TXLF2011 OpenStack
TXLF2011 OpenStack
Introductions
What is OpenStack?
NASA
Hypervisor agnostic:
support for Xen ,XenServer, Hyper-V, KVM, UML and ESX is coming
Hardware agnostic:
standard hardware, RAID not required
9
User Manager
Cloud Controller: Global state of system, talks to LDAP, OpenStack Object Storage, and node/storage workers through a queue ATAoE / iSCSI
API: Receives HTTP requests, converts commands to/from API format, and sends requests to cloud controller Host Machines: workers that spawn instances
OpenStack Compute
10
Hardware Requirements
OpenStack is designed to run on industry standard hardware, with flexible configurations Compute
x86 Server (Hardware Virt. recommended) Storage flexible (Local, SAN, NAS)
Object Storage
x86 Server (other architectures possible) Do not deploy with RAID (can use controller for cache)
11
Open eliminates vendor lock-in Working together, we all go faster Freedom to federate, or move between clouds
12
What is Chef?
13
14
At a High Level
Library for conguration management Conguration management system Systems integration platform API for your entire Infrastructure
15
16
Principles
18
19
20
23
24
25
26
Kernel info!
Platform info!
28
29
30
31
name "webserver" description "Systems that serve HTTP traffic" run_list( "role[base]", "recipe[apache2]", "recipe[apache2::mod_ssl]" ) default_attributes( "apache" => { "listen_ports" => [ "80", "443" ] } ) override_attributes( "apache" => { "max_children" => "50" } )
32
32
name "webserver" description "Systems that serve HTTP traffic" run_list( "role[base]", "recipe[apache2]", "recipe[apache2::mod_ssl]" )
default_attributes( "apache" => { "listen_ports" => [ "80", "443" ] } ) override_attributes( "apache" => { "max_children" => "50" } )
32
32
33
Resources
Resources
package "apache2" do version "2.2.11-2ubuntu2.6" action :install end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end
Resources
Have a type
package "apache2" do version "2.2.11-2ubuntu2.6" action :install end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end
Resources
Have a type Have a name
package "apache2" do version "2.2.11-2ubuntu2.6" action :install end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end
Resources
Have a type Have a name Have parameters
package "apache2" do version "2.2.11-2ubuntu2.6" action :install end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end
Resources
Have a type Have a name Have parameters Take action to put the resource in the declared state
package "apache2" do version "2.2.11-2ubuntu2.6" action :install end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end
35
36
Recipes
package "apache2" do version "2.2.11-2ubuntu2.6" action :install end
template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end
37
Order Matters
38
40
Cookbooks
Cookbooks
43
45
46
46
Search
CLI or in Ruby Nodes are searchable Roles are searchable Recipes are
searchable searchable
$ knife search node 'platform:ubuntu' search(:node, platform:centos) $ knife search role 'max_children:50' search(:role, max_children:50) $ knife search node role:webserver search(:node, role:webserver) $ knife users shell:/bin/bash search (:users, group:sysadmins)
47
48
49
50
Compute (Nova)
Single machine installation
Role: nova-single-machine MySQL, RabbitMQ Nova-(api|scheduler|network|objectstore|compute)
Multi-machine
Role: nova-multi-controller (1) Role: nova-multi-compute (N)
51
Role: nova-single-machine
name "nova-single-machine-install" description "Installs everything required to run Nova on a single machine" run_list( "role[nova-multi-controller]", "role[nova-multi-compute]" )
52
Role: nova-multi-controller
name "nova-multi-controller" description "Installs requirements to run the Controller node in a Nova cluster" run_list( "role[nova-support-server]", "role[nova-head]", "role[nova-cloud-controller]", "role[nova-super-user-setup]" )
53
Role: nova-multi-compute
name "nova-multi-compute" description "Installs requirements to run a Compute node in a Nova cluster" run_list( "recipe[nova::compute]" )
54
55
Crowbar
Codename for the OpenStack
installer from Dell
56
network boot and installation nodes are congured with Chef deploys OpenStack, could be
used for anything
57
OpenStack Installation
$ $ $ $ $
knife cookbook upload -a knife cookbook list rake roles knife role list knife node list
58
AMIs
name "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
60
chef-client
mray@ubuntu1010:~$ sudo chef-client [Fri, 25 Feb 2011 11:52:59 -0800] INFO: 0.9.12) ... [Fri, 25 Feb 2011 11:56:05 -0800] INFO: 5.911955 seconds [Fri, 25 Feb 2011 11:56:05 -0800] INFO: [Fri, 25 Feb 2011 11:56:05 -0800] INFO: [Fri, 25 Feb 2011 11:56:05 -0800] INFO: Starting Chef Run (Version Chef Run complete in cleaning the checksum cache Running report handlers Report handlers complete
61
63
64
65
Whats Next?
66
67
68
Dashboard
69
Knife
http://github.com/opscode/knife-openstack Nova has same API as Amazon Fog supports OpenStack already knife openstack server create role
[base] -i ami-a403f6xd -f m1.micro A OpenStack instance
70
Recipes originated from Anso Labs repository Will be managed with Chef and Crowbar Included in the bexar branch Untested so far (Cactus will tackle)
71
Recipes originated from Anso Labs repository Will be managed with Chef and Crowbar Included in the bexar branch Untested so far (Cactus!)
72
73
Deployment Scenarios
Single machine is special case of multi-install Controller + Compute nodes is a known quantity
for small installations
74
Development continues... Branches for each stable release Design Summit later this month Design Summit in the Fall
75
76
Get Involved!
https://github.com/mattray/openstack-cookbooks/tree/bexar http://lists.openstack.org http://lists.opscode.com #chef on irc.freenode.net #openstack on irc.freenode.net matt@opscode.com jordan@openstack.com
77