SlideShare uma empresa Scribd logo
1 de 42
Infrastructure as code
   with Puppet and
  Apache CloudStack
  David Nalley <david@gnsa.us> @ke4qqq
#whoami

• Recovering sysadmin
• Apache CloudStack Committer
• Designer of ugly slides
To set the stage...

• Apache CloudStack is...
 • an open source IaaS platform
 • proven in production at massive scale
 • awesome
Gorgeous UI
Decent API


• EC2 or native
•   http://incubator.apache.org/cloudstack/docs/api
So IaaS removes one
           constraint....


No longer waiting days/weeks to provision a
 machine.
...but introduces another
             constraint..


Now have to get a machine configured in a
 timely manner.
People provision stuff


Often not ops folks
Often not intimately familiar with intricacies
Baseline is important; but...
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 'foo*' {
 include httpd
}
Classification
Everything is default


node 'default' {
 include httpd
}
Classification


External node classifier
Classification
Facts
class base {
 case $::fact {
   'httpd': {
     include httpd
    }
   'otherrole': {
     include nginx
   }
  }
 }
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
class base {
             manifest
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 is here, 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

• So 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 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 have grown used to



Puppet _defines_ the configuration within the
 machine
What we want...
What we want...


Puppet _defines_ the machine
What we want...


Puppet _defines_ a collection of machines
What we want...


Puppet _defines_ ALL the machines
This even has its own buzzword



     Software defined datacenter
...and 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-presentation-puppet-conf
So then for Christmas...


• puppet types and providers arrived -
    courtesy of Dan Bode
•   https://github.com/bodepd/cloudstack_resources
So 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',
     }
  }
Define all your
infrastructure
Resources/contact
Me: David Nalley <david@gnsa.us> @ke4qqq
CloudStack: http://cloudstack.org
  cloudstack-users@incubator.apache.org
cloudstack_resources:
 https://github.com/bodepd/cloudstack_resources

Jason Hancock Vids
   http://youtu.be/c8YWctfOpwo
   http://youtu.be/8W0BqCmNZQQ

Mais conteúdo relacionado

Mais procurados

Rackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & PackerRackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & Packer
Marc Cluet
 
Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)
Cameron Eagans
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013
Simon McCartney
 

Mais procurados (20)

OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraForm
 
Packer
PackerPacker
Packer
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
 
Puppet and the HashiCorp Suite
Puppet and the HashiCorp SuitePuppet and the HashiCorp Suite
Puppet and the HashiCorp Suite
 
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
 
A Introduction of Packer
A Introduction of PackerA Introduction of Packer
A Introduction of Packer
 
Rackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & PackerRackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & Packer
 
Ansible fest Presentation slides
Ansible fest Presentation slidesAnsible fest Presentation slides
Ansible fest Presentation slides
 
Learn you some Ansible for great good!
Learn you some Ansible for great good!Learn you some Ansible for great good!
Learn you some Ansible for great good!
 
ILM - Pipeline in the cloud
ILM - Pipeline in the cloudILM - Pipeline in the cloud
ILM - Pipeline in the cloud
 
(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images
 
Packer
Packer Packer
Packer
 
OpenStack Glance
OpenStack GlanceOpenStack Glance
OpenStack Glance
 
Apache Cassandra and Go
Apache Cassandra and GoApache Cassandra and Go
Apache Cassandra and Go
 
Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)
 
Ufo Ship for AWS ECS
Ufo Ship for AWS ECSUfo Ship for AWS ECS
Ufo Ship for AWS ECS
 
Using Ansible for Deploying to Cloud Environments
Using Ansible for Deploying to Cloud EnvironmentsUsing Ansible for Deploying to Cloud Environments
Using Ansible for Deploying to Cloud Environments
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECS
 

Semelhante a Puppet and CloudStack

Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
ke4qqq
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
Hannes Hapke
 

Semelhante a Puppet and CloudStack (20)

Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
ApacheCloudStack
ApacheCloudStackApacheCloudStack
ApacheCloudStack
 
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki
Google Cloud Platform for DeVops, by Javier Ramirez @ teowakiGoogle Cloud Platform for DeVops, by Javier Ramirez @ teowaki
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Reusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modulesReusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modules
 
Just one-shade-of-openstack
Just one-shade-of-openstackJust one-shade-of-openstack
Just one-shade-of-openstack
 
Cutting through the fog of cloud
Cutting through the fog of cloudCutting through the fog of cloud
Cutting through the fog of cloud
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014
 
Using Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresUsing Puppet in Small Infrastructures
Using Puppet in Small Infrastructures
 
Introduction to Apache CloudStack by David Nalley
Introduction to Apache CloudStack by David NalleyIntroduction to Apache CloudStack by David Nalley
Introduction to Apache CloudStack by David Nalley
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 

Mais de ke4qqq

Understanding the CloudStack Release Process
Understanding the CloudStack Release ProcessUnderstanding the CloudStack Release Process
Understanding the CloudStack Release Process
ke4qqq
 
CloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestCloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWest
ke4qqq
 
Bacd zenoss
Bacd zenossBacd zenoss
Bacd zenoss
ke4qqq
 
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStackBuild a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
ke4qqq
 
