Move collectd into the main Ansible run for CI
This commit allows CI to run the collectd-openstack role directly to do this I take the relevent variables from the group_vars/all.yml and duplicate them in to the defaults. If you're not making mix and match playbooks with browbeat roles and run the playbooks 'normally' these defaults will never affect you in any way and will be overridden by the group_vars/all.yml file without any interaction from you. If on the other hand you want a playbook where you can toss collectd install whereever you need it, this makes life much easier. Also note that the trick I'm using to get the name of the executing hosts first group could be used to make the collectd-openstack playbook run in parallel across all hosts all at once rather than one group at a time. As one final tweak this adds 10 minutesof retires to the epel install role, specifically because two of it's tasks rely on external internet access and fail often enough to cause trouble. Previously I would retry the whole CollectD playbook when that happened, this is more efficient Change-Id: Ia67ab2b4152a8d8e9f3ba1dabe1f4417d7b86233
This commit is contained in:
parent
3bdb101123
commit
c11374cca1
73
ansible/install/roles/collectd-openstack/defaults/main.yml
Normal file
73
ansible/install/roles/collectd-openstack/defaults/main.yml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
########################################
|
||||||
|
# Collectd Configuration
|
||||||
|
########################################
|
||||||
|
# Install collectd from EPEL
|
||||||
|
collectd_from_epel: true
|
||||||
|
# Interval in seconds
|
||||||
|
collectd_interval: 10
|
||||||
|
# Run collectd on specific openstack nodes:
|
||||||
|
collectd_undercloud: true
|
||||||
|
collectd_controller: true
|
||||||
|
collectd_blockstorage: true
|
||||||
|
collectd_objectstorage: true
|
||||||
|
collectd_cephstorage: true
|
||||||
|
collectd_compute: false
|
||||||
|
|
||||||
|
# Collect plugins configuration:
|
||||||
|
########################
|
||||||
|
# Apache plugin
|
||||||
|
########################
|
||||||
|
# Undercloud
|
||||||
|
apache_undercloud_collectd_plugin: false
|
||||||
|
apache_undercloud_mod_status_port: 5001
|
||||||
|
# Overcloud Controller
|
||||||
|
apache_controller_collectd_plugin: false
|
||||||
|
apache_controller_mod_status_port: 5001
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Ceph plugin
|
||||||
|
########################
|
||||||
|
# Overcloud Controller
|
||||||
|
ceph_controller_collectd_plugin: false
|
||||||
|
ceph_storage_collectd_plugin: false
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Gnocchi backlog plugin
|
||||||
|
########################
|
||||||
|
# This should only be enabled on a single controller when monitoring Gnocchi for
|
||||||
|
# performance/scale. This plugin does create a token each interval and adds load
|
||||||
|
# to Gnocchi-api each time it polls for measurements and thus your cloud will pay
|
||||||
|
# a monitoring "tax" by enabling this plugin.
|
||||||
|
gnocchi_status_python_plugin: false
|
||||||
|
gnocchi_status_interval: 30
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Keystone token count via dbi plugin
|
||||||
|
########################
|
||||||
|
keystone_undercloud_collectd_plugin: false
|
||||||
|
keystone_overcloud_collectd_plugin: false
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Rabbitmq plugin
|
||||||
|
########################
|
||||||
|
rabbitmq_undercloud_collectd_plugin: false
|
||||||
|
rabbitmq_undercloud_collectd_interval: 10
|
||||||
|
rabbitmq_controller_collectd_plugin: false
|
||||||
|
rabbitmq_controller_collectd_interval: 10
|
||||||
|
|
||||||
|
# Queues to monitor message count on Undercloud
|
||||||
|
undercloud_monitored_queues:
|
||||||
|
- "metering.sample"
|
||||||
|
- "event.sample"
|
||||||
|
|
||||||
|
# Queues to monitor message count on Controllers
|
||||||
|
controller_monitored_queues:
|
||||||
|
- "metering.sample"
|
||||||
|
- "event.sample"
|
||||||
|
|
||||||
|
########################
|
||||||
|
# tail plugin
|
||||||
|
########################
|
||||||
|
# Determines if WARN/INFO messages are also counted
|
||||||
|
regex_warn: false
|
||||||
|
regex_info: false
|
2
ansible/install/roles/epel/defaults/main.yml
Normal file
2
ansible/install/roles/epel/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# epel7 rpm for collectd packages
|
||||||
|
epel7_rpm: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
@ -7,12 +7,23 @@
|
|||||||
yum: name=epel-release state=absent
|
yum: name=epel-release state=absent
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
# The fedoraproject CDN has problems somtimes, this will keep trying
|
||||||
|
# for up to 10 minutes before failing.
|
||||||
- name: Import EPEL GPG Key
|
- name: Import EPEL GPG Key
|
||||||
rpm_key: key=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
|
rpm_key: key=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
|
||||||
state=present
|
state=present
|
||||||
become: true
|
become: true
|
||||||
|
register: import_result
|
||||||
|
until: import_result|success
|
||||||
|
retries: 10
|
||||||
|
delay: 60
|
||||||
|
|
||||||
|
# Same as above but with the Centos CDN
|
||||||
- name: Check for EPEL repo
|
- name: Check for EPEL repo
|
||||||
yum: "name={{ epel7_rpm }} state=present"
|
yum: "name={{ epel7_rpm }} state=present"
|
||||||
become: true
|
become: true
|
||||||
|
register: install_result
|
||||||
|
until: install_result|success
|
||||||
|
retries: 10
|
||||||
|
delay: 60
|
||||||
notify: remove_epel
|
notify: remove_epel
|
||||||
|
@ -6,7 +6,15 @@
|
|||||||
roles:
|
roles:
|
||||||
- browbeat/pre-install-setup
|
- browbeat/pre-install-setup
|
||||||
- browbeat/oooq-metadata
|
- browbeat/oooq-metadata
|
||||||
- browbeat/collectd-undercloud
|
|
||||||
|
- name: Setup Undercloud CollectD
|
||||||
|
hosts: undercloud
|
||||||
|
vars:
|
||||||
|
config_type: "{{group_names[0]}}"
|
||||||
|
roles:
|
||||||
|
- browbeat/common
|
||||||
|
- browbeat/epel
|
||||||
|
- browbeat/collectd-openstack
|
||||||
|
|
||||||
- include: baremetal-quickstart-extras.yml
|
- include: baremetal-quickstart-extras.yml
|
||||||
|
|
||||||
@ -29,10 +37,21 @@
|
|||||||
roles:
|
roles:
|
||||||
- browbeat/no-sshd-dns
|
- browbeat/no-sshd-dns
|
||||||
|
|
||||||
|
- name: Setup Overcloud CollectD
|
||||||
|
hosts: overcloud
|
||||||
|
vars:
|
||||||
|
config_type: "{{group_names[0]}}"
|
||||||
|
graphite_host: "{{graphite_host_template}}"
|
||||||
|
graphite_password: "{{graphite_password_template}}"
|
||||||
|
graphite_prefix: "{{graphite_prefix_template}}"
|
||||||
|
roles:
|
||||||
|
- browbeat/common
|
||||||
|
- browbeat/epel
|
||||||
|
- browbeat/collectd-openstack
|
||||||
|
|
||||||
- name: Run Browbeat
|
- name: Run Browbeat
|
||||||
hosts: undercloud
|
hosts: undercloud
|
||||||
roles:
|
roles:
|
||||||
- browbeat/collectd
|
|
||||||
- browbeat/bug-check
|
- browbeat/bug-check
|
||||||
- browbeat/grafana-dashboard-setup
|
- browbeat/grafana-dashboard-setup
|
||||||
- browbeat/browbeat-run
|
- browbeat/browbeat-run
|
||||||
|
@ -26,15 +26,15 @@ export PLAYBOOK=baremetal-virt-undercloud-tripleo-browbeat.yml
|
|||||||
export VARS="elastic_enabled_template=true \
|
export VARS="elastic_enabled_template=true \
|
||||||
--extra-vars grafana_enabled_template=false \
|
--extra-vars grafana_enabled_template=false \
|
||||||
--extra-vars elastic_host_template=$ELASTIC_HOST \
|
--extra-vars elastic_host_template=$ELASTIC_HOST \
|
||||||
--extra-vars graphite_host_template=$GRAPH_HOST \
|
--extra-vars graphite_host=$GRAPH_HOST \
|
||||||
--extra-vars statsd_host=$GRAPH_HOST \
|
--extra-vars statsd_host=$GRAPH_HOST \
|
||||||
--extra-vars statsd_enabled=True \
|
--extra-vars statsd_enabled=True \
|
||||||
--extra-vars grafana_host_template=$GRAPH_HOST \
|
--extra-vars grafana_host=$GRAPH_HOST \
|
||||||
--extra-vars grafana_username_template=$GRAFANA_USER \
|
--extra-vars grafana_username=$GRAFANA_USER \
|
||||||
--extra-vars grafana_password_template=$GRAFANA_PASS \
|
--extra-vars grafana_password=$GRAFANA_PASS \
|
||||||
--extra-vars browbeat_cloud_name=$CLOUD_NAME \
|
--extra-vars browbeat_cloud_name=$CLOUD_NAME \
|
||||||
--extra-vars browbeat_config_file=$BENCHMARK \
|
--extra-vars browbeat_config_file=$BENCHMARK \
|
||||||
--extra-vars graphite_prefix_template=$CLOUD_NAME"
|
--extra-vars graphite_prefix=$CLOUD_NAME"
|
||||||
|
|
||||||
#For Pipeline builds we need to get the pipeline image
|
#For Pipeline builds we need to get the pipeline image
|
||||||
#we check that the pipeline image var is set and then
|
#we check that the pipeline image var is set and then
|
||||||
|
Loading…
Reference in New Issue
Block a user