Your SlideShare is downloading. ×
Chef Cookbooks forDeploying OpenStack    Matt Ray    matt@opscode.com    Twitter/GitHub/Launchpad:mattray
Chef enables infrastructure as code                            package "haproxy" do‣ Manage configuration         action :i...
Chef Principles           Idempotent           Data-Driven           Sane Defaults           Easy to Extend
Open Source and  Community
What Works Today?
Role: nova-single-machinename "nova-single-machine-install"description "Installs everything required to run Nova on a sing...
Role: nova-multi-controllername "nova-multi-controller"description "Installs requirements to run the Controller node in aN...
Role: nova-multi-computename "nova-multi-compute"description "Installs requirements to run a Compute node in a Novacluster...
What does this look like?
OpenStack Installation‣ Cookbooks uploaded   $                       $                           knife cookbook upload -a ...
AMIsname "nova-ami-urls"description "Feed in a list URLs for AMIs to download"default_attributes(  "nova" => {    "images"...
Assign the Roles$ knife node run_list add crushinator.localdomain "role[nova-ami-urls]"{  "run_list": [    "role[nova-ami-...
chef-client$ sudo chef-client[Fri, 25 Feb 2011 11:52:59   -0800] INFO: Starting Chef Run (Version0.9.12)...[Fri, 25 Feb 20...
The Moment of Truthnova@$ nova-manage service listnova@$ euca-describe-imagesnova@$ euca-run-instances ami-h8wh0j17 -k myk...
How Did We Get Here?
Forked from Anso Labs’ Cookbooks          Bootstrapped by Opscode          Chef Solo/Vagrant installs for Developers      ...
Crowbar‣OpenStack installer from Dell‣ Dell is releasing this under the Apache 2 license‣ Extension of the Chef server‣ Jo...
Who’s involvedso far?
What’s Next?
Nova needed enhancements         Pluggable/Modular Roles         ‣ Database         ‣ ObjectStore         ‣ Network       ...
Dashboard
Knife        ‣ http://github.com/opscode/knife-openstack        ‣ Fog supports OpenStack already        ‣ gem install knif...
Object Storage (Swift)           ‣ Recipes originated from Anso Labs’ repository           ‣ Will be managed with Chef and...
Image Registry (Glance)          ‣ Recipes originated from Anso Labs’ repository          ‣ Will be managed with Chef and ...
Scaling changes howwe deploy OpenStack!
Deployment Scenarios         ‣ Controller + Compute nodes is a known quantity          for small installations         ‣ N...
Spiceweasel/knife bulkload	                 ‣ yaml/json for describing                  infrastructure                 ‣ g...
Cactus, Diablo, ...          Development continues...          Crowbar Open Sourced          Branches for each stable rele...
Get Involved!   http://github.com/mattray/openstack-cookbooks/tree/cactus   http://wiki.opscode.com/display/chef/Deploying...
Deploying OpenStack with Chef
Deploying OpenStack with Chef
Upcoming SlideShare
Loading in...5
×

Deploying OpenStack with Chef

5,825

Published on

Presentation from the Spring 2011 OpenStack Design Summit. Blueprint URL is https://blueprints.launchpad.net/openstack-devel/+spec/openstack-deployment-cookbooks

Published in: Technology, Self Improvement

Transcript of "Deploying OpenStack with Chef"

  1. 1. Chef Cookbooks forDeploying OpenStack Matt Ray matt@opscode.com Twitter/GitHub/Launchpad:mattray
  2. 2. Chef enables infrastructure as code package "haproxy" do‣ Manage configuration action :install end as idempotent Resources. template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb"‣ Put them together in owner "root" group "root" Recipes. mode 0644 notifies :restart, "service[haproxy]"‣ Track it like Source end Code. service "haproxy" do action [:enable, :start]‣ Configures your servers. end
  3. 3. Chef Principles Idempotent Data-Driven Sane Defaults Easy to Extend
  4. 4. Open Source and Community
  5. 5. What Works Today?
  6. 6. Role: nova-single-machinename "nova-single-machine-install"description "Installs everything required to run Nova on a singlemachine"run_list( "role[nova-multi-controller]", "role[nova-multi-compute]" )
  7. 7. Role: nova-multi-controllername "nova-multi-controller"description "Installs requirements to run the Controller node in aNova cluster"run_list( "role[nova-support-server]", "role[nova-head]", "role[nova-cloud-controller]", "role[nova-super-user-setup]" )
  8. 8. Role: nova-multi-computename "nova-multi-compute"description "Installs requirements to run a Compute node in a Novacluster"run_list( "recipe[nova::compute]")
  9. 9. What does this look like?
  10. 10. OpenStack Installation‣ Cookbooks uploaded $ $ knife cookbook upload -a knife cookbook list $ rake roles‣ Roles uploaded $ knife role list $ knife node list‣ Nodes ready
  11. 11. AMIsname "nova-ami-urls"description "Feed in a list URLs for AMIs to download"default_attributes( "nova" => { "images" =>["http://192.168.11.7/ubuntu1010-UEC-localuser-image.tar.gz”] } )$ knife role from file roles/nova-ami-urls.rb‣ Use an existing AMI‣ Update URL to your own
  12. 12. Assign the Roles$ knife node run_list add crushinator.localdomain "role[nova-ami-urls]"{ "run_list": [ "role[nova-ami-urls]" ]}$ knife node run_list add crushinator.localdomain "role[nova-single-machine-install]"{ "run_list": [ "role[nova-ami-urls]" "role[nova-single-machine-install]", ]}
  13. 13. chef-client$ sudo chef-client[Fri, 25 Feb 2011 11:52:59 -0800] INFO: Starting Chef Run (Version0.9.12)...[Fri, 25 Feb 2011 11:56:05 -0800] INFO: Chef Run complete in5.911955 seconds[Fri, 25 Feb 2011 11:56:05 -0800] INFO: cleaning the checksum cache[Fri, 25 Feb 2011 11:56:05 -0800] INFO: Running report handlers[Fri, 25 Feb 2011 11:56:05 -0800] INFO: Report handlers complete
  14. 14. The Moment of Truthnova@$ nova-manage service listnova@$ euca-describe-imagesnova@$ euca-run-instances ami-h8wh0j17 -k mykey -t m1.smallnova@$ euca-describe-instancesnova@$ ssh -i mykey.priv ubuntu@10.0.0.2Linux i-00000001 2.6.35-24-virtual #42-Ubuntu SMP Thu Mar 3005:15:26 UTC 2011 x86_64 GNU/LinuxUbuntu 10.10Welcome to Ubuntu!<SNIP>See "man sudo_root" for details.ubuntu@i-00000001:~$
  15. 15. How Did We Get Here?
  16. 16. Forked from Anso Labs’ Cookbooks Bootstrapped by Opscode Chef Solo/Vagrant installs for Developers ‣ http://github.com/ansolabs/openstack-cookbooks
  17. 17. Crowbar‣OpenStack installer from Dell‣ Dell is releasing this under the Apache 2 license‣ Extension of the Chef server‣ Jointly developed by Dell, Rackspace and Opscode‣ Bootstrapping Hyperscale Clouds (Yosemite 3:45 today)
  18. 18. Who’s involvedso far?
  19. 19. What’s Next?
  20. 20. Nova needed enhancements Pluggable/Modular Roles ‣ Database ‣ ObjectStore ‣ Network ‣ Virtualization Swift and Glance integration
  21. 21. Dashboard
  22. 22. Knife ‣ http://github.com/opscode/knife-openstack ‣ Fog supports OpenStack already ‣ gem install knife-openstack ‣ knife openstack server create ‘role [base]’ -i ami-a403f6xd -f m1.micro - A “OpenStack instance”
  23. 23. Object Storage (Swift) ‣ Recipes originated from Anso Labs’ repository ‣ Will be managed with Chef and Crowbar ‣ Untested so far (Cactus will tackle)
  24. 24. Image Registry (Glance) ‣ Recipes originated from Anso Labs’ repository ‣ Will be managed with Chef and Crowbar ‣ Untested so far (Cactus!)
  25. 25. Scaling changes howwe deploy OpenStack!
  26. 26. Deployment Scenarios ‣ Controller + Compute nodes is a known quantity for small installations ‣ Nova + Swift + Glance in large installations ‣ Services separated and HA configurations supported ‣ Real-world experiences ‣ Documentation and Chef Roles will be the solution
  27. 27. Spiceweasel/knife bulkload ‣ yaml/json for describing infrastructure ‣ generates Chef knife commands ‣ knife bulkload ‣ shareable "best practices"
  28. 28. Cactus, Diablo, ... Development continues... Crowbar Open Sourced Branches for each stable release Design Summit in the Fall
  29. 29. Get Involved! http://github.com/mattray/openstack-cookbooks/tree/cactus http://wiki.opscode.com/display/chef/Deploying+OpenStack +with+Chef (aka bit.ly/OSChef) http://lists.opscode.com #chef on irc.freenode.net matt@opscode.com Twitter/GitHub/Launchpad:mattray

×