Permalink
Browse files

New submodules added (jboss and puppet) and updated

  • Loading branch information...
1 parent 6c2dd0d commit 161d35eb61a1bf84f44c3c0f2d260fb8dddc33bd @alvagante alvagante committed Mar 26, 2012
Showing with 11 additions and 2,761 deletions.
  1. +6 −0 .gitmodules
  2. +1 −0 jboss
  3. +0 −8 jboss/Modulefile
  4. +0 −89 jboss/README
  5. +0 −29 jboss/files/run.conf
  6. +0 −25 jboss/manifests/absent.pp
  7. +0 −26 jboss/manifests/debug.pp
  8. +0 −28 jboss/manifests/init.pp
  9. +0 −33 jboss/manifests/install.pp
  10. +0 −257 jboss/manifests/instance.pp
  11. +0 −17 jboss/manifests/package.pp
  12. +0 −241 jboss/manifests/params.pp
  13. +0 −16 jboss/manifests/prerequisites.pp
  14. +0 −26 jboss/manifests/puppi.pp
  15. +0 −140 jboss/templates/jboss.init.erb
  16. +0 −49 jboss/templates/variables_jboss.erb
  17. +1 −1 mysql
  18. +1 −1 nrpe
  19. +1 −0 puppet
  20. +0 −7 puppet/Modulefile
  21. +0 −57 puppet/README
  22. +0 −20 puppet/files/config.ru
  23. +0 −10 puppet/files/default-puppet
  24. +0 −6 puppet/files/foreman.repo
  25. +0 −87 puppet/files/puppet.vim
  26. +0 −12 puppet/manifests/absent.pp
  27. +0 −41 puppet/manifests/backup.pp
  28. +0 −56 puppet/manifests/client.pp
  29. +0 −23 puppet/manifests/conf.pp
  30. +0 −66 puppet/manifests/debug.pp
  31. +0 −13 puppet/manifests/disable.pp
  32. +0 −13 puppet/manifests/disableboot.pp
  33. +0 −17 puppet/manifests/doc.pp
  34. +0 −24 puppet/manifests/firewall.pp
  35. +0 −54 puppet/manifests/init.pp
  36. +0 −13 puppet/manifests/moduletool.pp
  37. +0 −90 puppet/manifests/monitor.pp
  38. +0 −385 puppet/manifests/params.pp
  39. +0 −29 puppet/manifests/puppi.pp
  40. +0 −29 puppet/manifests/rails.pp
  41. +0 −40 puppet/manifests/ruby.pp
  42. +0 −128 puppet/manifests/server.pp
  43. +0 −14 puppet/manifests/server/disable.pp
  44. +0 −52 puppet/manifests/server/mysql.pp
  45. +0 −58 puppet/manifests/server/passenger.pp
  46. +0 −15 puppet/manifests/ubuntu.pp
  47. +0 −4 puppet/templates/client/namespaceauth.conf.erb
  48. +0 −28 puppet/templates/client/puppet.conf.erb
  49. +0 −42 puppet/templates/puppet-passenger.conf.erb
  50. +0 −109 puppet/templates/server/auth.conf.erb
  51. +0 −5 puppet/templates/server/fileserver.conf.erb
  52. +0 −24 puppet/templates/server/namespaceauth.conf.erb
  53. +0 −108 puppet/templates/server/puppet.conf.erb
  54. +0 −4 puppet/templates/server/tagmail.conf.erb
  55. +0 −91 puppet/templates/variables_puppet.erb
  56. +1 −1 puppi
