diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | accounts | 1 | ||||
-rwxr-xr-x | groups | 3 | ||||
-rwxr-xr-x | utils/puppet/BUILD | 1 | ||||
-rwxr-xr-x | utils/puppet/CONFIGURE | 5 | ||||
-rwxr-xr-x | utils/puppet/DEPENDS | 5 | ||||
-rwxr-xr-x | utils/puppet/DETAILS | 20 | ||||
-rw-r--r-- | utils/puppet/HISTORY | 5 | ||||
-rwxr-xr-x | utils/puppet/INSTALL | 54 | ||||
-rwxr-xr-x | utils/puppet/PRE_BUILD | 4 | ||||
-rw-r--r-- | utils/puppet/ftools_gemtask.patch | 40 | ||||
-rw-r--r-- | utils/puppet/puppet.conf | 5 | ||||
-rw-r--r-- | utils/puppet/puppetmaster.conf | 12 |
13 files changed, 157 insertions, 1 deletions
@@ -1,4 +1,7 @@ 2010-06-21 Mark Bainter <mbainter@sourcemage.org> + * utils/puppet: new spell, Configuration Management system + +2010-06-21 Mark Bainter <mbainter@sourcemage.org> * utils/augeas: new spell, Configuration editing API 2010-06-21 Mark Bainter <mbainter@sourcemage.org> @@ -86,4 +86,5 @@ memcached:176:177 camera:177:178 mariadb:178:180 avahi-autoipd:180:180 +puppet:181:181 nobody:65534:65534 @@ -104,6 +104,7 @@ memcached:177: camera:178: libvirt:179: mariadb:180: -avahi-autoipd:180 +avahi-autoipd:180: +puppet:181: users:1000: nogroup:65534: diff --git a/utils/puppet/BUILD b/utils/puppet/BUILD new file mode 100755 index 0000000000..54843c5997 --- /dev/null +++ b/utils/puppet/BUILD @@ -0,0 +1 @@ +create_account puppet "/var/lib/puppet" diff --git a/utils/puppet/CONFIGURE b/utils/puppet/CONFIGURE new file mode 100755 index 0000000000..dd37a05377 --- /dev/null +++ b/utils/puppet/CONFIGURE @@ -0,0 +1,5 @@ +config_query CLIENT_ONLY 'Install client only?' y + +config_query VIM_SYNTAX 'Install vim syntax highlighting?' y + +config_query INSTALL_EXAMPLES 'Install examples?' n diff --git a/utils/puppet/DEPENDS b/utils/puppet/DEPENDS new file mode 100755 index 0000000000..bdcb984685 --- /dev/null +++ b/utils/puppet/DEPENDS @@ -0,0 +1,5 @@ +depends facter && +depends RUBY && +suggest_depends shadow "" "" "for shadow file support" && +suggest_depends augeas "" "" "for automated editing of configuration files" && +suggest_depends rrdtool "" "" "for generating graphs from report data" diff --git a/utils/puppet/DETAILS b/utils/puppet/DETAILS new file mode 100755 index 0000000000..724ea09589 --- /dev/null +++ b/utils/puppet/DETAILS @@ -0,0 +1,20 @@ + SPELL=puppet + VERSION=0.25.5 + SOURCE="puppet-${VERSION}.tar.gz" + SOURCE_URL[0]=http://puppetlabs.com/downloads/puppet/${SOURCE} + SOURCE_HASH=sha512:a563421f57e30eb09dc0596f4769ccaa45e9f9c6f29aa4072f370cc95cb50aab00b9ec3450289ea20b7383bb184c491a2ddbe003845beb7d01d328083f3dbad7 +SOURCE_DIRECTORY="${BUILD_DIRECTORY}/puppet-${VERSION}" + WEB_SITE="http://puppetlabs.com/" + LICENSE[0]=GPL + ENTERED=20100617 + SHORT="Puppet is a configuration management system" +cat << EOF +Puppet lets you centrally manage every important aspect of your system +using a cross-platform specification language that manages all the separate +elements normally aggregated in different files, including users, cron jobs, +and hosts, along with obviously discrete elements like packages, services, +and files. Its simple declarative specification language provides powerful +classing abilities for drawing out the similarities between hosts while +allowing them to be as specific as necessary, and it handles dependency and +prerequisite relationships between objects clearly and explicitly. +EOF diff --git a/utils/puppet/HISTORY b/utils/puppet/HISTORY new file mode 100644 index 0000000000..a3c22b1439 --- /dev/null +++ b/utils/puppet/HISTORY @@ -0,0 +1,5 @@ +2010-06-17 Mark Bainter <mbainter@sourcemage.org> + * DEPENDS, DETAILS, CONFIGURE< PRE_BUILD, BUILD, INSTALL: spell created + * puppet.conf, puppetmaster.conf: basic configuration files + * ftools_gemtask.patch: Allows spell to build against ruby 1.9.1 + diff --git a/utils/puppet/INSTALL b/utils/puppet/INSTALL new file mode 100755 index 0000000000..ad9fd5b30c --- /dev/null +++ b/utils/puppet/INSTALL @@ -0,0 +1,54 @@ +cd ${SOURCE_DIRECTORY} && ruby install.rb --destdir="${INSTALL_ROOT}" && +echo "***************** COMPLETED RUBY INSTALL *************************" && + +install_config_file "$SPELL_DIRECTORY/puppet.conf" \ + "${INSTALL_ROOT}/etc/sysconfig/puppet.conf" && + +if [[ "$CLIENT_ONLY" != 'y' ]]; then + echo "************* NOT CLIENT_ONLY (${CLIENT_ONLY}) - installing puppetmaster config ***************" && + install_config_file "$SPELL_DIRECTORY/puppetmaster.conf" \ + "${INSTALL_ROOT}/etc/sysconfig/puppetmaster.conf" +fi && + +if [[ ! -d "${INSTALL_ROOT}/etc/puppet" ]]; then + echo "************* /etc/puppet DOES NOT EXIST, CREATING *************" && + install -vdm 755 "${INSTALL_ROOT}/etc/puppet" +fi && + +echo "**************** INSTALLING CONFIG FILES ********************" && +install_config_file "${SOURCE_DIRECTORY}/conf/auth.conf" \ + "${INSTALL_ROOT}/etc/puppet/auth.conf" && +install_config_file "${SOURCE_DIRECTORY}/conf/namespaceauth.conf" \ + "${INSTALL_ROOT}/etc/puppet/namespaceauth.conf" && + +if [[ "$CLIENT_ONLY" != 'y' ]]; then + echo "************* NOT CLIENT_ONLY (${CLIENT_ONLY}) - installing manifests/modules ***************" && + install -vdm 755 "${INSTALL_ROOT}"/etc/puppet/{manifests,modules} +fi && + +if [[ "$VIM_SYNTAX" == 'y' ]]; then + echo "************** VIM_SYNTAX set (${VIM_SYNTAX}) - installing **********" && + install -vm 644 "${SOURCE_DIRECTORY}/ext/vim/syntax/puppet.vim" \ + "${INSTALL_ROOT}/usr/share/vim/vimfiles/syntax" && + install -vm 644 "${SOURCE_DIRECTORY}/ext/vim/ftdetect/puppet.vim" \ + "${INSTALL_ROOT}/usr/share/vim/vimfiles/ftdetect" +fi && + +if [[ "$INSTALL_EXAMPLES" == 'y' ]]; then + echo "************ INSTALL_EXAMPLES set ($INSTALL_EXAMPLES) - installing ************" && + if [[ ! -d "${INSTALL_ROOT}/usr/share/doc/puppet" ]]; then + install -vdm 755 "${INSTALL_ROOT}/usr/share/doc/puppet" + fi + for f in $(find ext examples -type f); do + if [[ ! -d "${INSTALL_ROOT}"/usr/share/doc/puppet/$(dirname ${f}) ]]; then + install -vdm 755 "${INSTALL_ROOT}"/usr/share/doc/puppet/$(dirname ${f}) + fi + install -vm 644 "$f" "${INSTALL_ROOT}/usr/share/doc/puppet/${f}" + done +fi && + +if [[ "$CLIENT_ONLY" == 'y' ]]; then + echo "******************* CLIENT ONLY FLAG SET (${CLIENT_ONLY}) *********************" && + rm -f "${INSTALL_ROOT}"/usr/sbin/{puppetmasterd,puppetqd,puppetrun} +fi + diff --git a/utils/puppet/PRE_BUILD b/utils/puppet/PRE_BUILD new file mode 100755 index 0000000000..f571948a8c --- /dev/null +++ b/utils/puppet/PRE_BUILD @@ -0,0 +1,4 @@ +default_pre_build && +cd $SOURCE_DIRECTORY && +patch -p0 < $SCRIPT_DIRECTORY/ftools_gemtask.patch + diff --git a/utils/puppet/ftools_gemtask.patch b/utils/puppet/ftools_gemtask.patch new file mode 100644 index 0000000000..2ebb9c804f --- /dev/null +++ b/utils/puppet/ftools_gemtask.patch @@ -0,0 +1,40 @@ +--- tasks/rake/gem-orig.rake 2010-05-16 23:10:24.000000000 -0500 ++++ tasks/rake/gem.rake 2010-06-18 05:28:29.000000000 -0500 +@@ -1,4 +1,10 @@ +-require 'ftools' ++begin ++ require 'ftools' ++ $haveftools = true ++rescue LoadError ++ puts "ftools not found. Using FileUtils instead.." ++ $haveftools = false ++end + + GEM_FILES = FileList[ + '[A-Z]*', +@@ -44,7 +50,11 @@ + desc "Prepare binaries for gem creation" + task :prepare_gem do + SBIN.each do |f| +- File.copy(f,"bin") ++ if $haveftools ++ FileUtils.copy(f,"bin") ++ else ++ File.copy(f,"bin") ++ end + end + end + +@@ -52,7 +62,11 @@ + task :create_gem => :prepare_gem do + Dir.mkdir("pkg") rescue nil + Gem::Builder.new(spec).build +- File.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg") ++ if $haveftools ++ FileUtils.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg") ++ else ++ File.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg") ++ end + SBIN.each do |f| + File.unlink("bin/" + f.gsub(/sbin\//, '')) + end diff --git a/utils/puppet/puppet.conf b/utils/puppet/puppet.conf new file mode 100644 index 0000000000..e7e62574b0 --- /dev/null +++ b/utils/puppet/puppet.conf @@ -0,0 +1,5 @@ +# Location of PID files +PUPPET_PID_DIR="/var/run/puppet" + +# You may specify other parameters to the puppet client here +#PUPPET_EXTRA_OPTS="" diff --git a/utils/puppet/puppetmaster.conf b/utils/puppet/puppetmaster.conf new file mode 100644 index 0000000000..37b04d44da --- /dev/null +++ b/utils/puppet/puppetmaster.conf @@ -0,0 +1,12 @@ +# Location of PID files +PUPPETMASTER_PID_DIR="/var/run/puppet" + +# Location of the main manifest +#PUPPETMASTER_MANIFEST="/etc/puppet/manifests/site.pp" + +# Where to log general messages to. +# Specify syslog to send log messages to the system log. +#PUPPETMASTER_LOG="syslog" + +# You may specify other parameters to the puppetmaster here +#PUPPETMASTER_EXTRA_OPTS="--no-ca" |