From 8962ed056342d9fb979f2b54f6e3a796e9a23a37 Mon Sep 17 00:00:00 2001 From: Piotr Misiak Date: Fri, 5 Jun 2015 13:49:38 +0200 Subject: [PATCH] initial version of SNMP trap daemon for Zabbix plugin Change-Id: I4041c15fdf09af5944b75f142a5c374b24af380f --- .gitignore | 5 + .../puppet/manifests/controller.pp | 16 + .../files/initscripts/snmpd | 143 ++++ .../files/initscripts/snmptrapd | 110 +++ .../plugin_zabbix_snmptrapd/files/snmptt.conf | 2 + .../plugin_zabbix_snmptrapd/files/snmptt.ini | 626 ++++++++++++++++++ .../plugin_zabbix_snmptrapd/manifests/init.pp | 51 ++ .../manifests/params.pp | 30 + .../manifests/snmptt.pp | 62 ++ .../manifests/zabbix.pp | 38 ++ environment_config.yaml | 12 + metadata.yaml | 33 + pre_build_hook | 43 ++ repositories/centos/.gitkeep | 0 repositories/ubuntu/.gitkeep | 0 tasks.yaml | 7 + 16 files changed, 1178 insertions(+) create mode 100644 .gitignore create mode 100644 deployment_scripts/puppet/manifests/controller.pp create mode 100755 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmpd create mode 100755 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmptrapd create mode 100644 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.conf create mode 100644 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.ini create mode 100644 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/init.pp create mode 100644 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp create mode 100644 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/snmptt.pp create mode 100644 deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp create mode 100644 environment_config.yaml create mode 100644 metadata.yaml create mode 100755 pre_build_hook create mode 100644 repositories/centos/.gitkeep create mode 100644 repositories/ubuntu/.gitkeep create mode 100644 tasks.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c9dabe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.build/ +*.noarch.rpm +repositories/centos/*.rpm +repositories/ubuntu/*.deb +deployment_scripts/puppet/modules/snmp diff --git a/deployment_scripts/puppet/manifests/controller.pp b/deployment_scripts/puppet/manifests/controller.pp new file mode 100644 index 0000000..3b2536c --- /dev/null +++ b/deployment_scripts/puppet/manifests/controller.pp @@ -0,0 +1,16 @@ +# +# Copyright 2015 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. +# +include plugin_zabbix_snmptrapd diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmpd b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmpd new file mode 100755 index 0000000..3c92eb0 --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmpd @@ -0,0 +1,143 @@ +#! /bin/sh -e +### BEGIN INIT INFO +# Provides: snmpd snmptrapd +# Required-Start: $network $remote_fs $syslog +# Required-Stop: $network $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: SNMP agents +# Description: NET SNMP (Simple Network Management Protocol) Agents +### END INIT INFO +# +# Author: Jochen Friedrich +# Modified by: Piotr Misiak (network namespaces support added) +# +set -e + +. /lib/lsb/init-functions + +export PATH=/sbin:/usr/sbin:/bin:/usr/bin + +# Defaults +OLD_MIBS_DIR="/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" +MIBS_DIR="/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf" +export MIBDIRS="$MIBS_DIR:$OLD_MIBS_DIR" + +IP_BINARY="/sbin/ip" + +SNMPD_BINARY="/usr/sbin/snmpd" +SNMPD_PID="/run/snmpd.pid" +SNMPDNS="haproxy" +SNMPDRUN="yes" +SNMPDOPTS="-Lsd -Lf /dev/null -p $SNMPD_PID" + +TRAPD_BINARY="/usr/sbin/snmptrapd" +TRAPD_PID="/run/snmptrapd.pid" +TRAPDNS="haproxy" +TRAPDRUN="no" +TRAPDOPTS="-Lsd -p $TRAPD_PID" + +# Reads config file (will override defaults above) +[ -r /etc/default/snmpd ] && . /etc/default/snmpd + +test -x $SNMPD_BINARY || exit 0 +test -x $TRAPD_BINARY || exit 0 + +if [ "x$SNMPDNS" != "x" ]; then + SNMPDOPTS="netns exec $SNMPDNS $SNMPD_BINARY $SNMPDOPTS" + SNMPDEXEC=$IP_BINARY +else + SNMPDEXEC=$SNMPD_BINARY +fi + +if [ "x$TRAPDNS" != "x" ]; then + TRAPDOPTS="netns exec $TRAPDNS $TRAPD_BINARY $TRAPDOPTS" + TRAPDEXEC=$IP_BINARY +else + TRAPDEXEC=$TRAPD_BINARY +fi + +# Cd to / before starting any daemons. +cd / + +case "$1" in + start) + log_daemon_msg "Starting network management services:" + # remove old symlink with previous version + if [ -L /var/run/agentx ]; then + rm -f /var/run/agentx + fi + if [ ! -d /var/run/agentx ]; then + mkdir -p /var/run/agentx + fi + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + start-stop-daemon --quiet --start --oknodo --exec $SNMPDEXEC -- $SNMPDOPTS + log_progress_msg " snmpd" + fi + if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then + start-stop-daemon --quiet --start --oknodo --exec $TRAPDEXEC -- $TRAPDOPTS + log_progress_msg " snmptrapd" + fi + ;; + stop) + log_daemon_msg "Stopping network management services:" + start-stop-daemon --quiet --stop --oknodo --exec $SNMPD_BINARY && [ ! -f $SNMPD_PID ] || rm $SNMPD_PID + log_progress_msg " snmpd" + start-stop-daemon --quiet --stop --oknodo --exec $TRAPD_BINARY && [ ! -f $TRAPD_PID ] || rm $TRAPD_PID + log_progress_msg " snmptrapd" + ;; + restart) + log_daemon_msg "Restarting network management services:" + start-stop-daemon --quiet --stop --oknodo --exec $SNMPD_BINARY && [ ! -f $SNMPD_PID ] || rm $SNMPD_PID + start-stop-daemon --quiet --stop --oknodo --exec $TRAPD_BINARY && [ ! -f $TRAPD_PID ] || rm $TRAPD_PID + # Allow the daemons time to exit completely. + set +e + for i in `seq 0 10`; do + pgrep -f $SNMPD_BINARY >/dev/null + SNMPDSTATUS=$? + pgrep -f $TRAPD_BINARY >/dev/null + TRAPDSTATUS=$? + if [ $SNMPDSTATUS -eq 1 -a $TRAPDSTATUS -eq 1 ]; then + # both processes are not running + break + fi + if [ $i -eq 10 ]; then + log_failure_msg "ERROR: Network management services didn't stop within 10 seconds, exiting..." + exit 1 + fi + sleep 1 + done + set -e + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + start-stop-daemon --quiet --start --exec $SNMPDEXEC -- $SNMPDOPTS + log_progress_msg " snmpd" + fi + if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then + start-stop-daemon --quiet --start --exec $TRAPDEXEC -- $TRAPDOPTS + log_progress_msg " snmptrapd" + fi + ;; + reload|force-reload) + log_daemon_msg "Reloading network management services:" + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + start-stop-daemon --quiet --stop --signal 1 \ + --pidfile /var/run/snmpd.pid --exec $SNMPD_BINARY + log_progress_msg " snmpd" + fi + ;; + status) + status=0 + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + status_of_proc $SNMPD_BINARY snmpd || status=$? + fi + if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then + status_of_proc $TRAPD_BINARY snmptrapd || status=$? + fi + exit $status + ;; + *) + echo "Usage: /etc/init.d/snmpd {start|stop|restart|reload|force-reload|status}" + exit 1 +esac + +exit 0 diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmptrapd b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmptrapd new file mode 100755 index 0000000..af14452 --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/initscripts/snmptrapd @@ -0,0 +1,110 @@ +#!/bin/bash + +# ucd-snmp init file for snmptrapd +# +# chkconfig: - 50 50 +# description: Simple Network Management Protocol (SNMP) Trap Daemon +# +# processname: /usr/sbin/snmptrapd +# config: /etc/snmp/snmptrapd.conf +# config: /usr/share/snmp/snmptrapd.conf +# pidfile: /var/run/snmptrapd.pid + + +### BEGIN INIT INFO +# Provides: snmptrapd +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: start and stop Net-SNMP trap daemon +# Description: Simple Network Management Protocol (SNMP) trap daemon +### END INIT INFO + +# source function library +. /etc/init.d/functions + +NS="haproxy" +OPTIONS="-Lsd -p /var/run/snmptrapd.pid" +if [ -e /etc/sysconfig/snmptrapd ]; then + . /etc/sysconfig/snmptrapd +fi + +RETVAL=0 +prog="snmptrapd" +binary=/usr/sbin/snmptrapd +pidfile=/var/run/snmptrapd.pid + +if [ "x$NS" != "x" ]; then + cmd="/sbin/ip netns exec $NS $binary" +else + cmd=$binary +fi + +start() { + [ -x $binary ] || exit 5 + echo -n $"Starting $prog: " + daemon --pidfile=$pidfile $cmd $OPTIONS + RETVAL=$? + echo + touch /var/lock/subsys/snmptrapd + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $binary + RETVAL=$? + echo + rm -f /var/lock/subsys/snmptrapd + return $RETVAL +} + +reload(){ + stop + start +} + +restart(){ + stop + start +} + +condrestart(){ + [ -e /var/lock/subsys/snmptrapd ] && restart + return 0 +} + +case "$1" in + start) + start + RETVAL=$? + ;; + stop) + stop + RETVAL=$? + ;; + restart) + restart + RETVAL=$? + ;; + reload|force-reload) + reload + RETVAL=$? + ;; + condrestart|try-restart) + condrestart + RETVAL=$? + ;; + status) + status $prog + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}" + RETVAL=2 +esac + +exit $RETVAL diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.conf b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.conf new file mode 100644 index 0000000..bb0042b --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.conf @@ -0,0 +1,2 @@ +EVENT netSnmpExampleHeartbeatNotification .1.3.6.1.4.1.8072.2.3.0.1 "Status Events" Normal +FORMAT ZBXTRAP $aA netSnmpExampleHeartbeatNotification diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.ini b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.ini new file mode 100644 index 0000000..8c93cc5 --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/files/snmptt.ini @@ -0,0 +1,626 @@ +# +# SNMPTT v1.4 Configuration File +# +# Linux / Unix +# + +[General] +# Name of this system for $H variable. If blank, system name will be the computer's +# hostname via Sys::Hostname. +snmptt_system_name = + +# Set to either 'standalone' or 'daemon' +# standalone: snmptt called from snmptrapd.conf +# daemon: snmptrapd.conf calls snmptthandler +# Ignored by Windows. See documentation +mode = standalone + +# Set to 1 to allow multiple trap definitions to be executed for the same trap. +# Set to 0 to have it stop after the first match. +# This option should normally be set to 1. See the section 'SNMPTT.CONF Configuration +# file Notes' in the SNMPTT documentation for more information. +# Note: Wildcard matches are only matched if there are NO exact matches. This takes +# into consideration the NODES list. Therefore, if there is a matching trap, but +# the NODES list prevents it from being considered a match, the wildcard entry will +# only be used if there are no other exact matches. +multiple_event = 1 + +# SNMPTRAPD passes the IP address of device sending the trap, and the IP address of the +# actual SNMP agent. These addresses could differ if the trap was sent on behalf of another +# device (relay, proxy etc). +# If DNS is enabled, the agent IP address is converted to a host name using a DNS lookup +# (which includes the local hosts file, depending on how the OS is configured). This name +# will be used for: NODES entry matches, hostname field in logged traps (file / database), +# and the $A variable. Host names on the NODES line will be resolved and the IP address +# will then be used for comparing. +# Set to 0 to disable DNS resolution +# Set to 1 to enable DNS resolution +dns_enable = 0 + +# Set to 0 to enable the use of FQDN (Fully Qualified Domain Names). If a host name is +# passed to SNMPTT that contains a domain name, it will not be altered in any way by +# SNMPTT. This also affects resolve_value_ip_addresses. +# Set to 1 to have SNMPTT strip the domain name from the host name passed to it. For +# example, server01.domain.com would be changed to server01 +# Set to 2 to have SNMPTT strip the domain name from the host name passed to it +# based on the list of domains in strip_domain_list +strip_domain = 0 + +# List of domain names that should be stripped when strip_domain is set to 2. +# List can contain one or more domains. For example, if the FQDN of a host is +# server01.city.domain.com and the list contains domain.com, the 'host' will be +# set as server01.city. +strip_domain_list = < ["udp:${server_ip}:162"], + ro_community => $plugin_settings['community'], + service_ensure => 'stopped', + trap_service_ensure => 'running', + trap_service_enable => true, + trap_handlers => ['default /usr/sbin/snmptthandler'], + } + + file { "/etc/init.d/${service_name}": + ensure => present, + owner => 'root', + group => 'root', + mode => '0755', + source => "puppet:///modules/plugin_zabbix_snmptrapd/initscripts/${service_name}", + require => Class['snmp'], + notify => Service[$service_name], + } + + class { 'plugin_zabbix_snmptrapd::snmptt': + require => Class['snmp'], + } + + class { 'plugin_zabbix_snmptrapd::zabbix': + require => Class['plugin_zabbix_snmptrapd::snmptt'], + } + +} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp new file mode 100644 index 0000000..e62e53e --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp @@ -0,0 +1,30 @@ +# +# Copyright 2015 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. +# +class plugin_zabbix_snmptrapd::params { + + case $::osfamily { + 'Debian': { + $service_name = 'snmpd' + } + 'RedHat': { + $service_name = 'snmptrapd' + } + default: { + fail("unsuported osfamily ${::osfamily}, currently Debian and RedHat are the only supported platforms") + } + } + +} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/snmptt.pp b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/snmptt.pp new file mode 100644 index 0000000..0083fa6 --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/snmptt.pp @@ -0,0 +1,62 @@ +# +# Copyright 2015 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. +# +class plugin_zabbix_snmptrapd::snmptt { + + if $::osfamily == 'RedHat' { + package { 'net-snmp-perl': + ensure => present, + before => Package['snmptt'], + } + } + + package { 'snmptt': + ensure => present, + } + + service { 'snmptt': + ensure => running, + enable => true, + require => Package['snmptt'], + } + + file { '/etc/snmp/snmptt.ini': + ensure => present, + mode => '0644', + owner => 'root', + group => 'root', + source => 'puppet:///modules/plugin_zabbix_snmptrapd/snmptt.ini', + require => Package['snmptt'], + notify => Service['snmptt'], + } + + file { '/etc/snmp/snmptt.conf': + ensure => present, + mode => '0644', + owner => 'root', + group => 'root', + source => 'puppet:///modules/plugin_zabbix_snmptrapd/snmptt.conf', + require => Package['snmptt'], + notify => Service['snmptt'], + } + + file_line { 'in logrotate disable compressing of snmptt logfiles': + path => '/etc/logrotate.d/snmptt', + match => 'compress', + line => 'nocompress', + require => Package['snmptt'], + } + +} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp new file mode 100644 index 0000000..44a3270 --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp @@ -0,0 +1,38 @@ +# +# Copyright 2015 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. +# +class plugin_zabbix_snmptrapd::zabbix { + + file_line { 'enable SNMPTrapper in Zabbix': + path => '/etc/zabbix/zabbix_server.conf', + match => 'StartSNMPTrapper', + line => 'StartSNMPTrapper=1', + notify => Service['p_zabbix-server'], + } + + file_line { 'set SNMPTrapperFile in Zabbix': + path => '/etc/zabbix/zabbix_server.conf', + match => 'SNMPTrapperFile', + line => 'SNMPTrapperFile=/var/log/snmptt/snmptt.log', + notify => Service['p_zabbix-server'], + } + + service { 'p_zabbix-server': + ensure => running, + enable => true, + provider => 'pacemaker', + } + +} diff --git a/environment_config.yaml b/environment_config.yaml new file mode 100644 index 0000000..7f11d06 --- /dev/null +++ b/environment_config.yaml @@ -0,0 +1,12 @@ +attributes: + metadata: + restrictions: + - condition: "settings:zabbix_monitoring.metadata.enabled == false" + action: disable + message: "This plugin requires Zabbix plugin" + community: + value: "public" + label: "SNMP community" + description: "SNMP community for traps authorization" + weight: 10 + type: "password" diff --git a/metadata.yaml b/metadata.yaml new file mode 100644 index 0000000..2a0704a --- /dev/null +++ b/metadata.yaml @@ -0,0 +1,33 @@ +# Plugin name +name: zabbix_snmptrapd +title: SNMP trap daemon for Zabbix plugin +# Plugin version +version: 1.0.0 +# Description +description: Gives ability to receive SNMP traps and pass them to Zabbix. +# Required fuel version +fuel_version: ['6.1'] +# Groups +groups: [] +# Licenses +licenses: ['Apache License, Version 2.0'] +# Homepage +homepage: 'https://github.com/stackforge/fuel-plugin-zabbix-snmptrapd' +# Authors +authors: ['Dmitry Klenov ', 'Piotr Misiak ', 'Szymon Banka ', 'Alexander Zatserklyany '] + +# The plugin is compatible with releases in the list +releases: + - os: ubuntu + version: 2014.2-6.1 + mode: ['ha'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/ubuntu + - os: centos + version: 2014.2-6.1 + mode: ['ha'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/centos + +# Version of plugin package +package_version: '2.0.0' diff --git a/pre_build_hook b/pre_build_hook new file mode 100755 index 0000000..02dc7dc --- /dev/null +++ b/pre_build_hook @@ -0,0 +1,43 @@ +#!/bin/bash +set -eux + +ROOT="$(dirname `readlink -f $0`)" +RPM_REPO="${ROOT}"/repositories/centos +DEB_REPO="${ROOT}"/repositories/ubuntu +MODULES="${ROOT}"/deployment_scripts/puppet/modules +SNMP_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/razorsedge-snmp-3.3.1.tar.gz" +mkdir -p $RPM_REPO +mkdir -p $DEB_REPO +mkdir -p $MODULES + +# Downloads needed RPM or DEB packages +function download { + case "$1" in + deb) REPO=$DEB_REPO;; + rpm) REPO=$RPM_REPO;; + esac + shift + + while [ $# -gt 0 ]; do + FILE=$(basename "$1") + wget -qO - $1 > "$REPO/$FILE" + shift + done +} + +download rpm http://mirror.centos.org/centos/6/updates/x86_64/Packages/net-snmp-5.5-50.el6_6.1.x86_64.rpm \ + http://mirror.centos.org/centos/6/updates/x86_64/Packages/net-snmp-libs-5.5-50.el6_6.1.x86_64.rpm \ + http://mirror.centos.org/centos/6/updates/x86_64/Packages/net-snmp-perl-5.5-50.el6_6.1.x86_64.rpm \ + http://mirror.centos.org/centos/6/os/x86_64/Packages/perl-Digest-HMAC-1.01-22.el6.noarch.rpm \ + http://mirror.centos.org/centos/6/os/x86_64/Packages/perl-Digest-SHA1-2.12-2.el6.x86_64.rpm \ + http://mirror.centos.org/centos/6/os/x86_64/Packages/perl-IO-stringy-2.110-10.1.el6.noarch.rpm \ + http://mirror.centos.org/centos/6/os/x86_64/Packages/perl-List-MoreUtils-0.22-10.el6.x86_64.rpm \ + http://dl.fedoraproject.org/pub/epel/6/x86_64/snmptt-1.4-0.9.beta2.el6.noarch.rpm \ + http://dl.fedoraproject.org/pub/epel/6/x86_64/perl-Crypt-DES-2.05-9.el6.x86_64.rpm \ + http://dl.fedoraproject.org/pub/epel/6/x86_64/perl-Config-IniFiles-2.72-2.el6.noarch.rpm \ + http://dl.fedoraproject.org/pub/epel/6/x86_64/perl-Net-SNMP-5.2.0-4.el6.noarch.rpm + +#download snmp module +mkdir -p "${MODULES}/snmp" +wget -qO- "${SNMP_TARBALL_URL}" | tar -C "${MODULES}/snmp" --strip-components=1 -xz + diff --git a/repositories/centos/.gitkeep b/repositories/centos/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/repositories/ubuntu/.gitkeep b/repositories/ubuntu/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tasks.yaml b/tasks.yaml new file mode 100644 index 0000000..87638fe --- /dev/null +++ b/tasks.yaml @@ -0,0 +1,7 @@ +- role: ['primary-controller', 'controller'] + stage: post_deployment/8110 + type: puppet + parameters: + puppet_manifest: puppet/manifests/controller.pp + puppet_modules: puppet/modules:/etc/puppet/modules + timeout: 1200