Merge "Add support for OSP15/RHEL 8"

This commit is contained in:
Zuul 2019-07-25 14:23:32 +00:00 committed by Gerrit Code Review
commit c23d9730af
3 changed files with 47 additions and 7 deletions

View File

@ -152,6 +152,12 @@ collectd_objectstorage: true
collectd_cephstorage: true collectd_cephstorage: true
collectd_compute: false collectd_compute: false
#######################################
# OSP15 Collectd Configuration
######################################
rhos_release_rpm:
osp_release: 15
# Opt-In Collectd plugins configuration: # Opt-In Collectd plugins configuration:
######################## ########################
# Apache plugin # Apache plugin

View File

@ -152,6 +152,12 @@ collectd_objectstorage: true
collectd_cephstorage: true collectd_cephstorage: true
collectd_compute: false collectd_compute: false
#######################################
# OSP15 Collectd Configuration
#######################################
rhos_release_rpm:
osp_release: 15
# Opt-In Collectd plugins configuration: # Opt-In Collectd plugins configuration:
######################## ########################
# Apache plugin # Apache plugin

View File

@ -15,18 +15,25 @@
- collectd-ceph - collectd-ceph
- collectd-mysql - collectd-mysql
- collectd-turbostat - collectd-turbostat
when: collectd_from_epel when: collectd_from_epel and ansible_distribution_major_version < '8'
- name: Clean Non-EPEL collectd configuration - name: Clean Non-EPEL collectd configuration
shell: "rm -rf /etc/collectd.d/*.conf" shell: "rm -rf /etc/collectd.d/*.conf"
become: true become: true
when: collectd_from_epel when: collectd_from_epel and ansible_distribution_major_version < '8'
- name: Enable OSP repos for controller, compute
shell: |
dnf install -y {{ rhos_release_rpm }}
rhos-release {{ osp_release }}
when: "('controller' in group_names) or ('compute' in group_names) and ansible_distribution_major_version == '8'"
become: yes
# #
# (akrzos) yum module works at this point due to the fact the EPEL repo now exists. EPEL rpm is # (akrzos) yum module works at this point due to the fact the EPEL repo now exists. EPEL rpm is
# installed at this point in time. # installed at this point in time.
# #
- name: Install collectd rpms - name: Install collectd rpms for centos
yum: yum:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
@ -40,7 +47,27 @@
- collectd-mysql - collectd-mysql
- collectd-ping - collectd-ping
- collectd-turbostat - collectd-turbostat
when: collectd_from_epel when: collectd_from_epel and ansible_distribution_major_version < '8'
#
# (zul) Remove rhelosp15-0-brew when EPEL 8 exists
#
- name: Install collectd rpms for centos
dnf:
name: "{{ item }}"
state: present
enablerepo: "rhelosp-15.0-brew, rhelosp-15.0-trunk-brew"
become: true
with_items:
- collectd
- collectd-apache
- collectd-ceph
- collectd-mysql
- collectd-ping
- collectd-turbostat
- collectd-disk
- collectd-python
when: ansible_distribution_major_version == '8'
# (sai) Since we moved to containers we don't have java installed on the host # (sai) Since we moved to containers we don't have java installed on the host
# anymore but it is needed for collectd-java # anymore but it is needed for collectd-java
@ -52,13 +79,14 @@
enabled: yes enabled: yes
become: true become: true
register: repo_add register: repo_add
when: ('controller' in group_names and opendaylight_java_plugin) when: ('controller' in group_names and opendaylight_java_plugin and ansible_distribution_major_version < '8')
- name: Add key - name: Add key
rpm_key: rpm_key:
state: present state: present
key: https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7 key: https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
become: true become: true
when: ansible_distribution_major_version < '8'
# (sai) Separating out collectd java rpms as they have a lot of dependencies and # (sai) Separating out collectd java rpms as they have a lot of dependencies and
# are only required for ODL monitoring on controllers only # are only required for ODL monitoring on controllers only
@ -71,14 +99,14 @@
- java-1.8.0-openjdk - java-1.8.0-openjdk
- collectd-java - collectd-java
- collectd-generic-jmx - collectd-generic-jmx
when: (repo_add is success and 'controller' in group_names and opendaylight_java_plugin) when: (repo_add is success and 'controller' in group_names and opendaylight_java_plugin and ansible_distribution_major_version < '8')
- name: Remove repository - name: Remove repository
yum_repository: yum_repository:
name: CentOS-7-Base name: CentOS-7-Base
state: absent state: absent
become: true become: true
when: (repo_add is success and 'controller' in group_names and opendaylight_java_plugin) when: (repo_add is success and 'controller' in group_names and opendaylight_java_plugin and ansible_distribution_major_version < '8')
# Iostat plugin requires sysstat since shelling iostat for stats, Also it is # Iostat plugin requires sysstat since shelling iostat for stats, Also it is
# handy to have sysstat. # handy to have sysstat.