Successfully deploy build manage your cloud with cloud stack2
Successfully deploy build manage your cloud with cloud stack2Successfully deploy build manage your cloud with cloud stack2
Successfully deploy build manage your cloud with cloud stack2
ke4qqq
 

Mais de ke4qqq (17)

The Tragedy of Open Source
The Tragedy of Open SourceThe Tragedy of Open Source
The Tragedy of Open Source
 
On-demand Continuous Integration with Jenkins, jclouds, and CloudStack
On-demand Continuous Integration with Jenkins, jclouds, and CloudStackOn-demand Continuous Integration with Jenkins, jclouds, and CloudStack
On-demand Continuous Integration with Jenkins, jclouds, and CloudStack
 
Cloud Innovation and Risks
Cloud Innovation and RisksCloud Innovation and Risks
Cloud Innovation and Risks
 
Understanding the CloudStack Release Process
Understanding the CloudStack Release ProcessUnderstanding the CloudStack Release Process
Understanding the CloudStack Release Process
 
ApacheConEU Keynote: What is the value of the Apache Software Foundation
ApacheConEU Keynote: What is the value of the Apache Software FoundationApacheConEU Keynote: What is the value of the Apache Software Foundation
ApacheConEU Keynote: What is the value of the Apache Software Foundation
 
Ceph and Apache CloudStack
Ceph and Apache CloudStackCeph and Apache CloudStack
Ceph and Apache CloudStack
 
It's not tools, Stupid
It's not tools, StupidIt's not tools, Stupid
It's not tools, Stupid
 
DevOps, Cloud, and the Death of Backup Tape Changers
DevOps, Cloud, and the Death of Backup Tape ChangersDevOps, Cloud, and the Death of Backup Tape Changers
DevOps, Cloud, and the Death of Backup Tape Changers
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
 
10 Minute Overview of Apache CloudStack
10 Minute Overview of Apache CloudStack10 Minute Overview of Apache CloudStack
10 Minute Overview of Apache CloudStack
 
CloudStack Intro NYC
CloudStack Intro NYCCloudStack Intro NYC
CloudStack Intro NYC
 
CloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestCloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWest
 
Bacd zenoss
Bacd zenossBacd zenoss
Bacd zenoss
 
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStackBuild a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
 
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStackBuild a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
 
Successfully deploy build manage your cloud with cloud stack2
Successfully deploy build manage your cloud with cloud stack2Successfully deploy build manage your cloud with cloud stack2
Successfully deploy build manage your cloud with cloud stack2
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Puppet and CloudStack

  • 1. Infrastructure as code with Puppet and Apache CloudStack David Nalley <david@gnsa.us> @ke4qqq
  • 2. #whoami • Recovering sysadmin • Apache CloudStack Committer • Designer of ugly slides
  • 3. To set the stage... • Apache CloudStack is... • an open source IaaS platform • proven in production at massive scale • awesome
  • 5. Decent API • EC2 or native • http://incubator.apache.org/cloudstack/docs/api
  • 6. So IaaS removes one constraint.... No longer waiting days/weeks to provision a machine.
  • 7. ...but introduces another constraint.. Now have to get a machine configured in a timely manner.
  • 8. People provision stuff Often not ops folks Often not intimately familiar with intricacies
  • 10. Classification Problem: We spin up, dynamically, 1-500 VMs at any given time - how do we decide what configurations apply.
  • 11. Classification The wrong way - dedicated images for each purpose
  • 14. Classification Everything is default node 'default' { include httpd }
  • 16. Classification Facts class base { case $::fact { 'httpd': { include httpd } 'otherrole': { include nginx } } }
  • 17. One solution During instance provisioning define metadata. Custom fact for that metadata Case statement based on that fact
  • 19. Corresponding class base { manifest case $::fact { 'webserver': { include httpd } 'database': { include postgresql } } }
  • 20. Links, et al Fact: http://s.apache.org/acs_userdata Blog with details: http://s.apache.org/acs_userdata2
  • 21. Video is here, 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
  • 22. And then there was a knife.....plugin • So 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
  • 23. Deploying a machine with knife knife cs server create
  • 24. "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" } ] }
  • 25. Deploy that with... knife cs stack create hadoop_cluster_a
  • 27. 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....
  • 28. 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
  • 29. What we have grown used to Puppet _defines_ the configuration within the machine
  • 31. What we want... Puppet _defines_ the machine
  • 32. What we want... Puppet _defines_ a collection of machines
  • 33. What we want... Puppet _defines_ ALL the machines
  • 34. This even has its own buzzword Software defined datacenter
  • 35. ...and 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-presentation-puppet-conf
  • 36.
  • 37. So then for Christmas... • puppet types and providers arrived - courtesy of Dan Bode • https://github.com/bodepd/cloudstack_resources
  • 38. So 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. Resources/contact Me: David Nalley <david@gnsa.us> @ke4qqq CloudStack: http://cloudstack.org cloudstack-users@incubator.apache.org cloudstack_resources: https://github.com/bodepd/cloudstack_resources Jason Hancock Vids http://youtu.be/c8YWctfOpwo http://youtu.be/8W0BqCmNZQQ