SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Puppet Deployment at OnApp


        Wai Keen Woon
        CTO, CDN Division
        waikeen.woon@onapp.com
WARNING	




<ObligatoryPlug>
About OnApp
       A leading provider of software for hosts



The leading cloud                     The instant global CDN for hosts
management software for
hosts

                   OnApp launched July 1st 2010
                     Deep industry knowledge
                          Backed by LDC
                 100+ employees in US, EU, APAC
Vital Statistics


                   1 in 3
                   public clouds


                 800+
              cloud deployments


                   300+
                   global clients
Customer Stories
Instant CDN that gives you…



75+       PoPs



low       cost, high margin



get       paid for idle capacity
OK.
       	




</ObligatoryPlug>
Systems Overview

l    Core & Development
      l    ~20 physical servers
      l    ~200 VMs
      l    Homogeneous environment – 64-bit Debian everywhere
      l    Mainly use OpenVZ and KVM for virtualization
l    CDN Delivery Edge Servers
      l    100+ servers in 60+ cities
      l    Running on the OnApp platform – either Xen or KVM
l    Puppet integral to our setup – since day 1
Why Puppet?

l    More reliable configuration of servers. Less need to
      “run ssh in a for loop” and miss out something.
l    Self-documenting – our manifests are almost able to
      bootstrap an empty server.
      l    Our manifests can't bootstrap an empty environment yet.
      l    Limitation – manifests describe what/where/how something
            is setup, but doesn't describe *why*.
l    Nice syntax – easy on the eyes. Comprehensive builtin
      resource types. Able to fallback to dumb ways of doing
      things if required (use file, exec et al).
Core Infra Environments

l    Systems manifest describes everything.
l    Three environments:




                         β
What Would OnApp Setup...

l    Essential utilities (tcpdump, less, vim, etc).
l    Users & their SSH keys, sudoers.
      l    Developer's shell => /bin/false if production
l    Base firewall rules.
l    Nagios agent.
l    Set uniform locality settings: UTC timezone,
      en_US.UTF-8 locale.
l    SMTP that smarthosts to our central relay.
l    Syslogd for remote logs to central logging server.
l    Finally, the services.
Core Infra Manifest Excerpt
$portal_domain   = "portal.alpha.onappcdn.com"        node
                                                        "monitoring.alpha.onappcdn.com" {
$portal_db_host = "portal.alpha.onappcdn.com"
                                                           include base
$portal_db_user = "aflexi_webportal"
                                                           include s_db_monitoring
                                                           include s_monitoring_server
$auth_nameservers = { "ns1" => "175.143.72.214",
                                                           include collectd::rrdcached
                         "ns2" => "175.143.72.214",
                                                           include s_munin
                         "ns3" => "175.143.72.214",
                                                           include s_monitoring_alerts
                         "ns4" => "175.143.72.214",
                                                           include s_monitoring_graph
                     }
                                                      }

$monitoring_host_server =                                 class collectd::rrdcached {
                                                           package { "rrdcached":
      [ "monitoring.alpha.onappcdn.com",
        "dns.alpha.onappcdn.com" ]                             ensure     => latest,
                                                           }
                                                           service { "rrdcached":
 BLUE       – env config definitions                           ensure     => running,
 RED            – node definitions                         }
 GREEN – class definitions                            }
Package Repo Integration

l    Jenkins builds debs of our code and stores it into an apt
      repository for the environment it is built for.
l    Puppet keeps packages up-to-date (ensure => latest)
      and restarts services on package upgrades.
      Puppet-agent[25431]:
      (/Stage[main]/Debian/Exec[apt-get-update]/returns) executed
      successfully

      puppet-agent[25431]:
      (/Stage[main]/Python::Aflexi::Mq/Package[python-aflexi-mqcore]/
      ensure)
      ensure changed '7065.20120530.113915-1' to '7066.20120604.090916-1'

      puppet-agent[25431]:
      (/Stage[main]/S_mq/Service[worker-rabbitmq])
      Triggered 'refresh' from 1 events

      puppet-agent[25431]: Finished catalog run in 16.08 seconds
