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

What's hot (19)

PDF
문서화에 날개를 달아주는 Flybook CLI
Rhio Kim
 
PPTX
Packer, where DevOps begins
Jeff Hung
 
PPTX
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
HubSpot Product Team
 
ODP
Puppet and Apache CloudStack
Puppet
 
PPTX
Packer
Nitesh Saini
 
PDF
Automating CloudStack with Puppet - David Nalley
Puppet
 
PDF
Using Docker with Puppet - PuppetConf 2014
Puppet
 
PDF
Deploying Elasticsearch on Docker with Weave
Ilya Dmitrichenko
 
PDF
Docker on azure
Sasha Vinčić
 
PPTX
ILM - Pipeline in the cloud
Aaron Carey
 
PDF
Vagrant presentation
Mahmudur Rahman
 
PDF
Dev to Delivery with Puppet, Vagrant and AWS
Puppet
 
PDF
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
PDF
Production Ready Javascript With Grunt
XB Software, Ltd.
 
PDF
DevOps and Drupal
Aarno Aukia
 
PDF
Node4J: Running Node.js in a JavaWorld
Ian Bull
 
PPSX
Node.js In The Enterprise - A Primer
Naveen S.R
 
PDF
Bower & Grunt - A practical workflow
Riccardo Coppola
 
PDF
Delivery Pipeline for Windows Machines
Dmitry Buzdin
 
문서화에 날개를 달아주는 Flybook CLI
Rhio Kim
 
Packer, where DevOps begins
Jeff Hung
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
HubSpot Product Team
 
Puppet and Apache CloudStack
Puppet
 
Packer
Nitesh Saini
 
Automating CloudStack with Puppet - David Nalley
Puppet
 
Using Docker with Puppet - PuppetConf 2014
Puppet
 
Deploying Elasticsearch on Docker with Weave
Ilya Dmitrichenko
 
Docker on azure
Sasha Vinčić
 
ILM - Pipeline in the cloud
Aaron Carey
 
Vagrant presentation
Mahmudur Rahman
 
Dev to Delivery with Puppet, Vagrant and AWS
Puppet
 
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
Production Ready Javascript With Grunt
XB Software, Ltd.
 
DevOps and Drupal
Aarno Aukia
 
Node4J: Running Node.js in a JavaWorld
Ian Bull
 
Node.js In The Enterprise - A Primer
Naveen S.R
 
Bower & Grunt - A practical workflow
Riccardo Coppola
 
Delivery Pipeline for Windows Machines
Dmitry Buzdin
 

Similar to Infrastructure as code with Puppet and Apache CloudStack (20)

ODP
Puppet and Apache CloudStack
Puppet
 
ODP
Puppetpreso
ke4qqq
 
PPT
Automating Your CloudStack Cloud with Puppet
buildacloud
 
PPT
PowerPoint Presentation
lalitjangra9
 
PPTX
Getting Started with Apache CloudStack
Joe Brockmeier
 
PPTX
Openstack Summit Tokyo 2015 - Building a private cloud to efficiently handle ...
Pierre GRANDIN
 
PDF
Txlf2012
Joe Brockmeier
 
PPT
Introduction to Apache CloudStack by David Nalley
buildacloud
 
PPTX
Building clouds with apache cloudstack apache roadshow 2018
ShapeBlue
 
PDF
Building a Dev/Test Cloud with Apache CloudStack
ke4qqq
 
PDF
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
MaxServ
 
PDF
One-Man Ops
Jos Boumans
 
PPTX
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
Chip Childers
 
PDF
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Malcolm Duncanson, CISSP
 
PDF
Cloud stack for_beginners
Radhika Puthiyetath
 
PPTX
vBACD - Deploying Infrastructure-as-a-Service with CloudStack - 2/28
CloudStack - Open Source Cloud Computing Project
 
PDF
Puppet and the HashiStack
Bram Vogelaar
 
PPTX
CloudStack Overview
sedukull
 
PDF
What’s New and What’s Upcoming in Apache CloudStack, Giles Sirett, ShapeBlue
ShapeBlue
 
PDF
Infrastructure-as-Code with Puppet Enterprise in the Cloud - PuppetConf 2014
Puppet
 
Puppet and Apache CloudStack
Puppet
 
Puppetpreso
ke4qqq
 
Automating Your CloudStack Cloud with Puppet
buildacloud
 
PowerPoint Presentation
lalitjangra9
 
Getting Started with Apache CloudStack
Joe Brockmeier
 
Openstack Summit Tokyo 2015 - Building a private cloud to efficiently handle ...
Pierre GRANDIN
 
Txlf2012
Joe Brockmeier
 
Introduction to Apache CloudStack by David Nalley
buildacloud
 
Building clouds with apache cloudstack apache roadshow 2018
ShapeBlue
 
Building a Dev/Test Cloud with Apache CloudStack
ke4qqq
 
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
MaxServ
 
One-Man Ops
Jos Boumans
 
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
Chip Childers
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Malcolm Duncanson, CISSP
 
Cloud stack for_beginners
Radhika Puthiyetath
 
vBACD - Deploying Infrastructure-as-a-Service with CloudStack - 2/28
CloudStack - Open Source Cloud Computing Project
 
Puppet and the HashiStack
Bram Vogelaar
 
CloudStack Overview
sedukull
 
What’s New and What’s Upcoming in Apache CloudStack, Giles Sirett, ShapeBlue
ShapeBlue
 
Infrastructure-as-Code with Puppet Enterprise in the Cloud - PuppetConf 2014
Puppet
 
Ad

More from ke4qqq (16)

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

Recently uploaded (20)

PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PPTX
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
PPTX
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
The Growing Value and Application of FME & GenAI
Safe Software
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 

Infrastructure as code with Puppet and Apache CloudStack

  • 1. Infrastructure as code with Puppet and Apache CloudStack David Nalley [email protected] @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 – [email protected]