Install sensu from centos-opstools

This should help improve stability overall, in exchange for slightly
older package version.

Cap all the sensu plugins to their known major version that works with
the ruby interpreter shipped with the current version of
rhel/centos/oraclelinux -- currently ruby 2.0. All sensu plugins use
semantic versioning so we're assured they don't introduce breaking
changes in the capped major version.

Change-Id: Ic5ca679c40da3e466433b0e04f762d2bbffbf156
Closes-Bug: #1774123
This commit is contained in:
Martin André 2018-05-30 13:32:01 +02:00
parent a126aca298
commit 76a965ad80
5 changed files with 34 additions and 35 deletions

View File

@ -76,7 +76,6 @@ RUN echo {{ centos_contentdir }} >> /etc/yum/vars/contentdir
'kibana.yum.repo',
'nfs_ganesha.repo',
'opendaylight.repo',
'sensu.repo',
'td.repo'
] %}

View File

@ -1,6 +0,0 @@
[sensu]
name=sensu
baseurl=https://sensu.global.ssl.fastly.net/yum/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://sensu.global.ssl.fastly.net/yum/pubkey.gpg

View File

@ -46,34 +46,38 @@ RUN echo '{{ image_name }} not yet available for {{ base_distro }}' \
{% block sensu_clients_install %}
# Sensu plugins are all using semantic versioning.
# Let's cap them to the known major version that works with the ruby shipped on
# rhel/centos/oraclelinux (currently 2.0)
{% set sensu_plugins = [
'ceph',
'cpu-checks',
'disk-checks',
'dns',
'docker',
'elasticsearch',
'filesystem-checks',
'haproxy',
'http',
'io-checks',
'load-checks',
'memcached',
'memory-checks',
'mongodb',
'mysql',
'network-checks',
'ntp',
'openstack',
'process-checks',
'rabbitmq',
'redis',
'uptime-checks',
'vmstats'
'ceph:"~>1"',
'cpu-checks:"~>1"',
'disk-checks:"~>2"',
'dns:"~>1"',
'docker:"~>3"',
'elasticsearch:"~>1"',
'filesystem-checks:"~>1"',
'haproxy:"~>1"',
'http:"~>1"',
'io-checks:"~>1"',
'load-checks:"~>3"',
'memcached:"~>0"',
'memory-checks:"~>1"',
'mongodb:"~>0"',
'mysql:"~>2"',
'network-checks:"~>2"',
'ntp:"~>1"',
'openstack:"~>1"',
'process-checks:"~>2"',
'rabbitmq:"~>3"',
'redis:"~>2"',
'uptime-checks:"~>1"',
'vmstats:"~>1"'
] %}
RUN /opt/sensu/embedded/bin/gem install vmstat --no-rdoc --no-ri \
&& sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }}
# TODO(mandre) Use packaged sensu plugins from centos-opstools for binary distro
# http://cbs.centos.org/koji/search?match=glob&type=package&terms=*sensu*
RUN sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }}
{% endblock %}
{% block sensu_client_footer %}{% endblock %}

View File

@ -99,9 +99,6 @@ SKIPPED_IMAGES = {
# https://bugs.launchpad.net/kolla/+bug/1764621
"neutron-server-opendaylight",
"ovsdpdk",
# TODO(mandre) remove after fixing
# https://bugs.launchpad.net/kolla/+bug/1774123
"sensu-base",
# TODO(jeffrey4l): remove tripleo-ui when following bug is fixed
# https://bugs.launchpad.net/tripleo/+bug/1744215
"tripleo-ui"

View File

@ -0,0 +1,5 @@
---
features:
- |
Install sensu from centos-opstools for rpm based distros instead of from
upstream sensu repository.