SlideShare a Scribd company logo
Infrastructure as code with
Puppet and Apache CloudStack
David Nalley
ke4qqq@apache.org
@ke4qqq
#whoami
• Apache Software Foundation Member
• Apache CloudStack PMC Member
• Recovering Sysadmin
• Fedora Project Contributor
• Zenoss contributor
• Employed by Citrix in the Open Source Business Office
Setting the stage
Apache CloudStack is...
● an open source IaaS platform
● proven in production at massive scale
● awesome
Gorgeous UI
API
● Native: http://cloudstack.apache.org/docs/api
● EC2
IaaS removes one constraint
No longer waiting days or weeks to get a VM provisioned
but introduces another...
Now you have to get a machine configured in a timely
manner.
Self service
● UI
● API
● Some external tool
People provision stuff...
Not ops folks
Often not familiar with environmental intricacies
Don't care
Baseline can be important....
Classification
Problem: We spin up, dynamically, 1-500 VMs at any given time - how do
we decide what configurations apply.
Classification
The wrong way - dedicated images for each purpose
Classification
editing nodes.pp
node 'foo-356.cloud.com' {
include httpd
}
Classification
globbing
node 'mysql*' {
include mysqld
}
Classification
Everything is default
node 'default' {
include httpd
}
Classification
External Node Classifier
Classification
External Node Classifier
Classification
Facts
class base {
case $::fact {
'httpd': {
include httpd
}
'otherrole': {
include nginx
}
}
}
Classification - One Solution
● During instance provisioning define metadata.
● Custom fact for that metadata
● Case statement based on that fact
Example Metadata
role=webserver
location=datacenter1
environment=production
Corresponding manifest
class base {
case $::fact {
'webserver': {
include httpd
}
'database': {
include postgresql
}
}
}
Corresponding manifest
class base {
case $::fact {
'webserver': {
include httpd
}
'database': {
include postgresql
}
}
}
Links, et al.
● Fact:
http://s.apache.org/acs_userdata
● Blog with details:
http://s.apache.org/acs_userdata2
Video - go watch it
● I only have 45 minutes - so can't delve
into everything, you should watch the
video- it’s great.
● http://youtu.be/c8YWctfOpwo
Video - go watch it
● I only have 45 minutes - so can't delve
into everything, you should watch the
video- it’s great.
● http://youtu.be/c8YWctfOpwo
And then there was a knife-plugin
The folks at Edmunds.com wrote a knife plugin for
CloudStack
The knife plugin had the ability to define an application
stack, potentially hundreds of nodes, that are interrelated,
and provision them with a single knife command.
https://github.com/cloudstack-extras/knife-cloudstack
Deploying a machine with knife
~ knife cs server create
{
"name": "hadoop_cluster_a",
"description": "A small hadoop cluster with hbase",
"version": "1.0",
"environment": "production",
"servers": [
{
"name": "zookeeper-a, zookeeper-b, zookeeper-c",
"description": "Zookeeper nodes",
"template": "rhel-5.6-base",
"service": "small",
"port_rules": "2181",
"run_list": "role[cluster_a], role[zookeeper_server]",
"actions": [
{ "knife_ssh": ["role:zookeeper_server", "sudo chef-client"] }
]
},
{
"name": "hadoop-master",
"description": "Hadoop master node",
"template": "rhel-5.6-base",
"service": "large",
"networks": "app-net, storage-net",
"port_rules": "50070, 50030, 60010",
"run_list": "role[cluster_a], role[hadoop_master], role[hbase_master]"
},
{
"name": "hadoop-worker-a hadoop-worker-b hadoop-worker-c",
"description": "Hadoop worker nodes",
"template": "rhel-5.6-base",
"service": "medium",
"port_rules": "50075, 50060, 60030",
"run_list": "role[cluster_a], role[hadoop_worker], role[hbase_regionserver]",
"actions": [
{ "knife_ssh": ["role:hadoop_master", "sudo chef-client"] },
{ "http_request": "http://${hadoop-master}:50070/index.jsp" }
]
}
}
Deploy that Hadoop cluster with
knife cs stack create hadoop_cluster_a
I was jealous....
Then at FOSDEM 2012
● CloudStack user shows me Puppet types and resources
for OpenNebula.
● https://puppetlabs.com/blog/puppetizing-opennebula/
● They indicated they wanted this awesomeness for
CloudStack....
Why?
● They wanted to define each of their application
stacks in puppet, so that not only the configuration
of software on the machine, but the machines
themselves would be configured by Puppet.
● Automated deployment of test environments that
are exactly the same
● Really gets outside of machine configuration to
entire infrastructure configuration
What we are used to
● Puppet _defines_ the configuration
within the machine
What we want
● Puppet _defines_ the machine.
● Puppet _defines_ collection of
machines
● Puppet _defines_ the machines,
networks, and rest of infrastructure
Then at Puppetconf
● There was Google Compute
Engine types and resources for
Puppet.
● Dan Bode gave a presentation showing off the work he
had done... that presentation is worth seeing...
● http://www.slideshare.net/bodepd/google-compute-presentati
ApacheCloudStack
And then for Christmas
● puppet types and providers arrived - courtesy of Dan
Bode
● https://github.com/bodepd/cloudstack_resource
s
How does this work?
cloudstack_instance { 'foo1':
ensure => present,
flavor => 'Small Instance',
zone => 'FMT-ACS-001',
image => 'CentOS 5.6(64-bit) no GUI
(XenServer)',
network => 'puppetlabs-network',
# domain
# account
# hostname
}
●
Setting defaults
Cloudstack_instance {
image => 'CentOS 6.3',
flavor => 'M1.medium',
zone => 'San Jose',
network => 'davids_net',
keypair => 'david_keys',
}
cloudstack_instance {
ensure => $::ensure,
group => 'role=db',
}
A simple stack
class my_web_stack {
cloudstack_instance { 'foo4':
ensure => present,
group => 'role=apache',
}
cloudstack_instance { 'foo5':
ensure => present,
group => 'role=db',
}
}
Questions
Contact
● Project
– http://cloudstack.apache.org
– #cloudstack on irc.freenode.net
● Me
– ke4qqq on irc.freenode.net
– ke4qqq@apache.org

More Related Content

PDF
Vagrant Workshop
ODP
Puppet and CloudStack
PDF
(2016-06-11) Packer: Make Multi-Platform Images
PDF
Introduction to Express and Grunt
PDF
Integrating cloud stack with puppet
PDF
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
ODP
Infrastructure as code with Puppet and Apache CloudStack
PPTX
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT
Vagrant Workshop
Puppet and CloudStack
(2016-06-11) Packer: Make Multi-Platform Images
Introduction to Express and Grunt
Integrating cloud stack with puppet
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Infrastructure as code with Puppet and Apache CloudStack
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT

What's hot (19)

PDF
문서화에 날개를 달아주는 Flybook CLI
PPTX
Packer, where DevOps begins
PPTX
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
ODP
Puppet and Apache CloudStack
PPTX
Packer
PDF
Automating CloudStack with Puppet - David Nalley
PDF
Using Docker with Puppet - PuppetConf 2014
PDF
Deploying Elasticsearch on Docker with Weave
PDF
Docker on azure
PPTX
ILM - Pipeline in the cloud
PDF
Vagrant presentation
PDF
Dev to Delivery with Puppet, Vagrant and AWS
PDF
The Secrets of The FullStack Ninja - Part A - Session I
PDF
Production Ready Javascript With Grunt
PDF
DevOps and Drupal
PDF
Node4J: Running Node.js in a JavaWorld
PPSX
Node.js In The Enterprise - A Primer
PDF
Bower & Grunt - A practical workflow
PDF
Delivery Pipeline for Windows Machines
문서화에 날개를 달아주는 Flybook CLI
Packer, where DevOps begins
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Puppet and Apache CloudStack
Packer
Automating CloudStack with Puppet - David Nalley
Using Docker with Puppet - PuppetConf 2014
Deploying Elasticsearch on Docker with Weave
Docker on azure
ILM - Pipeline in the cloud
Vagrant presentation
Dev to Delivery with Puppet, Vagrant and AWS
The Secrets of The FullStack Ninja - Part A - Session I
Production Ready Javascript With Grunt
DevOps and Drupal
Node4J: Running Node.js in a JavaWorld
Node.js In The Enterprise - A Primer
Bower & Grunt - A practical workflow
Delivery Pipeline for Windows Machines
Ad

Viewers also liked (7)

PDF
Writing & Sharing Great Modules - Puppet Camp Boston
PDF
Puppet and Telefonica R&D
PDF
How Puppet Labs Tests and Validates Puppet Enterprise
PDF
Engaging With The Puppet Community: From Noob to Guru* in Under a Year
PDF
Puppet at Spotify
PDF
Puppet powershell
PDF
State of Puppet - Puppet Camp Barcelona 2013
Writing & Sharing Great Modules - Puppet Camp Boston
Puppet and Telefonica R&D
How Puppet Labs Tests and Validates Puppet Enterprise
Engaging With The Puppet Community: From Noob to Guru* in Under a Year
Puppet at Spotify
Puppet powershell
State of Puppet - Puppet Camp Barcelona 2013
Ad

Similar to ApacheCloudStack (20)

ODP
Puppet and Apache CloudStack
ODP
Puppetpreso
PPTX
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
ODP
Deploy MediaWiki usgin Fiware Lab Facilities
ODP
Deploy Mediawiki Using FIWARE Lab Facilities
PPTX
Docker 101
PDF
Making your app soar without a container manifest
PDF
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
PDF
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
PDF
SCM Puppet: from an intro to the scaling
PDF
Intro - End to end ML with Kubeflow @ SignalConf 2018
PDF
PDXPortland - Dockerize Django
PDF
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
PDF
Using Puppet in Small Infrastructures
PDF
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
PPTX
Vagrant crash course
PPTX
Puppeteer - Headless Chrome Node API
PPTX
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
PDF
Devops with Python by Yaniv Cohen DevopShift
PDF
One-Man Ops
Puppet and Apache CloudStack
Puppetpreso
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Deploy MediaWiki usgin Fiware Lab Facilities
Deploy Mediawiki Using FIWARE Lab Facilities
Docker 101
Making your app soar without a container manifest
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
SCM Puppet: from an intro to the scaling
Intro - End to end ML with Kubeflow @ SignalConf 2018
PDXPortland - Dockerize Django
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
Using Puppet in Small Infrastructures
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Vagrant crash course
Puppeteer - Headless Chrome Node API
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
Devops with Python by Yaniv Cohen DevopShift
One-Man Ops

More from Puppet (20)

PPTX
Puppet Community Day: Planning the Future Together
PPTX
The Evolution of Puppet: Key Changes and Modernization Tips
PPTX
Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Up...
PPTX
Bolt Dynamic Inventory: Making Puppet Easier
PPTX
Customizing Reporting with the Puppet Report Processor
PPTX
Puppet at ConfigMgmtCamp 2025 Sponsor Deck
PPTX
The State of Puppet in 2025: A Presentation from Developer Relations Lead Dav...
PPTX
Let Red be Red and Green be Green: The Automated Workflow Restarter in GitHub...
PDF
Puppet camp2021 testing modules and controlrepo
PPTX
Puppetcamp r10kyaml
PDF
2021 04-15 operational verification (with notes)
PPTX
Puppet camp vscode
PDF
Modules of the twenties
PDF
Applying Roles and Profiles method to compliance code
PPTX
KGI compliance as-code approach
PDF
Enforce compliance policy with model-driven automation
PDF
Keynote: Puppet camp compliance
PPTX
Automating it management with Puppet + ServiceNow
PPTX
Puppet: The best way to harden Windows
PPTX
Simplified Patch Management with Puppet - Oct. 2020
Puppet Community Day: Planning the Future Together
The Evolution of Puppet: Key Changes and Modernization Tips
Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Up...
Bolt Dynamic Inventory: Making Puppet Easier
Customizing Reporting with the Puppet Report Processor
Puppet at ConfigMgmtCamp 2025 Sponsor Deck
The State of Puppet in 2025: A Presentation from Developer Relations Lead Dav...
Let Red be Red and Green be Green: The Automated Workflow Restarter in GitHub...
Puppet camp2021 testing modules and controlrepo
Puppetcamp r10kyaml
2021 04-15 operational verification (with notes)
Puppet camp vscode
Modules of the twenties
Applying Roles and Profiles method to compliance code
KGI compliance as-code approach
Enforce compliance policy with model-driven automation
Keynote: Puppet camp compliance
Automating it management with Puppet + ServiceNow
Puppet: The best way to harden Windows
Simplified Patch Management with Puppet - Oct. 2020

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
KodekX | Application Modernization Development
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Reach Out and Touch Someone: Haptics and Empathic Computing
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
sap open course for s4hana steps from ECC to s4
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Digital-Transformation-Roadmap-for-Companies.pptx
KodekX | Application Modernization Development
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

ApacheCloudStack

  • 1. Infrastructure as code with Puppet and Apache CloudStack David Nalley ke4qqq@apache.org @ke4qqq
  • 2. #whoami • Apache Software Foundation Member • Apache CloudStack PMC Member • Recovering Sysadmin • Fedora Project Contributor • Zenoss contributor • Employed by Citrix in the Open Source Business Office
  • 3. Setting the stage Apache CloudStack is... ● an open source IaaS platform ● proven in production at massive scale ● awesome
  • 6. IaaS removes one constraint No longer waiting days or weeks to get a VM provisioned
  • 7. but introduces another... Now you have to get a machine configured in a timely manner.
  • 8. Self service ● UI ● API ● Some external tool
  • 9. People provision stuff... Not ops folks Often not familiar with environmental intricacies Don't care
  • 10. Baseline can be important....
  • 11. Classification Problem: We spin up, dynamically, 1-500 VMs at any given time - how do we decide what configurations apply.
  • 12. Classification The wrong way - dedicated images for each purpose
  • 15. Classification Everything is default node 'default' { include httpd }
  • 18. Classification Facts class base { case $::fact { 'httpd': { include httpd } 'otherrole': { include nginx } } }
  • 19. Classification - One Solution ● During instance provisioning define metadata. ● Custom fact for that metadata ● Case statement based on that fact
  • 21. Corresponding manifest class base { case $::fact { 'webserver': { include httpd } 'database': { include postgresql } } }
  • 22. Corresponding manifest class base { case $::fact { 'webserver': { include httpd } 'database': { include postgresql } } }
  • 23. Links, et al. ● Fact: http://s.apache.org/acs_userdata ● Blog with details: http://s.apache.org/acs_userdata2
  • 24. Video - go watch it ● I only have 45 minutes - so can't delve into everything, you should watch the video- it’s great. ● http://youtu.be/c8YWctfOpwo
  • 25. Video - go watch it ● I only have 45 minutes - so can't delve into everything, you should watch the video- it’s great. ● http://youtu.be/c8YWctfOpwo
  • 26. And then there was a knife-plugin The folks at Edmunds.com wrote a knife plugin for CloudStack The knife plugin had the ability to define an application stack, potentially hundreds of nodes, that are interrelated, and provision them with a single knife command. https://github.com/cloudstack-extras/knife-cloudstack
  • 27. Deploying a machine with knife ~ knife cs server create
  • 28. { "name": "hadoop_cluster_a", "description": "A small hadoop cluster with hbase", "version": "1.0", "environment": "production", "servers": [ { "name": "zookeeper-a, zookeeper-b, zookeeper-c", "description": "Zookeeper nodes", "template": "rhel-5.6-base", "service": "small", "port_rules": "2181", "run_list": "role[cluster_a], role[zookeeper_server]", "actions": [ { "knife_ssh": ["role:zookeeper_server", "sudo chef-client"] } ] }, { "name": "hadoop-master", "description": "Hadoop master node", "template": "rhel-5.6-base", "service": "large", "networks": "app-net, storage-net", "port_rules": "50070, 50030, 60010", "run_list": "role[cluster_a], role[hadoop_master], role[hbase_master]" }, { "name": "hadoop-worker-a hadoop-worker-b hadoop-worker-c", "description": "Hadoop worker nodes", "template": "rhel-5.6-base", "service": "medium", "port_rules": "50075, 50060, 60030", "run_list": "role[cluster_a], role[hadoop_worker], role[hbase_regionserver]", "actions": [ { "knife_ssh": ["role:hadoop_master", "sudo chef-client"] }, { "http_request": "http://${hadoop-master}:50070/index.jsp" } ] } }
  • 29. Deploy that Hadoop cluster with knife cs stack create hadoop_cluster_a
  • 31. Then at FOSDEM 2012 ● CloudStack user shows me Puppet types and resources for OpenNebula. ● https://puppetlabs.com/blog/puppetizing-opennebula/ ● They indicated they wanted this awesomeness for CloudStack....
  • 32. Why? ● They wanted to define each of their application stacks in puppet, so that not only the configuration of software on the machine, but the machines themselves would be configured by Puppet. ● Automated deployment of test environments that are exactly the same ● Really gets outside of machine configuration to entire infrastructure configuration
  • 33. What we are used to ● Puppet _defines_ the configuration within the machine
  • 34. What we want ● Puppet _defines_ the machine. ● Puppet _defines_ collection of machines ● Puppet _defines_ the machines, networks, and rest of infrastructure
  • 35. Then at Puppetconf ● There was Google Compute Engine types and resources for Puppet. ● Dan Bode gave a presentation showing off the work he had done... that presentation is worth seeing... ● http://www.slideshare.net/bodepd/google-compute-presentati
  • 37. And then for Christmas ● puppet types and providers arrived - courtesy of Dan Bode ● https://github.com/bodepd/cloudstack_resource s
  • 38. How does this work? cloudstack_instance { 'foo1': ensure => present, flavor => 'Small Instance', zone => 'FMT-ACS-001', image => 'CentOS 5.6(64-bit) no GUI (XenServer)', network => 'puppetlabs-network', # domain # account # hostname } ●
  • 39. Setting defaults Cloudstack_instance { image => 'CentOS 6.3', flavor => 'M1.medium', zone => 'San Jose', network => 'davids_net', keypair => 'david_keys', } cloudstack_instance { ensure => $::ensure, group => 'role=db', }
  • 40. A simple stack class my_web_stack { cloudstack_instance { 'foo4': ensure => present, group => 'role=apache', } cloudstack_instance { 'foo5': ensure => present, group => 'role=db', } }
  • 42. Contact ● Project – http://cloudstack.apache.org – #cloudstack on irc.freenode.net ● Me – ke4qqq on irc.freenode.net – ke4qqq@apache.org