Skip to content
Permalink
Browse files

Refresh collectd for "train"

This commit does several things at once:

- Use ansible_distribution_major_version to detect which version of the
  EPEL repository. So we dont have to hard code the URL for either epel7
  or epel 8.
- Remove "stein" workaround for colelctd-openstack role. The "stein"
  workaround has been removed in favor of running the collectd daemon
  in a podman container.
- Drop opendaylight support for collectd since it is no longer
  suupported.
- Add the collectd playbook so we can run collectd in a centos 7
  container going forward for "train". This commit still needs
  to be tested on "stein" but it will probably work anyways.
- Add browbeat-containers to tox.ini for flake8
- Simplify detection of docker or podman for older versions of OSP.
(sai)
- Fixed typo from compute_compute to collectd_compute that caused failures on computes
- clear graphite_host in install/group_vars/all.yml
- Move container DockerFiles into brwobeat tree
- Conditionally copy required Dockerfiles to node instead of git clone
- Fix up some log file paths
- Use Docker/Podman depending on release
- Provide single interface(collectd.yml) which has container and baremetal playbooks
- Introduce variable collectd_container in install/group_vars/all
- remove unneeded selinux rebaelling (already running as priveleged) when running container
- remove unneed hostfs mount
- collectd container logs to file instead of STDOUT for easier debug
- add collectd-ping package to collectd-openstack Dockerfile
- Improve docs to reflect changes
- dynamically set rabbitmq and swift paths as well for tail plugin

Co-Authored-By: Sai Sindhur Malleni <smalleni@redhat.com>

Change-Id: I627a696f6f1240d96a0e1d85c26d59bbbfae2b1b
Signed-off-by: Charles Short <chucks@redhat.com>
Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
  • Loading branch information...
zulcss committed Oct 23, 2019
1 parent 0e1d5ba commit 2ba39b30abc17fec40e130f71f4f971158ae9645
Showing with 4,189 additions and 365 deletions.
  1. +4 −0 .gitignore
  2. +1 −1 ansible/README.rst
  3. +7 −7 ansible/install/{collectd-openstack.yml → collectd-baremetal.yml}
  4. +83 −0 ansible/install/collectd-container.yml
  5. +3 −3 ansible/install/collectd-generic.yml
  6. +9 −0 ansible/install/collectd.yml
  7. +5 −20 ansible/install/group_vars/all.yml
  8. +0 −19 ansible/install/group_vars/zuul_all.yml
  9. +0 −10 ansible/install/roles/collectd-openstack/defaults/main.yml
  10. +3 −78 ansible/install/roles/collectd-openstack/tasks/main.yml
  11. +2 −97 ansible/install/roles/collectd-openstack/templates/controller.collectd.conf.j2
  12. +105 −0 ansible/install/roles/collectd/tasks/main.yml
  13. +25 −0 ansible/install/roles/collectd/templates/00-browbeat_mod_status.conf.j2
  14. +73 −0 ansible/install/roles/collectd/templates/baremetal.collectd.conf.j2
  15. +195 −0 ansible/install/roles/collectd/templates/blockstorage.collectd.conf.j2
  16. +182 −0 ansible/install/roles/collectd/templates/cephstorage.collectd.conf.j2
  17. +222 −0 ansible/install/roles/collectd/templates/compute.collectd.conf.j2
  18. +598 −0 ansible/install/roles/collectd/templates/controller.collectd.conf.j2
  19. +73 −0 ansible/install/roles/collectd/templates/guest.collectd.conf.j2
  20. +295 −0 ansible/install/roles/collectd/templates/networker.collectd.conf.j2
  21. +245 −0 ansible/install/roles/collectd/templates/objectstorage.collectd.conf.j2
  22. +470 −0 ansible/install/roles/collectd/templates/undercloud.collectd.conf.j2
  23. +171 −0 ansible/install/roles/collectd/vars/13.yml
  24. +163 −0 ansible/install/roles/collectd/vars/16.yml
  25. +3 −3 ansible/install/roles/epel/defaults/main.yml
  26. +2 −2 ansible/install/roles/epel/tasks/main.yml
  27. +0 −4 ansible/install/roles/grafana-dashboards/templates/openstack_general_system_performance.yaml.j2
  28. +0 −41 ansible/install/roles/grafana-dashboards/templates/partials/opendaylight_metrics.yaml
  29. +12 −0 ansible/install/roles/osp_version/tasks/main.yml
  30. +1 −1 ansible/oooq/roles/collectd-undercloud/tasks/main.yml
  31. +1 −1 ansible/oooq/roles/collectd/tasks/main.yml
  32. +13 −0 browbeat-containers/collectd-baremetal/Dockerfile
  33. +13 −0 browbeat-containers/collectd-guest/Dockerfile
  34. +22 −0 browbeat-containers/collectd-openstack/Dockerfile
  35. +334 −0 browbeat-containers/collectd-openstack/files/collectd_ceph_storage.py
  36. +96 −0 browbeat-containers/collectd-openstack/files/collectd_gnocchi_status.py
  37. +403 −0 browbeat-containers/collectd-openstack/files/collectd_iostat_python.py
  38. +82 −0 browbeat-containers/collectd-openstack/files/collectd_ovsagent.py
  39. +147 −0 browbeat-containers/collectd-openstack/files/collectd_rabbitmq_monitoring.py
  40. +121 −0 browbeat-containers/collectd-openstack/files/collectd_swift_stat.py
  41. +4 −2 doc/source/installation.rst
  42. +0 −75 doc/source/usage.rst
  43. +1 −1 tox.ini
