Hi,
A few questions about DO288- Lab:Deploying Simple Applications
I created DB in web console, however, when I created the nodejs application, how can I find out the missing environment variable is called DB_PASSWORD ?
Which steps and cmds I need to run in order to find it?
Why do no other environment variables are needed in this case? Like DB_USERNAME and DB_NAME?
What will be the solution in this case by using "oc set env"?
Thanks.
Parameter Value
| Database Service Name | postgresql |
| PostgreSQL Connection Username | developer |
| PostgreSQL Connection Password | test |
| PostgreSQL Database Name | todo_list |
| Application Name | todo-list |
| Application Image | registry.ocp4.example.com:8443/redhattraining/openshift-dev-deploy-review-todo-list |
@jazz-nz you can check env variables using oc describe deployment command. You might find it in oc logs if you did not set those env variables.
Since this exercise uses templates , it must have created those variables using the data in the table provided.
This error : Error: could not connect to the database:error: password authentication failed for user "developer" suggests that the password env variable was not correctly set.
you can use oc set env deployment and then oc rollout to set that env variable.
Hi Chetan,
When todo-list pod failed at the begining, I used "oc describe deploy todo-list" to check, since no env was setting, so ENV only showed <none>.
If I run "oc describe po postgresql-1-xxxx" and I could see the below env:
However, both can not help me to figure out why DB_PASSWORD is the right env's name I need to set to fix the password issue, why not be POSGRESQL_PASSWORD?
Can you explain step by step?
Thanks.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.