Closed vilisseranen closed 8 years ago
When you run vagrant up
, do you see a .zero-knife.rb
file on the local directory?
If so, could you post the contents?
Also, do you have the latest version of the plugin?
@vilisseranen Any update on this issue? Or can I close it?
Hi. I have latest version of plugins vagrant-chef-zero-2.0.0 vagrant-berkshelf-4.1.0 vagrant_1.8.1
and the same error.
==> default: Updating Vagrant's Berkshelf... ==> default: Resolving cookbook dependencies... ==> default: Fetching 'cs-backup' from source at . ==> default: Using cs-backup (0.1.0) from source at . ==> default: Vendoring cs-backup (0.1.0) to /home/user/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160120-2586-1m7b2ms-default/cs-backup ==> default: Uploading cookbooks to http://10.1.1.19:4000 The following berks command failed to execute:
/usr/bin/berks upload --berksfile /home/user/chef/chef-repo/cookbooks/cs-backup/Berksfile --no-freeze --force
The stdout and stderr are shown below:
stdout: E, [2016-01-20T14:31:09.868415 #4373] ERROR -- : Ridley::Errors::ClientKeyFileNotFoundOrInvalid: client key is invalid or not found at: '/etc/chef/client.pem'
E, [2016-01-20T14:31:09.868501 #4373] ERROR -- : /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.3.2/lib/ridley/client.rb:144:in `initialize'
» cat .zero-knife.rb
chef_server_url 'http://10.1.1.19:4000'
node_name 'zero-host'
client_key '/tmp/fake_key/fake.pem'
» ls -lha /tmp/fake_key/fake.pem -rw-r--r-- 1 user user 1,7K січ 20 14:25 /tmp/fake_key/fake.pem
Hi @lesha4ever
My best guess is that vagrant-berkshellf plugin is not picking up on the server configuration that vagrant-chef-zero creates (here: https://github.com/schubergphilis/vagrant-chef-zero/blob/master/lib/vagrant-chef-zero/env_helpers.rb#L29). This could be for several reasons, not blaming the berks plugin.
If you would like to contribute with a PR to integrate with vagrant-berkshelf, that would be great. If not I'm afraid all I can offer you now is a workaround.
The workaround would be:
berks vendor TARGET_DIR
config.chef_zero.cookbooks = "TARGET_DIR"
Can you please try this? I will be happy to assist you if you get stuck.
Thanks,
Looks like this workaround works.
But I do not understand where I should to contact for fixing this bug?
Great to hear that it worked.
This is the palace for asking these things. However, it is not a bug. A bug would be something not working in the plugin. What you would like to see is this plugin integrate with another plugin (berkshelf). That's a feature request, and since we have no planned roadmap for the plugin, it will be difficult to implement it. New features have been added by the people that need them, when they need them. That's why I say, if you really need the integration with berks, then you are more than welcome to make a pull request to add that, and I will be very happy to help you by reviewing, and testing your change,
Many thanks!
With this Vagrantfile
It fails with
I thought the authentication was handled by the plugin so I don't understand why I can't connect.