Chef server installation on linux

We are going to see Chef server installation on linux

Configuration options in Chef:

 

1. Standalone
2. High Availability
3. Tiered

Requirements:

1. Machine with RedHat server operating system with FQDN.
2. Mail agent which will help chef server to send notification.
3. Should know to work with cron jobs to schedule jobs

We are going to see Standalone chef server in this post.

In this method will use single machine for chef server installation.
1. Download “chef-server-core-<ver>” and kept under /tmp directory on a server which will run the server.
2. Install the package as root user using below commands.

#rpm -ivh chef-server-core-xxx.rpm

It will take some minutes to install it.

Execute the following server to start all services.

#chef-server-ctl reconfigure

Now we should create a user to manage the chef server

#chef-server-ctl user-create <username> <firstname> <lastname> <email> ‘Password’ –filename /path/uname.pem

Now we should create organization

 

#chef-server-ctl org-create short_name ‘full_organization_name’ –association_user user_name –filename ORGANIZATION-validator.pem

Download and install additional packages:
We can use Chef management console to manage the data bags, attributes, run-lists, roles, environments, and cookbooks from a web user interface.

Run below commands on chef server.

#chef-server-ctl install chef-manage
#chef-server-ctl reconfigure
#chef-manage-ctl reconfigure

We can use Chef push jobs to execute the jobs

Run the below commands on chef server.

#chef-server-ctl install opscode-push-jobs-server
#chef-server-ctl reconfigure
#opscode-push-jobs-server-ctl reconfigure

Use reporting will keep track while every client run on full infra.

Run the below commands on chef server:

#chef-server-ctl install opscode-reporting
#chef-server-ctl reconfigure
#opscode-reporting-ctl reconfigure

Update purchase for nodes:

While using more than 25 nodes, configuration should be updated by us for license.
for that, need to edit chef-server.rb file. follow the below steps to edit

#mkdir /etc/opscode && sudo touch /etc/opscode/chef-server.rb

open new chef-server.rb file
#vi /etc/opscode/chef-server.rb

append the below line on that file

#license[‘nodes’] = N (number of licensed nodes you have purchased)


save and exit from the file using :wq


run below command to update the modified changes on chef server

#chef-server-ctl reconfigure