@@ -42,3 +42,7 @@ log/*

# Swap files
*.sw[po]

# Containers
browbeat-containers/collectd-openstack/config/*
ansible-errors.json
@@ -68,7 +68,7 @@ file to ensure the correct parameters are passed.

::

# ansible-playbook -i hosts install/collectd-openstack.yml
# ansible-playbook -i hosts install/collectd.yml

To install collectd on everything other than Openstack machines, view
the `README for collectd-generic <README.collectd-generic.md>`__.
@@ -22,7 +22,7 @@
config_type: undercloud
roles:
- { role: common, when: collectd_undercloud|bool }
- { role: epel, when: collectd_undercloud|bool and ansible_distribution_major_version == '7'}
- { role: epel, when: collectd_undercloud|bool }
- { role: repo }
- { role: collectd-openstack, when: collectd_undercloud|bool }
tasks:
@@ -41,7 +41,7 @@
roles:
- { role: osp_version }
- { role: common, when: collectd_controller|bool }
- { role: epel, when: collectd_controller|bool and ansible_distribution_major_version == '7'}
- { role: epel, when: collectd_controller|bool }
- { role: repo }
- { role: collectd-openstack, when: collectd_controller|bool }
tasks:
@@ -59,7 +59,7 @@
config_type: networker
roles:
- { role: common, when: collectd_networker|bool }
- { role: epel, when: collectd_networker|bool and ansible_distribution_major_version == '7'}
- { role: epel, when: collectd_networker|bool }
- { role: repo }
- { role: collectd-openstack, when: collectd_networker|bool }
tasks:
@@ -77,7 +77,7 @@
config_type: blockstorage
roles:
- { role: common, when: collectd_blockstorage|bool }
- { role: epel, when: collectd_blockstorage|bool and ansible_distribution_major_version == '7' }
- { role: epel, when: collectd_blockstorage|bool }
- { role: repo }
- { role: collectd-openstack, when: collectd_blockstorage|bool }
tasks:
@@ -95,7 +95,7 @@
config_type: objectstorage
roles:
- { role: common, when: collectd_objectstorage|bool }
- { role: epel, when: collectd_objectstorage and ansible_distribution_major_version == '7' }
- { role: epel, when: collectd_objectstorage|bool }
- { role: repo }
- { role: collectd-openstack, when: collectd_objectstorage|bool }
tasks:
@@ -113,7 +113,7 @@
config_type: cephstorage
roles:
- { role: common, when: collectd_cephstorage|bool }
- { role: epel, when: collectd_cephstorage|bool and ansible_distribution_major_version == '7'}
- { role: epel, when: collectd_cephstorage|bool }
- { role: repo }
- { role: collectd-openstack, when: collectd_cephstorage|bool }
tasks:
@@ -132,7 +132,7 @@
roles:
- { role: osp_version }
- { role: common, when: collectd_compute|bool }
- { role: epel, when: collectd_compute|bool and ansible_distribution_major_version == '7'}
- { role: epel, when: collectd_compute|bool }
- { role: repo }
- { role: collectd-openstack, when: collectd_compute|bool }
tasks:
@@ -0,0 +1,83 @@
---
#
# Generic Playbook to install collectd, use tags to separate machine type:
#
# Examples:
#
# ansible-playbook -i hosts install/collectd.yml --tags="undercloud"
# ansible-playbook -i hosts install/collectd.yml --tags="controller"
# ansible-playbook -i hosts install/collectd.yml --tags="compute"


- hosts: undercloud
remote_user: "{{ local_remote_user }}"
vars:
config_type: undercloud
roles:
- { role: osp_version }
- { role: common, when: collectd_undercloud|bool }
- { role: collectd, when: collectd_undercloud|bool }
tags: undercloud
environment: "{{proxy_env}}"

- hosts: controller
remote_user: "{{ host_remote_user }}"
vars:
config_type: controller
roles:
- { role: osp_version }
- { role: common, when: collectd_controller|bool }
- { role: collectd, when: collectd_controller|bool }
tags: controller

- hosts: compute
remote_user: "{{ host_remote_user }}"
vars:
config_type: compute
roles:
- { role: osp_version }
- { role: common, when: collectd_compute|bool }
- { role: collectd, when: collectd_compute|bool }
tags: compute

- hosts: networker
remote_user: "{{ host_remote_user }}"
vars:
config_type: networker
roles:
- { role: osp_version }
- { role: common, when: collectd_networker|bool }
- { role: collectd, when: collectd_networker|bool }
tags: networker

- hosts: blockstroage
remote_user: "{{ host_remote_user }}"
vars:
config_type: blockstorage
roles:
- { role: osp_version }
- { role: common, when: collectd_blockstoarge|bool }
- { role: collectd, when: collectd_blockstorage|bool }
tags: blockstorage

- hosts: objectstorage
remote_user: "{{ host_remote_user }}"
vars:
config_type: objectstorage
roles:
- { role: osp_version }
- { role: common, when: collectd_objectstorage|bool }
- { role: collectd, when: collectd_objectstorage|bool }
tags: objectstorage

- hosts: cephstorage
remote_user: "{{ host_remote_user }}"
vars:
config_type: cephstorage
roles:
- { role: osp_version }
- { role: common, when: collectd_cephstorage|bool }
- { role: collectd, when: collectd_cephstorage|bool }
tags: cephstorage


@@ -15,7 +15,7 @@
vars:
config_type: baremetal
roles:
- {role: epel, when: ansible_distribution_major_version == '7'}
- {role: epel }
- collectd-generic
tags: baremetal
environment: "{{proxy_env}}"
@@ -25,7 +25,7 @@
vars:
config_type: guest
roles:
- {role: epel, when: ansible_distribution_major_version == '7'}
- {role: epel }
- collectd-generic
tags: guest
environment: "{{proxy_env}}"
@@ -35,7 +35,7 @@
vars:
config_type: graphite
roles:
- {role: epel, when: ansible_distribution_major_version == '7'}
- {role: epel }
- collectd-generic
tags: graphite
environment: "{{proxy_env}}"
@@ -0,0 +1,9 @@
---
- name: Run containerized collectd (Stein and greater recommended)
import_playbook: collectd-container.yml
when: collectd_container

- name: Run collectd installed through RPMs
import_playbook: collectd-baremetal.yml
when: not collectd_container

@@ -129,10 +129,6 @@ proxy_env: {}
# Disables dns lookup by overcloud sshd process
disable_ssh_dns: false

# epel7 rpm for collectd packages
epel7_rpm: https://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
epel7_rpmkey: https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

# Extra Repos to add during collectd install
repos: {}
# repos:
@@ -142,6 +138,9 @@ repos: {}
########################################
# Collectd Configuration
########################################
# Install release specific templates
# Set collectd_container true for OSP >= 15
collectd_container: true
# Install collectd from EPEL
collectd_from_epel: true
# Interval in seconds
@@ -157,12 +156,7 @@ collectd_objectstorage: true
collectd_cephstorage: true
collectd_compute: false

#######################################
# OSP15 Collectd Configuration
######################################
rhos_release_rpm:
osp_release: 15

########################
# Opt-In Collectd plugins configuration:
########################
# Apache plugin
@@ -319,15 +313,6 @@ regex_info: false
ping_plugin: false
ping_interval: 1

############################
# OpenDaylight JAVA Plugin
###########################

# Plugin assumes that JAVA is already installed on the host
opendaylight_java_plugin: false
karaf_user: karaf
karaf_password: karaf

########################################
# Carbon/Graphite Configuration
########################################
@@ -337,7 +322,7 @@ graphite_host:
graphite_port: 80
carbon_cache_port: 2003
# Graphite prefix / Cloud name used both with graphite and grafana dashboards
graphite_prefix: openstack
graphite_prefix:
# Graphite username and password for login on the dashboard
# credential aren't created when you deploy graphite, use manage.py
graphite_username: root
@@ -124,10 +124,6 @@ proxy_env: {}
# Disables dns lookup by overcloud sshd process
disable_ssh_dns: false

# epel7 rpm for collectd packages
epel7_rpm: https://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
epel7_rpmkey: https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

# Extra Repos to add during collectd install
repos: {}
# repos:
@@ -152,12 +148,6 @@ collectd_objectstorage: true
collectd_cephstorage: true
collectd_compute: false

#######################################
# OSP15 Collectd Configuration
#######################################
rhos_release_rpm:
osp_release: 15

# Opt-In Collectd plugins configuration:
########################
# Apache plugin
@@ -314,15 +304,6 @@ regex_info: false
ping_plugin: false
ping_interval: 1

############################
# OpenDaylight JAVA Plugin
###########################

# Plugin assumes that JAVA is already installed on the host
opendaylight_java_plugin: false
karaf_user: karaf
karaf_password: karaf

########################################
# Carbon/Graphite Configuration
########################################
@@ -145,16 +145,6 @@ controller_monitored_ns:
swift_stat_controller_collectd_plugin: false
swift_stat_controller_collectd_interval: 10


############################
# OpenDaylight JAVA Plugin
###########################

# Plugin assumes that JAVA is already installed on the host
opendaylight_java_plugin: false
karaf_user: karaf
karaf_password: karaf

########################
# tail plugin
########################

0 comments on commit 2ba39b3

Please sign in to comment.
You can’t perform that action at this time.