chef-boneyard/chef-dk

How can I force the use of knife-ec2 v0.17.0 ?

sirosen opened this issue · 5 comments

Description

I want to use knife-ec2:0.17.0 within ChefDK on Ubuntu 18.04

ChefDK Version

Versions after 3.0.27 have knife-ec2:0.18.0 in the Gemfile.lock

Platform Version

Running on Ubuntu 18.04 this becomes an issue, as chefdk v2.5.3 does not have a deb package for 18.04 (at least, not on packages.chef.io ).
Populating
https://packages.chef.io/files/stable/chefdk/2.5.3/ubuntu/18.04/chefdk_2.5.3-1_amd64.deb
would be a nice way of handling this.

I noted on the knife-ec2 repo that the breaking behavior change in v0.17.0 -> v0.18.0 is bad for anyone who wrote scripts using knife-ec2.
There's no way to do a graceful migration of the scripts we've written.

I either want to install the latest stable ChefDK version on Ubuntu 18.04 and use knife-ec2:0.17.0 OR safely install an older stable version of ChefDK and tell everyone in our org to lock to that.
Right now, installing the 16.04 deb for chefdk 2.5.3 on 18.04 works, but it's not a very clean resolution.

  • 2.5.3 was released before we had 18.04 in the matrix, the next 2.x release will populate that. we don't go back and repopulate old versions.
  • the 14.04 builds are just copied to 16.04 and 18.04, we don't actually build on 18.04 so you can use those.
  • you'll have to use Gemfile + bundler if you want to pin on cookbooks, there's no user-accessible way to pin. you may have to bundle exec /opt/chefdk/embedded/bin/kitchen instead of bundle exec kitchen until the next 2.x release lands and pulls in the appbundler fixes in chef/appbundler#43

this is also not really a bug, this is a question better suited to slack/discorse/stackoverflow.

(or to maybe be more accurate the bug here is contained in knife-ec2 and needs to get fixed over there...)

Thanks for the responses, even though this wasn't the perfect forum for asking about this.
These data are more than enough to satisfy me on a practical level.

knife-ec2 has a fix that just merged (but hasn't released yet), so presumably that will get pulled in at some point.


With the knowledge that this case is probably far too niche to be worth much attention:
What I wanted to do was "install the latest ChefDK, and then downgrade knife-ec2", knowing and understanding that doing so could, in theory, ruin the chefdk install.

Yeah trying to hack up a chefdk generally wrecks it. Use bundler+Gemfile instead.

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.