Add support for OSP15/RHEL 8

Added support for OSP15/RHEL 8:

- Add variables for rhos_release_rpm and osp_release to allow the user
  install the rhosp15 brew repository on the overcloud. This is a
  temporary work around because there is no collectd plugins in the
  main rhosp repository yet and there is no EPEL8.
- Disable collectd_from_epel when you are running the ansible playbook
  on RHEL8.
- Install the normal collectd rpm packages on RHEL8, but also
  add collectd-disk and collectd-python because they do not get
  installed properly when a user is just installing collectd.
  Without these RPMs installed collectd will fail to install.
- Disable dont install ODL monitoring for RHEL8. This should be removed
  in a seperate commit.

Change-Id: Ie79e940516fb33e6b874f100013a25090fedbed2
Signed-off-by: Charles Short <chucks@redhat.com>
This commit is contained in:
Charles Short 2019-07-10 14:27:24 -04:00
parent 3d9478aef2
commit db0c4aed4e
3 changed files with 47 additions and 7 deletions

View File

@ -152,6 +152,12 @@ 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

View File

@ -152,6 +152,12 @@ 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

View File

@ -15,18 +15,25 @@
- collectd-ceph
- collectd-mysql
- collectd-turbostat
when: collectd_from_epel
when: collectd_from_epel and ansible_distribution_major_version < '8'
- name: Clean Non-EPEL collectd configuration
shell: "rm -rf /etc/collectd.d/*.conf"
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
# installed at this point in time.
#
- name: Install collectd rpms
- name: Install collectd rpms for centos
yum:
name: "{{ item }}"
state: present
@ -40,7 +47,27 @@
- collectd-mysql
- collectd-ping
- 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
# anymore but it is needed for collectd-java
@ -52,13 +79,14 @@
enabled: yes
become: true
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
rpm_key:
state: present
key: https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
become: true
when: ansible_distribution_major_version < '8'
# (sai) Separating out collectd java rpms as they have a lot of dependencies and
# are only required for ODL monitoring on controllers only
@ -71,14 +99,14 @@
- java-1.8.0-openjdk
- collectd-java
- 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
yum_repository:
name: CentOS-7-Base
state: absent
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
# handy to have sysstat.