From ee2d7ea220bed64304577aa3d926782d57c26f6d Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 20 May 2013 15:49:40 +0200 Subject: update to latest config.ru --- files/master/config.ru | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) (limited to 'files/master') diff --git a/files/master/config.ru b/files/master/config.ru index cec2a34..984017e 100644 --- a/files/master/config.ru +++ b/files/master/config.ru @@ -2,28 +2,35 @@ # SSL needs to be handled outside this, though. # if puppet is not in your RUBYLIB: -# $:.unshift('/opt/puppet/lib') +# $LOAD_PATH.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" - -require 'puppet/application/puppetmasterd' +# Rack applications typically don't start as root. Set --confdir and --vardir +# to prevent reading configuration from ~puppet/.puppet/puppet.conf and writing +# to ~puppet/.puppet +ARGV << "--confdir" << "/etc/puppet" +ARGV << "--vardir" << "/var/lib/puppet" + +# 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/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 + -- cgit v1.2.3 From da308e957c8713f440d22609983e8fb0dd078696 Mon Sep 17 00:00:00 2001 From: tr Date: Sat, 3 May 2014 20:47:47 +0200 Subject: update the puppetmaster puppet.conf to puppetversion > 3.5 --- files/master/puppet.conf | 107 ++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 72 deletions(-) (limited to 'files/master') diff --git a/files/master/puppet.conf b/files/master/puppet.conf index cf50317..893dfb6 100644 --- a/files/master/puppet.conf +++ b/files/master/puppet.conf @@ -1,73 +1,36 @@ [main] - confdir=/srv/puppet/etc - - # Where Puppet stores dynamic and growing data. - # The default value is '/var/puppet'. - vardir = /srv/puppet - - # The Puppet log directory. - # The default value is '$vardir/log'. - logdir = /var/log/puppet - - # Where Puppet PID files are kept. - # The default value is '$vardir/run'. - rundir = /var/run/puppet - - # Where SSL certificates are kept. - # The default value is '$confdir/ssl'. - ssldir = $vardir/ssl - - factpath = $vardir/lib/facter - plugindest = $vardir/lib/puppet - -[puppetd] - # The file in which puppetd stores a list of the classes - # associated with the retrieved configuratiion. Can be loaded in - # the separate ``puppet`` executable using the ``--loadclasses`` - # option. - # The default value is '$confdir/classes.txt'. - classfile = $vardir/classes.txt - - # Where puppetd caches the local configuration. An - # extension indicating the cache format is added automatically. - # The default value is '$confdir/localconfig'. - localconfig = $vardir/localconfig - - report=true - pluginsync = true - factsync=true - - logdest=/var/log/puppet/puppet.log - -[puppetmasterd] - reportdir = $logdir/reports - autoflush = true - storeconfigs=true - dbadapter=mysql - dbserver=localhost - dbuser=puppet - dbpassword=**************** - dbsocket=/var/lib/mysql/mysql.sock - - #usage for clusters - #ssl_client_header=HTTP_X_SSL_SUBJECT - - # apache2/passenger usage: http://github.com/reductivelabs/puppet/tree/master/ext/rack - ssl_client_header = SSL_CLIENT_S_DN - ssl_client_verify_header = SSL_CLIENT_VERIFY - - - # specify allowed environments - environments=production,development - - # configure environments - [development] - manifest=$vardir/development/etc/manifests/site.pp - modulepath=$vardir/development/modules/ - templatepath=$vardir/development/templates/ - - [production] - manifest=$vardir/production/etc/manifests/site.pp - modulepath=$vardir/production/modules/ - templatepath=$vardir/production/templates/ - + confdir = /etc/puppet + logdir = /var/log/puppet + vardir = /var/lib/puppet + ssldir = $vardir/ssl + rundir = /var/run/puppet + factpath = $vardir/lib/facter + templatedir = $confdir/templates + #certname = puppetmaster01.example.com + #server = puppet.example.com + #user = pe-puppet + #group = pe-puppet + #archive_files = true + #archive_file_server = puppet.example.com + +[master] + #certname = puppetmaster01.example.com + #dns_alt_names = puppetmaster01,puppetmaster01.example.com,puppet,puppet.example.com + #ca_name = 'Puppet CA generated on puppetmaster01.example.com at 2013-08-09 19:11:11 +0000' + reports = http,puppetdb + reporturl = https://localhost:443/reports/upload + #node_terminus = exec + #external_nodes = /etc/puppetlabs/puppet-dashboard/external_node + ssl_client_header = SSL_CLIENT_S_DN + ssl_client_verify_header = SSL_CLIENT_VERIFY + #storeconfigs_backend = puppetdb + #storeconfigs = true + #autosign = true + +[agent] + report = true + classfile = $vardir/classes.txt + localconfig = $vardir/localconfig + graph = true + pluginsync = true + environment = production -- cgit v1.2.3