servicecatalog / oscm-dockerbuild

OSCM docker build files.
Apache License 2.0
3 stars 10 forks source link

DB_SUPERPWD and DB_PWD_CORE environment variables are blank #352

Closed IvanDrag0 closed 2 years ago

IvanDrag0 commented 2 years ago

Version Info v19.1_20211210

Describe the bug DB_SUPERPWD and DB_PWD_CORE environment variables in all the init containers are blank. As a result, the Postgres login commands hang on "Database not ready - waiting..." (since the command is waiting for the password in the background.

How to Reproduce Steps to reproduce the behavior:

  1. Follow the steps under the Setup section in this repo.
  2. The process will stop and hang once the oscm-initdb-core container launchers with a log entry repeatedly showing "Database not ready - waiting..."

Observed behavior After following the steps under the Setup section in this repo, the deployment process stops and hangs once the oscm-initdb-core container launchers with a log entry repeatedly showing "Database not ready - waiting..."

Expected behavior The deployment process continues as expected and initiates all databases.

GoebelL commented 2 years ago

Hi @IvanDrag0

there are a few values that need to be set in var.env when installing from scratch according documentation. At minimum the initial database credentials are needed, as for example shown below. Use your own values here.

# Database password for the application core database
DB_PWD_CORE=mysecret
# Database password for the Asynchronous Provisioning Platform (APP) database
DB_PWD_APP=mysecret
# Database superuser (postgres) password
DB_SUPERPWD=mysecret

Afterwards stop any running OSCM container, if exist (e.g. docker-compose -f docker-compose-oscm.yml down in /docker) and re-run the oscm-deployer as described in the readme.

docker run --name deployer2 --rm -v /docker:/target -v /var/run/docker.sock:/var/run/docker.sock -e INITDB=true -e PROXY=true -e STARTUP=true servicecatalog/oscm-deployer
IvanDrag0 commented 2 years ago

Hi @GoebelL,

Thank you for the help! When I saw that the variables are set in the var.env file I assume that they're getting their values from somewhere else.

#####################
# Database settings #
#####################
# The ports of the PostgreSQL databases
# Please set to 5432
DB_PORT_CORE=5432
DB_PORT_JMS=5432
DB_PORT_APP=5432
# Database password for the application core database
DB_PWD_CORE=${DB_PWD_CORE}
# Database password for the Asynchronous Provisioning Platform (APP) database
DB_PWD_APP=${DB_PWD_APP}
# Database superuser (postgres) password
DB_SUPERPWD=${DB_SUPERPWD}