Skip to content

Instantly share code, notes, and snippets.

@fujin
Created March 1, 2009 23:51
Show Gist options
  • Save fujin/72533 to your computer and use it in GitHub Desktop.
Save fujin/72533 to your computer and use it in GitHub Desktop.
def run
AMQP.logging = true
EM.run do
agent = Nanite::Agent.start(@config)
agent.register(Opscode::OhaiActor.new, 'state')
agent.register(Opscode::ChefActor.new, 'control')
end
end
EM.run do
puts "starting agent"
agent = Opscode::Agent::CLI.new
agent.run
puts "running thin"
Rack::Handler::Thin.run Opscode::Agent::HttpService.new(agent), :Port => 8000
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment