|
Nodes are hosts whose configuration that you want to manage using Chef. In general, installing chef-client on a node includes:
Typically, chef-client is installed on CentOS systems using one of two possible methods:
You only need to use one of these three methods on any given node. Choose the method that makes the most sense for your environment. |
|
Install RubyChef is written in Ruby and thus requires Ruby as well as other system dependencies to run. Ruby 1.8.7+ is required to run Chef. Run the following command to install ruby and other required dependencies: On Red Hat and CentOS (Version 5)Enable AegisCo repository to get Ruby 1.8.7. If you will be installing a Chef Server on this host, you will also need to enable the RBEL repo: Install Ruby and other development tools: On Red Hat and CentOS (Version 6)Install the RBEL repo Install Ruby and other development tools:
Install RubyGems from SourceWe prefer to install RubyGems from source rather than use the OS-provided version (if any), as it is cross platform, so we know what to expect. Install RubyGems Install Chef GemTo install Chef and its dependencies, run the following code: Install Chef If you are installing Chef to use chef-client, proceed below. If you are installing Chef-solo as a means of installing Chef Server, return to Installing Chef Server using Chef Solo. If you wish to use Chef-solo as your primary Chef client, see Chef Solo. Configure chef-clientThe initial configuration of a chef-client requires a client.rb configuration file and a validation.pem file to be placed in /etc/chef. At a minimum client.rb must contain the configuration settings necessary for chef-client to communicate with chef-server. validation.pem is the permission certificate for your validator client. This API client is used on the first-run of chef-client and is used to create a new API client for the node. To create these we do the following:
Chef client has a number of configuration settings that do not appear above. See Chef Configuration Settings for further details. BootstrapIt is often easiest to install Chef on a node using knife-bootstrap. Bootstrapping runs a script on the target system which install Ruby. This method requires the node to be accessible over SSH. In most cases, bootstrapping a new node will be as simple as running a single command. For instance, to bootstrap a CentOS 5.6 workstation you might run the following command: See Knife Bootstrap and Launch Cloud Instances with Knife for complete documentation. The bootstrap scripts distributed with knife for CentOS use an install method similar to the Rubygems installation methods above.
|
|
|

