[chef] Re: knife zero plugin doesn't work on chef 12.x


Chronological Thread 
  • From: Tsuyoshi Ushio < >
  • To:
  • Subject: [chef] Re: knife zero plugin doesn't work on chef 12.x
  • Date: Wed, 24 Dec 2014 16:36:20 +0900

Hi Chefs,

This problem was quickly fixed by the author of knife zero.

Now it has been updated and no problem.

Thanks.


On 24 December 2014 at 14:28, Tsuyoshi Ushio < " target="_blank"> > wrote:
Hi Chefs,

I'm trying knife zero plugin. 

But it doesn't work on chef 12.x but it works on chef 11.x.

Can I use knife zero plugin on chef 12.x? 
 or Anything wrong with my procedure?

Knife zero's author seems to remove the dependency on purpose. 



Case A : chef 12.x
===

-------
$ chef generate repo test
$ cd test
$ mkdir .chef
$ vi Gemfile
$ bundle install
$ echo "local_mode true" >> .chef/knife.rb
$ bundle exec knife zero bootstrap test_ubuntu -x vagrant --sudo
Connecting to test_ubuntu
ERROR: knife encountered an unexpected error
This may be a bug in the 'zero bootstrap' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NameError: undefined local variable or method `chef_version' for #<Chef::Knife::Core::BootstrapContext:0x007fe716eab550>

------

---Gemfile
gem "chef"
gem "knife-zero"
gem "berkshelf"
---

---Gemfile.lock
   :
chef (12.0.3)
      chef-zero (~> 3.2)
   :
---


CaseB : chef 11.x
===

I changed Gemfile. Like this.

---Gemfile
gem "chef", "11.16.4"
gem "knife-zero"
gem "berkshelf"
---

Then it works.
---
$ rm Gemfile.lock
$ bundle install
$ bundle exec knife zero bootstrap test_ubuntu -x vagrant --sudo
ffi-yajl/json_gem is deprecated, these monkeypatches will be dropped shortly
Connecting to test_ubuntu
test_ubuntu Starting first Chef Client run...
test_ubuntu Starting Chef Client, version 11.8.2
test_ubuntu resolving cookbooks for run list: []
test_ubuntu Synchronizing Cookbooks:
test_ubuntu Compiling Cookbooks...
test_ubuntu [2014-12-24T05:08:50+00:00] WARN: Node vagrant-ubuntu-trusty-64 has an empty run list.
test_ubuntu Converging 0 resources
test_ubuntu Chef Client finished, 0 resources updated
----

---Gemfile.lock
   :
    chef (11.16.4)
      chef-zero (~> 2.1, >= 2.1.4)
   :
----

Regards,

Tsuyoshi

 






Archive powered by MHonArc 2.6.16.

§