Commits

Peter Eisentraut  committed 7c180e2

Rename local puppet modules to pgci-*

So they can be distinguished from public ones.

  • Participants
  • Parent commits 51048a1

Comments (0)

Files changed (13)

File manifests/pgci.pp

   }
 }
 
-class { 'build-deps': }
-class { 'ferm': }
-class { 'icinga': }
+class { 'pgci-build-deps': }
+class { 'pgci-ferm': }
+class { 'pgci-icinga': }
 
 # interferes with facter
 package { 'procinfo':

File modules/build-deps/files/jadetex.cnf

-TEXINPUTS.jadetex = .;$TEXMF/tex/{jadetex,latex,plain,generic,}//
-TEXINPUTS.pdfjadetex = .;$TEXMF/tex/{jadetex,latex,plain,generic,}//
-
-%%
-%% jacking up TeX settings for the unique uses of jadetex
-%%
-extra_mem_bot.jadetex = 85000
-extra_mem_bot.pdfjadetex = 85000
-
-%%
-%% added for PostgreSQL
-%%
-hash_extra.jadetex  = 200000
-hash_extra.pdfjadetex  = 200000
-pool_size.jadetex = 2000000
-pool_size.pdfjadetex = 2000000
-string_vacancies.jadetex = 150000
-string_vacancies.pdfjadetex = 150000
-max_strings.jadetex = 300000
-max_strings.pdfjadetex = 300000
-save_size.jadetex = 15000
-save_size.pdfjadetex = 15000

File modules/build-deps/manifests/init.pp

-class build-deps {
-
-  $build_deps = [ 'bison',
-                  'flex',
-                  'gcc',
-                  'gettext',
-                  'libedit-dev',
-                  'libkrb5-dev',
-                  'libldap2-dev',
-                  'libossp-uuid-dev',
-                  'libpam0g-dev',
-                  'libperl-dev',
-                  'libreadline-dev',
-                  'libssl-dev',
-                  'libxml2-dev',
-                  'libxslt1-dev',
-                  'zlib1g-dev',
-                  'make',
-                  'perl',
-                  'python-dev',
-                  'python3-dev',
-                  'systemtap-sdt-dev',
-                  'tcl-dev',
-
-                  'lcov',
-
-                  'docbook',
-                  'docbook2x',
-                  'docbook-dsssl',
-                  'docbook-xsl',
-                  'fop',
-                  'jadetex',
-                  'openjade1.3',
-                  'opensp',
-                  'texinfo',
-                  'xsltproc',
-
-                  'python-docutils', # for pghashlib
-                  ]
-
-  package {
-    $build_deps:
-      ensure => latest;
-
-    'ccache':
-      ensure => installed;
-  }
-
-
-  apt::pin { 'squeeze-backports':
-    packages => ['fop'],
-    priority => 500,
-    before => Package['fop'],
-  }
-
-
-  file { ['/etc/texmf', '/etc/texmf/texmf.d']:
-    ensure => directory,
-  }
-
-  file { '/etc/texmf/texmf.d/96JadeTeX.cnf':
-    ensure => present,
-    source => 'puppet:///modules/build-deps/jadetex.cnf',
-    owner => root,
-    group => root,
-    notify => Exec['update-texmf'],
-  }
-
-  exec { 'update-texmf':
-    path => ['/usr/bin', '/usr/sbin', '/bin', '/sbin'],
-    refreshonly => true,
-  }
-
-}

File modules/ferm/files/ferm.conf

-# -*- shell-script -*-
-#
-#  Configuration file for ferm(1).
-#
-
-domain (ip ip6) {
-table filter {
-    chain INPUT {
-        policy DROP;
-
-        # connection tracking
-        mod state state INVALID DROP;
-        mod state state (ESTABLISHED RELATED) ACCEPT;
-
-        # allow local packet
-        interface lo ACCEPT;
-
-        # respond to ping
-        proto icmp ACCEPT; 
-
-        proto tcp dport (ssh 222 smtp http https) ACCEPT;
-    }
-    chain OUTPUT {
-        policy ACCEPT;
-
-        # connection tracking
-        #mod state state INVALID DROP;
-        mod state state (ESTABLISHED RELATED) ACCEPT;
-    }
-    chain FORWARD {
-        policy DROP;
-
-        # connection tracking
-        mod state state INVALID DROP;
-        mod state state (ESTABLISHED RELATED) ACCEPT;
-    }
-}
-}

File modules/ferm/manifests/init.pp

-class ferm {
-
-  package {
-    'ferm':
-      ensure => installed,
-  }
-
-  file {
-    '/etc/ferm':
-      ensure  => directory,
-      owner   => 'root',
-      group   => 'adm',
-      mode    => 'u=rwx,g=rxs,o=',
-      require => Package['ferm'];
-
-    '/etc/ferm/ferm.conf':
-      ensure  => present,
-      owner   => 'root',
-      group   => 'adm',
-      mode    => 'u=rw,go=r',
-      notify  => Exec['ferm-reload'],
-      source  => 'puppet:///modules/ferm/ferm.conf';
-  }
-
-  exec {
-    'ferm-reload':
-      command => '/etc/init.d/ferm reload',
-      refreshonly => true,
-      require => Package['ferm'],
-  }
-}

File modules/icinga/manifests/init.pp

-class icinga {
-
-  package {
-    'icinga':
-      ensure => installed,
-  }
-
-  file {
-    ['/etc/icinga', '/etc/icinga/objects']:
-      ensure => directory,
-      require => Package ['icinga'];
-
-    '/etc/icinga/objects/pgci.cfg':
-      ensure => present,
-      content => template('icinga/pgci.cfg.erb'),
-      notify => Service['icinga'];
-  }
-
-  service {
-    'icinga':
-      ensure => running,
-      require => Service['httpd', 'postfix'],
-  }
-}

File modules/icinga/templates/pgci.cfg.erb

-define command {
-	command_name                   check_mailq
-	command_line                   /usr/lib/nagios/plugins/check_mailq -w 10 -c 20 -M postfix
-}
-
-define command {
-	command_name                   check_http_jenkins
-	command_line                   /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' -u 'http://localhost/jenkins' -f follow -s 'Dashboard'
-}
-
-define command {
-	command_name                   check_ntp_time
-	command_line                   /usr/lib/nagios/plugins/check_ntp_time -H 0.debian.pool.ntp.org -w 0.5 -c 1
-}
-
-define command {
-	command_name                   check_swap
-	command_line                   /usr/lib/nagios/plugins/check_swap -w 90% -c 50%
-}
-
-define service {
-	check_command                  check_swap
-	host_name                      localhost
-	use                            generic-service
-	service_description            Swap
-}
-
-define service {
-	check_command                  check_apt_distupgrade
-	host_name                      localhost
-	use                            generic-service
-	service_description            APT
-}
-
-define service {
-	check_command                  check_mailq
-	host_name                      localhost
-	use                            generic-service
-	service_description            Mail queue
-}
-
-define service {
-	check_command                  check_ntp_time
-	host_name                      localhost
-	use                            generic-service
-	service_description            NTP
-}
-
-define service {
-	check_command                  check_http
-	host_name                      <%= hostname %>
-	use                            generic-service
-	service_description            HTTP
-}
-
-define service {
-	check_command                  check_http_jenkins
-	host_name                      <%= hostname %>
-	use                            generic-service
-	service_description            HTTP Jenkins
-}
-
-define service {
-	check_command                  check_https
-	host_name                      <%= hostname %>
-	use                            generic-service
-	service_description            HTTPS
-}
-
-define host {
-	address                        <%= ipaddress %>
-	host_name                      <%= hostname %>
-	use                            generic-host
-}

File modules/pgci-build-deps/files/jadetex.cnf

+TEXINPUTS.jadetex = .;$TEXMF/tex/{jadetex,latex,plain,generic,}//
+TEXINPUTS.pdfjadetex = .;$TEXMF/tex/{jadetex,latex,plain,generic,}//
+
+%%
+%% jacking up TeX settings for the unique uses of jadetex
+%%
+extra_mem_bot.jadetex = 85000
+extra_mem_bot.pdfjadetex = 85000
+
+%%
+%% added for PostgreSQL
+%%
+hash_extra.jadetex  = 200000
+hash_extra.pdfjadetex  = 200000
+pool_size.jadetex = 2000000
+pool_size.pdfjadetex = 2000000
+string_vacancies.jadetex = 150000
+string_vacancies.pdfjadetex = 150000
+max_strings.jadetex = 300000
+max_strings.pdfjadetex = 300000
+save_size.jadetex = 15000
+save_size.pdfjadetex = 15000

File modules/pgci-build-deps/manifests/init.pp

+class pgci-build-deps {
+
+  $build_deps = [ 'bison',
+                  'flex',
+                  'gcc',
+                  'gettext',
+                  'libedit-dev',
+                  'libkrb5-dev',
+                  'libldap2-dev',
+                  'libossp-uuid-dev',
+                  'libpam0g-dev',
+                  'libperl-dev',
+                  'libreadline-dev',
+                  'libssl-dev',
+                  'libxml2-dev',
+                  'libxslt1-dev',
+                  'zlib1g-dev',
+                  'make',
+                  'perl',
+                  'python-dev',
+                  'python3-dev',
+                  'systemtap-sdt-dev',
+                  'tcl-dev',
+
+                  'lcov',
+
+                  'docbook',
+                  'docbook2x',
+                  'docbook-dsssl',
+                  'docbook-xsl',
+                  'fop',
+                  'jadetex',
+                  'openjade1.3',
+                  'opensp',
+                  'texinfo',
+                  'xsltproc',
+
+                  'python-docutils', # for pghashlib
+                  ]
+
+  package {
+    $build_deps:
+      ensure => latest;
+
+    'ccache':
+      ensure => installed;
+  }
+
+
+  apt::pin { 'squeeze-backports':
+    packages => ['fop'],
+    priority => 500,
+    before => Package['fop'],
+  }
+
+
+  file { ['/etc/texmf', '/etc/texmf/texmf.d']:
+    ensure => directory,
+  }
+
+  file { '/etc/texmf/texmf.d/96JadeTeX.cnf':
+    ensure => present,
+    source => 'puppet:///modules/pgci-build-deps/jadetex.cnf',
+    owner => root,
+    group => root,
+    notify => Exec['update-texmf'],
+  }
+
+  exec { 'update-texmf':
+    path => ['/usr/bin', '/usr/sbin', '/bin', '/sbin'],
+    refreshonly => true,
+  }
+
+}

File modules/pgci-ferm/files/ferm.conf

+# -*- shell-script -*-
+#
+#  Configuration file for ferm(1).
+#
+
+domain (ip ip6) {
+table filter {
+    chain INPUT {
+        policy DROP;
+
+        # connection tracking
+        mod state state INVALID DROP;
+        mod state state (ESTABLISHED RELATED) ACCEPT;
+
+        # allow local packet
+        interface lo ACCEPT;
+
+        # respond to ping
+        proto icmp ACCEPT; 
+
+        proto tcp dport (ssh 222 smtp http https) ACCEPT;
+    }
+    chain OUTPUT {
+        policy ACCEPT;
+
+        # connection tracking
+        #mod state state INVALID DROP;
+        mod state state (ESTABLISHED RELATED) ACCEPT;
+    }
+    chain FORWARD {
+        policy DROP;
+
+        # connection tracking
+        mod state state INVALID DROP;
+        mod state state (ESTABLISHED RELATED) ACCEPT;
+    }
+}
+}

File modules/pgci-ferm/manifests/init.pp

+class pgci-ferm {
+
+  package {
+    'ferm':
+      ensure => installed,
+  }
+
+  file {
+    '/etc/ferm':
+      ensure  => directory,
+      owner   => 'root',
+      group   => 'adm',
+      mode    => 'u=rwx,g=rxs,o=',
+      require => Package['ferm'];
+
+    '/etc/ferm/ferm.conf':
+      ensure  => present,
+      owner   => 'root',
+      group   => 'adm',
+      mode    => 'u=rw,go=r',
+      notify  => Exec['ferm-reload'],
+      source  => 'puppet:///modules/pgci-ferm/ferm.conf';
+  }
+
+  exec {
+    'ferm-reload':
+      command => '/etc/init.d/ferm reload',
+      refreshonly => true,
+      require => Package['ferm'],
+  }
+}

File modules/pgci-icinga/manifests/init.pp

+class pgci-icinga {
+
+  package {
+    'icinga':
+      ensure => installed,
+  }
+
+  file {
+    ['/etc/icinga', '/etc/icinga/objects']:
+      ensure => directory,
+      require => Package ['icinga'];
+
+    '/etc/icinga/objects/pgci.cfg':
+      ensure => present,
+      content => template('pgci-icinga/pgci.cfg.erb'),
+      notify => Service['icinga'];
+  }
+
+  service {
+    'icinga':
+      ensure => running,
+      require => Service['httpd', 'postfix'],
+  }
+}

File modules/pgci-icinga/templates/pgci.cfg.erb

+define command {
+	command_name                   check_mailq
+	command_line                   /usr/lib/nagios/plugins/check_mailq -w 10 -c 20 -M postfix
+}
+
+define command {
+	command_name                   check_http_jenkins
+	command_line                   /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' -u 'http://localhost/jenkins' -f follow -s 'Dashboard'
+}
+
+define command {
+	command_name                   check_ntp_time
+	command_line                   /usr/lib/nagios/plugins/check_ntp_time -H 0.debian.pool.ntp.org -w 0.5 -c 1
+}
+
+define command {
+	command_name                   check_swap
+	command_line                   /usr/lib/nagios/plugins/check_swap -w 90% -c 50%
+}
+
+define service {
+	check_command                  check_swap
+	host_name                      localhost
+	use                            generic-service
+	service_description            Swap
+}
+
+define service {
+	check_command                  check_apt_distupgrade
+	host_name                      localhost
+	use                            generic-service
+	service_description            APT
+}
+
+define service {
+	check_command                  check_mailq
+	host_name                      localhost
+	use                            generic-service
+	service_description            Mail queue
+}
+
+define service {
+	check_command                  check_ntp_time
+	host_name                      localhost
+	use                            generic-service
+	service_description            NTP
+}
+
+define service {
+	check_command                  check_http
+	host_name                      <%= hostname %>
+	use                            generic-service
+	service_description            HTTP
+}
+
+define service {
+	check_command                  check_http_jenkins
+	host_name                      <%= hostname %>
+	use                            generic-service
+	service_description            HTTP Jenkins
+}
+
+define service {
+	check_command                  check_https
+	host_name                      <%= hostname %>
+	use                            generic-service
+	service_description            HTTPS
+}
+
+define host {
+	address                        <%= ipaddress %>
+	host_name                      <%= hostname %>
+	use                            generic-host
+}