Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matthewtodd/skillet

Deploy a Chef server on Heroku!
https://github.com/matthewtodd/skillet

Last synced: about 2 months ago
JSON representation

Deploy a Chef server on Heroku!

Awesome Lists containing this project

README

        

= Skillet

An easy-to-deploy standalone Rack app with bundled Chef server and cookbooks.

== Rationale

Hey, wouldn't it be cool to run a Chef[http://wiki.opscode.com/display/chef] server on Heroku[http://heroku.com]?

== Deployment

As a prerequisite, you'll need access to a CouchDB instance somehow somewhere. (As one option, see my hideabed[http://github.com/matthewtodd/hideabed]. I hear there's also http://hosting.couch.io.)

I happen to be using Heroku. Here's how you'd deploy there:

git clone http://github.com/matthewtodd/skillet.git
cd skillet
# adjust cookbooks to your liking
heroku create my-skillet
heroku config:add MERB_SESSION_SECRET_KEY=37b51d194a7513e45b56f6524f2d51f2
heroku config:add CHEF_AUTHORIZED_OPENID_IDENTIFIERS=one.example.com,two.example.com
heroku config:add CHEF_AUTHORIZED_OPENID_PROVIDERS=provider.example.com,another-provider.example.com
heroku config:add CHEF_COUCHDB_URL=https://user:[email protected]
heroku config:add CHEF_OPENID_URL=https://my-skillet-openid.heroku.com
heroku config:add CHEF_VALIDATION_TOKEN=73feffa4b7f6bb68e44cf984c85f6e88
heroku addons:add piggyback_ssl
git push heroku master

Then, give it a go with

open https://my-skillet.heroku.com

Until Chef 0.8.0 is released, you'll need a second appserver so that your Nodes can authenticate themselves with OpenID. Strangely, it seems this is not as simple as cranking your Heroku dynos to 2. So, you'll need to create a *second* copy of Skillet on Heroku to act as Chef's OpenID server. Basically, you'll follow the instructions above, but with a different app name, and make sure you've set CHEF_OPENID_URL properly. (At this point, it probably makes sense to keep your own fork of Skillet.)

== Notes

It would be great if Heroku supported[http://docs.heroku.com/constraints#git-submodules] git submodules[http://groups.google.com/group/heroku/browse_thread/thread/5e6807fcd2572f64/bee1a3b581db9c00]. Then we could pull in Opscode's cookbooks[http://github.com/opscode/cookbooks] instead of duplicating them.

I've totally stubbed out Chef::Queue, so there's no search indexing. This hasn't been a big deal for me yet, as I'm dealing with a number of single-server environments. But I suppose you could either perform the search indexing in-process, or run it through Heroku's recently-added[http://blog.heroku.com/archives/2009/7/15/background_jobs_with_dj_on_heroku/] support for Delayed::Job. Either way, beware the Heroku constraints[http://docs.heroku.com/constraints#read-only-filesystem] and workarounds[http://docs.heroku.com/full-text-indexing].