Customizing Cloudbreak Profile file
Cloudbreak deployer configuration is based on environment variables.
During startup, Cloudbreak deployer tries to determine the underlying infrastructure and then sets required environment variables with appropriate default values. If these environment variables are not sufficient for your use case, you can set additional environment variables in your
Set Profile variables
To set environment variables relevant for Cloudbreak Deployer, add them to a file called
Profile located in the Cloudbreak deployment directory (typically
Profile file is sourced, so you can use the usual syntax to set configuration values:
export MY_VAR=some_value export MY_OTHER_VAR=another_value
After changing a property, you must regenerate the config file and restart the application by using
Check available Profile variables
To see all available environment variables with their default values, use:
cbd env show
Create environment-specific Profile files
If you would like to use a different versions of Cloudbreak for prod and qa profile, you must create two environment specific configurations that can be sourced. For example:
For example, to create and use a prod profile, you need to:
- Create a file called
- Write the environment-specific
Profile.prodto specify Docker image.
- Set the environment variable:
To use the prod specific profile once, set:
CBD_DEFAULT_PROFILE=prod cbd some_commands
To permanently use the prod profile, set
export CBD_DEFAULT_PROFILE=prod in your
Secure the Profile file
Before starting Cloudbreak for the first time, configure the Profile file as directed below. Changes are applied during startup so a restart (
cbd restart) is required after each change.
Execute the following command in the directory where you want to store Cloudbreak-related files:
echo export PUBLIC_IP=[the ip or hostname to bind] > Profile
After you have a base Profile file, add the following custom properties to it:
export UAA_DEFAULT_SECRET='[custom secret]' export UAA_DEFAULT_USER_EMAIL='[default admin email address]' export UAA_DEFAULT_USER_PW='[default admin password]' export UAA_DEFAULT_USER_FIRSTNAME='[default admin first name]' export UAA_DEFAULT_USER_LASTNAME='[default admin last name]'
Cloudbreak has additional secrets which by default inherit their values from
UAA_DEFAULT_SECRET. Instead of using the default, you can define different values in the Profile for each of these service clients:
export UAA_CLOUDBREAK_SECRET='[cloudbreak secret]' export UAA_PERISCOPE_SECRET='[auto scaling secret]' export UAA_ULUWATU_SECRET='[web ui secret]' export UAA_SULTANS_SECRET='[authenticator secret]'
You can change these secrets at any time, except
UAA_CLOUDBREAK_SECRETwhich is used to encrypt sensitive information at database level.
UAA_DEFAULT_USER_PWis stored in plain text format, but if
UAA_DEFAULT_USER_PWis missing from the Profile, it gets a default value. Because default password is not an option, if you set an empty password explicitly in the Profile Cloudbreak deployer will ask for password all the time when it is needed for the operation.
In this case, Cloudbreak deployer wouldn't be able to add the default user, so you have to do it manually by executing the following command:
cbd util add-default-user
For more information about setting environment variables in Profile, refer to Set Profile variables.
Cloudbreak uses Consul for DNS resolution. All Cloudbreak related services are registered as someservice.service.consul.
Consul’s built-in DNS server is able to fallback on another DNS server. This option is called
-recursor. Cloudbreak deployer first tries to discover the DNS settings of the host by looking for nameserver entry in the
/etc/resolv.conf file. If it finds one, consul will use it as a recursor. Otherwise, it will use
For a full list of available consul config options, refer to Consul documentation.
To pass any additional Consul configuration, define the
DOCKER_CONSUL_OPTIONS variable in the Profile file.