Multiple chef-repo with Berkshelf

All -

Currently I have three Chef instances, meaning three chef-repos, call them A, B, and C. (We are hoping to merge into one repo soon.) I want to use Berkshelf. However, Berkshelf creates its config.json file at $HOME/.berkshelf/config.json which means that the “chef”: portion is shared for all three instance.

Can I split this file into two, putting the “chef”: portion specific to my chef-repo at the chef-repo level while leaving the rest of the config.json at $HOME?

If I can’t split the file, can I just create the .berkshelf directory at the chef-repo level and have three, one for each chef-repo?

Thanks,
Mark

mark nichols | @zanshin | zanshin.net

Hey Mark,

If I understand your question correctly, you have the option to pass a config file to the berks command. e.g.

berks upload -config==/home/blah/.berkshelf/config_A.json
berks upload -config==/home/blah/.berkshelf/config_B.json

Thanks,

Brian
[http://www.workday.com/pics/common/green_note.gif]

From: “Mark H. Nichols” <chef@zanshin.netmailto:chef@zanshin.net>
Reply-To: <chef@lists.opscode.commailto:chef@lists.opscode.com>
Date: Wednesday 8 January 2014 15:08
To: <chef@lists.opscode.commailto:chef@lists.opscode.com>
Subject: [chef] Multiple chef-repo with Berkshelf

All -

Currently I have three Chef instances, meaning three chef-repos, call them A, B, and C. (We are hoping to merge into one repo soon.) I want to use Berkshelf. However, Berkshelf creates its config.json file at $HOME/.berkshelf/config.json which means that the “chef”: portion is shared for all three instance.

Can I split this file into two, putting the “chef”: portion specific to my chef-repo at the chef-repo level while leaving the rest of the config.json at $HOME?

If I can’t split the file, can I just create the .berkshelf directory at the chef-repo level and have three, one for each chef-repo?

Thanks,
Mark

mark nichols | @zanshin | zanshin.nethttp://zanshin.net/

you might try to manage them via linked files...ala chefvm (
GitHub - trobrock/chefvm: Simple Chef environment manager)

it's sort of like rvm, but for chef config files...

On Wed, Jan 8, 2014 at 7:23 AM, Brian Fletcher
brian.fletcher@workday.comwrote:

Hey Mark,

If I understand your question correctly, you have the option to pass a
config file to the berks command. e.g.

berks upload —config==/home/blah/.berkshelf/config_A.json
berks upload —config==/home/blah/.berkshelf/config_B.json

Thanks,

Brian

From: "Mark H. Nichols" chef@zanshin.net
Reply-To: chef@lists.opscode.com
Date: Wednesday 8 January 2014 15:08
To: chef@lists.opscode.com
Subject: [chef] Multiple chef-repo with Berkshelf

All -

Currently I have three Chef instances, meaning three chef-repos, call
them A, B, and C. (We are hoping to merge into one repo soon.) I want to
use Berkshelf. However, Berkshelf creates its config.json file at
$HOME/.berkshelf/config.json which means that the “chef”: portion is shared
for all three instance.

Can I split this file into two, putting the “chef”: portion specific to
my chef-repo at the chef-repo level while leaving the rest of the
config.json at $HOME?

If I can’t split the file, can I just create the .berkshelf directory at
the chef-repo level and have three, one for each chef-repo?

Thanks,
Mark

mark nichols | @zanshin | zanshin.net

On Wed, 8 Jan 2014 09:08:05 -0600 "Mark H. Nichols" chef@zanshin.net
wrote:

Currently I have three Chef instances, meaning three chef-repos, call
them A, B, and C. (We are hoping to merge into one repo soon.) I want
to use Berkshelf. However, Berkshelf creates its config.json file at
$HOME/.berkshelf/config.json which means that the “chef”: portion is
shared for all three instance.

Can I split this file into two, putting the “chef”: portion specific
to my chef-repo at the chef-repo level while leaving the rest of the
config.json at $HOME?

If I can’t split the file, can I just create the .berkshelf directory
at the chef-repo level and have three, one for each chef-repo?

I 'solved' this by having a 'berks' skript in one of my repos that
calls 'bundle exec berks --config= $*'. Now I only need to
remember to use "./berks" in that repo...

Have fun,

Arnold