new config.ru .. puppet stopped working after that
(root)@sys-ubuntu:/usr/share/puppet/rack/puppetmasterd# cat config.ru# 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
old config.run ... puppet was working fine
# Author: Christian Hofstaedtler <hofstaedtler@inqnet.at># Copyright (c) 2007 Luke Kanies, 2008 Christian Hofstaedtler## This file is mostly based on puppetmasterd, which is part of# the standard puppet distribution.require'rack'require'puppet'require'puppet/network/http_server/rack'# startup code from bin/puppetmasterdPuppet.parse_config
Puppet::Util::Log.level =:infoPuppet::Util::Log.newdestination(:syslog)
# A temporary solution, to at least make the master work for now.Puppet::Node::Facts.terminus_class =:yaml# Cache our nodes in yaml. Currently not configurable.Puppet::Node.cache_class =:yaml# The list of handlers running inside this puppetmaster
handlers = {
:Status => {},
:FileServer => {},
:Master => {},
:CA => {},
:FileBucket => {},
:Report => {}
}
# Fire up the Rack-Server instance
server =Puppet::Network::HTTPServer::Rack.new(handlers)
# prepare the rack app
app = proc do |env|
server.process(env)
end# Go.
run app