Installing Nginx using Chef

Agenda:

To install Nginx on a node machine using Chef

Requirements:

  • Chef Server
  • Chef Work Station
  • Chef node to install and run the services
  • Nginx Cookbooks and its dependencies

Dependencies:

  1. yum-epel
  • compat resource
  1. runit
  • yum-epel
  • compat resource
  • package cloud
  1. ohai
  2. build-essential
  • mingw
  • seven zip
  • windows
  • ohai
  1. bluepill
  • rsyslog
  1. apt

How to:

  • After downloading the Nginx cookbook and its dependencies, upload them to the Chef Server using the following command from your Chef Work Station “knife cookbook upload cookbook_name”
  • After you upload verify the cookbooks from your Chef’s GUI in polices section.
  • Then add the Nginx cookbook to your nodes run list by using the following command “knife node run_list add node_name “recipe[cookbook_name]””
  • You can also do this by navigating to the Nodes section, select the preferred node, edit run list and drag the Nginx cookbook from the available recipes and save it.
  • Once this is done, your node is ready to install and run Nginx on it.
  • From your node, use the following command to run Nginx cookbook “sudo chef-client”
  • Check the Nginx services are up and running by hitting the nodes IP.
  • If you are able to see Nginx on the screen, then its successfully installed using Chef.

Conclusion:

Thus we have successfully installed nginix using chef

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s