More Related Content Similar to Openstack grizzley puppet_talk (20) Openstack grizzley puppet_talk2. who is this talk for?
- the reasonably technical
- already understands config management
- wants to learn more about using Puppet modules to deploy
openstack
5. Resources describe state
Current Desired package {‘git’:
ensure => present,
State State }
!=
Sync Event
| CONFIDENTIAL & PROPRIETARY
6. Providers Detect Current State
rpm -q git
Current Desired package {‘git’:
ensure => present,
dpkg-query --search
git State State }
!=
Sync Event
| CONFIDENTIAL & PROPRIETARY
7. Puppet compares
rpm -q git
Current Desired package {‘git’:
ensure => present,
dpkg-query --search
git State State }
Absent != Present
Sync Event
| CONFIDENTIAL & PROPRIETARY
8. Provides remediate
rpm -q git
Current Desired package {‘git’:
ensure => present,
dpkg-query --search
git State State }
Absent != Present
yum install git
Sync Event
apt-get install git
| CONFIDENTIAL & PROPRIETARY
9. Providers Remediate
rpm -q git
Current Desired package {‘git’:
ensure => present,
dpkg-query --search
git State State }
Absent != Present
yum install git state transition:
Sync Event absent -> present
apt-get install git
| CONFIDENTIAL & PROPRIETARY
10. Noop Mode
rpm -q git
Current Desired package {‘git’:
ensure => present,
dpkg-query --search
git State State }
Absent != Present
state transition:
Sync Event absent -> present
| CONFIDENTIAL & PROPRIETARY
11. Puppet DSL composes resources
class keystone(
$admin_token,
){
package { 'keystone':
ensure => present,
}
keystone_config {
'DEFAULT/admin_token':
value => $admin_token,
require => Package[‘keystone’],
notify => Service[‘keystone’],
}
service { 'keystone':
ensure => running,
}
}
| CONFIDENTIAL & PROPRIETARY
15. OpenStack makes it easier to automate the management
of compute resources
Puppet
Your Business
OpenStack Configuration Management
Self Service API
Hardware
16. OpenStack makes it easier to automate the management
of compute resources
You
Puppet
Your Business
OpenStack Configuration Management
Self Service API
Hardware
http://www.happyemrdoctor.com/files/2011/02/HappyComputerMan.gif
17. Puppet can be used to codify best practices for OpenStack
OpenStackios
Now with best practices by:
CERN,
Enovance,
Cisco
Redhat,
Cybera
19. OpenStack modules
• nova
• swift
• glance
• keystone
• horizon
• openstack
• quantum
• cinder
20. General purpose modules
• rabbitmq
• mysql
• memcache
• apt
• concat
• ntp
• rsync
• stdlib
• xinetd
• openvswitch
• apache
21. Each module has classes that present
configuration interfaces
glance
class { 'glance::api':
auth_port => '35357',
auth_host => ‘keystone_host’,
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => ' pass',
}
class { 'glance::registry':
...
}
22. OpenStack - higher level roles
class { 'openstack::db::mysql':
....
}
class { ‘openstack::keystone’:
....
}
class { 'openstack::glance':
...
}
class { ‘openstack::horizon’
}
class { ‘openstack::nova::controller’ {
}
23. 2 role deployments
node /openstack-controller/ {
class { 'openstack::controller':
....
}
}
node /compute/ {
class { ‘openstack::compute’:
...
}
}
26. Install modules
> gem install librarian-puppet
> cd puppetlabs-openstack_dev_env
> librarian-puppet install
Once it’s released to the forge
> puppet module install puppetlabs-openstack
29. Modify top scope
variables
...
$cinder_user_password = 'cinder_user_password'
$quantum_user_password = 'quantum_user_password'
$verbose = 'True'
$public_interface = 'eth1'
$private_interface = 'eth2'
$rabbit_password = 'rabbit_password'
$rabbit_user = 'nova'
...
30. install openstack
host1# puppet agent -t --certname openstack-
controller
host2# puppet agent -t --certname compute
34. Or use hiera
(maybe I should
switch?)
$cinder_user_password = hiera('cinder_user_password')
$quantum_user_password = hiera('quantum_user_password')
$verbose = 'True'
$public_interface = hiera('public_interface')
$private_interface = hiera('private_interface')
$rabbit_password = hiera('rabbit_password')
Editor's Notes \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n