|
/
Zope
/
gocept svn checkins
/
Archive
/
2008
/
2008-11
/
SVN: r7016 - in gocept.infrastructure/testing/puppet: manifests/classes modules/net_analyzer/files modules/net_analyzer/manifests modules/net_analyzer/templates modules/net_firewall modules/net_firewall/manifests
[
SVN: r7003 - in gocept.imapapi/trunk: . profiles ... ]
[
SVN: r7018 - in gocept.fckeditor/trunk: . ... ]
SVN: r7016 - in gocept.infrastructure/testing/puppet: manifests/classes modules/net_analyzer/files modules/net_analyzer/manifests modules/net_analyzer/templates modules/net_firewall modules/net_firewall/manifests
Christian Theune <ct(at)gocept.com> |
2008-11-09 14:14:15 |
[ FULL ]
|
Author: ctheune
Date: Sun Nov 9 14:14:13 2008
New Revision: 7016
Log:
Add automatic traffic client installation.
Added:
gocept.infrastructure/testing/puppet/modules/net_analyzer/files/traffic-client-13636.tar.gz
(contents, props changed)
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/traffic_client.pp
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/trafficclient.conf
gocept.infrastructure/testing/puppet/modules/net_firewall/
gocept.infrastructure/testing/puppet/modules/net_firewall/manifests/
gocept.infrastructure/testing/puppet/modules/net_firewall/manifests/init.pp
gocept.infrastructure/testing/puppet/modules/net_firewall/manifests/iptables.pp
Modified:
gocept.infrastructure/testing/puppet/manifests/classes/role.pp
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/init.pp
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/nagios.pp
Modified: gocept.infrastructure/testing/puppet/manifests/classes/role.pp
==============================================================================
--- gocept.infrastructure/testing/puppet/manifests/classes/role.pp (original)
+++ gocept.infrastructure/testing/puppet/manifests/classes/role.pp Sun Nov 9
14:14:13 2008
(at)(at) -19,6 +19,8 (at)(at)
include app_admin::tmpwatch
include app_shells::bash
include net_analyzer::nagios_client
+ include net_analyzer::traffic_client
+ include net_firewall::iptables
include net_misc::ntp
include net_misc::sshd
include sys_apps::baselayout
(at)(at) -63,6 +65,9 (at)(at)
owner => "service",
mode => "700"
}
+
+ sys_portage::package { "subversion": }
+
}
# node that acts as a frontend server
Added:
gocept.infrastructure/testing/puppet/modules/net_analyzer/files/traffic-client-13636.tar.gz
==============================================================================
Binary file. No diff available.
Modified:
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/init.pp
==============================================================================
---
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/init.pp (original)
+++
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/init.pp Sun
Nov 9 14:14:13 2008
(at)(at) -1,2 +1,3 (at)(at)
import "defines.pp"
import "nagios.pp"
+import "traffic_client.pp"
Modified:
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/nagios.pp
==============================================================================
---
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/nagios.pp (original)
+++
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/nagios.pp Sun
Nov 9 14:14:13 2008
(at)(at) -13,8 +13,12 (at)(at)
require => Group["nagios"]
}
- sys_portage::package { ["nagios-nrpe", "nagios-plugins"]:
- require => User["nagios"]
+ sys_portage::package {
+ "nagios-nrpe":
+ require => User["nagios"];
+ "nagios-plugins":
+ require => User["nagios"],
+ ensure => "1.4.12-r101"
}
file {
Added:
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/traffic_client.pp
==============================================================================
--- (empty file)
+++
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/traffic_client.pp Sun
Nov 9 14:14:13 2008
(at)(at) -0,0 +1,38 (at)(at)
+class net_analyzer::traffic_client {
+
+ if $location::traffic_server {
+
+ file { "/usr/src/traffic-client.tar.gz":
+ require => Package["iptables"],
+ source => "puppet:///net_analyzer/traffic-client-13636.tar.gz"
+ }
+
+ exec { "traffic_client unpack":
+ cwd => "/opt",
+ command => "rm -rf /opt/traffic-gatherer; tar xf
/usr/src/traffic-client.tar.gz",
+ refreshonly => true,
+ subscribe => File["/usr/src/traffic-client.tar.gz"],
+ }
+
+ exec { "traffic_client buildout":
+ cwd => "/opt/traffic-gatherer",
+ command => "echo -e '[buildout]\nextends=profiles/base.cfg'
> buildout.cfg && \
+ python2.4 bootstrap.py && \
+ bin/buildout",
+ refreshonly => true,
+ timeout => 60,
+ subscribe => Exec["traffic_client unpack"]
+ }
+
+ file {
+ "/opt/traffic-gatherer/etc/trafficclient.conf":
+ content => template("net_analyzer/trafficclient.conf"),
+ require => Exec["traffic_client buildout"];
+ "/etc/cron.d/traffic-client":
+ source =>
"file:///opt/traffic-gatherer/etc/cron.d/trafficclient",
+ mode => "0644",
+ require => Exec["traffic_client buildout"]
+ }
+
+ }
+}
Added:
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/trafficclient.conf
==============================================================================
--- (empty file)
+++
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/trafficclient.conf Sun
Nov 9 14:14:13 2008
(at)(at) -0,0 +1,3 (at)(at)
+[trafficclient]
+server = <%= scope.lookupvar('location::traffic_server') %>
+dbdir = ~/.trafficclient
Added:
gocept.infrastructure/testing/puppet/modules/net_firewall/manifests/init.pp
==============================================================================
--- (empty file)
+++
gocept.infrastructure/testing/puppet/modules/net_firewall/manifests/init.pp Sun
Nov 9 14:14:13 2008
(at)(at) -0,0 +1 (at)(at)
+import "iptables.pp"
Added:
gocept.infrastructure/testing/puppet/modules/net_firewall/manifests/iptables.pp
==============================================================================
--- (empty file)
+++
gocept.infrastructure/testing/puppet/modules/net_firewall/manifests/iptables.pp Sun
Nov 9 14:14:13 2008
(at)(at) -0,0 +1,5 (at)(at)
+class net_firewall::iptables {
+
+ sys_portage::package{ "iptables": }
+
+}
|
SVN: r7017 - in gocept.infrastructure/testing/puppet/modules/net_analyzer: manifests templates
Christian Theune <ct(at)gocept.com> |
2008-11-09 15:24:47 |
[ FULL ]
|
Author: ctheune
Date: Sun Nov 9 15:24:46 2008
New Revision: 7017
Log:
move cron.d snippet content into puppet to fix path to binary
Added:
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/cron.d_trafficclient.erb
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/trafficclient.conf.erb
(props changed)
- copied unchanged from r7016,
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/trafficclient.conf
Removed:
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/trafficclient.conf
Modified:
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/traffic_client.pp
Modified:
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/traffic_client.pp
==============================================================================
---
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/traffic_client.pp (original)
+++
gocept.infrastructure/testing/puppet/modules/net_analyzer/manifests/traffic_client.pp Sun
Nov 9 15:24:46 2008
(at)(at) -1,5 +1,8 (at)(at)
class net_analyzer::traffic_client {
+ # XXX Define a Nagios check that verifies that the client runs correctly
+ # and gets its data delivered to the server.
+
if $location::traffic_server {
file { "/usr/src/traffic-client.tar.gz":
(at)(at) -26,10 +29,10 (at)(at)
file {
"/opt/traffic-gatherer/etc/trafficclient.conf":
- content => template("net_analyzer/trafficclient.conf"),
+ content => template("net_analyzer/trafficclient.conf.erb"),
require => Exec["traffic_client buildout"];
"/etc/cron.d/traffic-client":
- source =>
"file:///opt/traffic-gatherer/etc/cron.d/trafficclient",
+ content =>
template("net_analyzer/cron.d_trafficclient.erb"),
mode => "0644",
require => Exec["traffic_client buildout"]
}
Added:
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/cron.d_trafficclient.erb
==============================================================================
--- (empty file)
+++
gocept.infrastructure/testing/puppet/modules/net_analyzer/templates/cron.d_trafficclient.erb Sun
Nov 9 15:24:46 2008
(at)(at) -0,0 +1,2 (at)(at)
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
+19,49 * * * * root /opt/traffic-gatherer/bin/trafficclient
|
SVN: r7033 - in gocept.infrastructure/testing/puppet: manifests/classes modules/sys_apps/manifests modules/sys_fs/manifests
Christian Kauhaus <kc(at)gocept.com> |
2008-11-14 17:31:46 |
[ FULL ]
|
Author: ckauhaus
Date: Fri Nov 14 17:31:45 2008
New Revision: 7033
Log:
fixed interface renaming race condition
Modified:
gocept.infrastructure/testing/puppet/manifests/classes/role.pp
gocept.infrastructure/testing/puppet/modules/sys_apps/manifests/network_interface.pp
gocept.infrastructure/testing/puppet/modules/sys_fs/manifests/udev.pp
Modified: gocept.infrastructure/testing/puppet/manifests/classes/role.pp
==============================================================================
--- gocept.infrastructure/testing/puppet/manifests/classes/role.pp (original)
+++ gocept.infrastructure/testing/puppet/manifests/classes/role.pp Fri Nov 14
17:31:45 2008
(at)(at) -49,7 +49,7 (at)(at)
user {"service":
comment => "Project service user",
home => "/home/service",
- uid => 900 # XXX
+ uid => 900 # XXX
}
file {"/home/service":
Modified:
gocept.infrastructure/testing/puppet/modules/sys_apps/manifests/network_interface.pp
==============================================================================
---
gocept.infrastructure/testing/puppet/modules/sys_apps/manifests/network_interface.pp (original)
+++
gocept.infrastructure/testing/puppet/modules/sys_apps/manifests/network_interface.pp Fri
Nov 14 17:31:45 2008
(at)(at) -46,13 +46,12 (at)(at)
# register init scripts with rc
if $bridged {
exec { "rc-update net $iface":
- # XXX: net.brX restart exhibits race condition and leaves an
- # unusable bridge
command => "\
rc-update add net.br$iface default; \
rc-update del net.eth$iface; \
/etc/init.d/net.br$iface stop; \
- sleep 3;
+ udevadm trigger; \
+ sleep 3; \
/etc/init.d/net.br$iface start; \
",
logoutput => true
(at)(at) -61,7 +60,10 (at)(at)
exec { "rc-update net $iface":
command => "\
rc-update add net.eth$iface default; \
- /etc/init.d/net.eth$iface restart; \
+ /etc/init.d/net.eth$iface stop; \
+ udevadm trigger; \
+ sleep 3; \
+ /etc/init.d/net.eth$iface start; \
",
logoutput => true
}
Modified: gocept.infrastructure/testing/puppet/modules/sys_fs/manifests/udev.pp
==============================================================================
---
gocept.infrastructure/testing/puppet/modules/sys_fs/manifests/udev.pp (original)
+++ gocept.infrastructure/testing/puppet/modules/sys_fs/manifests/udev.pp Fri
Nov 14 17:31:45 2008
(at)(at) -7,8 +7,7 (at)(at)
$iface = "eth$title"
file { "/etc/udev/rules.d/70-persistent-net-$iface.rules":
- content => template("sys_fs/70-persistent-net.rules.erb"),
- notify => Exec["udevadm trigger"],
+ content => template("sys_fs/70-persistent-net.rules.erb")
}
}
(at)(at) -16,16 +15,14 (at)(at)
class sys_fs::udev {
sys_portage::package { "udev":
- ensure => "124-r1"
+ ensure => "124-r1"
}
# We do not want the persistent net rules generator since we generate
# persistent net rules ourselves.
file { ["/etc/udev/rules.d/70-persistent-net.rules",
- "/etc/udev/rules.d/75-persistent-net-generator.rules"]:
+ "/etc/udev/rules.d/75-persistent-net-generator.rules"]:
ensure => absent
}
- exec { "udevadm trigger": }
-
}
|
|