-
Story
-
Resolution: Not Done
-
Medium
-
Frankfurt Release
-
None
-
None
Currently dcaemod-onboarding-api expects an environment variable called "PG_CONN" to be set with a full postgres URL including the user name, password, host, port, and path. The value of PG_CONN looks like this:
postgresql://postgres:root_password@_postgres_host:_5432/dcae_onboarding_db
Having a single environment variable with an embedded password is not consistent with the direction ONAP is taking with passwords. The ONAP direction will provide the password, by itself, in an environment variable.
The minimum change we need would be to introduce 2 environment variables:
PG_PASSWORD
PG_HOST
If we wanted to be more complete, we could also add
PG_USER (maybe it's not always "postgres"
PG_PORT (maybe it's not always 5432, though in a k8s environment, I don't why it would be different)
PG_PATH
The change needs to be made in the startup script for the onboarding-api container, dcaegen2/platform/mod/onboardingapi/start.sh.
Instead of checking for the existence of PG_CONN, it would check for the existence of the variables above.
In order to avoid changing the code for the onboarding API, the startup script would create the variable PG_CONN.
If we do the minimal change, we would set PG_CONN this way:
export PG_CONN=postgresql://postgres:${PG_PASSWORD)@${PG_HOST}:5432/dcae_onboarding_db
Then do the dcae-cli launch as before.
(TEST BEFORE USING!)
(Do we need lines 9-13 of the current start.sh? Should we be supplying the config file?)
- is blocked by
-
OOM-2317 Generated passwords may be incompatible with common postgres container
- Closed