tobami / littlechef

Cook with Chef without a Chef Server
Apache License 2.0
472 stars 71 forks source link

littlechef installs a very outdated version of chef #201

Closed henning closed 10 years ago

henning commented 10 years ago

LittleChef installs a very old version of Chef on the node when setting it up - it's due to the fact that opscode doesn't provide an apt repository anymore, but only wants users ti install from their self-invented omnibus repository for which no distribution install method seems to be available.

$ fix node:default deploy_chef

DeprecationWarning: deprecated config file name 'config.cfg'. Use littlechef.cfg Are you sure you want to install Chef 0.10 using "precise" packages on node default? [Y/n] y Setting up Opscode repository... Installing Chef Solo Saving node configuration to nodes/default.json...

Done. Disconnecting from 127.0.0.1:2222... done.

henning commented 10 years ago

oh looking further, it didn't install a 0.10.X version but 10.18.2-2 - so it's not that old, but still more than a year and a major version leap back.

tobami commented 10 years ago

Ok, this is a bug in the documentation.

As in #199, 1.6 made many changes that will only become the default (breaking) behaviour in 2.x

Using deploy_chef without arguments will use the traditional debian repo way, which as you noted is no longer being updated by Opscode. LittleChef 1.6 introduced support for omnibus installs, which use the 'getchef' service and give you the latest 10.x or 11.x

Sadly it was not documented. I will fix that, thanks for reporting.

henning commented 10 years ago

Hmm, trying to do as the new doc says. (actually, I tried to get some info about the command line options and usage details of the deploy_chef command like the one you documented in the patch, but I couldn#t squeeze it out of the fix command line)

To me this still looks like it's trying to install 0.10, this time with omnibus, which might fail because there is no 0.10 omnibus version? (running the thing against a vagrant VM with centOS 6.5)

$ fix node:default deploy_chef:method=omnibus Deploying Chef 0.10 using the omnibus installer... Downloading and installing Chef 0.10...

Fatal error: sudo() received nonzero return code 1 while executing!

Requested: bash /tmp/install.sh -v 0.10 Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "bash /tmp/install.sh -v 0.10"

==================================================================================== Standard output ====================================================================================

Downloading Chef 0.10 for el... downloading https://www.opscode.com/chef/metadata?v=0.10&prerelease=false&nightlies=false&p=el&pv=6&m=x86_64 to file /tmp/install.sh.2574/metadata.txt trying wget... ERROR 404 Unable to retrieve a valid package! Please file a bug report at http://tickets.opscode.com Project: Chef Component: Packages Label: Omnibus Version: 0.10

Please detail your operating system type, version and any other relevant details Metadata URL: https://www.opscode.com/chef/metadata?v=0.10&prerelease=false&nightlies=false&p=el&pv=6&m=x86_64

Aborting. Disconnecting from 127.0.0.1:2222... done.

tobami commented 10 years ago

Indeed. Default version is still the one in the old repositories for compatibility reasons. I'll have to add version to the omnibus usage, and best would be to catch those install.sh errors