Nagios Integration

l    Plugs into nagios – uses “exported resources”
Nagios Integration

Server manifest                           Nagios service manifest
                                           *collects the resources to check
 *exports the service that is checked


 @@nagios_service { "check_load_$fqdn":    Nagios_service <<| tag == "onappcdn.cm" |>>
                                           {
check_command =>                             target => "/etc/n3/conf.d/services.cfg",
         "check_nrpe_1arg!check_load",       require => Package["nagios3"],
   use           => "generic-service",       notify => Exec["reload-nagios"],
   host_name     => $fqdn,                 }
   service_description => "check_load",
   tag                 => $domain,
 }
Nagios Integration

l    What's logged on the nagios server when puppet runs?
      puppet-agent[15293]: (/Stage[main]/Nagios::Monitor_private/
      Nagios_host[hrm.onappcdn.com]/ensure) created

      puppet-agent[15293]: (/Stage[main]/Nagios::Monitor_private/
      Nagios_service[check_load_hrm.onappcdn.com]/ensure) created

      nagios3: Nagios 3.2.1 starting... (PID=5601)

      puppet-agent[15293]: (/Stage[main]/Nagios::Base/Exec[reload-
      nagios]) Triggered 'refresh' from 8 events
Monitoring Puppet Itself

l    Lots of tools/dashboards out there to achieve this.
l    For us: “grep -i err */syslog”. Dumb, but works until we
      need to Really Address it.
l    Common issues:
      l  Puppet gets “stuck”. And only one puppet instance

          can run at any one time.
      l  Manifest errors – syntax, merge issues.


      l  Badly-written manifests (vague dependencies,

          conditions/commands not robust enough).
      l  An important dependent resource failing (e.g. apt-get

          install fails due to dpkg-configure error).
File/Dir Organization

l    We use git to revision control our                                   l    Common branch
                                                                                  Manifests/
      puppet manifests.                                                                alpha.pp
                                                                                       beta.pp
l    Style we adopted mainly comes                                               Modules/
                                                                                       Base/
      from Hunter Haugen*                                                              Users/
l    A branch for each environment,                                       l    Alpha env branch
                                                                                   Modules/
      plus a “common” branch.                                                           Python/
                                                                                   Services/
l    Each branch checked out as a                                                      Nameserver/
      separate directory in /etc/puppet/                                   l    Beta env branch
      environments/$env                                                            Modules/
                                                                                        Python/
l    And puppetmaster's includedir                                                Services/
                                                                                        Nameserver/
      configured to that directory.
       * - http://hunnur.com/blog/2010/10/dynamic-git-branch-puppet-environments/
File/Dir Organization

l    Common goes into its own branch – for convenience;
      less merging needed for manifests that we are Really
      Sure won't differ between environments.
l    System manifest into common/manifests/$env.pp
      l    Initially tried putting manifest into alpha/beta/omega
            branches as site.pp – merge hell.
l    Introduced extra variable - $effective_env
      l    Abstracts the puppet environment name, from the
            environment that the manifest runs in.
File/Dir Organization

l    Hotfixes branch off omega and merged to alpha/beta/
      omega.
l    Development branches off alpha
      l    This branch can be trialed as a separate environment (use
            --environment to specify custom env on puppet client).
      l    Merge to alpha → beta → omega.
      l    Or merge as feature branch to any other environment.
l    “git diff branchA branchB” - differences are shown
      clearly between environments.
Edge Servers

l    Our edge servers are hosted on OnApp cloud (only).
l    When creating an edge server, the cloud control panel
      l    Instantiates a VM from a lightly-customized Debian image.
      l    Configures the package repositories.
      l    Issues a puppet run to set up.
