puppet openstack
TRANSCRIPT
![Page 1: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/1.jpg)
Puppet OpenStack<3 Fest
by Dan Bodebodepd <at > [‘freenode.net’, ‘twitter’, ‘github’]
![Page 2: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/2.jpg)
OpenStack?
![Page 3: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/3.jpg)
What is OpenStack?
Open source project
Self service API for your infrastructure
![Page 4: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/4.jpg)
OpenStack Components
•Compute (Nova)•Image (Glance)•Identity (Keystone)•Dashboard (Horizon)•Object Store (Swift)
![Page 5: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/5.jpg)
NovaOpenStack Compute
Schedules allocation of compute resources.
Nova API RabbitMQ
Scheduler
Network
ComputeComputeCompute
VolumesVolumes
![Page 6: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/6.jpg)
NovaSupports management of VM instances, volumes, and networks
Nova API RabbitMQ
Scheduler
Network
ComputeComputeCompute
VolumesVolumes
list instancecreate instance
terminate instance
create network
create volumeattach volume
![Page 7: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/7.jpg)
Glance
GlanceAPI
GlanceRegistry
Store
Swift
FileSystem
Storage service for Virtual machine images
![Page 8: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/8.jpg)
Glance
GlanceAPI
GlanceRegistry
Store
Swift
FileSystem
Storage service for Virtual machine images
AMI Store
AMI
Retrieve
![Page 9: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/9.jpg)
Keystone
Manages authentication/authorization
Keystone API
Authenticate
Token
Tenant
User
Role
Service
Endpoint
![Page 10: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/10.jpg)
HorizonProvides a dashboard for the OpenStack components.
![Page 11: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/11.jpg)
Why Integrate?
![Page 12: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/12.jpg)
OpenStack is hard to build reliably, repeatedly
![Page 13: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/13.jpg)
OpenStack is hard
![Page 14: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/14.jpg)
Hardware
Self Service API
Configuration Management
OpenStack makes it easier to automate the management of compute resources
OpenStack
PuppetYour Business
![Page 15: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/15.jpg)
Puppet can be used to codify best practices for OpenStack
OpenStackiosNow with best practices by:CERN,Enovance,CiscoRedhat,Cybera
![Page 16: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/16.jpg)
BuildingOpenStackModules
![Page 17: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/17.jpg)
Part One:
Creating a community
Because you’re the experts
![Page 18: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/18.jpg)
“The first step towards starting an open source community is to write some code”
![Page 19: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/19.jpg)
User[keystone]
Package[keystone]
File[/etc/keystone/keystone.conf]
Class[keystone]
Interface - bind_host - public_port - admin_port - admin_token - compute_port
Group[keystone]
Service[keystone]
Create classes that wrap all of the OpenStack components
![Page 20: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/20.jpg)
All of them:
• nova
• swift
• glance
• keystone
• horizon
• openstack
• rabbitmq
• mysql
• memcache
• apt
• concat
• ntp
• rsync
• stdlib
• xinetd
![Page 21: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/21.jpg)
Class[openstack::controller]
keystone
mysql::serverglance::api
rabbit::queue
glance::registry
nova::api
nova::scheduler
nova::network::flatdhcp
memcached
horizon
Class[openstack::compute]
nova::compute::libvirt
nova::volume::iscsi
Create Higher level ‘role’ classes
![Page 22: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/22.jpg)
“Design with community in mind”
![Page 23: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/23.jpg)
repos: repo_paths: # openstack git repos git://github.com/puppetlabs/puppetlabs-nova: nova git://github.com/puppetlabs/puppetlabs-glance: glance git://github.com/puppetlabs/puppetlabs-swift: swift git://github.com/puppetlabs/puppetlabs-keystone: keystone git://github.com/puppetlabs/puppetlabs-horizon: horizon # openstack middleware git://github.com/puppetlabs/puppetlabs-rabbitmq: rabbitmq git://github.com/puppetlabs/puppetlabs-mysql: mysql git://github.com/puppetlabs/puppetlabs-git: git git://github.com/puppetlabs/puppetlabs-vcsrepo: vcsrepo git://github.com/saz/puppet-memcached: memcached git://github.com/puppetlabs/puppetlabs-rsync: rsync # other deps git://github.com/ghoneycutt/puppet-xinetd: xinetd git://github.com/saz/puppet-ssh: ssh git://github.com/puppetlabs/puppetlabs-stdlib: stdlib git://github.com/puppetlabs/puppetlabs-apt: apt git://github.com/ripienaar/puppet-concat: concat git://github.com/duritong/puppet-sysctl.git: sysctl
Base everything on small reusable components
![Page 24: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/24.jpg)
class nova( $nova_cluster_id='localcluster', $sql_connection = false, $image_service = 'nova.image.glance.GlanceImageService', $glance_api_servers = 'localhost:9292', $rabbit_host = 'localhost', $rabbit_password='guest', $rabbit_port='5672', $rabbit_userid='guest', $rabbit_virtual_host='/', $auth_strategy = 'keystone', $service_down_time = 60, $logdir = '/var/log/nova', $state_path = '/var/lib/nova', $lock_path = $::nova::params::lock_path, $verbose = false, $periodic_interval = '60', $report_interval = '10', $root_helper = $::nova::params::root_helper){...}
Make them flexible
![Page 25: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/25.jpg)
Make it obvious where extensions go
glance|-- manifests| |-- db| | |-- mysql.pp| | `--postgresql.pp| |-- backend| | |-- file.pp| | `-- swift.pp
![Page 26: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/26.jpg)
Make it obvious how to add additional platforms
class nova::params {
case $::osfamily { 'RedHat': { # package names $api_package_name = false $cert_package_name = false $common_package_name = 'openstack-nova' $compute_package_name = false ... } 'Debian': { # package names $api_package_name = 'nova-api' $cert_package_name = 'nova-cert' $common_package_name = 'nova-common' $compute_package_name = 'nova-compute' ...
![Page 27: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/27.jpg)
“Fear the Fork!”
![Page 28: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/28.jpg)
“Git those forkers!”
![Page 29: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/29.jpg)
![Page 30: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/30.jpg)
300+ merged pull requests
![Page 31: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/31.jpg)
Whoa, we need tests
![Page 32: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/32.jpg)
Rspec Puppet
Puppet
Facts
Data
Model
![Page 33: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/33.jpg)
Emulate Facter
Model
Puppet
Facts
Datalet :facts do {:operatingsystem => ‘RedHat’}end
![Page 34: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/34.jpg)
Specify Data
Puppet
Facts
Datalet :params do {:rabbit_host => ‘10.0.0.42’}end
Model
![Page 35: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/35.jpg)
Inspect catalog
Model
Puppet
Facts
Datait do should contain_file (‘/etc/nova.conf’).\ with_content (‘rabbit_host = 10.0.0.42’)end
![Page 36: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/36.jpg)
Automated unit tests
![Page 37: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/37.jpg)
Integration Tests
Tempest
GitHub
Puppet
Jenkins
![Page 38: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/38.jpg)
Next Steps
• Start connecting the community• get more collaboration on the mailing list• grant community members merge rights
• Single set of “preferred community modules” for• monitoring• HA
![Page 39: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/39.jpg)
Part 2: Bare Metal
![Page 40: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/40.jpg)
Gotta hit bare metal at some point
![Page 41: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/41.jpg)
Razor
• automatically boots a machine in a micro-OS with facter running
• Machines are automatically discovered and turned into an inventory service that can be programmatically installed.
![Page 42: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/42.jpg)
Moving towards Reference Architectures
Puppet
OpenStack
Razor/Puppet/Facter
Hardware
You Business, Automated
![Page 43: Puppet OpenStack](https://reader035.vdocuments.us/reader035/viewer/2022071214/60433792641bc44ab73ba894/html5/thumbnails/43.jpg)
• http://puppetlabs.com/blog/module-of-the-week-puppetlabs-openstack/
• http://forge.puppetlabs.com/puppetlabs/openstack
• https://github.com/puppetlabs/puppetlabs-openstack
Resources: