summaryrefslogtreecommitdiff
path: root/files/master/config.ru
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-08-22 13:43:08 -0400
committerMicah Anderson <micah@riseup.net>2012-08-22 13:43:08 -0400
commit24e4503906c5ffef236814b003d1fd629989fc40 (patch)
tree1721fb6c2387d6cab5c6e6aaa9ab937b52c559f3 /files/master/config.ru
parent04d8317eb5b70aba62c2b18f6b1bd1d03aedeb5b (diff)
parented7d89163385a6eab4423aae7ce8b5d994339a2f (diff)
Merge remote-tracking branch 'riseup/master'
Conflicts: manifests/puppetmaster/debian.pp manifests/puppetmaster/linux.pp manifests/puppetmaster/package/debian.pp
Diffstat (limited to 'files/master/config.ru')
-rw-r--r--files/master/config.ru30
1 files changed, 16 insertions, 14 deletions
diff --git a/files/master/config.ru b/files/master/config.ru
index cec2a34..b0fd250 100644
--- a/files/master/config.ru
+++ b/files/master/config.ru
@@ -4,26 +4,28 @@
# if puppet is not in your RUBYLIB:
# $:.unshift('/opt/puppet/lib')
-$0 = "puppetmasterd"
-require 'puppet'
-
-# logs to file instead of syslog
-#Puppet::Util::Log.newdestination("/var/log/puppet/puppetmasterd.log")
+$0 = "master"
# if you want debugging:
-#ARGV << "--debug"
+# ARGV << "--debug"
ARGV << "--rack"
-# in some setups puppetmasterd doesn't seem to read the puppet.conf
-# config at startup, then you need to pass these options:
-ARGV << "--vardir" << "/var/lib/puppet"
-ARGV << "--ssldir" << "/var/lib/puppet/ssl"
-# if you use puppet-dashboard:
-#ARGV << "--reports" << "puppet_dashboard"
+# NOTE: it's unfortunate that we have to use the "CommandLine" class
+# here to launch the app, but it contains some initialization logic
+# (such as triggering the parsing of the config file) that is very
+# important. We should do something less nasty here when we've
+# gotten our API and settings initialization logic cleaned up.
+#
+# Also note that the "$0 = master" line up near the top here is
+# the magic that allows the CommandLine class to know that it's
+# supposed to be running master.
+#
+# --cprice 2012-05-22
-require 'puppet/application/puppetmasterd'
+require 'puppet/util/command_line'
# we're usually running inside a Rack::Builder.new {} block,
# therefore we need to call run *here*.
-run Puppet::Application[:puppetmasterd].run
+run Puppet::Util::CommandLine.new.execute
+