Blog

Downloading cookbooks to support DHCP, Razor, and OpenStack - OpenStack

  • (4.0)
  •   |   491 Ratings

Now that we have installed both CHEF SERVER and its Knife utility, we need to download the Chef cookbooks to support the remainder of our installation.

Getting started

Log into the Chef Server:

vagrant ssh chef
To gain in-depth knowledge and be on par with practical experience, then explore  OpenStack Training course.

How to achieve it…

On the Chef Server, execute the following commands to download, configure, and install the cookbooks and roles to support the rest of our installation efforts. To perform this, execute the following commands:

# Create chef Repo
sudo apt-get install –y git
sudo git clone git://github.com/opscode/chef-repo.git /root/cookbooks
# Download the DHCP Cookbook
sudo knife cookbook site install dhcp sudo knife data bag create dhcp_networks sudo mkdir -p /root/databags/dhcp_networks
sudo cat > /root/databags/dhcp_networks/razor_dhcp.json <<eof {="" "id":="" "172-16-0-0_24="" ″="" ,="" "routers":="" [="" "172.16.0.2"="" ],="" "address":="" "172.16.0.0="" "netmask":="" "255.255.255.0="" "broadcast":="" "172.16.0.255="" "range":="" "172.16.0.50="" 172.16.0.59="" "options":="" "next-server="" 172.16.0.101"="" ]="" }="" eof="" sudo="" knife="" data="" bag="" from="" file="" dhcp_networks="" root="" databags="" razor_dhcp.json="" #="" download="" the="" puppetlabs="" razor="" cookbooks="" cookbook="" site="" install="" razor_ip="172.16.0.101" sed="" -i="" "s="" node['ipaddress']="" $razor_ip="" g"="" attributes="" default.rb="" upload="" -o="" --all="" rackspace="" openstack="" git="" clone="" https:="" github.com="" rcbops="" chef-cookbooks.git="" cd="" chef-cookbooks="" checkout="" v4.0.0="" submodule="" init="" sync="" update="" -a="" role="" roles="" *rb="" 

How it works…

The first thing we need to do, is create a Chef cookbook repo. This provides the git structure that lets the Chef Server version our cookbooks. Next we have to download the DHCP cookbook and create a Chef “Databag”, or set of configuration values, to contain the configuration of our DHCP Scope, such as IP address range and critically, the next server. After that we download both the Razor and OpenStack Cookbooks. Finally, we add the IP address of the Razor Server to its configuration and then upload all of our cookbooks and roles.

Related Pages:
Openstack Tutorial

Sample Resume:
Openstack Sample Resume

Interview Questions:
Openstack Interview Questions


Popular Courses in 2018

Get Updates on Tech posts, Interview & Certification questions and training schedules