I am trying to set up a vagrant project which will get a centos 6.6 vm up and running and will load then use the supplied chef configuration to set everything else up according the recipes stored on the itccompliance chef server but I am very much stuck on the task of getting the vm (chef client) to authorise with the chef server.
When running vagrant up I am getting the following error: => default: [2015-03-09T09:00:38+00:00] INFO: Forking chef instance to converge... ==> default: [2015-03-09T09:00:38+00:00] INFO: *** Chef 12.1.0 *** ==> default: [2015-03-09T09:00:38+00:00] INFO: Chef-client pid: 3073 ==> default: [2015-03-09T09:00:39+00:00] INFO: Client key chef-repo/.chef/itccompliance.pem is not present - registering ==> default: ==> default: ==> default: ================================================================================ ==> default: Chef encountered an error attempting to create the client "itccompliance" ==> default: ================================================================================ ==> default: ==> default: [2015-03-09T09:00:40+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out ==> default: [2015-03-09T09:00:40+00:00] ERROR: I cannot write your private key to chef-repo/.chef/itccompliance.pem - check permissions? ==> default: [2015-03-09T09:00:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete. and the stacktrace which is being created is: Generated at 2015-03-09 09:00:40 +0000 Chef::Exceptions::CannotWritePrivateKey: I cannot write your private key to chef-repo/.chef/itccompliance.pem - check permissions? /opt/chef/embedded/apps/chef/lib/chef/api_client/registration.rb:71:in `assert_destination_writable!' /opt/chef/embedded/apps/chef/lib/chef/api_client/registration.rb:54:in `run' /opt/chef/embedded/apps/chef/lib/chef/client.rb:307:in `register' /opt/chef/embedded/apps/chef/lib/chef/client.rb:432:in `run' /opt/chef/embedded/apps/chef/lib/chef/application.rb:271:in `block in fork_chef_client' /opt/chef/embedded/apps/chef/lib/chef/application.rb:259:in `fork' /opt/chef/embedded/apps/chef/lib/chef/application.rb:259:in `fork_chef_client' /opt/chef/embedded/apps/chef/lib/chef/application.rb:225:in `block in run_chef_client' /opt/chef/embedded/apps/chef/lib/chef/local_mode.rb:38:in `with_server_connectivity' /opt/chef/embedded/apps/chef/lib/chef/application.rb:213:in `run_chef_client' /opt/chef/embedded/apps/chef/lib/chef/application/client.rb:392:in `block in interval_run_chef_client' /opt/chef/embedded/apps/chef/lib/chef/application/client.rb:382:in `loop' /opt/chef/embedded/apps/chef/lib/chef/application/client.rb:382:in `interval_run_chef_client' /opt/chef/embedded/apps/chef/lib/chef/application/client.rb:372:in `run_application' /opt/chef/embedded/apps/chef/lib/chef/application.rb:60:in `run' /opt/chef/embedded/apps/chef/bin/chef-client:26:in `<top (required)>' /usr/bin/chef-client:52:in `load' /usr/bin/chef-client:52:in `<main>' I have tried adding a chmod command to the shell provisioner which is ran first to change that directory recursively to permission levels 777 but this does not seem to make a difference. The Chef provisioner configuration I have used is: * config.vm.provision "chef_client" do |chef|* * chef.chef_server_url = "https://api.opscode.com/organizations/itccompliance"* * chef.client_key_path = "chef-repo/.chef/itccompliance.pem"* * chef.node_name = "itccompliance"* * chef.validation_key_path = "chef-repo/.chef/itccompliance-validator.pem"* * chef.validation_client_name = "itccompliance-validator"* * end* -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