l    Advantage of setting it up through puppet instead of a
      “gold image” - our system can be installed on bare
      metal if needed, can be reproducibly installed on
      $future_debian_release
Edge Servers

l    Our edge servers are hosted on OnApp cloud (only).
l    When creating an edge server, the control panel
      instantiates a VM from a lightly-customized Debian
      image, and issues a puppet run to set it up.
Edge Servers – External Node Classifier

l    No text manifest – all code, using “external node
      classifier”.
l    Assign variables and classes specific to the edge
      server through node classifier. E.g. its password, the
      services it runs.
l    In python,

          output = {}
          output[“classes”] = [ “class1”, “class2” ]
          output[“parameters”] = { “param1”: “value1” }
          print yaml.dump(output)
Edge Servers – External Node Classifier

l    This YAML-encoded structure...
      $ puppet-nodeclassifier 85206671.onappcdn.com

      classes: [base, nginx ]
      parameters: { edge_secret_key: 86zFsrM7Ma, monitoring_domain:
      monitoring.alpha.onappcdn.com }


l    … is equivalent to this textual manifest:
      node 85206671.onappcdn.com {
        $edge_secret_key = “86zFsrM7Ma”
        $monitoring_domain = “monitoring.alpha.onappcdn.com”
        include base
        include nginx
      }
Edge Servers Storedconfigs

l    Puppet stores facts about the edge servers into
      MySQL.
l    We make minimal use of this – for example sizing
      nginx's in-memory cache depending on the amount of
      memory it has.
l    Could probably use more e.g. set # threads based on
      cpu core count.
l    The data's always there if we ever want to query it...
Q&A

l    Questions? Comments?


l    P/S – final plug – we're hiring sysadmins!
Puppet Deployment at OnApp

Más contenido relacionado

La actualidad más candente

Using puppet
Using puppetUsing puppet
Using puppetAlex Su
 
Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Martin Alfke
 
Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With RpmMartin Jackson
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operationsgrim_radical
 
Puppet slides for intelligrape
Puppet slides for intelligrapePuppet slides for intelligrape
Puppet slides for intelligrapeSharad Aggarwal
 
Making Your Capistrano Recipe Book
Making Your Capistrano Recipe BookMaking Your Capistrano Recipe Book
Making Your Capistrano Recipe BookTim Riley
 
Eclipse HandsOn Workshop
Eclipse HandsOn WorkshopEclipse HandsOn Workshop
Eclipse HandsOn WorkshopBastian Feder
 
OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2Amar Kapadia
 
Modules reduce reuse_recycle
Modules reduce reuse_recycleModules reduce reuse_recycle
Modules reduce reuse_recycleDaniel Kendrick
 
Puppet Camp DC 2014: Managing Puppet with MCollective
Puppet Camp DC 2014: Managing Puppet with MCollectivePuppet Camp DC 2014: Managing Puppet with MCollective
Puppet Camp DC 2014: Managing Puppet with MCollectivePuppet
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksCarlos Sanchez
 
Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010isnull
 

La actualidad más candente (19)

Using puppet
Using puppetUsing puppet
Using puppet
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
 
Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?
 
Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With Rpm
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Puppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutesPuppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutes
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operations
 
Puppet slides for intelligrape
Puppet slides for intelligrapePuppet slides for intelligrape
Puppet slides for intelligrape
 
Dockerize All The Things
Dockerize All The ThingsDockerize All The Things
Dockerize All The Things
 
Making Your Capistrano Recipe Book
Making Your Capistrano Recipe BookMaking Your Capistrano Recipe Book
Making Your Capistrano Recipe Book
 
Getting Started With Aura
Getting Started With AuraGetting Started With Aura
Getting Started With Aura
 
Eclipse HandsOn Workshop
Eclipse HandsOn WorkshopEclipse HandsOn Workshop
Eclipse HandsOn Workshop
 
OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2
 
