The installation of the database nodes is done through two Ansible scripts. The master database is installed through install-postgres-core.yml and the slave databases through install-postgres-slave.yml. They both share the same Jinja template (gitlab.rb.postgres.j2); however, inside the template, there are some conditionals where values are replaced based on whether a host is a database master or slave:
- Script: install-postgres-core.yml and install-postgres-slaves.yml
- Jinja template: gitlab.rb.postgres.j2
- Run the following commands:
- For master databases: ansible-playbook -i /usr/local/bin/terraform.py deploy/install-postgres-core.yml
- For slave databases: ansible-playbook -i /usr/local/bin/terraform.py deploy/install-postgres-slaves.yml