Add support for MOS 10.0

Change-Id: I59d8a42e9e83a49a73aee73d598be15481e75f6c
This commit is contained in:
Olivier Bourdon 2016-12-22 09:37:23 +01:00
parent 0e359cb3cb
commit 0ae34e014c
16 changed files with 87 additions and 74 deletions

2
.gitignore vendored
View File

@ -6,4 +6,6 @@ Gemfile.lock
*.noarch.rpm *.noarch.rpm
repositories/centos/*.rpm repositories/centos/*.rpm
repositories/ubuntu/*.deb repositories/ubuntu/*.deb
repositories/ubuntu/trusty/*.deb
repositories/ubuntu/xenial/*.deb
deployment_scripts/puppet/modules/snmp deployment_scripts/puppet/modules/snmp

View File

@ -13,10 +13,10 @@ It is a base for additional plugins which adds specific SNMP traps monitoring.
Requirements Requirements
------------ ------------
| Requirement | Version/Comment | | Requirement | Version/Comment |
|:---------------------------------|:----------------------------| |:---------------------------------|:---------------------------------|
| Mirantis OpenStack compatibility | 7.0, 8.0, 9.0, 9.1, and 9.2 | | Mirantis OpenStack compatibility | 7.0, 8.0, 9.0, 9.1, 9.2 and 10.0 |
| Zabbix plugin for Fuel | 2.5.2 | | Zabbix plugin for Fuel | 2.5.3 |
Installation Guide Installation Guide
================== ==================
@ -36,20 +36,20 @@ To install SNMP trap daemon plugin, follow these steps:
that. If you do not have the Fuel Master node yet, see that. If you do not have the Fuel Master node yet, see
[Quick Start Guide](https://software.mirantis.com/quick-start/) : [Quick Start Guide](https://software.mirantis.com/quick-start/) :
# scp zabbix_snmptrapd-1.1-1.1.1-1.noarch.rpm root@<Fuel_Master_ip>:/tmp # scp zabbix_snmptrapd-1.1-1.1.2-1.noarch.rpm root@<Fuel_Master_ip>:/tmp
4. Install the plugin: 4. Install the plugin:
# cd /tmp # cd /tmp
# fuel plugins --install zabbix_snmptrapd-1.1-1.1.1-1.noarch.rpm # fuel plugins --install zabbix_snmptrapd-1.1-1.1.2-1.noarch.rpm
5. Check if the plugin was installed successfully: 5. Check if the plugin was installed successfully:
# fuel plugins # fuel plugins
id | name | version | package_version id | name | version | package_version
---|-------------------|---------|---------------- ---|-------------------|---------|----------------
1 | zabbix_monitoring | 2.5.2 | 3.0.0 1 | zabbix_monitoring | 2.5.3 | 3.0.0
2 | zabbix_snmptrapd | 1.1.1 | 3.0.0 2 | zabbix_snmptrapd | 1.1.2 | 3.0.0
For more information and instructions, see the SNMP trap daemon plugin Guide For more information and instructions, see the SNMP trap daemon plugin Guide
in the [Fuel Plugins Catalog](https://software.mirantis.com/fuel-plugins) in the [Fuel Plugins Catalog](https://software.mirantis.com/fuel-plugins)

View File

@ -1,6 +1,10 @@
Release notes / Changelog Release notes / Changelog
========================= =========================
**1.1.2**
* Compatibility with MOS 10.0
**1.1.1** **1.1.1**
* Compatibility with MOS 9.2 * Compatibility with MOS 9.2

View File

@ -56,7 +56,7 @@ author = u'Mirantis Inc.'
# The short X.Y version. # The short X.Y version.
version = '1.1' version = '1.1'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '1.1-1.1.1-1' release = '1.1-1.1.2-1'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -17,10 +17,10 @@ additional plugins to add monitoring of SNMP traps specific for their hardware.
Requirements Requirements
============ ============
====================== ========================== ====================== ================================
Requirement Version/Comment Requirement Version/Comment
====================== ========================== ====================== ================================
Fuel 7.0, 8.0, 9.0, 9.1 and 9.2 Fuel 7.0, 8.0, 9.0, 9.1, 9.2 and 10.0
Zabbix plugin for Fuel 2.5.2 Zabbix plugin for Fuel 2.5.3
====================== ========================== ====================== ================================

View File

@ -21,20 +21,20 @@ To install SNMP trap daemon for Zabbix plugin, follow these steps:
Fuel Master node using ssh. If you do not have the Fuel Master node yet, Fuel Master node using ssh. If you do not have the Fuel Master node yet,
see `Quick Start Guide <https://software.mirantis.com/quick-start/>`_:: see `Quick Start Guide <https://software.mirantis.com/quick-start/>`_::
# scp zabbix_snmptrapd-1.1-1.1.1-1.noarch.rpm root@<Fuel_Master_IP>:/tmp # scp zabbix_snmptrapd-1.1-1.1.2-1.noarch.rpm root@<Fuel_Master_IP>:/tmp
#. Log into the Fuel Master node. Install the plugin:: #. Log into the Fuel Master node. Install the plugin::
# cd /tmp # cd /tmp
# fuel plugins --install zabbix_snmptrapd-1.1-1.1.1-1.noarch.rpm # fuel plugins --install zabbix_snmptrapd-1.1-1.1.2-1.noarch.rpm
#. Check if the plugin was installed successfully:: #. Check if the plugin was installed successfully::
# fuel plugins # fuel plugins
id | name | version | package_version id | name | version | package_version
---|---------------------------|----------|---------------- ---|---------------------------|----------|----------------
1 | zabbix_monitoring | 2.5.2 | 3.0.0 1 | zabbix_monitoring | 2.5.3 | 3.0.0
2 | zabbix_snmptrapd | 1.1.1 | 3.0.0 2 | zabbix_snmptrapd | 1.1.2 | 3.0.0
SNMP trap daemon for Zabbix plugin removal SNMP trap daemon for Zabbix plugin removal
========================================== ==========================================
@ -45,7 +45,7 @@ To uninstall SNMP Trap Daemon for Zabbix plugin, follow these steps:
#. Uninstall the plugin:: #. Uninstall the plugin::
# fuel plugins --remove zabbix_snmptrapd==1.1.1 # fuel plugins --remove zabbix_snmptrapd==1.1.2
#. Check if the plugin was uninstalled successfully:: #. Check if the plugin was uninstalled successfully::

View File

@ -2,32 +2,35 @@
Revision history Revision history
================ ================
======= ============= ============================ ===================== ======= ============= ============================ ======================
Version Revision date Editor Comment Version Revision date Editor Comment
======= ============= ============================ ===================== ======= ============= ============================ ======================
0.1 06.19.2015 Piotr Misiak First release 0.1 06.19.2015 Piotr Misiak First release
(pmisiak@mirantis.com) (pmisiak@mirantis.com)
------- ------------- ---------------------------- --------------------- ------- ------------- ---------------------------- ----------------------
0.2 08.12.2015 Piotr Misiak Updated release 0.2 08.12.2015 Piotr Misiak Updated release
(pmisiak@mirantis.com) (pmisiak@mirantis.com)
------- ------------- ---------------------------- --------------------- ------- ------------- ---------------------------- ----------------------
0.3 08.02.2015 Marciej Relewicz Updated for fix 0.3 08.02.2015 Marciej Relewicz Updated for fix
(mrelewicz@mirantis.com) (mrelewicz@mirantis.com)
------- ------------- ---------------------------- --------------------- ------- ------------- ---------------------------- ----------------------
1.0.0 11.20.2015 Swann Croiset New Major version 1.0.0 11.20.2015 Swann Croiset New Major version
(scroiset@mirantis.com) (scroiset@mirantis.com)
------- ------------- ---------------------------- --------------------- ------- ------------- ---------------------------- ----------------------
1.0.1 03.14.2016 Olivier Bourdon Added MOS 8.0 support 1.0.1 03.14.2016 Olivier Bourdon Added MOS 8.0 support
(obourdon@mirantis.com) (obourdon@mirantis.com)
Doc fixes Doc fixes
------- ------------- ---------------------------- --------------------- ------- ------------- ---------------------------- ----------------------
1.1.0 05.11.2016 Olivier Bourdon Added MOS 9.0 support 1.1.0 05.11.2016 Olivier Bourdon Added MOS 9.0 support
(obourdon@mirantis.com) (obourdon@mirantis.com)
------- ------------- ---------------------------- --------------------- ------- ------------- ---------------------------- ----------------------
1.1.0 10.19.2016 Olivier Bourdon Added MOS 9.1 support 1.1.0 10.19.2016 Olivier Bourdon Added MOS 9.1 support
(obourdon@mirantis.com) (obourdon@mirantis.com)
------- ------------- ---------------------------- --------------------- ------- ------------- ---------------------------- ----------------------
1.1.1 02.17.2017 Olivier Bourdon Added MOS 9.2 support 1.1.1 02.17.2017 Olivier Bourdon Added MOS 9.2 support
(obourdon@mirantis.com) (obourdon@mirantis.com)
======= ============= ============================ ===================== ------- ------------- ---------------------------- ----------------------
1.1.2 02.20.2017 Olivier Bourdon Added MOS 10.0 support
(obourdon@mirantis.com)
======= ============= ============================ ======================

View File

@ -56,7 +56,7 @@ author = u'Mirantis Inc.'
# The short X.Y version. # The short X.Y version.
version = '1.1' version = '1.1'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '1.1-1.1.1-1' release = '1.1-1.1.2-1'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -56,7 +56,7 @@ author = u'Mirantis Inc.'
# The short X.Y version. # The short X.Y version.
version = '1.1' version = '1.1'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '1.1-1.1.1-1' release = '1.1-1.1.2-1'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -118,8 +118,8 @@ Work Items
Dependencies Dependencies
============ ============
* Fuel 7.0, 8.0, 9.0, 9.1 and 9.2 * Fuel 7.0, 8.0, 9.0, 9.1, 9.2 and 10.0
* Zabbix plugin for Fuel 2.5.2 * Zabbix plugin for Fuel 2.5.3
Testing Testing
======= =======

View File

@ -17,22 +17,14 @@ set -eux
ROOT="$(dirname "$(readlink -f "$0")")" ROOT="$(dirname "$(readlink -f "$0")")"
MODULES_DIR="${ROOT}"/deployment_scripts/puppet/modules MODULES_DIR="${ROOT}"/deployment_scripts/puppet/modules
RPM_REPO="${ROOT}"/repositories/centos/
DEB_REPO="${ROOT}"/repositories/ubuntu/
# Download RPM or DEB packages and store them in the local repository directory # Download RPM or DEB packages and store them in the local repository directory
function download_package { function download_package {
REPO="$1"
shift
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
if [[ "$1" == *.deb ]]; then
REPO=$DEB_REPO
elif [[ "$1" == *.rpm ]]; then
REPO=$RPM_REPO
else
echo "Invalid URL for download_package(): $1"
fi
FILE=$(basename "$1") FILE=$(basename "$1")
wget -qO - "$1" > "$REPO"/"$FILE" wget -qO "$REPO"/"$FILE" "$1"
shift shift
done done
} }
@ -43,4 +35,3 @@ function download_puppet_module {
mkdir -p "${MODULES_DIR}"/"$1" mkdir -p "${MODULES_DIR}"/"$1"
wget -qO- "$2" | tar -C "${MODULES_DIR}/$1" --strip-components=1 -xz wget -qO- "$2" | tar -C "${MODULES_DIR}/$1" --strip-components=1 -xz
} }

View File

@ -2,11 +2,11 @@
name: zabbix_snmptrapd name: zabbix_snmptrapd
title: SNMP trap daemon for Zabbix plugin title: SNMP trap daemon for Zabbix plugin
# Plugin version # Plugin version
version: 1.1.1 version: 1.1.2
# Description # Description
description: Gives ability to receive SNMP traps and pass them to Zabbix. description: Gives ability to receive SNMP traps and pass them to Zabbix.
# Required fuel version # Required fuel version
fuel_version: ['7.0', '8.0', '9.0'] fuel_version: ['7.0', '8.0', '9.0', '10.0']
# Groups # Groups
groups: ['monitoring'] groups: ['monitoring']
# Licenses # Licenses
@ -22,22 +22,27 @@ releases:
version: 2015.1.0-7.0 version: 2015.1.0-7.0
mode: ['ha'] mode: ['ha']
deployment_scripts_path: deployment_scripts/ deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu repository_path: repositories/ubuntu/trusty
- os: ubuntu - os: ubuntu
version: liberty-8.0 version: liberty-8.0
mode: ['ha'] mode: ['ha']
deployment_scripts_path: deployment_scripts/ deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu repository_path: repositories/ubuntu/trusty
- os: ubuntu - os: ubuntu
version: liberty-9.0 version: liberty-9.0
mode: ['ha'] mode: ['ha']
deployment_scripts_path: deployment_scripts/ deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu repository_path: repositories/ubuntu/trusty
- os: ubuntu - os: ubuntu
version: mitaka-9.0 version: mitaka-9.0
mode: ['ha'] mode: ['ha']
deployment_scripts_path: deployment_scripts/ deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu repository_path: repositories/ubuntu/trusty
- os: ubuntu
version: newton-10.0
mode: ['ha']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu/xenial
# Version of plugin package # Version of plugin package
package_version: '3.0.0' package_version: '3.0.0'

View File

@ -1,7 +1,21 @@
#!/bin/bash #!/bin/bash
# Copyright 2017 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -eux set -eux
ROOT="$(dirname `readlink -f $0`)" ROOT="$(dirname "$(readlink -f "$0")")"
. "${ROOT}"/functions.sh . "${ROOT}"/functions.sh
@ -10,30 +24,24 @@ ROOT="$(dirname `readlink -f $0`)"
SNMP_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/razorsedge-snmp-3.3.1.tar.gz" SNMP_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/razorsedge-snmp-3.3.1.tar.gz"
RPM_REPO="${ROOT}"/repositories/centos RPM_REPO="${ROOT}"/repositories/centos
DEB_REPO="${ROOT}"/repositories/ubuntu DEB_TRUSTY_REPO="${ROOT}"/repositories/ubuntu/trusty
MODULES="${ROOT}"/deployment_scripts/puppet/modules DEB_XENIAL_REPO="${ROOT}"/repositories/ubuntu/xenial
mkdir -p $RPM_REPO $DEB_REPO mkdir -p $RPM_REPO $DEB_TRUSTY_REPO $DEB_XENIAL_REPO
# Downloads needed RPM or DEB packages SNMP_TRUSTY_VERSION="5.7.2~dfsg-8.1ubuntu3.1"
function download { SNMP_TRUSTY_PACKAGES="http://archive.ubuntu.com/ubuntu/pool/universe/n/net-snmp/libsnmp-perl_${SNMP_TRUSTY_VERSION}_amd64.deb \
case "$1" in http://archive.ubuntu.com/ubuntu/pool/main/n/net-snmp/snmpd_${SNMP_TRUSTY_VERSION}_amd64.deb \
deb) REPO=$DEB_REPO;; http://archive.ubuntu.com/ubuntu/pool/main/n/net-snmp/snmp_${SNMP_TRUSTY_VERSION}_amd64.deb"
rpm) REPO=$RPM_REPO;;
esac
shift
while [ $# -gt 0 ]; do COMMON_PACKAGES="http://archive.ubuntu.com/ubuntu/pool/universe/s/snmptt/snmptt_1.4-1_all.deb"
FILE=$(basename "$1")
wget -qO - $1 > "$REPO/$FILE"
shift
done
}
download deb http://archive.ubuntu.com/ubuntu/pool/universe/n/net-snmp/libsnmp-perl_5.7.2~dfsg-8.1ubuntu3.1_amd64.deb \ download_package "$DEB_TRUSTY_REPO" $SNMP_TRUSTY_PACKAGES $COMMON_PACKAGES
http://archive.ubuntu.com/ubuntu/pool/main/n/net-snmp/snmpd_5.7.2~dfsg-8.1ubuntu3.1_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/n/net-snmp/snmp_5.7.2~dfsg-8.1ubuntu3.1_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/universe/s/snmptt/snmptt_1.4-1_all.deb
SNMP_XENIAL_VERSION="5.7.3+dfsg-1ubuntu4"
SNMP_XENIAL_PACKAGES="http://archive.ubuntu.com/ubuntu/pool/universe/n/net-snmp/libsnmp-perl_${SNMP_XENIAL_VERSION}_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/n/net-snmp/snmpd_${SNMP_XENIAL_VERSION}_amd64.deb \
http://archive.ubuntu.com/ubuntu/pool/main/n/net-snmp/snmp_${SNMP_XENIAL_VERSION}_amd64.deb"
download_package "$DEB_XENIAL_REPO" $SNMP_XENIAL_PACKAGES $COMMON_PACKAGES
# Install puppet manifests # Install puppet manifests
download_puppet_module "snmp" "$SNMP_TARBALL_URL" download_puppet_module "snmp" "$SNMP_TARBALL_URL"

View File

View File

View File

@ -35,7 +35,7 @@ whitelist_externals=
commands = commands =
rm -rf .build rm -rf .build
bash -c 'rm -rf doc/*/build' bash -c 'rm -rf doc/*/build'
bash -c 'rm -rf repositories/ubuntu/*.deb repositories/centos/*.rpm' bash -c 'rm -rf repositories/ubuntu/*.deb repositories/ubuntu/trusty/*.deb repositories/ubuntu/xenial/*.deb repositories/centos/*.rpm'
fpb --check {toxinidir} --debug fpb --check {toxinidir} --debug
fpb --build {toxinidir} --debug fpb --build {toxinidir} --debug