Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
were you ever able to get two chef servers working together behind a load balancer? –  nictrix Jun 12 '12 at 15:41
add comment

1 Answer

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

share|improve this answer
    
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 6: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 6 '11 at 1:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.