Hi.
Just taking my first steps in Chef, and have given myself a couple of weeks to get to know it. I am using the tutorial here…
https://learn.chef.io/learn-the-basics/rhel/make-your-recipe-more-manageable/
I am running my own chef server on a VM on my Mac. So I get to the bit about the cookbook, and I run…
chef generate cookbook learn_chef_httpd
I get…
[john@chef-server ~]$ chef generate cookbook learn_chef_httpd
chef: Command not found.
I change that command to ‘chef-client’ and it seems to run, but I get…
[john@chef-server ~]$ chef-client generate cookbook learn_chef_httpd
[2016-05-07T18:37:06+01:00] WARN: *****************************************
[2016-05-07T18:37:06+01:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options.
[2016-05-07T18:37:06+01:00] WARN: *****************************************
Starting Chef Client, version 12.9.41
Creating a new client identity for fo-ds-ats.member.g02.yahoodns.net using the validator key.
================================================================================
Chef encountered an error attempting to create the client “fo-ds-ats.member.g02.yahoodns.net”
Platform:
x86_64-linux
Running handlers:
[2016-05-07T18:37:08+01:00] ERROR: Running exception handlers
Running handlers complete
[2016-05-07T18:37:08+01:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2016-05-07T18:37:08+01:00] FATAL: Stacktrace dumped to /home/john/.chef/cache/chef-stacktrace.out
[2016-05-07T18:37:08+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-05-07T18:37:08+01:00] ERROR: I can’t write your private key to /etc/chef/client.pem - check permissions?
[2016-05-07T18:37:08+01:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[john@chef-server ~]$
I’m lost at this point!