An Ansible playbook to deploy our staging / production Grafana instances. It installs Grafana with HAProxy and uses a bash script to clone our dashboard repository to the Grafana provisioning folder. The bash script is also run with cron to keep the dashboards up-to-date..
To replace the Aquilon configuration...
- Clone this repository
git clone https://github.com/stfc/SCD-OpenStack-Utils
- Install ansible with pip (with a virtual environment)
sudo apt install python3-venv python3 -m venv ansible source ansible/bin/activate pip install ansible
- Make an IRIS IAM client with the redirect URI of:
https://<your-domain>:443/login/generic_oauth
- Fill in the staging or production inventory with the credentials
- (Optional): Change the
grafana
group inventory hosts to whatever IP they are running on - Copy your SSL certificate with name format
<your-domain>.crt
toroles/haproxy/files/
and make sure the key is prepended to the top. - Run the ansible playbook
ansible-playbook site.yaml --inventory staging/production
- If you need to make changes to either the Grafana or HAProxy config you can run each role separately with their tags
ansible-playbook site.yaml --inventory staging/production --tags grafana # or ansible-playbook site.yaml --inventory staging/production --tags haproxy