Check out the ‘knife bootstrap’ command from your workstation which will remotely install chef and place the appropriate validator.pem and knife.rb config onto the node. It will then register itself with the chef server.
Dimitar Georgievski firstname.lastname@example.org wrote:
I’ve seen that blog before and I think it describes only the Chef server and workstation set-up. The link to the Wiki site for the workstation set-up
mentions the following procedure to set-up the workstation when using OS Chef server:
$ knife configure -i
Please enter the chef server URL: [http://mychef.example.com:4000] http://mychef.example.comhttp://mychef.example.com
Please enter a name for the new user: [root] chadmin
Please enter the existing admin name: [admin]
Please enter the location of the existing admin’s private key: [/etc/chef/admin.pem] /etc/chef-server/admin.pem
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem] /etc/chef-server/chef-validator.pem
Please enter the path to a chef repository (or leave blank):
Creating initial API user…
Please enter a password for the new user:
ERROR: Chef::Exceptions::ValidationFailed: Option admin must be a kind of [TrueClass, FalseClass]! You passed “https://mychef.example.com/users/admin”.
Instead creating the required knife files from the command line I tried to create the new admin account from the Web interface of the chef server. The private key generated by this step was stored in the .chef/chadmin.pem on the workstation.
I’ve also copied to this location on the workstation the chef-validator.pem from the Chef server.
And this seemed to work, because I was able to query with the knife tool the Chef server from the workstation.
My problem started when I tried to register clients ie nodes that should be managed by the server.
How do I register the client? I created the client.rb with info on how to connect to the server and which client-name to use for validation with the server.
So, when I started chef-client I expected the client would self register and create the client.pam file. But that’s not the case and I get various errors at start-up.
The question is can I register the clients from the command line or they have to be manually added through the Web GUI?
Many thanks for the prompt response.
On Wed, Feb 27, 2013 at 3:54 PM, Devdatto Ray <email@example.com:firstname.lastname@example.org> wrote:
Please try this blog - http://www.linuxguy.in/how-to-install-and-configure-open-source-chef-server-11/
This one has the correct and updated instructions which I followed and was able to configure Open Source Chef Server and Client using v11.x on RHEL 5.7.
The hostnames are entered differently with https and no ref to port in v11.x
Thanks and Regards
I am trying unsuccessfully to register/configure a chef client with Open Source chef server. It should be simple but I find the available documentation outdated or to be missing important information. It looks like it is focused on the hosted chef only. I am stuck on this step which I thought would be the simplest part of the installation and configuration.
Could someone share his/her experience with setting up an Open Source server and clients? Is there are a guide or tutorial on it? Maybe I missed it.
I am using ver 11.4.0 for both client and server on RHEL 5…6.