This document describes how to modify a TripleO Queens OpenStack with Ceph Luminous Deployment to include Ceph Metrics.
TripleO's composable networks feature is used to deploy an overcloud with a dedicated CephMetrics network which is used by all Ceph nodes to share metrics data. Firewall ports are opened on all hosts with Ceph services for the Prometheus exporter. After the overcloud is deployed the overcloud admin configures the CephMetrics network as a provider network and creates a separate cephmetrics project with access to the provider network. Heat templates are provided to launch an instance within the cephmetrics project and tools are provided to install ceph metrics with Ansible on the instance. An example of accessing the ceph metrics GUI via a floating IP is provided though it is at the discretion of the deployer how the ceph metrics GUI is accessed.
There is a TripleO Heat Templates directory, tht, which contains the following templates.
- cephmetrics.yaml opens the firewall ports
- network_data_ceph_metrics.yaml replaces the standard /usr/share/openstack-tripleo-heat-templates/network_data.yaml by adding a new CephMetrics network
- roles_data_ceph_metrics.yaml replaces the standard /usr/share/openstack-tripleo-heat-templates/roles_data.yaml by redefining the Controller and CephStorage roles to include the CephMetrics network
As the stack user on the undercloud, save a copy of the tht directory in /home/stack/tht with the above contents. As the same user, create a ~/templates directory and render ~/templates/environments/network-environment.yaml with the following:
cp -r /usr/share/openstack-tripleo-heat-templates ~/templates
python ~/templates/tools/process-templates.py -n ~/tht/network_data_ceph_metrics.yaml -r ~/tht/roles_data_ceph_metrics.yaml -p ~/templates
Be sure to review the rendered ~/templates/environments/network-environment.yaml before deploying to ensure that the ControlPlaneDefaultRoute and DnsServers match the environment of your undercloud. E.g. if your undercloud is using 192.168.24.1 for the default route but the rendered ControlPlaneDefaultRoute isn't, then you may need to modify it (sed -i s/192.168.24.254/192.168.24.1/g ~/templates/environments/network-environment.yaml
).
Deploy the overcloud with ceph as usual but include the templates above; overcloud-deploy.sh is provided as an example.
In the first phase of this guide we will create a project in the overcloud called cephmetrics. Within the cephmetrics project we will create the following OpenStack resources:
- Neutron networks which can access the Ceph servers
- A Cinder volume to persist an instance based on a RHEL cloud image
- An instance based on the Cinder volume to host the dashboard
The above may be completed with the following steps:
- Access the undercloud
- Ensure that ~/overcloudrc is present
- If you haven't already, create an image in your overcloud using a RHEL KVM image such as the RHEL 7.5 image found here using a command similar to
openstack image create "rhel_7" --file ./rhel_7.img --disk-format qcow2 --container-format bare --public
- Inside the
instance
directory, runcp example.conf cephmetrics.conf
- Edit cephmetrics.conf and make any changes you require, such as the name of the image
- Run
./create.sh cephmetrics.conf
- After waiting for the instance to boot completely, SSH into it and register it using subscription-manager
- On the instance, enable the necessary repos with
subscription-manager repos --enable=rhel-7-server-rhceph-3-tools-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-rpms
In the second phase of this guide we will execute the cephmetrics Ansible playbook to install Cephmetrics in the instance created in the previous phase.
- Access the undercloud
tripleo-ansible-inventory --static-yaml-inventory ooo-inventory.yaml
./convert_inventory.py -a instance/cephmetrics.conf ooo-inventory.yaml > inventory.yaml
- If you need to override any Ansible variables for the deploy, you may edit inventory.yaml and insert them into the 'vars' object inside the 'all' group.
cd /path/to/cephmetrics/ansible
ansible-playbook -v -i /path/to/inventory/ playbook.yml
cd /path/to/cephmetrics/ansible
ansible-playbook -v -i /path/to/inventory purge.yml
- Using the instance configuration you created previously, run
delete.sh
- Delete the cephmetrics project from the overcloud as described in the documentation.