Registering chef client with a server


#1

Hello,

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.

Thanks,

Dimitar


#2

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
Devdatto

On Wed, Feb 27, 2013 at 2:48 PM, Dimitar Georgievski mitkany@gmail.comwrote:

Hello,

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.

Thanks,

Dimitar


#3

Josh Timberman’s blog is another gold mine for information -
http://jtimberman.housepub.org/. You can refer to that one also for
guidance on Chef v11.

Thanks and Regards
Devdatto

On Wed, Feb 27, 2013 at 2:54 PM, Devdatto Ray devdatto@gmail.com 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
Devdatto

On Wed, Feb 27, 2013 at 2:48 PM, Dimitar Georgievski mitkany@gmail.comwrote:

Hello,

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.

Thanks,

Dimitar


#4

General instructions for installing the Chef 11 server:
http://docs.opscode.com/install_server.html

A scenario for installing the Chef 11 server on a VM (this one uses VMWare Fusion, but the process will be similar for other VMs):
http://docs.opscode.com/install_server_scenario_vm.html

General instructions for installing and configuring the workstation (including the files from the server and the folder on the workstation):
http://docs.opscode.com/install_workstation.html

Bootstrapping a node:
http://docs.opscode.com/install_bootstrap.html

Hope these help!

James


From: Devdatto Ray [devdatto@gmail.com]
Sent: Wednesday, February 27, 2013 1:18 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Registering chef client with a server

Josh Timberman’s blog is another gold mine for information - http://jtimberman.housepub.org/. You can refer to that one also for guidance on Chef v11.

Thanks and Regards
Devdatto

On Wed, Feb 27, 2013 at 2:54 PM, Devdatto Ray <devdatto@gmail.commailto:devdatto@gmail.com> 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
Devdatto

On Wed, Feb 27, 2013 at 2:48 PM, Dimitar Georgievski <mitkany@gmail.commailto:mitkany@gmail.com> wrote:
Hello,

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.

Thanks,

Dimitar


#5

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
http://wiki.opscode.com/display/chef/Workstation+Setup

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.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.

Dimitar

On Wed, Feb 27, 2013 at 3:54 PM, Devdatto Ray devdatto@gmail.com 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
Devdatto

On Wed, Feb 27, 2013 at 2:48 PM, Dimitar Georgievski mitkany@gmail.comwrote:

Hello,

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.

Thanks,

Dimitar


#6

Thanks James. I wanted to mention that I followed the instructions in
these links when installing the server and workstation.
As I said in my previous replies my remaining issues seems to be the

  1. Using knife to create a new user
  2. Registration of new clients with knife bootstrap

Thanks,

Dimitar

On Wed, Feb 27, 2013 at 4:22 PM, James Scott jamescott@opscode.com wrote:

General instructions for installing the Chef 11 server:
http://docs.opscode.com/install_server.html

A scenario for installing the Chef 11 server on a VM (this one uses
VMWare Fusion, but the process will be similar for other VMs):
http://docs.opscode.com/install_server_scenario_vm.html

General instructions for installing and configuring the workstation
(including the files from the server and the folder on the workstation):
http://docs.opscode.com/install_workstation.html

Bootstrapping a node:
http://docs.opscode.com/install_bootstrap.html

Hope these help!

James

From: Devdatto Ray [devdatto@gmail.com]
Sent: Wednesday, February 27, 2013 1:18 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Registering chef client with a server

Josh Timberman’s blog is another gold mine for information -
http://jtimberman.housepub.org/. You can refer to that one also for
guidance on Chef v11.

Thanks and Regards
Devdatto

On Wed, Feb 27, 2013 at 2:54 PM, Devdatto Ray devdatto@gmail.com 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
Devdatto

On Wed, Feb 27, 2013 at 2:48 PM, Dimitar Georgievski mitkany@gmail.comwrote:

Hello,

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.

Thanks,

Dimitar


#7

The knife user command is in Chef 11.0.4.

I just realized that I haven’t documented it (it’s brand new) and will do that right now.

If you are willing to look at the source code in the interim, it’s at the bottom of this page:

Also, the knife bootstrap docs are here:

http://docs.opscode.com/knife_bootstrap.html

Similar to the bootstrap install example, you should be able to take the same approach to install Chef on any node that you want Chef to configure.

James


From: Dimitar Georgievski [mitkany@gmail.com]
Sent: Wednesday, February 27, 2013 2:18 PM
To: chef@lists.opscode.com
Subject: [chef] Re: RE: Re: Registering chef client with a server

Thanks James. I wanted to mention that I followed the instructions in these links when installing the server and workstation.
As I said in my previous replies my remaining issues seems to be the

  1. Using knife to create a new user
  2. Registration of new clients with knife bootstrap