View
6 .gitmodules
@@ -64,3 +64,9 @@
[submodule "nrpe"]
path = nrpe
url = https://github.com/example42/puppet-nrpe
+[submodule "puppet"]
+ path = puppet
+ url = https://github.com/example42/puppet-puppet
+[submodule "jboss"]
+ path = jboss
+ url = https://github.com/example42/puppet-jboss.git
1 jboss
@@ -0,0 +1 @@
+Subproject commit 48a27d3ebede967f2963b8ff9dd367ea574a017d
View
8 jboss/Modulefile
@@ -1,8 +0,0 @@
-name 'lab42-jboss'
-version '0.1.8'
-
-# dependency 'lab42/common', '>= 0.1.0'
-# dependency 'lab42/puppi', '>= 0.1.0'
-# dependency 'lab42/monitor', '>= 0.1.0'
-# dependency 'lab42/backup', '>= 0.1.0'
-# dependency 'lab42/firewall', '>= 0.1.0'
View
89 jboss/README
@@ -1,89 +0,0 @@
-Puppet module: jboss
-
-# Written by Lab42 #
-# http://www.Example42.com
-
-Licence: Apache2
-
-DESCRIPTION:
-This module installs and manages jboss either via system packages or native sources.
-It provides a define to manage multiple instances on the same host.
-
-Even if is intended to adapt to different Jboss versions and installation types, it has been
-tested only with Jboss 6 (Community Edition zip file) on Ubuntu.
-
-All the variables used in this module are defined in the jboss::params class
-(File: $MODULEPATH/jboss/manifests/params.pp). Here you can:
-- Set default settings and filtering module's specific Users variables
-- Add selectors for internal variables to adapt the module to different OSes
-- Review and eventually change default settings for variables that affect the
- Example42 extended classes.
-
-Customizations for different projects and logic on how to populate configuration
-files should be placed in the $my_project classes.
-
-
-MODULE'S SPECIFIC USER VARIABLES:
-
-USAGE:
-include jboss # Installs jboss (no instance provided by default, unless the package does it)
-jboss::instance { "myapp": } # Creates "myapp" instance (Check documentation on jboss/manifests/instance.pp
- # for customization options)
-
-If you want multiple instances you can bind them to different IP address :
-include jboss
-jboss::instance { "myapp1": bindaddr => 10.42.42.180 }
-jboss::instance { "myapp2": bindaddr => 10.42.42.181 }
-If you want to use the same address for multiple instances you've to manage in a custom way the offset on
-the various ports that Jboss opens by default.
-
-You can set this variables to alter jboss installation:
-$jboss_use_package - Define if you want to install Jboss via a package or from original source zip files.
- Default "no": files are downloaded from the Internet (or source defined in $jboss_source_url )
-$jboss_source_url - Define an alternative source from where to download the source zip files.
- Default are the official Jboss community download urls
-$jboss_version - Define the Jboss version to install. Default is 6.
-$jboss_destination_dir - Define where to unzip the source file. Default /usr/local
-$jboss_jboss_dir - Define the base jboss dir (a link with this name is created pointing to the extracted dir)
- Default: $jboss_destination_dir/jboss
-$jboss_download_dir - Define where to download the source zip file. Default /var/tmp
-
-# Extended Classes
-If you use Example42 monitoring abstraction or Puppi, jboss::instance creates the relevant configurations
-
-
-EXAMPLE42 GENERAL VARIABLES:
-Example42 modules collection uses some general variables that can influence the
-behaviour of this module. You can happily live without considering or setting them,
-but they can be useful to get many useful features out of the box.
-$my_project - If set, permits you to alter and customize the module behaviour
- and files's deploy logic in custom project classes than can be placed in a separated module.
-$base_source - Lets you define an alternative source for static files:
- - $base_source not set -> Files are looked in puppet://$servername/ (the PuppetMaster)
- - $base_source set -> Files are in $base_source ( Ex: puppet://$servername/$my_module )
- Note that the module automatically manages the different paths for Puppet pre 0.25
-$debug - If set to yes writes in /var/lib/puppet/debug/ useful debugging info
-
-VARIABLES FOR EXTENDED MODULES:
-$puppi - Set to "yes" to enable jboss plugins for puppi
-Check jboss/manifests/puppi.pp for more info.
-
-$monitor - Set to "yes" to enable auto monitoring classes
-$monitor_tool - Defines the monitor tools to activate (At leat one, can be an array)
-Check jboss/manifests/monitor.pp for more info on jboss monitoring related variables.
-
-$firewall - Set to "yes" to enable auto firewalling classes
-$firewall_tool - Defines the firewall tools to activate
-Check jboss/manifests/firewall.pp for more info on jboss firewalling related variables.
-
-
-DEPENDENCIES:
-Standard classes generally don't need external modules.
-Extended classes need the relevant external modules.
-jboss::instance needs curl and unzip commands. They are provided in the jboss::prerequisites class.
-
-OPERATING SYSTEMS SUPPORT (Planned, Development, Testing, Production):
-RedHat/Centos 5 : Testing
-RedHat/Centos 6 : Testing
-Debian 6 : Planned
-Ubuntu 10.04 : Production
View
29 jboss/files/run.conf
@@ -1,29 +0,0 @@
-# File Managed by Puppet
-# JBoss INSTANCE Bootstrap Script Configuration
-# Sample run.conf file based on Jboss 6 Community edition
-
-# Specify the maximum file descriptor limit, use "max" or "maximum" to use
-# the default, as queried by the system.
-#MAX_FD="maximum"
-
-# Specify the profiler configuration file to load.
-#PROFILER=""
-
-# Specify the location of the Java home directory. If set then $JAVA will
-# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
-#JAVA_HOME="/opt/java/jdk"
-
-# Specify the exact Java VM executable to use.
-#JAVA=""
-
-# Specify options to pass to the Java VM.
-if [ "x$JAVA_OPTS" = "x" ]; then
- JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
-fi
-
-# Sample JPDA settings for remote socket debuging
-#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
-
-# Sample JPDA settings for shared memory debugging
-#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
-
View
25 jboss/manifests/absent.pp
@@ -1,25 +0,0 @@
-# Class: jboss::absent
-#
-# Removes jboss package and its relevant monitor, backup, firewall entries
-#
-# Usage:
-# include jboss::absent
-#
-class jboss::absent {
-
- require jboss::params
-
- package { "jboss":
- name => "${jboss::params::packagename}",
- ensure => absent,
- }
-
- # Remove relevant monitor, backup, firewall entries
- if $monitor == "yes" { include jboss::monitor::absent }
- if $backup == "yes" { include jboss::backup::absent }
- if $firewall == "yes" { include jboss::firewall::absent }
-
- # Include debug class is debugging is enabled ($debug=yes)
- if ( $debug == "yes" ) or ( $debug == true ) { include jboss::debug }
-
-}
View
26 jboss/manifests/debug.pp
@@ -1,26 +0,0 @@
-#
-# Class: jboss::debug
-#
-# This class is used only for debugging purposes
-#
-# Usage:
-# This class is autoloaded if you set $debug=yes
-#
-class jboss::debug {
-
- # Load the variables used in this module. Check the params.pp file
- require jboss::params
- include puppet::debug
- include puppet::params
-
- file { "puppet_debug_variables_jboss":
- path => "${puppet::params::debugdir}/variables/jboss",
- mode => "${jboss::params::configfile_mode}",
- owner => "${jboss::params::configfile_owner}",
- group => "${jboss::params::configfile_group}",
- ensure => present,
- require => File["puppet_debug_variables"],
- content => template("jboss/variables_jboss.erb"),
- }
-
-}
View
28 jboss/manifests/init.pp
@@ -1,28 +0,0 @@
-#
-# Class: jboss
-#
-# Installs jboss.
-# For a functional installation you need also to define a jboss instance
-#
-# Usage:
-# include jboss
-# jboss::instance { "myapp": }
-#
-class jboss {
-
- # Load the variables used in this module. Check the params.pp file
- require jboss::params
-
- # Installation
- case $jboss::params::use_package {
- yes: { include jboss::package }
- default: { include jboss::install }
- }
-
- # Include project specific class if $my_project is set
- if $my_project { include "jboss::${my_project}" }
-
- # Include debug class is debugging is enabled ($debug=yes)
- if ( $debug == "yes" ) or ( $debug == true ) { include jboss::debug }
-
-}
View
33 jboss/manifests/install.pp
@@ -1,33 +0,0 @@
-#
-# Class: jboss::install
-#
-# Installs jboss from zip
-#
-class jboss::install {
-
- # Load the variables used in this module. Check the params.pp file
- require jboss::params
-
- require jboss::prerequisites
-
- exec { "Download_Jboss":
- command => "curl -L ${jboss::params::source_url} -o ${jboss::params::download_dir}/${jboss::params::source_filename}",
- cwd => "${jboss::params::download_dir}",
- creates => "${jboss::params::download_dir}/${jboss::params::source_filename}",
- timeout => 3600,
- }
-
- exec { "Extract_Jboss":
- command => "unzip ${jboss::params::download_dir}/${jboss::params::source_filename}",
- cwd => "${jboss::params::destination_dir}",
- creates => "${jboss::params::destination_dir}/${jboss::params::extracted_dir}",
- timeout => 3600,
- require => Exec["Download_Jboss"],
- }
-
- file { "Jboss_basedir_link":
- path => "${jboss::params::jboss_dir}",
- ensure => "${jboss::params::destination_dir}/${jboss::params::extracted_dir}",
- }
-
-}
View
257 jboss/manifests/instance.pp
@@ -1,257 +0,0 @@
-#
-# Define: jboss::instance
-#
-# This defines creates a Jboss instance.
-# It has been tested for installations based on source zip.
-# Given the huge amount of possible configurations settings that might be defined
-# you can provide, where needed, the puppet:///modules location from where to
-# source static files for conf, deploy and deployers directories in your instance.
-# The files present in the directories you define on the puppetmaster are copied
-# in the relevant subdir of your instance directory (existing files, not defined in
-# the source directory are preserved).
-#
-# Parameters:
-# user => The user with which the instance will be running
-# Default: jboss. You can have multiple instances using the same user but
-# only one has the createuser parameters set to true.
-# userid => The userid to force for your user. Default in unset (OS will decide)
-# group => The group with which the instance will be running
-# Default: jboss. You can have multiple instances using the same group but
-# only one has the createuser parameters set to true.
-# userid => The groupid to force for your group. Default in unset (OS will decide)
-# createuser => If the define will try to create the user. Default: true
-# Set this to false if the user is already created by other puppet classes
-# or other jboss::instance(s).
-# template => The base Jboss template to use as model for your instance.
-# Default: default. Possible values are: all, minimal, standard, default
-# According to what you find, in a fresh installation, in $jboss_dir/server/
-# bindaddr => The address where to bind the Jboss instance. Default: 127.0.0.1
-# port => The port where the Jboss instance will listen to. Default: 8080
-# Note (obvious): Do not place multiple instances with the same port on the same IP
-# Consider that Jboss opens by default other ports besides this one
-# run_conf => Source ( as in puppet:///modules/${run_conf} ) from where to get a custom run.conf dedicated
-# to this instance. Default is unset, and Jboss default run.conf is used
-# A sample file is in files/run.conf ( set run_conf => "jboss/run.conf" to use it )
-# conf_dir => The source from where you retrieve custom files to be placed in the instance conf dir
-# If defined whatever is placed in source => "puppet:///modules/${conf_dir}/" will
-# be recursively synced in the $instance_dir/conf/ directory (existing files are NOT purged).
-# Default is unset (no sync attempt will be made).
-# deploy_dir => The source from where you retrieve custom files to be placed in the instance deploy dir
-# If defined whatever is placed in source => "puppet:///modules/${deploy_dir}/" will
-# be recursively synced in the $instance_dir/deploy/ directory (existing files are NOT purged).
-# Default is unset (no sync attempt will be made).
-# deployers_dir => The source from where you retrieve custom files to be placed in the instance deployers dir
-# If defined whatever is placed in source => "puppet:///modules/${deployers_dir}/" will
-# be recursively synced in the $instance_dir/deployers/ directory (existing files are NOT purged).
-# Default is unset (no sync attempt will be made).
-# init_template => You may need to change the initscript of the Jboss instance.
-# The content of /etc/init.d/jboss-$name is: content => template("$init_template"),
-# Use this variable to define a different Puppet template source.
-# Default is: "jboss/jboss.init.erb" (Use it as reference for customization).
-# enable => If the instance is actually created and enabled. Default: true
-# If you set this to false since the beginning nothing is done.
-# If you set this to false once it had been already created existing files are kept, but service
-# is stopped and monitoring and puppi extensions are disabled.
-#
-# Examples:
-# Minimal Example based on default settings:
-# jboss::instance { "myapp": }
-#
-# More elaborated examples:
-# jboss::instance { "myapp":
-# user => "myapp", # Default is jboss
-# userid => "450", # Default is unset
-# group => "myapp", # Default is jboss
-# groupid => "450", # Default is unset
-# createuser => true # Default is true
-# template => "all", # Default is default
-# bindaddr => "0.0.0.0", # Default is 127.0.0.1
-# port => "80", # Default is 8080
-# run_conf => "site/jboss/myapp/run.conf", # Default is unset
-# conf_dir => "site/jboss/myapp/conf", # Default is unset
-# deploy_dir => "site/jboss/myapp/deploy", # Default is unset
-# deployers_dir => "site/jboss/myapp/deployers", # Default is unset
-# }
-#
-define jboss::instance (
- user="jboss",
- userid="",
- group="jboss",
- groupid="",
- createuser=true,
- template="default",
- bindaddr="127.0.0.1",
- port="8080",
- run_conf="",
- conf_dir="",
- deploy_dir="",
- deployers_dir="",
- init_template="jboss/jboss.init.erb",
- enable=true
- ) {
-
- # Load the variables used in this module. Check the params.pp file
- require jboss::params
-
- require jboss::prerequisites
-
- $instance_dir="${jboss::params::destination_dir}/${jboss::params::extracted_dir}/server/${name}"
-
- if ($enable == true) {
- # Create custom Instance files
- exec { "Clone_Jboss_Instance_$name":
- command => "cp -a ${template} ${name}",
- cwd => "${jboss::params::destination_dir}/${jboss::params::extracted_dir}/server/",
- creates => "${jboss::params::destination_dir}/${jboss::params::extracted_dir}/server/${name}",
- timeout => 3600,
- require => Exec["Extract_Jboss"],
- }
-
- exec { "Set_Jboss_Instance_Permissions_$name":
- command => "chown -R ${user}:${group} ${instance_dir} && touch ${instance_dir}/.permissions_set",
- cwd => "${jboss::params::destination_dir}",
- creates => "${instance_dir}/.permissions_set",
- timeout => 3600,
- require => [ Exec["Clone_Jboss_Instance_$name"] , User["${user}"] , Group["$group"] ]
- }
- }
-
- # Manage Instance service
- service { "jboss-$name":
- ensure => $enable ? {
- true => running,
- false => stopped,
- },
- enable => $enable,
- hasrestart => true,
- hasstatus => true,
- require => "${jboss::params::use_package}" ? {
- yes => Class["jboss::package"],
- default => Class["jboss::install"],
- },
- }
-
- if ($enable == true) {
- file { "Jboss_initscript_$name":
- path => "/etc/init.d/jboss-$name",
- mode => "755",
- owner => "root",
- group => "root",
- before => Service["jboss-$name"],
- notify => Service["jboss-$name"],
- content => template("$init_template"),
- }
- }
-
- # Manage Instance user
- if ($enable == true) and ($createuser == true) {
- @user { "$user":
- uid => $userid ? {
- '' => undef,
- default => "${userid}",
- },
- ensure => present,
- password => '!',
- managehome => false,
- comment => "JBoss user",
- shell => "/bin/bash",
- home => "${jboss::params::jboss_dir}",
- }
- @group { "$group":
- gid => $groupid ? {
- '' => undef,
- default => "${groupid}",
- },
- ensure => present,
- require => User["$user"],
- }
-
- realize User["$user"]
- realize Group["$group"]
- }
-
- # Manage custom run.conf , if defined
- if ($run_conf != "") and ($enable == true) {
- file { "jboss_run_conf_${name}":
- path => "${instance_dir}/run.conf",
- owner => "${user}",
- group => "${group}",
- require => Exec["Set_Jboss_Instance_Permissions_$name"],
- notify => Service["jboss-${name}"],
- source => "puppet:///modules/${run_conf}",
- }
- }
-
- # Manage conf dir, if defined
- if ($conf_dir != "") and ($enable == true) {
- file { "jboss_confdir_${name}":
- path => "${instance_dir}/conf/",
- owner => "${user}",
- group => "${group}",
- require => Exec["Set_Jboss_Instance_Permissions_$name"],
- notify => Service["jboss-${name}"],
- recurse => true,
- ignore => ".svn",
- source => "puppet:///modules/${conf_dir}/",
- }
- }
-
- # Manage deploy dir, if defined
- if ($deploy_dir != "") and ($enable == true) {
- file { "jboss_deploydir_${name}":
- path => "${instance_dir}/deploy/",
- owner => "${user}",
- group => "${group}",
- require => Exec["Set_Jboss_Instance_Permissions_$name"],
- notify => Service["jboss-${name}"],
- recurse => true,
- ignore => ".svn",
- source => "puppet:///modules/${deploy_dir}/",
- }
- }
-
- # Manage deployers dir, if defined
- if ($deployers_dir != "") and ($enable == true) {
- file { "jboss_deployersdir_${name}":
- path => "${instance_dir}/deployers/",
- owner => "${user}",
- group => "${group}",
- require => Exec["Set_Jboss_Instance_Permissions_$name"],
- notify => Service["jboss-${name}"],
- recurse => true,
- ignore => ".svn",
- source => "puppet:///modules/${deployers_dir}/",
- }
- }
-
- # Automatic monitoring, if enabled
- if $monitor == "yes" {
- monitor::port { "jboss_${jboss::params::protocol}_${port}":
- protocol => "${jboss::params::protocol}",
- port => "${port}",
- target => "${bindaddr}",
- enable => "${enable}",
- tool => "${monitor_tool}",
- }
- }
-
- # Puppi addons, if puppi is enabled
- if ($puppi == "yes") and ($enable == true) {
- puppi::info::module { "jboss-${name}":
- servicename => "jboss-${name}",
- processname => "${jboss::params::processname}",
- configdir => [ "${jboss::params::jboss_dir}/bin" , "${jboss::params::jboss_dir}/server/${name}/conf" ],
- datadir => [ "${instance_dir}/deploy" , "${instance_dir}/deployers" ],
- logdir => "${jboss::params::jboss_dir}/server/${name}/log",
- protocol => "${jboss::params::protocol}",
- port => "${port}",
- description => "What Puppet knows about jboss instance $name" ,
- # run => "jboss -V###",
- }
- puppi::log { "jboss-${name}":
- description => "Logs of jboss instance ${name}" ,
- log => [ "${instance_dir}/log/server.log" , "${instance_dir}/log/boot.log" ],
- }
- }
-
-}
View
17 jboss/manifests/package.pp
@@ -1,17 +0,0 @@
-#
-# Class: jboss::package
-#
-# Installs jboss via a package
-#
-class jboss::package {
-
- # Load the variables used in this module. Check the params.pp file
- require jboss::params
-
- # Basic Package - Service - Configuration file management
- package { "jboss":
- name => "${jboss::params::packagename}",
- ensure => present,
- }
-
-}
View
241 jboss/manifests/params.pp
@@ -1,241 +0,0 @@
-# Class: jboss::params
-#
-# Sets internal variables and defaults for jboss module
-# This class is loaded in all the classes that use the values set here
-#
-class jboss::params {
-
-## DEFAULTS FOR VARIABLES USERS CAN SET
-
- # Specify if installation is done via packages or downloading official zip
- $use_package = $jboss_use_package ? {
- true => "yes",
- "true" => "yes",
- "yes" => "yes",
- default => "no",
- }
-
- # Define which version to use
- $version = $jboss_version ? {
- '4' => "4",
- '5' => "5",
- '6' => "6",
- '7' => "7",
- default => "6",
- }
-
- # Where to get the source file (for $use_package = no). Set $jboss_source_url = "http://custom.url/" to override
- $source_url = $jboss_source_url ? {
- '' => $jboss_version ? {
- '4' => "http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip/download",
- '5' => "http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA.zip/download",
- # '6' => "http://sourceforge.net/projects/jboss/files/JBoss/JBoss-6.0.0.Final/jboss-as-distribution-6.0.0.Final.zip/download",
- '6' => "http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.zip",
- '7' => "http://download.jboss.org/jbossas/7.0/jboss-as-7.0.1.Final/jboss-as-7.0.1.Final.zip",
- default => "http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.zip",
- },
- default => "${jboss_source_url}",
- }
-
- $destination_dir = $jboss_destination_dir ? {
- '' => "/usr/local",
- default => "${jboss_destination_dir}",
- }
-
- $jboss_dir = $jboss_jboss_dir ? {
- '' => "${destination_dir}/jboss",
- default => "${jboss_jboss_dir}",
- }
-
- $download_dir = $jboss_download_dir ? {
- '' => "/var/tmp", # $jboss_download_dir must exist
- default => "${jboss_download_dir}",
- }
-
- $user = $jboss_user ? {
- '' => "jboss",
- default => "${jboss_user}",
- }
-
- $group = $jboss_group ? {
- '' => "jboss",
- default => "${jboss_group}",
- }
-
- $port = $jboss_port ? {
- '' => "8080",
- default => "${jboss_port}",
- }
-
- # The urlfilename function is provided by Example 42 common module
- $source_filename = urlfilename($source_url) # Name of zip file
- $extracted_dir = regsubst($source_filename,'\.zip$','') # Name of basedir extracted from zip
-
-
-## MODULE INTERNAL VARIABLES
-# (Modify to adapt to unsupported OSes)
-
- $packagename = $operatingsystem ? {
- debian => "jboss",
- ubuntu => "jboss",
- default => "jboss",
- }
-
- $servicename = $operatingsystem ? {
- debian => "jboss",
- ubuntu => "jboss",
- default => "jboss",
- }
-
- $processname = $operatingsystem ? {
- default => "java",
- }
-
- $hasstatus = $operatingsystem ? {
- default => false,
- }
-
- $initconfigfile = $operatingsystem ? {
- debian => "/etc/default/jboss",
- ubuntu => "/etc/default/jboss",
- default => "/etc/sysconfig/jboss",
- }
-
- # Used by monitor class
- $pidfile = $operatingsystem ? {
- default => "/var/run/jbossd.pid",
- }
-
- # Used by backup class
- $datadir = $operatingsystem ? {
- default => "/var/lib/jboss",
- }
-
- # Used by backup class - Provide the file name, if there's no dedicated dir
- $logdir = $operatingsystem ? {
- default => "/var/log/jboss",
- }
-
- # Used by monitor and firewall class
- $protocol = "tcp"
-
-
-## DEFAULTS FOR MONITOR CLASS
-# These are settings that influence the (optional) jboss::monitor class
-# You can define these variables or leave the defaults
-# The apparently complex variables assignements below follow this logic:
-# - If no user variable is set, a reasonable default is used
-# - If the user has set a host-wide variable (ex: $monitor_target ) that one is set
-# - The host-wide variable can be overriden by a module specific one (ex: $jboss_monitor_target)
-
- # How the monitor server refers to the monitor target
- $monitor_target_real = $jboss_monitor_target ? {
- '' => $monitor_target ? {
- '' => "${fqdn}",
- default => $monitor_target,
- },
- default => "$jboss_monitor_target",
- }
-
- # BaseUrl to access this service
- $monitor_baseurl_real = $jboss_monitor_baseurl ? {
- '' => $monitor_baseurl ? {
- '' => "http://${fqdn}",
- default => $monitor_baseurl,
- },
- default => "${jboss_monitor_baseurl}",
- }
-
- # Pattern to look for in the URL defined in jboss::monitor class
- $monitor_url_pattern = $jboss_monitor_url_pattern ? {
- '' => "OK",
- default => "${jboss_monitor_url_pattern}",
- }
-
- # If jboss port monitoring is enabled
- $monitor_port_enable = $jboss_monitor_port ? {
- '' => $monitor_port ? {
- '' => true,
- default => $monitor_port,
- },
- default => $jboss_monitor_port,
- }
-
- # If jboss url monitoring is enabled
- $monitor_url_enable = $jboss_monitor_url ? {
- '' => $monitor_url ? {
- '' => false,
- default => $monitor_url,
- },
- default => $jboss_monitor_url,
- }
-
- # If jboss process monitoring is enabled
- $monitor_process_enable = $jboss_monitor_process ? {
- '' => $monitor_process ? {
- '' => true,
- default => $monitor_process,
- },
- default => $jboss_monitor_process,
- }
-
- # If jboss plugin monitoring is enabled
- $monitor_plugin_enable = $jboss_monitor_plugin ? {
- '' => $monitor_plugin ? {
- '' => false,
- default => $monitor_plugin,
- },
- default => $jboss_monitor_plugin,
- }
-
-
-## DEFAULTS FOR FIREWALL CLASS
-# These are settings that influence the (optional) jboss::firewall class
-# You can define these variables or leave the defaults
-
- # Source IPs that can access this service - Use iptables friendly format
- $firewall_source_real = $jboss_firewall_source ? {
- '' => $firewall_source ? {
- '' => "0.0.0.0/0",
- default => $firewall_source,
- },
- default => "$jboss_firewall_source",
- }
-
- # Destination IP to use for this host (Default facter's $ipaddress)
- $firewall_destination_real = $jboss_firewall_destination ? {
- '' => $firewall_destination ? {
- '' => "${ipaddress}",
- default => $firewall_destination,
- },
- default => "$jboss_firewall_destination",
- }
-
- # If firewall filter is enabled
- $firewall_enable = $jboss_firewall_enable ? {
- '' => $firewall_enable ? {
- '' => true,
- default => $firewall_enable,
- },
- default => $jboss_firewall_enable,
- }
-
-## FILE SERVING SOURCE
-# Sets the correct source for static files
-# In order to provide files from different sources without modifying the module
-# you can override the default source path setting the variable $base_source
-# Ex: $base_source="puppet://ip.of.fileserver" or $base_source="puppet://$servername/myprojectmodule"
-# What follows automatically manages the new source standard (with /modules/) from 0.25
-
- case $base_source {
- '': {
- $general_base_source = $puppetversion ? {
- /(^0.25)/ => "puppet:///modules",
- /(^0.)/ => "puppet://$servername",
- default => "puppet:///modules",
- }
- }
- default: { $general_base_source=$base_source }
- }
-
-}
View
16 jboss/manifests/prerequisites.pp
@@ -1,16 +0,0 @@
-#
-# Class: jboss::prerequisites
-#
-# Prerequisites for jboss installation
-#
-class jboss::prerequisites {
-
- # Unzip is required if you install via sources
- package { "unzip": ensure => present }
-
-# Curl is needed for installation via sources
-# Here is commented since it's already provided by puppi module
-# package { "curl": ensure => present }
-
-
-}
View
26 jboss/manifests/puppi.pp
@@ -1,26 +0,0 @@
-# Class: jboss::puppi
-#
-# This class manages the puppi extensions for the jboss module
-# It's automatically included and used if $puppi=yes
-#
-class jboss::puppi {
-
- puppi::info::module { "jboss":
- servicename => "${jboss::params::servicename}",
- processname => "${jboss::params::processname}",
- configdir => [ "${jboss::params::jboss_dir}/bin" , "${jboss::params::jboss_dir}/server/${jboss::params::instance}/conf" ],
- pidfile => "${jboss::params::pidfile}",
- datadir => "${jboss::params::jboss_dir}/server/${jboss::params::instance}/deploy",
- logdir => "${jboss::params::jboss_dir}/server/${jboss::params::instance}/log",
- protocol => "${jboss::params::protocol}",
- port => "${jboss::params::port}",
- description => "What Puppet knows about jboss" ,
- # run => "jboss -V###",
- }
-
- puppi::log { "jboss":
- description => "Logs of jboss" ,
- log => [ "${jboss::params::jboss_dir}/server/${jboss::params::instance}/log/server.log" , "${jboss::params::jboss_dir}/server/${jboss::params::instance}/log/boot.log" ]
- }
-
-}
View
140 jboss/templates/jboss.init.erb
@@ -1,140 +0,0 @@
-#!/bin/sh
-# File Managed by Puppet
-# Based on init script samples provided in Jboss source
-
-# define where jboss is - this is the directory containing directories log, bin, conf etc
-JBOSS_HOME=${JBOSS_HOME:-"<%= scope.lookupvar('jboss::params::jboss_dir') %>"}
-
-# define the user under which jboss will run, or use 'RUNASIS' to run as the current user
-JBOSS_USER=${JBOSS_USER:-"<%= user %>"}
-
-# make sure java is in your path
-JAVAPTH=${JAVAPTH:-"/usr/local/jdk/bin"}
-
-# configuration to use, usually one of 'minimal', 'default', 'all'
-JBOSS_CONF=${JBOSS_CONF:-"<%= name %>"}
-
-# if JBOSS_HOST specified, use -b to bind jboss services to that address
-#JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b <%= bindaddr %>"}
-JBOSS_BIND_ADDR=${JBOSS_HOST:-"-b <%= bindaddr %>"}
-
-# define the classpath for the shutdown class
-JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}
-
-# define the script to use to start jboss
-JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF $JBOSS_BIND_ADDR"}
-
-# Lock and Pid files
-LOCKFILE=/var/lock/subsys/jboss-<%= name %>
-PIDFILE=/var/run/jboss-<%= name %>.pid
-
-if [ "$JBOSS_USER" = "RUNASIS" ]; then
- SUBIT=""
-else
- SUBIT="su - $JBOSS_USER -c "
-fi
-
-if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then
- # ensure the file exists
- touch $JBOSS_CONSOLE
- if [ ! -z "$SUBIT" ]; then
- chown $JBOSS_USER $JBOSS_CONSOLE
- fi
-fi
-
-if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then
- echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"
- echo "WARNING: ignoring it and using /dev/null"
- JBOSS_CONSOLE="/dev/null"
-fi
-
-#define what will be done with the console log
-JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
-
-# Jboss Start command
-<% if scope.lookupvar('run_conf') != "" -%>
-# Custom, per instance, run.conf configured via Puppet
-JBOSS_CMD_START="cd $JBOSS_HOME/bin; export RUN_CONF=<%= scope.lookupvar('jboss::params::jboss_dir') %>/server/<%= name %>/run.conf ; $JBOSSSH"
-<% else -%>
-JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
-<% end -%>
-
-
-JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}
-
-if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then
- export PATH=$PATH:$JAVAPTH
-fi
-
-if [ ! -d "$JBOSS_HOME" ]; then
- echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
- exit 1
-fi
-
-
-status () {
- pslist=$( ps -ef | grep java | grep $JBOSS_USER | awk '{print $2}' | tr '\n' ' ' | sed -e s/\ $// )
- if [ -n "$pslist" ]; then
- echo "jboss (pid $pslist) is running result: 0"
- return 0
- fi
- if [ -f $PIDFILE ]; then
- echo "jboss dead but pid file exists result: 1"
- return 1
- fi
- if [ -f $LOCKFILE ]; then
- echo "jboss dead but subsys locked result: 2"
- return 2
- fi
- echo "jboss is stopped result: 3"
- return 3
-}
-
-start () {
- if [ -f $LOCKFILE ]; then
- status
- exit
- fi
- cd $JBOSS_HOME/bin
- echo JBOSS_CMD_START = $JBOSS_CMD_START
- if [ -z "$SUBIT" ]; then
- eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
- if [ "$?" -eq 0 ]; then
- touch $LOCKFILE
- fi
- else
- $SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
- if [ "$?" -eq 0 ]; then
- touch $LOCKFILE
- fi
- fi
-}
-
-stop () {
- echo JBOSS_CMD_STOP = $JBOSS_CMD_STOP
- if [ -z "$SUBIT" ]; then
- $JBOSS_CMD_STOP && rm -f $LOCKFILE
- else
- $SUBIT "$JBOSS_CMD_STOP" && rm -f $LOCKFILE
- fi
-}
-
-case "$1" in
-start)
- start
- ;;
-stop)
- stop
- ;;
-restart)
- stop
- sleep 15
- start
- ;;
-status)
- status
- ;;
-*)
- echo "usage: $0 (start|stop|restart|status|help)"
-esac
-
View
49 jboss/templates/variables_jboss.erb
@@ -1,49 +0,0 @@
-# File Managed By Puppet
-
-These are the variables used by the module jboss
-
-User variables (unfiltered):
-# $jboss_server = <%= scope.lookupvar('jboss_server') %>
-
-User variables (after params.pp filter):
-# $jboss::params::server = <%= scope.lookupvar('jboss::params::server') %>
-
-General internal variables:
-$jboss::params::packagename = <%= scope.lookupvar('jboss::params::packagename') %>
-$jboss::params::servicename = <%= scope.lookupvar('jboss::params::servicename') %>
-$jboss::params::processname = <%= scope.lookupvar('jboss::params::processname') %>
-$jboss::params::hasstatus = <%= scope.lookupvar('jboss::params::hasstatus') %>
-$jboss::params::configfile = <%= scope.lookupvar('jboss::params::configfile') %>
-$jboss::params::configfile_mode = <%= scope.lookupvar('jboss::params::configfile_mode') %>
-$jboss::params::configfile_owner = <%= scope.lookupvar('jboss::params::configfile_owner') %>
-$jboss::params::configfile_group = <%= scope.lookupvar('jboss::params::configfile_group') %>
-$jboss::params::configdir = <%= scope.lookupvar('jboss::params::configdir') %>
-$jboss::params::initconfigfile = <%= scope.lookupvar('jboss::params::initconfigfile') %>
-$jboss::params::pidfile = <%= scope.lookupvar('jboss::params::pidfile') %>
-$jboss::params::datadir = <%= scope.lookupvar('jboss::params::datadir') %>
-$jboss::params::logdir = <%= scope.lookupvar('jboss::params::logdir') %>
-$jboss::params::protocol = <%= scope.lookupvar('jboss::params::protocol') %>
-$jboss::params::port = <%= scope.lookupvar('jboss::params::port') %>
-
-Variables used by monitor class:
-$jboss::params::monitor_target_real = <%= scope.lookupvar('jboss::params::monitor_target_real') %> ( Set with $jboss_monitor_target )
-$jboss::params::monitor_baseurl_real = <%= scope.lookupvar('jboss::params::monitor_baseurl_real') %> ( Set with $jboss_monitor_baseurl )
-$jboss::params::monitor_url_pattern = <%= scope.lookupvar('jboss::params::monitor_url_pattern') %> ( Set with $jboss_monitor_url_pattern )
-$jboss::params::monitor_port_enable = <%= scope.lookupvar('jboss::params::monitor_port_enable') %> ( Set with $jboss_monitor_port )
-$jboss::params::monitor_url_enable = <%= scope.lookupvar('jboss::params::monitor_url_enable') %> ( Set with $jboss_monitor_url )
-$jboss::params::monitor_process_enable = <%= scope.lookupvar('jboss::params::monitor_process_enable') %> ( Set with $jboss_monitor_process )
-$jboss::params::monitor_plugin_enable = <%= scope.lookupvar('jboss::params::monitor_plugin_enable') %> ( Set with $jboss_monitor_plugin )
-
-Variables used by backup class:
-$jboss::params::backup_target_real = <%= scope.lookupvar('jboss::params::backup_target_real') %> ( Set with $jboss_backup_target )
-$jboss::params::backup_frequency = <%= scope.lookupvar('jboss::params::backup_frequency') %> ( Set with $jboss_backup_frequency )
-$jboss::params::backup_data_enable = <%= scope.lookupvar('jboss::params::backup_data_enable') %> ( Set with $jboss_backup_data )
-$jboss::params::backup_log_enable = <%= scope.lookupvar('jboss::params::backup_log_enable') %> ( Set with $jboss_backup_log )
-
-Variables used by firewall class:
-$jboss::params::firewall_source_real = <%= scope.lookupvar('jboss::params::firewall_source_real') %> ( Set with $jboss_firewall_source )
-$jboss::params::firewall_destination_real = <%= scope.lookupvar('jboss::params::firewall_destination_real') %> ( Set with $jboss_firewall_destination )
-$jboss::params::firewall_enable = <%= scope.lookupvar('jboss::params::firewall_destination_real') %> ( Set with $jboss_firewall_enable )
-
-Module base source for static files:
-$jboss::params::general_base_source = <%= scope.lookupvar('jboss::params::general_base_source') %> ( Set with $base_source )
2 mysql
@@ -1 +1 @@
-Subproject commit 191a649191d397ecdfeab162d38619898033cf0a
+Subproject commit 2b9a3be30860068b647de09c00df1f2c907d35b1
2 nrpe
@@ -1 +1 @@
-Subproject commit 808036d18a6b912e4ad5853f7d127179396a171c
+Subproject commit 35dc729234aff09e07e61971faf26d4d4ce16b7d
1 puppet
@@ -0,0 +1 @@
+Subproject commit 6cae4ca5068ed26007703a8937bcecf05d4a8f54
View
7 puppet/Modulefile
@@ -1,7 +0,0 @@
-name 'lab42-puppet'
-version '0.1.1'
-
-# dependency 'lab42/common', '>= 0.0.1'
-# dependency 'lab42/monitor', '>= 0.0.1'
-# dependency 'lab42/backup', '>= 0.0.1'
-# dependency 'lab42/firewall', '>= 0.0.1'
View
57 puppet/README
@@ -1,57 +0,0 @@
-Puppet module: puppet
-
-# Written by Lab42 #
-# http://www.example42.com
-
-Licence: Apache2
-
-
-DESCRIPTION:
-This module installs and manages puppet.
-Standard and extended classes are available.
-Decide and customize how you want to define configuration files: static files, templates, infile modifications...
-
-
-USER VARIABLES:
-In order to customize the behaviour of the module you can set the following variables:
-$puppet_server (default: "puppet") - Defines the hostname of the puppet master (needed for puppet and puppet::master)
-$puppet_allow (default: "*.$domain" , "127.0.0.0") - Defines the acls on PuppetMaster's fileserver.conf
-$puppet_nodetool (default: undefined) - Use to include an eternal node tool ("dashboard" or "foreman")
-$puppet_externalnodes (default: no) - Use the external tool as external node classifier (if "yes" here, $puppet_nodetool must be defined)
-$puppet_passenger (default: no) - Use Apache's mod ruby (Passenger) instead of default Webrick
-$puppet_storeconfigs (default: no) - Use storeconfigs, needed for exported resources (as in Example42's extended classes)
-$puppet_storeconfigs_thin (default: yes) - Use thin storeconfigs
-$puppet_db (default: sqlite) - Define DB backend if you activate storeconfigs ("sqlite" or "mysql")
-$puppet_db_server (default: localhost) - Define DB server host (used if $puppet_db = "mysql")
-$puppet_db_user (default: root) - Define DB access user (used if $puppet_db = "mysql")
-$puppet_db_password (default: undefined) - Define DB access password (used if $puppet_db = "mysql")
-$puppet_inventoryserver (default: undefined) - Define if you want to use the inventory service (Availble form Puppet 2.6.7)
- - Set "localhost" if the inventory service is on the local puppetmaster
- - Set the hostname of the inventory service to use a remote puppetmaster
- Note that the db settings are the same used for storeconfigs.
-
-USAGE:
-# Standard Classes
-include puppet # Install and run puppet
-if ($puppet_server_local == true) or ($puppet_server == "$fqdn") Puppemaster is automatically installed
-
-include puppet::disable # Disable puppet service.
-include puppet::disableboot # Disable puppet service at boot time, but don't stop if it's running.
-include puppet::absent # Remove puppet package.
-
-# Extended Classes (require storeconfigs)
-include puppet::monitor # Monitor puppet Automatically included if $monitor=yes
-include puppet::backup # Backup puppet data - Automatically included if $backup=yes
-include puppet::firewall # Manages firewall rule for puppet service - Automatically included if $firewall=yes
-
-# Extra Classes
-
-# Generic main configuration infile modification Define
-puppet::conf { "ParameterName": value="YourValue"}
-
-
-DEPENDENCIES:
-Standard classes generally don't need external modules.
-Extended classes need the relevant external modules (import monitor ; import backup ... ) and the "common" module (import common)
-puppet::conf generic infile configuration define needs the "common" module
-Check on individual Extra classes and defines if there are specific requirements (generally only the common module).
View
20 puppet/files/config.ru
@@ -1,20 +0,0 @@
-# a config.ru, for use with every rack-compatible webserver.
-# SSL needs to be handled outside this, though.
-
-# if puppet is not in your RUBYLIB:
-# $:.unshift('/opt/puppet/lib')
-
-$0 = "puppetmasterd"
-require 'puppet'
-
-# if you want debugging:
-# ARGV << "--debug"
-
-ARGV << "--rack"
-require 'puppet/application/puppetmasterd'
-# we're usually running inside a Rack::Builder.new {} block,
-# therefore we need to call run *here*.
-run Puppet::Application[:puppetmasterd].run
-
-
-
View
10 puppet/files/default-puppet
@@ -1,10 +0,0 @@
-# File Managed by Puppet
-
-# Defaults for puppet - sourced by /etc/init.d/puppet
-
-# Start puppet on boot?
-START=yes
-
-# Startup options
-DAEMON_OPTS=""
-
View
6 puppet/files/foreman.repo
@@ -1,6 +0,0 @@
-# File Managed by Puppet
-[foreman]
-name=Foreman Repo
-baseurl=http://theforeman.org/repo
-gpgcheck=0
-enabled=1
View
87 puppet/files/puppet.vim
@@ -1,87 +0,0 @@
-" puppet syntax file
-" Filename: puppet.vim
-" Language: puppet configuration file
-" Maintainer: Luke Kanies <luke@madstop.com>
-" URL:
-" Last Change:
-" Version:
-"
-
-" Copied from the cfengine, ruby, and perl syntax files
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
- finish
-endif
-
-syn region puppetDefine start="^\s*\(class\|define\|site\|node\)" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments
-syn keyword puppetDefType class define site node inherits contained
-syn keyword puppetInherits inherits contained
-syn region puppetDefArguments start="(" end=")" contains=puppetArgument
-syn match puppetArgument "\w\+" contained
-syn match puppetDefName "\w\+" contained
-
-syn match puppetInstance "\w\+\s*{" contains=puppetTypeBrace,puppetTypeName,puppetTypeDefault
-syn match puppetTypeBrace "{" contained
-syn match puppetTypeName "[a-z]\w*" contained
-syn match puppetTypeDefault "[A-Z]\w*" contained
-
-syn match puppetParam "\w\+\s*=>" contains=puppetTypeRArrow,puppetParamName
-syn match puppetParamRArrow "=>" contained
-syn match puppetParamName "\w\+" contained
-syn match puppetVariable "$\w\+"
-syn match puppetVariable "${\w\+}"
-syn match puppetParen "("
-syn match puppetParen ")"
-syn match puppetBrace "{"
-syn match puppetBrace "}"
-
-syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable
-
-syn keyword puppetBoolean true false
-syn keyword puppetKeyword import inherits include
-syn keyword puppetControl case default
-
-" comments last overriding everything else
-syn match puppetComment "\s*#.*$" contains=puppetTodo
-syn keyword puppetTodo TODO NOTE FIXME XXX contained
-
-" Define the default highlighting.
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_puppet_syn_inits")
- if version < 508
- let did_puppet_syn_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-
- HiLink puppetVariable Identifier
- HiLink puppetBoolean Boolean
- HiLink puppetType Identifier
- HiLink puppetDefault Identifier
- HiLink puppetKeyword Define
- HiLink puppetTypeDefs Define
- HiLink puppetComment Comment
- HiLink puppetString String
- HiLink puppetTodo Todo
-" HiLink puppetBrace Delimiter
-" HiLink puppetTypeBrace Delimiter
-" HiLink puppetParen Delimiter
- HiLink puppetDelimiter Delimiter
- HiLink puppetControl Statement
- HiLink puppetDefType Define
- HiLink puppetDefName Type
- HiLink puppetTypeName Statement
- HiLink puppetTypeDefault Type
- HiLink puppetParamName Identifier
- HiLink puppetArgument Identifier
-
- delcommand HiLink
-endif
-
-let b:current_syntax = "puppet"
-
View
12 puppet/manifests/absent.pp
@@ -1,12 +0,0 @@
-# Class: puppet::absent
-#
-# Removes puppet package
-#
-# Usage:
-# include puppet::absent
-#
-class puppet::absent inherits puppet {
- Package["puppet"] {
- ensure => "absent" ,
- }
-}
View
41 puppet/manifests/backup.pp
@@ -1,41 +0,0 @@
-# Class: puppet::backup
-#
-# Backups puppet data and logs using Example42 backup meta module (to be adapted to custom backup solutions)
-# It's automatically included and used if $backup=yes
-# This class permits to abstract what you want to backup from the tool and module to use for backups.
-#
-# Variables:
-# The behaviour of this class has some defaults that can be overriden by user's variables:
-# $puppet_backup_data (true|false) : Set if you want to backup puppet's data. Default: As defined in $backup_data
-# $puppet_backup_log (true|false) : Set if you want to backup puppet's logs. Default: As defined in $backup_log
-# $puppet_backup_frequency (hourly|daily|weekly|monthly) : Set the frequency of your puppet backups. Default: daily.
-# $puppet_backup_target : Define how to reach (Ip, fqdn...) this host to backup puppet from an external server. Default: As defined in $backup_target
-#
-# You can also set some site wide variables that can be overriden by the above module specific ones:
-# $backup_data (true|false) : Set if you want to enable data backups site-wide.
-# $backup_log (true|false) : Set if you want to enable logs backups site-wide.
-# $backup_target : Set the ip/hostname you want to use on an external backup server to backup this host
-# For the defaults of the above variables check puppet::params
-#
-# Usage:
-# Automatically included if $backup=yes
-#
-class puppet::backup {
-
- include puppet::params
-
- backup { "puppet_data":
- frequency => "${puppet::params::backup_frequency}",
- path => "${puppet::params::datadir}",
- enabled => "${puppet::params::backup_data_enable}",
- target => "${puppet::params::backup_target_real}",
- }
-
- backup { "puppet_logs":
- frequency => "${puppet::params::backup_frequency}",
- path => "${puppet::params::logdir}",
- enabled => "${puppet::params::backup_log_enable}",
- target => "${puppet::params::backup_target_real}",
- }
-
-}
View
56 puppet/manifests/client.pp
@@ -1,56 +0,0 @@
-#
-# Class: puppet::client
-#
-# Manages puppet client
-# Include it to install and run puppet with default settings
-# It defines package, service, main configuration file.
-# Note that it doesn't modify, by default, the main configuration file,
-# in order to do it, add a source|content statement for the relevant File type in this class or in a class that inherits it.
-#
-# Usage:
-# Automatically included when you include puppet
-#
-class puppet::client {
-
- # Load the variables used in this module. Check the params.pp file
- require puppet::params
-
- # Resets variables needed in templates (to get default values)
- $puppet_server = $puppet::params::server
- $puppet_allow = $puppet::params::allow
- $puppet_version = $puppet::params::version
-
- file { "puppet.conf":
- path => "${puppet::params::configfile}",
- mode => "${puppet::params::configfile_mode}",
- owner => "${puppet::params::configfile_owner}",
- group => "${puppet::params::configfile_group}",
- require => Package[puppet],
- ensure => present,
- content => template("puppet/client/puppet.conf.erb"),
- notify => Service["puppet"],
- }
-
- file {
- "namespaceauth.conf":
- path => "${puppet::params::configdir}/namespaceauth.conf",
- mode => "${puppet::params::configfile_mode}",
- owner => "${puppet::params::configfile_owner}",
- group => "${puppet::params::configfile_group}",
- require => Package[puppet],
- ensure => present,
- content => template("puppet/client/namespaceauth.conf.erb"),
- notify => Service["puppet"],
- }
-
-
- # Include OS specific subclasses, if necessary
- case $operatingsystem {
- ubuntu: { include puppet::ubuntu }
- default: { }
- }
-
- # Include project specific monitor class if $my_project is set
- if $my_project { include "puppet::${my_project}::client" }
-
-}
View
23 puppet/manifests/conf.pp
@@ -1,23 +0,0 @@
-# Define puppet::conf
-#
-# General puppet main configuration file's inline modification define
-# Use with caution, it's still at experimental stage and may break in untested circumstances
-#
-# Usage:
-# puppet::conf { "mynetworks": value => "127.0.0.0/8 10.42.42.0/24" }
-#
-define puppet::conf ($value) {
-
- require puppet::params
-
- config { "puppet_conf_$name":
- file => "${puppet::params::configfile}",
- line => "$name = $value",
- pattern => "$name ",
- engine => "replaceline",
- notify => Service["puppet"],
- require => File["puppet.conf"],
- source => "puppet::conf",
- }
-
-}
View
66 puppet/manifests/debug.pp
@@ -1,66 +0,0 @@
-#
-# Class: puppet::debug
-#
-# This class is used only for debugging purposes
-#
-# Usage:
-# This class is used if you set $debug=yes
-#
-class puppet::debug {
-
- # Load the variables used in this module. Check the params.pp file
- include puppet::params
-
- file { "puppet_debug":
- path => "${puppet::params::debugdir}",
- mode => "755",
- owner => "${puppet::params::configfile_owner}",
- group => "${puppet::params::configfile_group}",
- ensure => directory,
- }
-
- file { "puppet_debug_variables":
- path => "${puppet::params::debugdir}/variables",
- mode => "750",
- owner => "root",
- group => "root",
- ensure => directory,
- require => File["puppet_debug"],
- }
-
- file { "puppet_debug_todo":
- path => "${puppet::params::debugdir}/todo",
- mode => "755",
- owner => "root",
- group => "root",
- ensure => directory,
- require => File["puppet_debug"],
- }
-
- file { "puppet_debug_variables_puppet":
- path => "${puppet::params::debugdir}/variables/puppet",
- mode => "${puppet::params::configfile_mode}",
- owner => "${puppet::params::configfile_owner}",
- group => "${puppet::params::configfile_group}",
- ensure => present,
- require => File["puppet_debug_variables"],
- content => template("puppet/variables_puppet.erb"),
- }
-
-# This file contains the whole scope with facts and user variables
-# Since it contains mutable data (uptime, datetime, free mem) is not
-# provided by default. ensure => present to do it
-# Source: http://www.puppetcookbook.com/posts/see-all-client-variables.html
-
- file { "puppet_debug_scope":
- path => "${puppet::params::debugdir}/variables/scope",
- mode => "640",
- owner => "root",
- group => "root",
- ensure => absent,
- # ensure => present,
- require => File["puppet_debug_variables"],
- content => inline_template("<%= scope.to_hash.reject { |k,v| !( k.is_a?(String) && v.is_a?(String) ) }.to_yaml %>"),
- }
-
-}
View
13 puppet/manifests/disable.pp
@@ -1,13 +0,0 @@
-# Class: puppet::disable
-#
-# Stops puppet service and disables it at boot time
-#
-# Usage:
-# include puppet::disable
-#
-class puppet::disable inherits puppet {
- Service["puppet"] {
- ensure => "stopped" ,
- enable => "false",
- }
-}
View
13 puppet/manifests/disableboot.pp
@@ -1,13 +0,0 @@
-# Class: puppet::disableboot
-#
-# This class disables puppet startup at boot time but doesn't check if the service is running
-# Useful when the service is started but another applications (such as a Cluster suite)
-#
-# Usage:
-# include puppet::disableboot
-#
-class puppet::disableboot inherits puppet {
- Service["puppet"] {
- enable => "false",
- }
-}
View
17 puppet/manifests/doc.pp
@@ -1,17 +0,0 @@
-# Class: puppet::doc
-#
-# Installs rdoc for puppetdoc
-#
-class puppet::doc {
- package {
- rdoc:
- name => $operatingsystem ? {
- Debian => "rdoc",
- CentOS => "ruby-rdoc",
- SuSE => "ruby",
- default => "ruby-rdoc",
- },
- ensure => present,
- }
-}
-
View
24 puppet/manifests/firewall.pp
@@ -1,24 +0,0 @@
-# Class: puppet::firewall
-#
-# Manages puppet firewalling using custom Firewall wrapper
-# By default it opens puppet's default port(s) to anybody
-# It's automatically included if $firewall=yes
-#
-# Usage:
-# Automatically included if $firewall=yes
-#
-class puppet::firewall {
-
- include puppet::params
-
- firewall { "puppet_${puppet::params::protocol}_${puppet::params::port}":
- source => "${puppet::params::firewall_source_real}",
- destination => "${puppet::params::firewall_destination_real}",
- protocol => "${puppet::params::protocol}",
- port => "${puppet::params::port}",
- action => "allow",
- direction => "input",
- enable => "${puppet::params::firewall_enable}",
- }
-
-}
View
54 puppet/manifests/init.pp
@@ -1,54 +0,0 @@
-#
-# Class: puppet
-#
-# Manages puppet.
-# Include it to install and run puppet
-# It defines package, service, main configuration file.
-#
-# Usage:
-# include puppet
-#
-class puppet {
-
- # Load the variables used in this module. Check the params.pp file
- require puppet::params
-
- # Autoloads puppet::master if $puppet_server_local is true or $puppet_server is equal to $fqdn
- if ($puppet_server_local == true) or ($puppet_server == "$fqdn") { include puppet::server }
- else { include puppet::client }
-
- # Basic Package - Service - Configuration file management is done on sub classess client and server
- package { puppet:
- name => "${puppet::params::packagename}",
- ensure => present,
- }
-
- service { puppet:
- name => "${puppet::params::servicename}",
- ensure => running,
- enable => true,
- hasrestart => true,
- pattern => "${puppet::params::processname}",
- hasstatus => "${puppet::params::hasstatus}",
- require => Package["puppet"],
- subscribe => File["puppet.conf"],
- }
-
- # Include OS specific subclasses, if necessary
- case $operatingsystem {
- ubuntu: { include puppet::ubuntu }
- default: { }
- }
-
- # Include project specific class if $my_project is set
- if $my_project { include "puppet::${my_project}" }
-
- # Include extended classes
- if $puppi == "yes" { include puppet::puppi }
- if $backup == "yes" { include puppet::backup }
- if $monitor == "yes" { include puppet::monitor }
-
- # Include debug class is debugging is enabled ($debug=yes)
- if ( $debug == "yes" ) or ( $debug == true ) { include puppet::debug }
-
-}
View
13 puppet/manifests/moduletool.pp
@@ -1,13 +0,0 @@
-# Class: puppet::moduletool
-#
-# Installs Puppet Module Tool
-#
-class puppet::moduletool {
-
- package {
- puppet-module:
- provider => "gem",
- ensure => present,
- }
-}
-
View
90 puppet/manifests/monitor.pp
@@ -1,90 +0,0 @@
-# Class: puppet::monitor
-#
-# Monitors puppet process/ports/service using Example42 monitor meta module (to be adapted to custom monitor solutions)
-# It's automatically included ad used if $monitor=yes
-# This class permits to abstract what you want to monitor from the actual tool and modules you'll use for monitoring
-#
-# Variables:
-# The behaviour of this class has some defaults that can be overriden by user's variables:
-# $puppet_monitor_port (true|false) : Set if you want to monitor puppet's port(s). If any. Default: As defined in $monitor_port
-# $puppet_monitor_url (true|false) : Set if you want to monitor puppet's url(s). If any. Default: As defined in $monitor_url
-# $puppet_monitor_process (true|false) : Set if you want to monitor puppet's process. If any. Default: As defined in $monitor_process
-# $puppet_monitor_plugin (true|false) : Set if you want to monitor puppet using specific monitor tool's plugin i s. If any. Default: As defined in $monitor_plugin
-# $puppet_monitor_target : Define how to reach (Ip, fqdn...) the host to monitor puppet from an external server. Default: As defined in $monitor_target
-# $puppet_monitor_url : Define the baseurl (http://$fqdn/...) to use for eventual puppet URL checks. Default: As defined in $monitor_url
-#
-# You can therefore set site wide variables that can be overriden by the above module specific ones:
-# $monitor_port (true|false) : Set if you want to enable port monitoring site-wide.
-# $monitor_url (true|false) : Set if you want to enable url checking site-wide.
-# $monitor_process (true|false) : Set if you want to enable process monitoring site-wide.
-# $monitor_plugin (true|false) : Set if you want to try to use specific plugins of your monitoring tools
-# $monitor_target : Set the ip/hostname you want to use on an external monitoring server to monitor this host
-# $monitor_url : Setbaseurl to use for eventual URL checks of services provided by this host
-# For the defaults of the above variables check puppet::params
-#
-# Usage:
-# Automatically included if $monitor=yes
-# Use the variable $monitor_tool (can be an array) to define the monitoring software you want to use.
-# To customize specific and more granular behaviours use the above variables and eventually your custom modulename::monitor::$my_project class
-#
-class puppet::monitor {
-
- include puppet::params
-
- # Port monitoring (only Puppetmaster)
-if ($puppet_server_local == true) or ($puppet_server == "$fqdn") {
- monitor::port { "puppet_${puppet::params::protocol}_${puppet::params::port}":
- protocol => "${puppet::params::protocol}",
- port => "${puppet::params::port}",
- target => "${puppet::params::monitor_target_real}",
- enable => "${puppet::params::monitor_port_enable}",
- tool => "${monitor_tool}",
- }
-}
-
- # URL monitoring
- monitor::url { "puppet_url":
- url => "${puppet::params::monitor_baseurl_real}",
- pattern => "${puppet::params::monitor_url_pattern}",
- enable => "${puppet::params::monitor_url_enable}",
- tool => "${monitor_tool}",
- }
-
- # Process monitoring
- monitor::process { "puppet_process":
- process => $operatingsystem ? {
- debian => "ruby",
- default => "${puppet::params::processname}",
- },
- argument => $operatingsystem ? {
- debian => "${puppet::params::processname}",
- default => undef,
- },
- service => "${puppet::params::servicename}",
- pidfile => "${puppet::params::pidfile}",
- enable => "${puppet::params::monitor_process_enable}",
- tool => "${monitor_tool}",
- }
-
- # Process monitoring (only Puppetmaster)
-if (($puppet_server_local == true) or ($puppet_server == "$fqdn")) and ( "${puppet::params::passenger}" != "yes") {
- monitor::process { "puppetmaster_process":
- process => "${puppet::params::processname_server}",
- service => "${puppet::params::servicename_server}",
- pidfile => "${puppet::params::pidfile_server}",
- enable => "${puppet::params::monitor_process_enable}",
- tool => "${monitor_tool}",
- }
-}
-
- # Use a specific plugin (according to the monitor tool used)
- monitor::plugin { "puppet_plugin":
- plugin => "puppet",
- enable => "${puppet::params::monitor_plugin_enable}",
- tool => "${monitor_tool}",
- }
-
- # Include project specific monitor class if $my_project is set
- if $my_project { include "puppet::${my_project}::monitor" }
-
-}
View
385 puppet/manifests/params.pp
@@ -1,385 +0,0 @@
-class puppet::params {
-
-# Settings that User can define (if not defined, defaults set here apply).
-# They are mostly related to PuppetMaster functionality.
-
-# Full hostname of Puppet server
- $server = $puppet_server ? {
- '' => "puppet",
- default => "$puppet_server",
- }
-
-# Access lists for Puppetmaster access (can be an array)
-# You should SET IT
- $allow = $puppet_allow ? {
- '' => [ "*.$domain" , "127.0.0.0" ],
- default => $puppet_allow,
- }
-
-# Bind address, useful if only one address should be used or if it should be IPv6
- $bindaddress = $puppet_bindaddress ? {
- '' => "",
- default => $puppet_bindaddress,
- }
-
-# Use a node tool ($puppet_nodetool). Default: undef
- $nodetool = $puppet_nodetool ? {
- dashboard => "dashboard",
- foreman => "foreman",
- default => undef,
- }
-
-# The run interval
- $runinterval = $puppet_runinterval ? {
- "" => "1800",
- default => $puppet_runinterval,
- }
-
-# Use external nodes qualifiers to manage nodes ($puppet_externalnodes). Default: no
-# Note that you can still define a $puppet_nodetool and leave $puppet_externalnodes=no
-# But if you set $puppet_externalnodes=yes you MUST define a valid $puppet_nodetool
- $externalnodes = $puppet_externalnodes ? {
- yes => "yes",
- no => "no",
- default => "no",
- }
-
-# Use passenger (Apache's mod_ruby) instead of default WebBrick ($puppet_passenger). Default: no
- $passenger = $puppet_passenger ? {
- yes => "yes",
- no => "no",
- default => "no",
- }
-
-# Use storeconfigs, needed for exported resources ($puppet_storeconfigs). Default: no
- $storeconfigs = $puppet_storeconfigs ? {
- yes => "yes",
- no => "no",
- default => "no",
- }
-
-# Use thin storeconfigs, for better performances when using storeconfigs ($puppet_storeconfigs_thin). Default: yes
- $storeconfigs_thin = $puppet_storeconfigs_thin ? {
- yes => "yes",
- no => "no",
- default => "yes",
- }
-
-# Define Puppet DB backend for storeconfigs, needed only if $puppet_storeconfigs=yes ($puppet_db). Default: sqlite
- $db = $puppet_db ? {
- sqlite => "sqlite",
- mysql => "mysql",
-# postgresql => "postgresql", # Not yet supported
- default => "sqlite",
- }
-
-# Define Puppet DB name ($puppet_db_name). Default: puppet
- $db_name = $puppet_db_name ? {
- '' => "puppet",
- default => "$puppet_db_name",
- }
-
-# Define Puppet DB server ($puppet_db_server). Default: localhost
- $db_server = $puppet_db_server ? {
- '' => "localhost",
- default => "$puppet_db_server",
- }
-
-# Define Puppet DB user ($puppet_db_user). Default: root
- $db_user = $puppet_db_user ? {
- '' => "root",
- default => "$puppet_db_user",
- }
-
-# Define Puppet DB password ($puppet_db_password). Default: blank
- $db_password = $puppet_db_password ? {
- '' => "",
- default => "$puppet_db_password",
- }
-
-# Define the inventory service server (Set "localhost" to use the local puppetmaster)
- $inventoryserver = $puppet_inventoryserver ? {
- '' => "",
- default => "$puppet_inventoryserver",
- }
-
-
-
-# Define Puppet version. Autocalculated: "0.2" for 0.24/0.25 "old" versions, 2.x for new 2.6.x branch.
- $version = $puppetversion ? {
- /(^0.)/ => "0.2",
- default => "2.x",
- }
-
-
-
-
-# Module's internal variables
- $packagename = $operatingsystem ? {
- solaris => "CSWpuppet",
- default => "puppet",
- }
-
- $packagename_server = $operatingsystem ? {
- debian => "puppetmaster",
- ubuntu => "puppetmaster",
- default => "puppet-server",
- }
-
- $servicename = $operatingsystem ? {
- solaris => "puppetd",
- default => "puppet",
- }
-
- $servicename_server = $operatingsystem ? {
- default => "puppetmaster",
- }
-
- $processname = $version ? {
- "0.2" => "puppetd",
- "2.x" => $operatingsystem ? {
- redhat => "puppetd",
- centos => "puppetd",
- default => "puppet",
- },
- }
-
- $processname_server = $operatingsystem ? {
- default => "puppetmasterd",
- }
-
- $hasstatus = $operatingsystem ? {
- debian => false,
- ubuntu => false,
- default => true,
- }
-
- $hasstatus_server = $operatingsystem ? {
- debian => false,
- ubuntu => false,
- default => true,
- }
-
- $configfile = $operatingsystem ? {
- freebsd => "/usr/local/etc/puppet/puppet.conf",
- default => "/etc/puppet/puppet.conf",
- }
-
- $configfile_mode = $operatingsystem ? {
- default => "644",
- }
-
- $configfile_owner = $operatingsystem ? {
- default => "root",
- }
-
- $configfile_group = $operatingsystem ? {
- default => "root",
- }
-
- $configdir = $operatingsystem ? {
- freebsd => "/usr/local/etc/puppet/",
- default => "/etc/puppet",
- }
-
- $basedir = $operatingsystem ? {
- redhat => "/usr/lib/ruby/site_ruby/1.8/puppet",
- centos => "/usr/lib/ruby/site_ruby/1.8/puppet",
- default => "/usr/lib/ruby/1.8/puppet",
- }
-
- $classesfile = $puppetversion ? {
- default => "/var/lib/puppet/state/classes.txt",
- }
-
- $debugdir = $operatingsystem ? {
- default => "/var/lib/puppet/debug",
- }
-
- # Used by monitor class
- $pidfile = $operatingsystem ? {
- default => "/var/run/puppet/puppetd.pid",
- }
-
- $pidfile_server = $operatingsystem ? {
- default => "/var/run/puppet/puppetmasterd.pid",
- }
-
- # Used by backup class
- $datadir = $operatingsystem ? {
- default => "/var/lib/puppet",
- }
-
- # Used by backup class - Provide the file name, if there's no dedicated dir
- $logdir = $operatingsystem ? {
- debian => "/var/log/syslog",
- ubuntu => "/var/log/syslog",
- default => "/var/log/messages",
- }
-
- # Used by monitor and firewall class
- # If you need to define additional ports, call them $protocol1/$port1 and add the relevant
- # parts in firewall.pp and monitor.pp
- $protocol = "tcp"
- $port = "8140"
-
-
-
-## DEFAULTS FOR MONITOR CLASS
-# These are settings that influence the (optional) puppet::monitor class
-# You can define these variables or leave the defaults
-# The apparently complex variables assignements below follow this logic:
-# - If no user variable is set, a reasonable default is used
-# - If the user has set a host-wide variable (ex: $monitor_target ) that one is set
-# - The host-wide variable can be overriden by a module specific one (ex: $puppet_monitor_target)
-
- # How the monitor server refers to the monitor target
- $monitor_target_real = $puppet_monitor_target ? {
- '' => $monitor_target ? {
- '' => "${fqdn}",
- default => $monitor_target,
- },
- default => "$puppet_monitor_target",
- }
-
- # BaseUrl to access this host
- $monitor_baseurl_real = $puppet_monitor_baseurl ? {
- '' => $monitor_baseurl ? {
- '' => "http://${fqdn}",
- default => $monitor_baseurl,
- },
- default => "${puppet_monitor_baseurl}",
- }
-
- # Pattern to look for in the URL defined in puppet::monitor class
- $monitor_url_pattern = $puppet_monitor_url_pattern ? {
- '' => "OK",
- default => "${puppet_monitor_url_pattern}",
- }
-
- # If puppet port monitoring is enabled
- $monitor_port_enable = $puppet_monitor_port ? {
- '' => $monitor_port ? {
- '' => true,
- default => $monitor_port,
- },
- default => $puppet_monitor_port,
- }
-
- # If puppet url monitoring is enabled
- $monitor_url_enable = $puppet_monitor_url ? {
- '' => $monitor_url ? {
- '' => false,
- default => $monitor_url,
- },
- default => $puppet_monitor_url,
- }
-
- # If puppet process monitoring is enabled
- $monitor_process_enable = $puppet_monitor_process ? {
- '' => $monitor_process ? {
- '' => true,
- default => $monitor_process,
- },
- default => $puppet_monitor_process,
- }
-
- # If puppet plugin monitoring is enabled
- $monitor_plugin_enable = $puppet_monitor_plugin ? {
- '' => $monitor_plugin ? {
- '' => false,
- default => $monitor_plugin,
- },
- default => $puppet_monitor_plugin,
- }
-
-## DEFAULTS FOR BACKUP CLASS
-# These are settings that influence the (optional) puppet::backup class
-# You can define these variables or leave the defaults
-
- # How the backup server refers to the backup target
- $backup_target_real = $puppet_backup_target ? {
- '' => $backup_target ? {
- '' => "${fqdn}",
- default => $backup_target,
- },
- default => "$puppet_backup_target",
- }
-
- # Frequency of backups
- $backup_frequency = $puppet_backup_frequency ? {
- '' => "daily",
- default => "$puppet_backup_frequency",
- }
-
- # If puppet data have to be backed up
- $backup_data_enable = $puppet_backup_data ? {
- '' => $backup_data ? {
- '' => true,
- default => $backup_data,
- },
- default => $puppet_backup_data,
- }
-
- # If puppet logs have to be backed up
- $backup_log_enable = $puppet_backup_log ? {
- '' => $backup_log ? {
- '' => false,
- default => $backup_log,
- },
- default => $puppet_backup_log,
- }
-
-
-## DEFAULTS FOR FIREWALL CLASS
-# These are settings that influence the (optional) puppet::firewall class
-# You can define these variables or leave the defaults
-
- # Source IPs that can access this service - Use iptables friendly format
- $firewall_source_real = $puppet_firewall_source ? {
- '' => $firewall_source ? {
- '' => "0.0.0.0/0",
- default => $firewall_source,
- },
- default => "$puppet_firewall_source",
- }
-
- # Destination IP to use for this host (Default facter's $ipaddress)
- $firewall_destination_real = $puppet_firewall_destination ? {
- '' => $firewall_destination ? {
- '' => "${ipaddress}",
- default => $firewall_destination,
- },
- default => "$puppet_firewall_destination",
- }
-
- # If firewall filter is enabled
- $firewall_enable = $puppet_firewall_enable ? {
- '' => $firewall_enable ? {
- '' => true,
- default => $firewall_enable,
- },
- default => $puppet_firewall_enable,
- }
-
-
-## FILE SERVING SOURCE
-# Sets the correct source for static files
-# In order to provide files from different sources without modifying the module
-# you can override the default source path setting the variable $base_source
-# Ex: $base_source="puppet://ip.of.fileserver" or $base_source="puppet://$servername/myprojectmodule"
-# What follows automatically manages the new source standard (with /modules/) from 0.25
-
- case $base_source {
- '': {
- $general_base_source = $puppetversion ? {
- /(^0.25)/ => "puppet:///modules",
- /(^0.)/ => "puppet://$servername",
- default => "puppet:///modules",
- }
- }
- default: { $general_base_source=$base_source }
- }
-
-}
-
View
29 puppet/manifests/puppi.pp
@@ -1,29 +0,0 @@
-# Class: puppet::puppi
-#
-# This class manages the puppi extensions for the puppet module
-# It's automatically included and used if $puppi=yes
-#
-class puppet::puppi {
-
- puppi::info::module { "puppet":
- packagename => "${puppet::params::packagename}",
- servicename => "${puppet::params::servicename}",
- processname => "${puppet::params::processname}",
- configfile => "${puppet::params::configfile}",
- configdir => "${puppet::params::configdir}",
- pidfile => "${puppet::params::pidfile}",
- datadir => "${puppet::params::datadir}",
- logdir => "${puppet::params::logdir}",
- protocol => "${puppet::params::protocol}",
- port => "${puppet::params::port}",
- description => "What Puppet knows about puppet" ,
- run => "puppet --genconfig | grep -v '^ #' | grep -v '^$' | grep -v '^#'",
- }
-
- if ($puppet_server_local == true) or ($puppet_server == "$fqdn") {
- puppi::log { "puppet":
- log => [ "/var/log/puppet/http.log" , "/var/log/puppet/masterhttp.log" ] ,
- }
- }
-}
-
View
29 puppet/manifests/rails.pp
@@ -1,29 +0,0 @@
-# Class: puppet::rails
-#
-# Installs rails package. Need for Puppetmaster with storecongis activated
-#
-# Usage:
-# include puppet::rails
-#
-
-class puppet::rails {
-
- package { "rails":
- name => $operatingsystem ? {
- default => "rails",
- },
- ensure => $operatingsystem ? {
- centos => "2.3.5",
- redhat => "2.3.5",
- default => "installed",
- },
- provider => $operatingsystem ? {
- debian => "apt",
- ubuntu => "apt",
- default => "gem",
- },
-
- }
-
-}
-
View
40 puppet/manifests/ruby.pp
@@ -1,40 +0,0 @@
-# Class: puppet::ruby
-#
-# Installs ruby packages useful for Puppet
-#
-# Usage:
-# include puppet::ruby
-#
-
-class puppet::ruby {
-
- package{"rubygems":
- name => $operatingsystem ? {
- default => "rubygems",
- },
- ensure => installed,
- }
-
-
- package{"rake":
- name => $operatingsystem ? {
- default => "rake",
- "CentOs" => "rubygem-rake",
- "RedHat" => "rubygem-rake",
- "Scientific" => "rubygem-rake",
- },
- ensure => installed,
- }
-
- package{"sqlite3-ruby":
- name => $operatingsystem ? {
- default => "libsqlite3-ruby",
- "CentOs" => "rubygem-sqlite3-ruby",
- "RedHat" => "rubygem-sqlite3-ruby",
- "Scientific" => "rubygem-sqlite3-ruby",
- },
- ensure => installed,
- }
-
-}
-
View
128 puppet/manifests/server.pp
@@ -1,128 +0,0 @@
-#
-# Class: puppet::server
-#
-# Manages puppet server
-# Include it to install and run puppetmaster
-# It defines package, service, main configuration files.
-#
-# Usage:
-# Automatically included when you include puppet if $puppet_server_local is true or $puppet_server is equal to $fqdn
-#
-class puppet::server {
-
- # Load the variables used in this module. Check the params.pp file
- require puppet::params
-
- # We need rails for storeconfigs
- case $puppet_storeconfigs {
- yes: { include puppet::rails }
- default: { }
- }
-
- # Automanagement of Mysql Grants if mysql is used
- if ( $puppet::params::db == "mysql" ) { include puppet::server::mysql }
-
- # Install Passenger if $puppet_passenger = yes
- if ( $puppet::params::passenger == "yes" ) { include puppet::server::passenger }
-
- # On the PuppetMaster is useful the puppet-module-tool
- # include puppet::moduletool
- include puppet::ruby
-
- case $puppet_nodetool {
- dashboard: { include dashboard }
- foreman: { include foreman }
- default: { }
- }
-
- package { "puppet-server":
- name => "${puppet::params::packagename_server}",
- ensure => present;
-
- rrdtool-ruby:
- name => $operatingsystem ? {
- debian => "librrd-ruby",
- ubuntu => "librrd-ruby",
- default => "rrdtool-ruby",
- },
- ensure => present;
- }
-
- service { "puppetmaster":
- name => "${puppet::params::servicename_server}",
- ensure => "${puppet::params::passenger}" ? {
- yes => undef,
- default => running,
- },
- enable => "${puppet::params::passenger}" ? {
- yes => false,
- default => true,
- },
- hasrestart => true,
- hasstatus => "${puppet::params::hasstatus_server}",
- pattern => "${puppet::params::processname_server}",