Invidious choices 101: Chef (<= 0.10) vs Vagrant

Hi,
Due to Chef pinning the json gem at <=1.4.6 you can’t use vagrant in
the same ruby gem environment as Chef…
This issue is proving to be a blocker in the quest to reuse Cucumber
steps in Vagrant+Chef use cases.

What methods are people adopting to use Chef and Vagrant in the same project?

At the moment all I can think of is to try switch gemsets with RVM
whenever you need to use knife ..., but I’m open to any other
suggestions
Specifically, I see the current master still has Chef pinning json gem
at <=1.4.6. So I assume this restriction will be around for some
considerable time. That means any workaround that is not clean/easy
gets a look in :slight_smile:

Appreciate any hints or tips.


πόλλ’ οἶδ ἀλώπηξ, ἀλλ’ ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com

What do you mean by "using vagrant and chef in the same project". I'm using
chef as a provisioner (primarily as a means to test my chef recipes/roles in
a speedy environment (switching vagrant between a chef-solo (for speed) and
chef server model (to the platform, for testing more advanced configs). But
I don't think that's what you meant. (I notice that vagrant during a
"vagrant provision" run seems to use an earlier version of chef than the
latest one I have installed - is gem dependency management that clever?)

Tim

On Wed, Mar 30, 2011 at 8:54 AM, Hedge Hog hedgehogshiatus@gmail.comwrote:

Hi,
Due to Chef pinning the json gem at <=1.4.6 you can't use vagrant in
the same ruby gem environment as Chef....
This issue is proving to be a blocker in the quest to reuse Cucumber
steps in Vagrant+Chef use cases.

What methods are people adopting to use Chef and Vagrant in the same
project?

At the moment all I can think of is to try switch gemsets with RVM
whenever you need to use knife ..., but I'm open to any other
suggestions
Specifically, I see the current master still has Chef pinning json gem
at <=1.4.6. So I assume this restriction will be around for some
considerable time. That means any workaround that is not clean/easy
gets a look in :slight_smile:

Appreciate any hints or tips.

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com

On Thu, Mar 31, 2011 at 7:43 AM, Tim Diggins tim@red56.co.uk wrote:

What do you mean by "using vagrant and chef in the same project".

One Gemfile with both present, and I don't think groups allow you to
sidestep this.

I'm using
chef as a provisioner (primarily as a means to test my chef recipes/roles in
a speedy environment (switching vagrant between a chef-solo (for speed) and
chef server model (to the platform, for testing more advanced configs). But
I don't think that's what you meant. (I notice that vagrant during a
"vagrant provision" run seems to use an earlier version of chef than the
latest one I have installed - is gem dependency management that clever?)

Could be or Vagrant adjusts the load path so the Chef it cah use is
encountered first - I haven't looked into the code that closely.
I think I have a (non-trivial) workaround, that is transparent to the
library user, just exploring it now....

Tim
On Wed, Mar 30, 2011 at 8:54 AM, Hedge Hog hedgehogshiatus@gmail.com
wrote:

Hi,
Due to Chef pinning the json gem at <=1.4.6 you can't use vagrant in
the same ruby gem environment as Chef....
This issue is proving to be a blocker in the quest to reuse Cucumber
steps in Vagrant+Chef use cases.

What methods are people adopting to use Chef and Vagrant in the same
project?

At the moment all I can think of is to try switch gemsets with RVM
whenever you need to use knife ..., but I'm open to any other
suggestions
Specifically, I see the current master still has Chef pinning json gem
at <=1.4.6. So I assume this restriction will be around for some
considerable time. That means any workaround that is not clean/easy
gets a look in :slight_smile:

Appreciate any hints or tips.

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com

On Wed, Mar 30, 2011 at 4:53 PM, Hedge Hog hedgehogshiatus@gmail.com wrote:

On Thu, Mar 31, 2011 at 7:43 AM, Tim Diggins tim@red56.co.uk wrote:

What do you mean by "using vagrant and chef in the same project".

One Gemfile with both present, and I don't think groups allow you to
sidestep this.

I'm using
chef as a provisioner (primarily as a means to test my chef recipes/roles in
a speedy environment (switching vagrant between a chef-solo (for speed) and
chef server model (to the platform, for testing more advanced configs). But
I don't think that's what you meant. (I notice that vagrant during a
"vagrant provision" run seems to use an earlier version of chef than the
latest one I have installed - is gem dependency management that clever?)

Could be or Vagrant adjusts the load path so the Chef it cah use is
encountered first - I haven't looked into the code that closely.
I think I have a (non-trivial) workaround, that is transparent to the
library user, just exploring it now....

I think vagrant has it's own seperate install of chef actually on the
vagrant instance that it uses. I was able to see the details by grep
the vagrant gem for references to chef-client or chef-solo.

Tim
On Wed, Mar 30, 2011 at 8:54 AM, Hedge Hog hedgehogshiatus@gmail.com
wrote:

Hi,
Due to Chef pinning the json gem at <=1.4.6 you can't use vagrant in
the same ruby gem environment as Chef....
This issue is proving to be a blocker in the quest to reuse Cucumber
steps in Vagrant+Chef use cases.

What methods are people adopting to use Chef and Vagrant in the same
project?

At the moment all I can think of is to try switch gemsets with RVM
whenever you need to use knife ..., but I'm open to any other
suggestions
Specifically, I see the current master still has Chef pinning json gem
at <=1.4.6. So I assume this restriction will be around for some
considerable time. That means any workaround that is not clean/easy
gets a look in :slight_smile:

Appreciate any hints or tips.

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com

On 30.03.2011, at 22:53, Hedge Hog wrote:

On Thu, Mar 31, 2011 at 7:43 AM, Tim Diggins tim@red56.co.uk wrote:

What do you mean by "using vagrant and chef in the same project".

Hm. What are you trying to do?

Host machine with vagrant gem
Client machine with chef-client gem

Where do they interfere?

cu edi

DI Edmund Haselwanter, edmund@haselwanter.com, http://edmund.haselwanter.com/
http://www.iteh.at | Facebook | http://at.linkedin.com/in/haselwanteredmund

On Thu, Mar 31, 2011 at 8:47 AM, Haselwanter Edmund
edmund@haselwanter.com wrote:

On 30.03.2011, at 22:53, Hedge Hog wrote:

On Thu, Mar 31, 2011 at 7:43 AM, Tim Diggins tim@red56.co.uk wrote:

What do you mean by "using vagrant and chef in the same project".

Hm. What are you trying to do?

run
vagrant ...
kife ....
in an env that is setup with one Gemfile.

Host machine with vagrant gem
Client machine with chef-client gem

Where do they interfere?

cu edi

DI Edmund Haselwanter, edmund@haselwanter.com, http://edmund.haselwanter.com/
http://www.iteh.at | Facebook | http://at.linkedin.com/in/haselwanteredmund

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com