Thanks,

Dimitar

On Wed, Feb 27, 2013 at 4:22 PM, James Scott <jamescott@opscode.commailto:jamescott@opscode.com> wrote:
General instructions for installing the Chef 11 server:
http://docs.opscode.com/install_server.html

A scenario for installing the Chef 11 server on a VM (this one uses VMWare Fusion, but the process will be similar for other VMs):
http://docs.opscode.com/install_server_scenario_vm.html

General instructions for installing and configuring the workstation (including the files from the server and the folder on the workstation):
http://docs.opscode.com/install_workstation.html

Bootstrapping a node:
http://docs.opscode.com/install_bootstrap.html

Hope these help!

James


From: Devdatto Ray [devdatto@gmail.commailto:devdatto@gmail.com]
Sent: Wednesday, February 27, 2013 1:18 PM
To: chef@lists.opscode.commailto:chef@lists.opscode.com
Subject: [chef] Re: Registering chef client with a server

Josh Timberman’s blog is another gold mine for information - http://jtimberman.housepub.org/. You can refer to that one also for guidance on Chef v11.

Thanks and Regards
Devdatto

On Wed, Feb 27, 2013 at 2:54 PM, Devdatto Ray <devdatto@gmail.commailto:devdatto@gmail.com> 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
Devdatto

On Wed, Feb 27, 2013 at 2:48 PM, Dimitar Georgievski <mitkany@gmail.commailto:mitkany@gmail.com> wrote:
Hello,

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.

Thanks,

Dimitar


#8

I found the cause of the issue.

the knife boostrap command installs chef-client and the required files in
/etc/chef
ll /etc/chef/
total 16
-rw------- 1 root root 1679 Feb 27 18:07 client.pem
-rw-r–r-- 1 root root 172 Feb 27 18:06 client.rb
-rw-r–r-- 1 root root 16 Feb 27 18:06 first-boot.json
-rw------- 1 root root 1675 Feb 27 18:06 validation.pem

If I replace http with https in chef_server_url which avoids one redirect
on the nginx server. It looks like a bug

After this, I have to run the chef-client command manually to register the
client with the server.

Where is the client.rb on the workstation that the knife bootstrap uploads
on the new client?

Thanks,

Dimitar

On Wed, Feb 27, 2013 at 5:39 PM, James Scott jamescott@opscode.com wrote:

The knife user command is in Chef 11.0.4.

I just realized that I haven’t documented it (it’s brand new) and will
do that right now.

If you are willing to look at the source code in the interim, it’s at
the bottom of this page:

https://github.com/opscode/chef/tree/master/lib/chef/knife

Also, the knife bootstrap docs are here:

http://docs.opscode.com/knife_bootstrap.html

Similar to the bootstrap install example, you should be able to take the
same approach to install Chef on any node that you want Chef to configure.

James

From: Dimitar Georgievski [mitkany@gmail.com]

Sent: Wednesday, February 27, 2013 2:18 PM
To: chef@lists.opscode.com
Subject: [chef] Re: RE: Re: Registering chef client with a server

Thanks James. I wanted to mention that I followed the instructions in
these links when installing the server and workstation.
As I said in my previous replies my remaining issues seems to be the

  1. Using knife to create a new user
  2. Registration of new clients with knife bootstrap

Thanks,

Dimitar

On Wed, Feb 27, 2013 at 4:22 PM, James Scott jamescott@opscode.comwrote:

General instructions for installing the Chef 11 server:
http://docs.opscode.com/install_server.html

A scenario for installing the Chef 11 server on a VM (this one uses
VMWare Fusion, but the process will be similar for other VMs):
http://docs.opscode.com/install_server_scenario_vm.html

General instructions for installing and configuring the workstation
(including the files from the server and the folder on the workstation):
http://docs.opscode.com/install_workstation.html

Bootstrapping a node:
http://docs.opscode.com/install_bootstrap.html

Hope these help!

James

From: Devdatto Ray [devdatto@gmail.com]
Sent: Wednesday, February 27, 2013 1:18 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Registering chef client with a server

Josh Timberman’s blog is another gold mine for information -
http://jtimberman.housepub.org/. You can refer to that one also for
guidance on Chef v11.

Thanks and Regards
Devdatto

On Wed, Feb 27, 2013 at 2:54 PM, Devdatto Ray devdatto@gmail.com 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
Devdatto

On Wed, Feb 27, 2013 at 2:48 PM, Dimitar Georgievski mitkany@gmail.comwrote:

Hello,

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.

Thanks,

Dimitar