Modules reduce reuse_recycle
Modules reduce reuse_recycleModules reduce reuse_recycle
Modules reduce reuse_recycle
 
Build Automation 101
Build Automation 101Build Automation 101
Build Automation 101
 
Puppet Camp DC 2014: Managing Puppet with MCollective
Puppet Camp DC 2014: Managing Puppet with MCollectivePuppet Camp DC 2014: Managing Puppet with MCollective
Puppet Camp DC 2014: Managing Puppet with MCollective
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
 
Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010
 

Destacado

Building an IaaS cloud
Building an IaaS cloudBuilding an IaaS cloud
Building an IaaS cloudFlexiant
 
Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...
Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...
Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...How to Web
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Puppet
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternPuppet
 
PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...
PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...
PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...Jonas Rosland
 
CoreOS 101 - EMC World 2015
CoreOS 101 - EMC World 2015CoreOS 101 - EMC World 2015
CoreOS 101 - EMC World 2015Jonas Rosland
 

Destacado (7)

Building an IaaS cloud
Building an IaaS cloudBuilding an IaaS cloud
Building an IaaS cloud
 
Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...
Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...
Paul Ford, Vice President, Softlayer - The SoftLayer Story – Building the wor...
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles Pattern
 
PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...
PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...
PuppetCamp Amsterdam 2013 - Automated OS and App deployment using Puppet and ...
 
CoreOS 101 - EMC World 2015
CoreOS 101 - EMC World 2015CoreOS 101 - EMC World 2015
CoreOS 101 - EMC World 2015
 

Similar a Puppet Deployment at OnApp

Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
One click deployment
One click deploymentOne click deployment
One click deploymentAlex Su
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to AnsibleCédric Delgehier
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012Carlos Sanchez
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with PuppetAlessandro Franceschi
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011Carlos Sanchez
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOpsAgile Spain
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to KubernetesPaul Czarkowski
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetOmar Reygaert
 
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 2013Cosimo Streppone
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...Puppet
 
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Puppet
 
Building Docker images with Puppet
Building Docker images with PuppetBuilding Docker images with Puppet
Building Docker images with PuppetNick Jones
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
Node.js basics
Node.js basicsNode.js basics
Node.js basicsBen Lin
 

Similar a Puppet Deployment at OnApp (20)

Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
One click deployment
One click deploymentOne click deployment
One click deployment
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with Puppet
 
Puppet
PuppetPuppet
Puppet
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
Puppet quick start guide
Puppet quick start guidePuppet quick start guide
Puppet quick start guide
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
 
DevOps Braga #6
DevOps Braga #6DevOps Braga #6
DevOps Braga #6
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
 
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
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
 
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
 
Building Docker images with Puppet
Building Docker images with PuppetBuilding Docker images with Puppet
Building Docker images with Puppet
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
 

Más de Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyamlPuppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)Puppet
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscodePuppet
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codePuppet
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approachPuppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationPuppet
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliancePuppet
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowPuppet
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Puppet
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppetPuppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkPuppet
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping groundPuppet
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy SoftwarePuppet
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User GroupPuppet
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsPuppet
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 

