SlideShare a Scribd company logo
Your browser doesn't support the features required by impress.js, so you are presented with a simplified
version of this presentation.
For the best experience please use the latest Chrome or Safari browser. Firefox 10 (to be released soon) will
also handle it.




     Integrating CloudStack With
                                          Puppet

                            Jason Hancock
       jsnbyh@gmail.com
             @jsnby
 http://geek.jasonhancock.com
            May 2012


Goals:
Do NOT use Puppet's auto­signing
feature
Instances receive all config via Puppet
Minimize the number of CloudStack
templates
No manual intervention
Translation:
Make one API call to launch the VM,
the automation takes over and puts
the box into production.


Puppet's auto certificate signing
Allows you to automatically sign any
certificate from a given domain
Exposes a vulnerability because
anyone can now connect and have a
cert signed


Working around auto­signing:
We decided to seed a pre­signed
certificate into the templates. Ran into
a couple of issues though...


   /etc/puppet/puppet.conf on the client:
[gn]
        aet

       ..
        .

       crnm =cmue0
        etae opt01
       nd_ae=fce
        oenm  atr
       nd_aefc =fd
        oenm_at  qn



  The n d _ a e
       o e n m  and n d _ a e f c  settings
                      oenm_at
  were necessary because the Puppet client thought it's
  node name was "compute001".




  Had to modify /etc/puppet/auth.conf on the Puppet
  master. Details about why and what to change found
  in issue 2128:

  #alwndst rtiv teronctlg
    lo oe o eree hi w aao
  #(etercniuain
    i hi ofgrto)
  #ah~^ctlg(^])
  pt    /aao/[/+$
  #ehdfn
  mto id
  #lo $
  alw 1

  #Ti cag alw u t ueacmo
    hs hne los s o s omn
  #criiaears mlil nds
    etfct cos utpe oe.
  pt ~/aao/+
  ah   ctlg.
  alw*
  lo




Enable Puppet to run as soon as
the box starts:
Turn off splay!
chkconfig Puppet on!


Passing a $ : o e
           : r l  (and other facts)
to Puppet.


We use CloudStack's user­data to
store key=value pairs (up to 2KB) that
get loaded into facts on the client


Code to load user­data into facts is
available on Github.


Implementing $ : o e
              : r l  on the
Puppet side.
Everyone is a default node. We don't
have to worry about adding nodes to
site.pp, conforming to a host naming
convention, or adding meta­data to an
ENC.


   Our simplified* site.pp:

            ipr 'ae
             mot bs'

            nd dfut{
             oe eal
              icuebs
               nld ae
            }


   *Irrelevant stuff omitted for clarity




   Excerpts from base.pp:

   casbs {
   ls ae
    ..
     .
    #Icue ta apyt almcie
       nlds ht pl o l ahns
..
        .

       #rl-pcfcicue
          oeseii nlds
       cs $:oe{
        ae :rl
         'oeoe:{
          smrl'
           icuesmrl
            nld oeoe
         }
         'terl' {
          ohroe:
           icueohroe
            nld terl
         }
       }
   }



What about $ : n i o m n ? Don't
            :evrnet
forget dev/qa/staging nodes!


You can pass the environment the
same way we set $::role, by adding
another key/value pair to the user­
data. There is a catch though...


It is impossible to know during the
plugin­sync stage what environment a
node belongs to.
The node will default to whatever's
specified in puppet.conf (or to
production if not specified).


When is this a problem?


When testing new facts/modules.


Shifting gears...Let's talk about
cleanup!


You are using stored configurations to
automatically add nodes to Nagios
(right?)


But now we're working in the cloud.
So we destory/terminate that
instance...


And your phone is blowing up with
Nagios alerts


Compare hosts in Puppet's DB vs.
hosts running in the cloud, removing
any hosts from DB that are no longer
running in the cloud.


Removing from Puppet's DB:
Old way:
puppetstoredconfigclean.rb <hostname>

New way:
puppet node clean <hostname>



A script to call
puppetstoredconfigclean.rb based on
what's running in a CloudStack cloud
can be found on github.


That removed it from puppet's DB.
What about actually cleaning up the
Nagios host?


I have another script that connects to
puppet's DB and removes any host
configurations from the nagios server
that aren't in the DB.


There is a better way...(I just haven't
played with it yet).


"puppet node clean" has an option to
un­export any exported resources.
Un­export the resources and let them
clean themselves up!


This presentation is available at:
https://github.com/jasonhancock/presentation

More Related Content

What's hot (19)

PPTX
Automation with Packer and TerraForm
Wesley Charles Blake
 
PDF
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Isaac Christoffersen
 
PPTX
Building Windows Images with Packer
Matt Wrock
 
PPTX
ILM - Pipeline in the cloud
Aaron Carey
 
PDF
A Introduction of Packer
Freyr Lin
 
PPTX
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
HubSpot Product Team
 
PDF
Usecase examples of Packer
Hiroshi SHIBATA
 
