=================
Installing Chef
=================
+
Chef defines three types of entities:
#. **Chef Nodes:** Run ``chef-client``, which installs and manages software.
.. _createuser:
Create a ``chef`` User
-----------------------
+======================
+
The ``chef-client`` command requires the proper privileges to install and manage
installations. On each Chef node, we recommend creating a ``chef`` user with
full ``root`` privileges. For example::
.. _genkeys:
Generate SSH Keys for Chef Clients
-----------------------------------
+==================================
+
Chef's ``knife`` tool can run ``ssh``. To streamline deployments, we
recommend generating an SSH key pair without a passphrase for your
Chef nodes and copying the public key(s) to your Chef nodes so that you
.. _installruby:
Installing Ruby
----------------
+===============
+
Chef requires you to install Ruby. Use the version applicable to your current
Linux distribution and install Ruby on all of your hosts. ::
.. _installchefserver:
Installing Chef and Chef Server on a Server
--------------------------------------------
+===========================================
+
If you plan on hosting your `Chef Server at Opscode`_ you may skip this step,
but you must make a note of the the fully qualified domain name or IP address
of your Chef Server for ``knife`` and ``chef-client``.
.. _installchef:
Install Chef on all Remaining Hosts
------------------------------------
+===================================
+
Install Chef on all Chef Nodes and on the Chef Workstation (if it is not the
same host as the Chef Server). See `Installing Chef Client on Ubuntu or Debian`_
for details.
.. _configknife:
Configuring Knife
------------------
+=================
+
Once you complete the Chef server installation, install ``knife`` on the your
Chef Workstation. If the Chef server is a remote host, use ``ssh`` to connect. ::
.. _addcbpath:
Add a Cookbook Path
--------------------
+===================
+
Add ``cookbook_path`` to the ``~/.chef/knife.rb`` configuration file
on your Chef workstation. For example::
.. _cpvalpem:
Copy ``validation.pem`` to Nodes
---------------------------------
+================================
+
Copy the ``/etc/chef/validation.pem`` file from your Chef server to
each Chef Node. In a command line shell on the Chef Server, for each node,
replace ``{nodename}`` in the following line with the node's host name and
.. _runchefcli:
Run ``chef-client`` on each Chef Node
--------------------------------------
+=====================================
+
Run the ``chef-client`` on each Chef Node so that the nodes
register with the Chef server. ::
.. _verifynodes:
Verify Nodes
-------------
+============
+
Verify that you have setup all the hosts you want to use as
Chef nodes. ::