You can use the knife block plugin to manage different knife.rb files that point to different Chef servers.
From: Yoshi Spendiff [mailto:email@example.com]
Sent: Tuesday, July 07, 2015 5:27 PM
Subject: [chef] Re: Re: It is possible use One workstation for multiple servers
There’s also the knife block plug-in
On Tue, Jul 7, 2015 at 1:18 PM, Daniel DeLeo <firstname.lastname@example.org:email@example.com> wrote:
On Tuesday, July 7, 2015 at 12:58 PM, Joseph Djomeda wrote:
Sorry for the beginner questions I keep asking recently. I am a beginner anyways
We have opted for hosted chef , and in another thread here, I passed a comment on using using ansible local/test/experiments stuff and I was advised to stick to one. In an attempt of doing that I realized I am more comfortable with a local community chef server installed on premise in our office.
There are several ways to do this.
knife will look in your current working directory and up for a .chef directory with your config file. So you just have one top level directory for each Chef server you want to talk to. Note that this uses the PWD environment variable (if set, otherwise it falls back to what the OS provides), so you can symlink in projects (like a chef repo or individual cookbooks) to avoid having multiple copies and it will do the right thing.
Chef config files are just ruby code, so you can define multiple configurations in one knife config, and set an environment variable to choose which one you want. If you do this, you might want to add the variable to your terminal prompt so you know which server you’re talking to.
Use a tool like https://github.com/trobrock/chefvm
Specify the config file with the -c option all the time.
There could be still others, but these are the ones I can remember off the top of my head. I personally use option 1.
Thanks in advance and Best Regards,
Joseph Kodjo-Kuma Djomeda
Mobile: +1 778 952 2025