This article talks about moving database password from customer_settings.py to an environment variable
This article assumes that the CloudBolt database lives in an external server and the database connection was overridden at customer_settings.py at /var/opt/cloudbolt/proserv directory.
Step 1 Define an env variable
Follow the steps mentioned at https://ultimatedjango.com/learn-django/lessons/handling-sensitive-keys/
Step 2 Modify JobEngine config file to respect the env variable
SSH to the CB box
Go to /etc/supervisord.d
Run vi jobengine.conf and add the DB password at the end of the env variable like this
Restart the JE and supervisord daemon by running service supervisord restart
In this example,
CB_DBA_MYSQL_PASSWORD is the env variable defined at Step 1.
Step 3 Test the configuration
Run a job and make sure the job is picked up by the jobengine.