Marcus Klein 78bb1459ea Fix Grafana deployment
Change-Id: I45c4f4f87a348d83d50952ab658058a1dc88ff08
2024-11-18 15:11:58 +01:00
..
2018-04-13 10:31:34 -05:00
2018-04-13 10:31:34 -05:00
2020-01-07 10:34:25 +00:00
2024-11-18 15:11:58 +01:00
2024-11-18 15:11:58 +01:00

Install Grafana

tags

openstack, ansible

About this repository

This set of playbooks will deploy Grafana. If this is being deployed as part of an OpenStack all of the inventory needs will be provided for.

These playbooks require Ansible 2.4+.

Optional | configure haproxy endpoints

Edit the /etc/openstack_deploy/user_variables.yml file and add fiel following lines

haproxy_extra_services:
  - service:
      haproxy_service_name: grafana
      haproxy_ssl: "{{ haproxy_ssl }}"
      haproxy_backend_nodes: "{{ groups['grafana'] | default([]) }}"
      haproxy_port: 3000  # This is set using the "grafana_port" variable
      haproxy_balance_type: http

Deployment Process

Clone the grafana-osa repo

cd /opt
git clone https://github.com/openstack/openstack-ansible-ops

Clone the grafana role

cd /opt/openstack-ansible-ops/grafana
ansible-galaxy install -r requirements.yml

Copy the env.d file into place

cd /opt/openstack-ansible-ops/grafana
cp env.d/grafana.yml /etc/openstack_deploy/env.d/

Copy the conf.d file into place

cp conf.d/grafana.yml /etc/openstack_deploy/conf.d/

Create the containers

cd /opt/openstack-ansible/playbooks
openstack-ansible lxc-containers-create.yml -e 'container_group=grafana'

install grafana

cd /opt/openstack-ansible-ops/grafana
ANSIBLE_INJECT_FACT_VARS=True openstack-ansible installGrafana.yml