12. The Chef API
• Client/Server
• RESTful API w/ JSON
• Search Service
• Derivative Services
13. The Chef Community
• Apache License, Version 2.0
• 360+ Individual contributors
• 70+ Corporate contributors
• Dell, Rackspace,VMware, RightScale,
Heroku, and many more
• 240+ cookbooks
• http://community.opscode.com
16. Chef Nodes
• Each system you manage is called a node.
• The chef-client runs on nodes.
• The ohai discovery agent runs on nodes.
• Nodes have a run list.
• Searchable
17. Chef Resources
package "haproxy" do
action :install
end
• Have a type.
•
template "/etc/haproxy/haproxy.cfg" do
Have a name. source "haproxy.cfg.erb"
• Have parameters.
owner "root"
group "root"
• Take action to put the resource mode 0644
notifies :restart, "service[haproxy]"
in the declared state. end
• Can send notifications to other service "haproxy" do
resources. supports :restart => true
action [:enable, :start]
• Take action through Providers end
18. Chef Recipes
extra_packages = case node[:platform]
when "ubuntu","debian"
%w{
ruby1.8
ruby1.8-dev
• Ordered list of Resources rdoc1.8
ri1.8
• Idempotent execution }
libopenssl-ruby
• Ruby
end
extra_packages.each do |pkg|
package pkg do
action :install
end
end
19. Chef Cookbooks
• Cookbooks are packages for Recipes
• Recipes
• Assets (files/templates)
• Attributes
• Metadata
• Distributable and managed as Source
• community.opscode.com
20. OpenStack Cookbooks
• Included
• glance
• nova
• swift
• Installed
• apache2
• apt
• mysql
• openssl
• rabbitmq
21. Chef Roles
• Roles describe the node.
• Roles have run lists.
• Roles have attributes.
• Roles may contain other roles.
• Searchable.
• Webserver, database, Hadoop-worker, etc.
23. Chef Data Bags
• Data bags store arbitrary data
• JSON
• Searchable
24. OpenStack Data Bags
knife data bag create openstack
knife data bag from file openstack defaults.json
knife data bag from file openstack glance.json
knife data bag from file openstack images.json
knife data bag show openstack images
id: images
images:
http://uec-images.ubuntu.com/lucid/current/ubuntu-10.04-
server-uec-amd64.tar.gz:
arch: x86_64
distro: Ubuntu
image: lucid-server-uec-amd64.img
kernel: lucid-server-uec-amd64-vmlinuz-virtual
version: 10.04
25.
26. Deploying OpenStack
• Scaling changes how we deploy!
• Single machine works
• Controller + N Computes work(ed)
• Nova and/or Swift installations
• Configurations will be supported, shared &
documented
27. Spiceweasel
• yaml/json for describing infrastructure
• generates knife commands
• shareable "best practices"
• infrastructure.yml included
• bit.ly/spcwsl
33. How did we get here?
git clone git://github.com/mattray/openstack-cookbooks.git
34. Origins
• Forked from Anso Labs
• Bootstrapped originally by Opscode
• Chef Solo/Vagrant installs for Developers
• http://github.com/ansolabs/openstack-cookbooks
35. Crowbar
• OpenStack installer from Dell
• Dell is releasing this under the Apache 2
license
• Extension of the Chef server
• Developed by Dell, Rackspace & Opscode
• http://github.com/dellcloudedge