-
Notifications
You must be signed in to change notification settings - Fork 0
Set up a Production DB
When you first deploy the Helm chart, Helpy will work immediately, using a Postgres database which is hosted within the cluster. This has the benefit of zero-configuration, but is not ideal for most production work. Setting up a separate Postgres instance using a DBAAS such as Amazon RDS or DigitalOcean Managed Postgres is recommended.
Helpy currently works best with version 10 of Postgresql.
Once you have created this remote database service, you can configure Helpy Pro to use it as described below:
In order to connect the cluster to the new DB, you will need to provide the database connection values to the values.yaml file. If you have not already, this is a good time to make a copy of this file which you will use to customize your cluster.
Once you have your copied file, disable the internal database by setting enabled
to false
:
postgres:
enabled: false # true recommended for testing only
Next, add the database connection information in the Postgresql section:
# If you are using a DBAAS, provide connection details here
host: db.host.com
port: port_value
db: 'helpy_production'
user: 'helpy_admin'
password: 'secure_password'
WARNING: WHEN YOU DO THIS, ALL DATA STORED ON THE INTERNAL CLUSTER DATABASE WILL BE LOST PERMANENTLY
When you are ready, upgrade the cluster with the new settings. Note, your containers will not run after you upgrade, because you still need to set up the new database.
helm upgrade helpy helpyio/helpy -n helpy -f path/to/your.values.yaml
We will now set up the new database using a utility job that migrates and seeds the database:
kubectl apply -f https://raw.githubusercontent.com/scott/helpy-helm/master/charts/helpy/utilities/setup-db.yml -n helpy