[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. 546130d929ce2f82cb074e440993749e74d1f8b4
Micah Anderson
micah at riseup.net
Mon Apr 14 02:30:40 UTC 2008
The following commit has been merged in the master branch:
commit 546130d929ce2f82cb074e440993749e74d1f8b4
Author: Micah Anderson <micah at riseup.net>
Date: Sun Apr 13 21:44:41 2008 -0400
Create /etc/default/puppet and /etc/default/puppetmaster
Modify puppetmaster.init to support mongrel instances on multiple ports
Add Suggests: apache2 | nginx, mongrel for puppetmaster in debian/control
Remove the no longer needed .svn directory cleaning
diff --git a/debian/changelog b/debian/changelog
index f27d0a0..f921791 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+puppet (0.24.4-4) unstable; urgency=low
+
+ * Create /etc/default/puppet and /etc/default/puppetmaster
+ * Modify /etc/init.d/puppetmaster to support mongrel instances
+ on multiple ports
+ * Remove no longer necessary .svn cleaning from debian/rules
+ * Cherry-pick upstream patches from 0.24.x branch:
+ - Install manpages
+ - Fix shebang issues (#1148)
+ - Updated fix for (#1020)
+ - Fix for (#1174)
+ - Emacs mode updates (#1160)
+ - Debian service [en|dis]able issue (#1161)
+ - User type group list validation enhancement
+ - Fix configtimeout issue (#1176)
+
+ -- Micah Anderson <micah at debian.org> Sun, 13 Apr 2008 19:18:46 -0400
+
puppet (0.24.4-3) unstable; urgency=low
* Remove pi binary, puppetdoc provides this functionality now
diff --git a/debian/control b/debian/control
index c809320..09547d4 100644
--- a/debian/control
+++ b/debian/control
@@ -30,6 +30,7 @@ Package: puppetmaster
Architecture: all
Depends: ruby (>= 1.8.1), puppet (= ${source:Version}), facter, lsb-base
Recommends: rails (>= 1.2.3-2), rdoc
+Suggests: apache2 | nginx, mongrel
Description: centralised configuration management control daemon
Puppet lets you centrally manage every important aspect of your system
using a cross-platform specification language that manages all the
diff --git a/debian/puppet.default b/debian/puppet.default
new file mode 100644
index 0000000..da38a38
--- /dev/null
+++ b/debian/puppet.default
@@ -0,0 +1,7 @@
+# Defaults for puppet - sourced by /etc/init.d/puppet
+
+# Start puppet on boot?
+START=yes
+
+# Startup options
+DAEMON_OPTS="-w 0"
\ No newline at end of file
diff --git a/debian/puppet.init b/debian/puppet.init
index 23ae391..7b65ab5 100644
--- a/debian/puppet.init
+++ b/debian/puppet.init
@@ -1,5 +1,5 @@
#! /bin/sh
-### BEGIN INIT INFO
+### BEGIN INIT INFO
# Provides: puppet
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
@@ -10,7 +10,7 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/puppetd
-DAEMON_OPTS="-w 0"
+DAEMON_OPTS=""
NAME=puppetd
DESC="puppet configuration management tool"
diff --git a/debian/puppetmaster.default b/debian/puppetmaster.default
new file mode 100644
index 0000000..0fd5775
--- /dev/null
+++ b/debian/puppetmaster.default
@@ -0,0 +1,29 @@
+# Defaults for puppetmaster - sourced by /etc/init.d/puppet
+
+# Start puppet on boot?
+START=yes
+
+# Startup options
+DAEMON_OPTS=""
+
+# What server type to run
+# Options:
+# webrick (default, cannot handle more than ~30 nodes)
+# mongrel (scales better than webrick because you can run
+# multiple processes if you are getting
+# connection-reset or End-of-file errors, switch to
+# mongrel. Requires front-end web-proxy such as
+# apache, nginx, or pound)
+# See: http://reductivelabs.com/trac/puppet/wiki/UsingMongrel
+SERVERTYPE=webrick
+
+# How many puppetmaster instances to start? Its pointless to set this
+# higher than 1 if you are not using mongrel.
+PUPPETMASTERS=1
+
+# What port should the puppetmaster listen on (default: 18140). If
+# NUMBER_OF_MASTERS is set to a number greater than 1, then the port
+# for the first puppetmaster will be set to the below port, and further
+# instances will be incremented by one
+
+PORT=18140
\ No newline at end of file
diff --git a/debian/puppetmaster.init b/debian/puppetmaster.init
index 2e09799..02987fa 100644
--- a/debian/puppetmaster.init
+++ b/debian/puppetmaster.init
@@ -1,5 +1,5 @@
#! /bin/sh
-### BEGIN INIT INFO
+### BEGIN INIT INFO
# Provides: puppetmaster
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
@@ -20,43 +20,75 @@ test -x $DAEMON || exit 0
. /lib/lsb/init-functions
if [ ! -d /var/run/puppet ]; then
- rm -rf /var/run/puppet
mkdir -p /var/run/puppet
fi
chown puppet:puppet /var/run/puppet
+is_true() {
+ if [ "x$1" = "xtrue" -o "x$1" = "xyes" -o "x$1" = "x0" ] ; then
+ return 0
+ else
+ return 1
+ fi
+}
+
start_puppetmaster() {
+ if [ "$SERVERTYPE" = "mongrel" ]
+ then
+ DAEMON_OPTS="$DAEMON_OPS --servertype=mongrel"
+ NUMSTART=0
+ while [ $NUMSTART -lt $PUPPETMASTERS ]; do
+ start-stop-daemon --start --quiet --pidfile=/var/run/puppet/$NAME-$PORT.pid \
+ --startas $DAEMON -- $DAEMON_OPTS --masterport=$PORT
+ let PORT=PORT+1
+ let NUMSTART=NUMSTART+1
+ done
+ else
start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \
- --startas $DAEMON -- $DAEMON_OPTS
+ --startas $DAEMON -- $DAEMON_OPTS --masterport=$PORT
+ fi
}
stop_puppetmaster() {
+ if [ "$SERVERTYPE" = "mongrel" ]
+ then
+ for instance in $PUPPETMASTERS; do
+ start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME-$instance.pid
+ rm /var/run/puppet/$NAME-$instance.pid
+ done
+ else
start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid
+ fi
}
case "$1" in
start)
- log_begin_msg "Starting $DESC"
- start_puppetmaster
- log_end_msg $?
+ if is_true "$START"
+ then
+ log_begin_msg "Starting $DESC"
+ start_puppetmaster
+ log_end_msg $?
+ else
+ exit 0
+ fi
;;
stop)
log_begin_msg "Stopping $DESC"
stop_puppetmaster
log_end_msg $?
;;
- reload)
+ reload)
# Do nothing, as Puppetmaster rechecks its config automatically
;;
- restart|force-reload)
+ restart|force-reload)
log_begin_msg "Restarting $DESC"
stop_puppetmaster
sleep 1
start_puppetmaster
log_end_msg 0
;;
- *)
+ *)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
;;
diff --git a/debian/rules b/debian/rules
index 851eefd..1a4ad0a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -86,10 +86,6 @@ install: build
dh_installlogcheck
rm debian/puppet.logcheck.*
- # Clean out any SVN cruft that may still be lingering in our
- # packages
- find debian/tmp debian/puppet debian/puppetmaster -name .svn |xargs rm -rf
-
# Build architecture-dependent files here.
binary-arch: build install
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list