0

I have a chef server setup, but since it serves quite a lot nodes, the server gets slow. There is two scenarios I would like to explore and I would like to know if anyone has experience with them:

  • Since Merb is single threaded, is it possible to run multiple chef-server instances and proxy them through some frontend webserver (Apache or nginx)?
  • Has anyone ever setup a replicated Chef environment? CouchDB and RabbitMQ can be clustered, but how do I go about with cookbooks?

I haven't found a lot on these topics (especially the last one) and I'm wondering if there is anyone here doing some of this?

Wouter de Bie
  • 719
  • 5
  • 7

1 Answers1

2

You can run multiple instances of the chef-server-api with the -c flag.

sudo chef-server -c 8

[Edit] You'll need a shared filesystem like glusterfs, nfs or similar for sharing the cookbooks.

You can also proxy this with apache2 or nginx. There's a recipe in Opscode's Chef cookbook that should be helpful for setting this up.

https://github.com/opscode/cookbooks/blob/master/chef/recipes/server_proxy.rb

Finally, the server was definitely designed to scale easily, and a lot of the configuration directives in Chef are used by the server for exactly that.

http://wiki.opscode.com/display/chef/Chef+Configuration+Settings

Selva
  • 243
  • 2
  • 5
jtimberman
  • 7,587
  • 2
  • 34
  • 42
  • Thanks for the -c! However, a problem with scaling to multiple machines is that I get couchdb and rabbitmq to replicate, but when uploading cookbooks, that only goes to one server. As soon as the digest of my files is calculated and put into couchdb, cookbooks will not be uploaded to the second server. – Wouter de Bie Feb 18 '11 at 06:56
  • you'll need a shared filesystem like glusterfs, nfs or similar. – jtimberman Feb 18 '11 at 17:12
  • Your last comment should probably be part of your main answer because it's a key part of clustering and scaling a chef-server installation. – yfeldblum Apr 06 '11 at 01:21