Skip to content

Instantly share code, notes, and snippets.

@pglombardo
Last active December 30, 2015 22:39
Show Gist options
  • Save pglombardo/7896073 to your computer and use it in GitHub Desktop.
Save pglombardo/7896073 to your computer and use it in GitHub Desktop.
How to Instrument puppetmaster-passenger using Oboe::Rack [WIP]
gem install oboe json
# 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