-
Notifications
You must be signed in to change notification settings - Fork 213
Default to installing the same Chef version on the node as is used on work station #186
Default to installing the same Chef version on the node as is used on work station #186
Conversation
I vote for this as the default. Chef 11 seems to have some incompatibilities with ec2 and knife plugins, and it's not the first time this has happened when chef is revved. I worked quite hard to get a set of gems installed locally that worked, and then "knife prepare" went and installed different (broken) ones on the remote server. Error output:
|
@dsyer agreed. But your error message makes me wonder if you're using the right version of knife-solo. |
@dsyer Yeah that error message comes from your local machine. Also ec2 and other knife plugins won't be installed on the node. So you can use Chef 11 on the node independent of the version on your working station. But incompatibility issues might rise from cookbooks. Anyway you can force the version on the node by giving e.g. But I will anyway fix this issue soon unless someone is faster. =) |
@dsyer were you able to resolve your problem? |
Didn't have time yesterday, but thanks for following up. I will try --omnibus-version=... when I get a chance. I have to say it was pretty obscure, if that turns out to be the workaround. I can confirm that I was using an earlier version of knife solo. Here's a section of my Gemfile.lock
This was the only combination of chef, knife, knife-solo, knife-ec2 and the net-ssh gems I could find that worked (coped a Gemfile from a helpful old blog). If it doesn't work out of the box without specifying explicit dependencies, then I think it's a big pit of potentially wasted time. Is there anything I can do to get a reliable set of modern dependencies? A Gemfile that someone could share for instance? |
The I tested quickly with a Gemfile like this: source "https://rubygems.org"
gem 'chef', '~> 10'
gem 'knife-ec2'
gem 'knife-solo' Bundler seemed to resolve all of them to the latest versions (knife-ec2 v0.6.2, knife-solo v0.2.0, chef v10.22.0). The same with Chef v11.4.0. There has been a lot of dependency based problems lately in Chef, so it could have been different story some days ago. |
I never had a problem with
It turned out I had forgotten to run
|
The error message still gives a hint you have (also) some old knife-solo gem installed. Try |
I'll boldly merge this. @matschaffer can fix it later if needed. ;) |
Default to installing the same Chef version on the node as is used on work station
knife bootstrap
works like this, and it offers less surprises like currently when Chef 11 is released. This is related to #185 as the same logic would be good for both omnibus and gem installers.