PPTX
Ufo Ship for AWS ECS
Tung Nguyen
 
PPTX
Baking in the cloud with packer and puppet
Alan Parkinson
 
PDF
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Habeeb Rahman
 
PPTX
Intro to Node.js (v1)
Chris Cowan
 
PDF
Packer
Diego Pacheco
 
PDF
Using Ansible for Deploying to Cloud Environments
ahamilton55
 
PPTX
Cyansible
Alan Norton
 
ODP
Bootstrap your Cloud Infrastructure using puppet and hashicorp stack
Bram Vogelaar
 
KEY
fog or: How I Learned to Stop Worrying and Love the Cloud
Wesley Beary
 
PDF
Rackspace Hack Night - Vagrant & Packer
Marc Cluet
 
PPTX
An intro to Docker, Terraform, and Amazon ECS
Yevgeniy Brikman
 
PDF
Ansible testing
Scott van Kalken
 
Automation with Packer and TerraForm
Wesley Charles Blake
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Isaac Christoffersen
 
Building Windows Images with Packer
Matt Wrock
 
ILM - Pipeline in the cloud
Aaron Carey
 
A Introduction of Packer
Freyr Lin
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
HubSpot Product Team
 
Usecase examples of Packer
Hiroshi SHIBATA
 
Ufo Ship for AWS ECS
Tung Nguyen
 
Baking in the cloud with packer and puppet
Alan Parkinson
 
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Habeeb Rahman
 
Intro to Node.js (v1)
Chris Cowan
 
Using Ansible for Deploying to Cloud Environments
ahamilton55
 
Cyansible
Alan Norton
 
Bootstrap your Cloud Infrastructure using puppet and hashicorp stack
Bram Vogelaar
 
fog or: How I Learned to Stop Worrying and Love the Cloud
Wesley Beary
 
Rackspace Hack Night - Vagrant & Packer
Marc Cluet
 
An intro to Docker, Terraform, and Amazon ECS
Yevgeniy Brikman
 
Ansible testing
Scott van Kalken
 

Similar to Integrating cloud stack with puppet (20)

PDF
Puppet - Simple Configuration Management
Mike Rogers
 
PDF
From SaltStack to Puppet and beyond...
Yury Bushmelev
 
PDF
Puppet HackDay/BarCamp New Delhi Exercises
Julie Tsai
 
PPTX
Puppet
John Coggeshall
 
PPTX
Introduction to puppet - Hands on Session at HPI Potsdam
Christoph Oelmüller
 
PDF
SCM Puppet: from an intro to the scaling
Stanislav Osipov
 
PPTX
Puppet for Developers
sagarhere4u
 
ODP
Puppet slides for intelligrape
Sharad Aggarwal
 
PDF
Continuously-Integrated Puppet in a Dynamic Environment
Puppet
 
PPT
Scalable systems management with puppet
Puppet
 
PPT
Scalable Systems Management with Puppet
Puppet
 
PPTX
Puppet in the Pipeline
Anna Kennedy
 
PDF
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
MaxServ
 
KEY
Puppet for dummies - PHPBenelux UG edition
Joshua Thijssen
 
PDF
Creating a mature puppet system
rkhatibi
 
PDF
Creating a Mature Puppet System
Puppet
 
PPTX
Managing and Scaling Puppet - PuppetConf 2014
Puppet
 
PDF
Puppet Deployment at OnApp
Puppet
 
PDF
PuppetCamp SEA 1 - Puppet Deployment at OnApp
OlinData
 
PDF
PuppetCamp SEA 1 - Puppet Deployment at OnApp
Walter Heck
 
Puppet - Simple Configuration Management
Mike Rogers
 
From SaltStack to Puppet and beyond...
Yury Bushmelev
 
Puppet HackDay/BarCamp New Delhi Exercises
Julie Tsai
 
Introduction to puppet - Hands on Session at HPI Potsdam
Christoph Oelmüller
 
SCM Puppet: from an intro to the scaling
Stanislav Osipov
 
Puppet for Developers
sagarhere4u
 
Puppet slides for intelligrape
Sharad Aggarwal
 
Continuously-Integrated Puppet in a Dynamic Environment
Puppet
 
Scalable systems management with puppet
Puppet
 
Scalable Systems Management with Puppet
Puppet
 
Puppet in the Pipeline
Anna Kennedy
 
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
MaxServ
 
Puppet for dummies - PHPBenelux UG edition
Joshua Thijssen
 
Creating a mature puppet system
rkhatibi
 
Creating a Mature Puppet System
Puppet
 
Managing and Scaling Puppet - PuppetConf 2014
Puppet
 
Puppet Deployment at OnApp
Puppet
 
PuppetCamp SEA 1 - Puppet Deployment at OnApp
OlinData
 
PuppetCamp SEA 1 - Puppet Deployment at OnApp
Walter Heck
 
Ad

More from Puppet (20)

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

Recently uploaded (20)

PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 

Integrating cloud stack with puppet