Más de Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Último

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...apidays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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 SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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 Scriptwesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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 AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Último (20)

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...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Puppet Deployment at OnApp

  • 1. Puppet Deployment at OnApp Wai Keen Woon CTO, CDN Division waikeen.woon@onapp.com
  • 3. About OnApp A leading provider of software for hosts The leading cloud The instant global CDN for hosts management software for hosts OnApp launched July 1st 2010 Deep industry knowledge Backed by LDC 100+ employees in US, EU, APAC
  • 4. Vital Statistics 1 in 3 public clouds 800+ cloud deployments 300+ global clients
  • 6. Instant CDN that gives you… 75+ PoPs low cost, high margin get paid for idle capacity
  • 7. OK. </ObligatoryPlug>
  • 8. Systems Overview l  Core & Development l  ~20 physical servers l  ~200 VMs l  Homogeneous environment – 64-bit Debian everywhere l  Mainly use OpenVZ and KVM for virtualization l  CDN Delivery Edge Servers l  100+ servers in 60+ cities l  Running on the OnApp platform – either Xen or KVM l  Puppet integral to our setup – since day 1
  • 9. Why Puppet? l  More reliable configuration of servers. Less need to “run ssh in a for loop” and miss out something. l  Self-documenting – our manifests are almost able to bootstrap an empty server. l  Our manifests can't bootstrap an empty environment yet. l  Limitation – manifests describe what/where/how something is setup, but doesn't describe *why*. l  Nice syntax – easy on the eyes. Comprehensive builtin resource types. Able to fallback to dumb ways of doing things if required (use file, exec et al).
  • 10. Core Infra Environments l  Systems manifest describes everything. l  Three environments: β
  • 11. What Would OnApp Setup... l  Essential utilities (tcpdump, less, vim, etc). l  Users & their SSH keys, sudoers. l  Developer's shell => /bin/false if production l  Base firewall rules. l  Nagios agent. l  Set uniform locality settings: UTC timezone, en_US.UTF-8 locale. l  SMTP that smarthosts to our central relay. l  Syslogd for remote logs to central logging server. l  Finally, the services.
  • 12. Core Infra Manifest Excerpt $portal_domain = "portal.alpha.onappcdn.com" node "monitoring.alpha.onappcdn.com" { $portal_db_host = "portal.alpha.onappcdn.com" include base $portal_db_user = "aflexi_webportal" include s_db_monitoring include s_monitoring_server $auth_nameservers = { "ns1" => "175.143.72.214", include collectd::rrdcached "ns2" => "175.143.72.214", include s_munin "ns3" => "175.143.72.214", include s_monitoring_alerts "ns4" => "175.143.72.214", include s_monitoring_graph } } $monitoring_host_server = class collectd::rrdcached { package { "rrdcached": [ "monitoring.alpha.onappcdn.com", "dns.alpha.onappcdn.com" ] ensure => latest, } service { "rrdcached": BLUE – env config definitions ensure => running, RED – node definitions } GREEN – class definitions }
  • 13. Package Repo Integration l  Jenkins builds debs of our code and stores it into an apt repository for the environment it is built for. l  Puppet keeps packages up-to-date (ensure => latest) and restarts services on package upgrades. Puppet-agent[25431]: (/Stage[main]/Debian/Exec[apt-get-update]/returns) executed successfully puppet-agent[25431]: (/Stage[main]/Python::Aflexi::Mq/Package[python-aflexi-mqcore]/ ensure) ensure changed '7065.20120530.113915-1' to '7066.20120604.090916-1' puppet-agent[25431]: (/Stage[main]/S_mq/Service[worker-rabbitmq]) Triggered 'refresh' from 1 events puppet-agent[25431]: Finished catalog run in 16.08 seconds
  • 14. Nagios Integration l  Plugs into nagios – uses “exported resources”
  • 15. Nagios Integration Server manifest Nagios service manifest *collects the resources to check *exports the service that is checked @@nagios_service { "check_load_$fqdn": Nagios_service <<| tag == "onappcdn.cm" |>> { check_command => target => "/etc/n3/conf.d/services.cfg", "check_nrpe_1arg!check_load", require => Package["nagios3"], use => "generic-service", notify => Exec["reload-nagios"], host_name => $fqdn, } service_description => "check_load", tag => $domain, }
  • 16. Nagios Integration l  What's logged on the nagios server when puppet runs? puppet-agent[15293]: (/Stage[main]/Nagios::Monitor_private/ Nagios_host[hrm.onappcdn.com]/ensure) created puppet-agent[15293]: (/Stage[main]/Nagios::Monitor_private/ Nagios_service[check_load_hrm.onappcdn.com]/ensure) created nagios3: Nagios 3.2.1 starting... (PID=5601) puppet-agent[15293]: (/Stage[main]/Nagios::Base/Exec[reload- nagios]) Triggered 'refresh' from 8 events
  • 17. Monitoring Puppet Itself l  Lots of tools/dashboards out there to achieve this. l  For us: “grep -i err */syslog”. Dumb, but works until we need to Really Address it. l  Common issues: l  Puppet gets “stuck”. And only one puppet instance can run at any one time. l  Manifest errors – syntax, merge issues. l  Badly-written manifests (vague dependencies, conditions/commands not robust enough). l  An important dependent resource failing (e.g. apt-get install fails due to dpkg-configure error).
  • 18. File/Dir Organization l  We use git to revision control our l  Common branch Manifests/ puppet manifests. alpha.pp beta.pp l  Style we adopted mainly comes Modules/ Base/ from Hunter Haugen* Users/ l  A branch for each environment, l  Alpha env branch Modules/ plus a “common” branch. Python/ Services/ l  Each branch checked out as a Nameserver/ separate directory in /etc/puppet/ l  Beta env branch environments/$env Modules/ Python/ l  And puppetmaster's includedir Services/ Nameserver/ configured to that directory. * - http://hunnur.com/blog/2010/10/dynamic-git-branch-puppet-environments/
  • 19. File/Dir Organization l  Common goes into its own branch – for convenience; less merging needed for manifests that we are Really Sure won't differ between environments. l  System manifest into common/manifests/$env.pp l  Initially tried putting manifest into alpha/beta/omega branches as site.pp – merge hell. l  Introduced extra variable - $effective_env l  Abstracts the puppet environment name, from the environment that the manifest runs in.
  • 20. File/Dir Organization l  Hotfixes branch off omega and merged to alpha/beta/ omega. l  Development branches off alpha l  This branch can be trialed as a separate environment (use --environment to specify custom env on puppet client). l  Merge to alpha → beta → omega. l  Or merge as feature branch to any other environment. l  “git diff branchA branchB” - differences are shown clearly between environments.
  • 21. Edge Servers l  Our edge servers are hosted on OnApp cloud (only). l  When creating an edge server, the cloud control panel l  Instantiates a VM from a lightly-customized Debian image. l  Configures the package repositories. l  Issues a puppet run to set up. l  Advantage of setting it up through puppet instead of a “gold image” - our system can be installed on bare metal if needed, can be reproducibly installed on $future_debian_release
  • 22. Edge Servers l  Our edge servers are hosted on OnApp cloud (only). l  When creating an edge server, the control panel instantiates a VM from a lightly-customized Debian image, and issues a puppet run to set it up.
  • 23. Edge Servers – External Node Classifier l  No text manifest – all code, using “external node classifier”. l  Assign variables and classes specific to the edge server through node classifier. E.g. its password, the services it runs. l  In python, output = {} output[“classes”] = [ “class1”, “class2” ] output[“parameters”] = { “param1”: “value1” } print yaml.dump(output)
  • 24. Edge Servers – External Node Classifier l  This YAML-encoded structure... $ puppet-nodeclassifier 85206671.onappcdn.com classes: [base, nginx ] parameters: { edge_secret_key: 86zFsrM7Ma, monitoring_domain: monitoring.alpha.onappcdn.com } l  … is equivalent to this textual manifest: node 85206671.onappcdn.com { $edge_secret_key = “86zFsrM7Ma” $monitoring_domain = “monitoring.alpha.onappcdn.com” include base include nginx }
  • 25. Edge Servers Storedconfigs l  Puppet stores facts about the edge servers into MySQL. l  We make minimal use of this – for example sizing nginx's in-memory cache depending on the amount of memory it has. l  Could probably use more e.g. set # threads based on cpu core count. l  The data's always there if we ever want to query it...
  • 26. Q&A l  Questions? Comments? l  P/S – final plug – we're hiring sysadmins!