07 12 / 2011

How to manage multiple chef servers chef client?

I was stupid enough on how to manage multiple chef clients for multiple chef servers.

e.g.

I played with Opscode hosted chef servers. Actually, I was astonished with chef through those guys presentations/talks. And later I installed one local chef-server to play around.

But I was always confused on what are the files do I need to change while switching to the previous or another one. Should I keep them(3 files; client key, organization validator key and knife.rb) in ~/chef or ~/.chef or ~/other_folder/.chef.

But, today I find this approach simple and simple.

Do cd inside any folder that you’re managing for different servers. Make one directory named .chef and put your client key, orgnization validator kye, knife.rb

Now when you run any knife -h commands being inside that folder, the configuration will be read first from the .chef directory.

It made me much simpler, should have known before!!

Tags:

Permalink 42 notes