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
Infrastructure as code with Puppet and Apache CloudStack
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

Similar to Infrastructure as code with Puppet and Apache CloudStack (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
Ad

More from ke4qqq (17)

PPTX
The Tragedy of Open Source
PPT
On-demand Continuous Integration with Jenkins, jclouds, and CloudStack
PPTX
Cloud Innovation and Risks
PPTX
Understanding the CloudStack Release Process
PPTX
ApacheConEU Keynote: What is the value of the Apache Software Foundation
PDF
Ceph and Apache CloudStack
PDF
It's not tools, Stupid
PDF
DevOps, Cloud, and the Death of Backup Tape Changers
PDF
Building a Dev/Test Cloud with Apache CloudStack
ODP
Building a Dev/Test Cloud with Apache CloudStack
PPT
10 Minute Overview of Apache CloudStack
PPT
CloudStack Intro NYC
PDF
CloudStack - LinuxFest NorthWest
PDF
Bacd zenoss
ODP
Build a Cloud Day - CloudStack
ODP
Build a Cloud Day - CloudStack
PPTX
Successfully deploy build manage your cloud with cloud stack2
The Tragedy of Open Source
On-demand Continuous Integration with Jenkins, jclouds, and CloudStack
Cloud Innovation and Risks
Understanding the CloudStack Release Process
ApacheConEU Keynote: What is the value of the Apache Software Foundation
Ceph and Apache CloudStack
It's not tools, Stupid
DevOps, Cloud, and the Death of Backup Tape Changers
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
10 Minute Overview of Apache CloudStack
CloudStack Intro NYC
CloudStack - LinuxFest NorthWest
Bacd zenoss
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
Successfully deploy build manage your cloud with cloud stack2

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Modernizing your data center with Dell and AMD
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Monthly Chronicles - July 2025
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The AUB Centre for AI in Media Proposal.docx
Empathic Computing: Creating Shared Understanding
Modernizing your data center with Dell and AMD
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
Per capita expenditure prediction using model stacking based on satellite ima...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development

Infrastructure as code with Puppet and Apache CloudStack

  • 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