This solution allows to prepare test workload within environment and monitor instances availability during scheduled operations such as ceph or contrail upgrades.
By default ansible playbook creates one basic monitor VM that has prometheus, alertmanager and alerta as docker compose services at the top of itself. In addition it generates dedicated count of dummy VMs with prometheus exporter that used as monitoring goals to check the instances availability.
$ git clone https://github.com/msenin94/openstack-workload-monitoring
$ cd openstack-workload-monitoring
$ virtualenv .venv
$ .venv/bin/activate
$ pip install -r requirements.txt
You need to fill up and put clouds.yaml
file to root project folder. Content example:
clouds:
devstack:
auth:
auth_url: http://192.168.122.10:35357/
project_name: demo
username: demo
password: 0penstack
region_name: RegionOne
ds-admin:
auth:
auth_url: http://192.168.122.10:35357/
project_name: admin
username: admin
password: 0penstack
region_name: RegionOne
infra:
cloud: rackspace
auth:
project_id: 275610
username: openstack
password: xyzpdq!lazydog
region_name: DFW,ORD,IAD
interface: internal
More information about clouds.yaml
you may find in the official documentation.
TBD, count all openstack resources needed for playbook start
From root project folder execute:
$ ansible-playbook -i hosts --private-key=<path-to-mon.pem> main.yaml
- Check ansible proxy
- Create and attach volumes for each service (for datastore)
- Optimise roles
- Add openstack resources creation - project, private key, security group, network, etc.
- Add template for cloudinit
- Make tasks async
- Add new alert rule - ping / curl destination from external network and fire alert once external network is unavailable
- Add dockerfile
- Add kitchen: ansible-playbook --syntax-check