Here is the definition from “http://docs.opscode.com“ of “Chef”:
Chef is a systems and cloud infrastructure automation framework that makes it easy to deploy servers and applications to any physical, virtual, or cloud location, no matter the size of the infrastructure. Each Chef organization is comprised of one (or more) workstations, a single server, and every node that will be configured and maintained by Chef. Cookbooks (and recipes) are used to tell Chef how each node in your organization should be configured. The chef-client (which is installed on every node) does the actual configuration.
In this article, I want to record how to install Chef server and client.
Chef Server Installation
Here is a guide how to install chef server. Another article is also referred.
First, get the chef server binary installation file from here. Note that you need to click the “Chef Server” tab and select your OS name, version and arch, then you will get the binary file URL which can be used to download the installation file. In my case, the file “chef-server-11.0.8-1.el6.x86_64.rpm” size is 170MB.
Then put this file to your server(supposed to be act as the Chef server) and install it:
1 | sudo rpm -Uvh chef-server-11.0.8-1.el6.x86_64.rpm # Install |
Now the Chef server is ready.
Chef Client Installation
Here is a guide how to install Chef client. Note that every computer(workstation, server) which is supposed to be managed by Chef server should install the Chef client.
First, here is the installation command:
1 | curl -L http://www.opscode.com/chef/install.sh | sudo bash |
When the installation step finishes, run the following commands to verify the installation:
1 | ef-client -v |
Configure Chef client to make it work with Chef server
Clone the Chef repository
Get the three server files needed by client
Move the three files to “.chef” directory
Verify the Chef install