Setup Knife to Use Local Chef Zero
From Bonus Bits
This article gives the steps to configure Knife to use local Chef Zero instance.
- ChefDK or Chef Client Installed
Create an RSA Client PEM. Doesn't really matter because nothing is signed with the Chef Zero.
- Create Chef configuration directory
- Create Client PEM
openssl genrsa -out ~/.chef/$USER.pem 2048
Assuming we don't have a knife configure already in place.
knife configure initial
WARNING: No knife configuration file found Where should I put the config file? [/Users/username/.chef/knife.rb] Please enter the chef server URL: [https://localhost.local/organizations/myorg] http://127.0.0.1:8889 Please enter an existing username or clientname for the API: [username] Please enter the validation clientname: [chef-validator] Please enter the location of the validation key: [/etc/chef-server/chef-validator.pem] Please enter the path to a chef repository (or leave blank): ***** You must place your client key in: /Users/username/.chef/username.pem Before running commands with Knife ***** You must place your validation key in: /etc/chef-server/chef-validator.pem Before generating instance data with Knife ***** Configuration file written to /Users/username/.chef/knife.rb
Start Chef Zero
Run as Daemon
Run in Background (Option 2)
chef-zero > /dev/null 2>&1 &