Last active
December 30, 2015 22:39
-
-
Save pglombardo/7896073 to your computer and use it in GitHub Desktop.
How to Instrument puppetmaster-passenger using Oboe::Rack [WIP]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install oboe json | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a config.ru, for use with every rack-compatible webserver. | |
# SSL needs to be handled outside this, though. | |
require 'oboe' | |
require 'oboe/inst/rack' | |
Oboe::Config[:tracing_mode] = 'always' | |
Oboe::Config[:verbose] = true | |
use Oboe::Rack | |
Oboe::Ruby.initialize | |
# if puppet is not in your RUBYLIB: | |
# $:.unshift('/opt/puppet/lib') | |
$0 = "master" | |
# if you want debugging: | |
# ARGV << "--debug" | |
ARGV << "--rack" | |
require 'puppet/application/master' | |
# we're usually running inside a Rack::Builder.new {} block, | |
# therefore we need to call run *here*. | |
run Puppet::Application[:master].run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment