Configure external Cloudbreak database
Perform these steps to configure Cloudbreak with an existing external database, other than the embedded PostgreSQL database instance that Cloudbreak uses by default.
- On your Cloudbreak host machine, set the following environment
variables according to the settings of your external
export DATABASE_HOST=my.database.host export DATABASE_PORT=5432 export DATABASE_USERNAME=admin export DATABASE_PASSWORD=Admin123!
- On your external database, create three databases:
cbdb, uaadb, periscopedb. You can create these databases using the
createdbutility with the following commands:
createdb -h $DATABASE_HOST -p $DATABASE_PORT -U $DATABASE_USERNAME cbdb createdb -h $DATABASE_HOST -p $DATABASE_PORT -U $DATABASE_USERNAME uaadb createdb -h $DATABASE_HOST -p $DATABASE_PORT -U $DATABASE_USERNAME periscopedb
- Set the following variables in your Cloudbreak Profile file.
Modify the database parameters according to your external
export DATABASE_HOST=my.database.host export DATABASE_PORT=5432 export DATABASE_USERNAME=admin export DATABASE_PASSWORD=Admin123! export CB_DB_PORT_5432_TCP_ADDR=$DATABASE_HOST export CB_DB_PORT_5432_TCP_PORT=$DATABASE_PORT export CB_DB_ENV_USER=$DATABASE_USERNAME export CB_DB_ENV_PASS=$DATABASE_PASSWORD export CB_DB_ENV_DB=cbdb export PERISCOPE_DB_PORT_5432_TCP_ADDR=$DATABASE_HOST export PERISCOPE_DB_PORT_5432_TCP_PORT=$DATABASE_PORT export PERISCOPE_DB_ENV_USER=$DATABASE_USERNAME export PERISCOPE_DB_ENV_PASS=$DATABASE_PASSWORD export PERISCOPE_DB_ENV_DB=periscopedb export PERISCOPE_DB_ENV_SCHEMA=public export IDENTITY_DB_URL=$DATABASE_HOST:$DATABASE_PORT export IDENTITY_DB_USER=$DATABASE_USERNAME export IDENTITY_DB_PASS=$DATABASE_PASSWORD export IDENTITY_DB_NAME=uaadb
- Restart Cloudbreak application by using the
After performing these steps, your external database will be used for Cloudbreak instead of the built-in database.
If your external database uses SSL, you must also perform the steps described in Configure an SSL certificate for an external Cloudbreak database.
If you would like to migrate your existing data (such as blueprints, recipes, and so on) from the embedded database to the external one, then after completing these steps, you should also create a backup of your original database and then restore it in the external database.