Skip to content

Latest commit

 

History

History

grafana_monitoring

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Ansible Deployment of Cloud Grafana

What?

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..

Why?

To replace the Aquilon configuration...

How?

Note: You will need to have a floating IP with DNS and ports 80, 443 open. You must set up a load balancer and add the VM as a member to both pools beforehand.

  1. Clone this repository
    git clone https://github.com/stfc/SCD-OpenStack-Utils
  2. Install ansible with pip (with a virtual environment)
    sudo apt install python3-venv
    python3 -m venv ansible
    source ansible/bin/activate
    pip install ansible
  3. By default, the hosts file includes both the dev and prod grafana instance domains. If you want to run the playbook on only one of these instances you need to uncomment the corresponding host in the inventory.
    # Contents of: ./hosts.ini
    [grafana]
    # grafana.nubes.rl.ac.uk
    # dev-grafana.nubes.rl.ac.uk
  4. Run the ansible playbook
    ansible-playbook site.yaml --inventory hosts.ini --ask-vault-pass
  5. If you need to make changes to any of the services' config you can run each role separately with their tags
    ansible-playbook site.yaml --inventory hosts.ini --ask-vault-pass --tags <grafana | haproxy | certbot>