SlideShare una empresa de Scribd logo
1 de 53
Automating CloudStack with Puppet



      Puppet Camp Silicon Valley
             David Nalley
           david@gnsa.us
              @ke4qqq
#whoami

    Recovering sysadmin

    Committer on Apache CloudStack

    Fedora Project Contributor

    Fan of “The Phoenix Project”
The plan

    Overview of Apache CloudStack

    Using puppet to manage your CloudStack-based VMs

    Using puppet to manage your VM deployment.
What is CloudStack?

    Open source IaaS platform

    ASLv2 licensed

    History tl;dr
    −   began development in 2008
    −   production deployments by 2009
    −   open sourced in 2010
    −   moved to ASF in 2012
Design goals

    Integrate with untold number of yet to be identified hardware.

    Provide an API platform on which to run cloud operations.

    Orchestrate hardware resources that may be protected by a
    firewall.

    Horizontally scalable management layer.

    Enable the best data paths to accomplish cloud operations.

    A beautiful and functional UI
Architectural Overview

    Division of physical resources

    Storage

    Borg drones VMs

    Networking

    Management and orchestration
Physical hosts

    Hypervisors
    −   KVM
    −   Xenserver
    −   XCP
    −   VMware

    Baremetal (with IPMI)
Clusters

    Collections of hosts

    Typically 1-15 hosts in a cluster

    Homogenity
    −   Network
    −   Hypervisor
    −   CPU type
Clusters

    Hosts share storage

    Fault domain for individual VM availability

    Lowest level for allocation decisions
Pods

    Collection of clusters

    Typically a rack or row of racks

    Can contain multiple types of hypervisors

    Largely just an arbitrary division
Zones

    Typically a datacenter

    Single networking model within a zone

    Visible to the end user
Storage

    CloudStack doesn't really provide storage, but does consume
    and orchestrate it.
Local Storage

    Typically faster than SAN/NAS

    Failure of a host means loss of a VM

    Can be far more scalable than trying to scale a large traditional
    storage platform
Primary (shared) storage

    Shared at the cluster level

    Where running disk images live

    All hosts in the cluster can write to the resource

    Most commonly NFS and iSCSI, but essentially anything the
    hypervisor can mount

    'New' storage types like Ceph RBD
Secondary Storage

    Primary storage is focused on running VMs, Secondary
    storage is focused on immutable items.
    −   Snapshots
    −   Disk images
    −   ISOs

    Zone wide storage resource

    Can employ object storage
Borg drone VMs
Console Proxy VM

    AJAX-based VNC console access

    Allows CloudStack to deal with auth{n,z} for console access.

    Abstracts away hypervisor access

    Not a replacement for ssh/RDP but no more painful than
    DRAC/iLO

    Stateless; horizontally scalable
Secondary Storage VM

    Secondary Storage is the resource, the SSVM that handles the following operations:
    −   Copying snapshots from primary to secondary storage
    −   Copying disk images from secondary to primary storage
    −   Making all items stored in secondary storage downloadable and a place to
        transfer items into secondary storage
    −   Aging the snapshots according to policy
Networking Model: VLANs

    Traditional L2 isolation

    CloudStack given a block of VLANs and allocates them on
    demand

    Each account gets allocated at least one VLAN.

    Inherent limitations of VLANs
Networking model: L3 Isolation

    L3 isolation; aka Security Groups

    Pushes ACLs down to each hypervisor host

    Far more scalable, decentralized (more Borg)

    Filter at the bridge device
Security Groups
Security Groups
Network Model: SDN

    OVS (GRE overlay tunnels)

    Nicira NVP

    Others rapidly appearing:
    −   BigSwitch
    −   Midokura
Virtual networking hardware

    DHCP

    VLAN allocation

    Firewall

    NAT/Port forwarding

    Routing

    VPN

    Load Balancing
Virtual networking hardware

    Cisco Nexus 1000v

    NetScaler VPX

    F5 Big IP virtual edition
Physical networking hardware

    Juniper SRX

    F5 BigIP LB

    NetScaler
Management Server

    Management server is stateless, horizontally scalable platform
    for orchestrating all of the resources.

    Provides isolation in what is assumed to be a multi-tenant
    environment
UI
API

    EC2/S3 translation layer

    CloudStack native API:
    −   http://incubator.apache.org/cloudstack/docs/api
More info

    http://incubator.apache.org/cloudstack

    #cloudstack on irc.freenode.net

    cloudstack-users-subscribe@incubator.apache.org
Using puppet to manage VMs

    Being able to deploy 500 VMs in 10 minutes means you need
    some method to classify and apply configuration management.

    Most of the work for this awesomeness was done by Jason
    Hancock (@jsnby)
A couple of upfront goals

    Minimize the number of templates

    Have all instances receive config via Puppet

    Zero manual intervention
Make one API call to launch a VM, and get out of the way and
 watch the automation do wonderful things.
A word about auto-signing

    You can use auto-signing.

    Automatically signs any cert from a given domain

    Potential security issues if folks can connect to your
    puppetmaster

    You can pre-seed templates with a signed key - but there are
    gotchas
Run puppet ASAP

    Turn off splay - you want to minimize the time that the box
    remains unconfigured.

    Make sure puppet is configured to start on boot (enable the
    service, not cron)
Classifying nodes - options

    {site,node}.pp

    hostname-based regex

    PE/Dashboard

    ENC

    facts

    $other_things
facts
What to base a fact on...
           http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/user/deployVirtualMachine.html


userdata                                                 an optional binary data that can be sent to the virtual
                                                         machine upon a successful deployment. This binary data
                                                         must be base64 encoded before adding it to the request.
                                                         Currently only HTTP GET is supported. Using HTTP GET
                                                         (via querystring), you can send up to 2KB of data after
                                                         base64 encoding.
Sample userdata
role=webserver
location=datacenter1
environment=production
Custom fact for userdata

    http://s.apache.org/acs_userdata
Implementing ::role in puppet
Everyone is a default node.
No need to add nodes to site.pp or use an ENC.
Sample, skeletonized, site.pp
import 'base'


node default {
    include base
}
Sample, skeletonized, base.pp
class base.pp {
 # Includes that apply to all machines


 case $::role {
  'somerole': {
      include somemodule
  }
  'otherrole': {
      include someothermodule
  }
This is only the beginning...

    Setting environment, purging terminated instances, and more.

    Check out Jason's blog: http://geek.jasonhancock.com
Making puppet deploy your infrastructure in
                   CloudStack

    Most of the real work that follows was done by Dan Bode.
deployVirtualMachine API

    CloudStack provides an API for provisioning machines.
Puppet...

    converts freshly provisioned VMs into functional machines
    ready to do work.
When combined....
you can start from nothing, deploy the machines and wind up
 with a completely automated deployment system.
CloudStack resources in puppet
https://github.com/bodepd/cloudstack_resources


Still a bit raw....potentially unstable, use with caution, file bug
 reports and patches.
Defining application stacks
class my_app_stack {
 cloudstack_instance {'web1':
     ensure => present,
     group   => 'role=web',
 }
 cloudstack_instance {'db1':
     ensure => present,
     group   => 'role=db',
 }
Setting defaults
Cloudstack_instance {
    image    => 'Fedora18_x86_64',
    flavor   => 'm1.medium',
    zone     => 'SanJose',
    network => 'default own',
    keypair => 'my_secret_keypair',
}
cloudstack_instance { 'web1':
    ensure => $::ensure,
Now machines and their configuration are deployable all from
 puppet.


(This also exists for GCE and OpenNebula.)
Automating Your CloudStack Cloud with Puppet

Más contenido relacionado

La actualidad más candente

Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzurePatrick Chanezon
 
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...Corley S.r.l.
 
CloudStack-Developer-Day
CloudStack-Developer-DayCloudStack-Developer-Day
CloudStack-Developer-DayKimihiko Kitase
 
Ironic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentIronic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentDevananda Van Der Veen
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorAnil Madhavapeddy
 
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)Isn't it ironic - managing a bare metal cloud (OSL TES 2015)
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)Devananda Van Der Veen
 
Scaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersScaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersThe Linux Foundation
 
Scaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoScaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoVali-Marius Malinoiu
 
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA ArchitectureRed Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA ArchitectureEtsuji Nakai
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureJérôme Petazzoni
 
Scalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache HadoopScalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache HadoopChiradeep Vittal
 
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 Nalleybuildacloud
 
Andrija Panic - Ceph with CloudStack
Andrija Panic - Ceph with CloudStackAndrija Panic - Ceph with CloudStack
Andrija Panic - Ceph with CloudStackShapeBlue
 
Cassandra and docker
Cassandra and dockerCassandra and docker
Cassandra and dockerBen Bromhead
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 

La actualidad más candente (20)

Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
 
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
 
CloudStack-Developer-Day
CloudStack-Developer-DayCloudStack-Developer-Day
CloudStack-Developer-Day
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Ironic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentIronic - A modern approach to machine deployment
Ironic - A modern approach to machine deployment
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library Hypervisor
 
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)Isn't it ironic - managing a bare metal cloud (OSL TES 2015)
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)
 
CloudStack Architecture
CloudStack ArchitectureCloudStack Architecture
CloudStack Architecture
 
Scaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersScaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud Servers
 
Scaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoScaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and Presto
 
Cloud stack for_beginners
Cloud stack for_beginnersCloud stack for_beginners
Cloud stack for_beginners
 
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA ArchitectureRed Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
 
Apache CloudStack from API to UI
Apache CloudStack from API to UIApache CloudStack from API to UI
Apache CloudStack from API to UI
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and Azure
 
Scalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache HadoopScalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache Hadoop
 
Xen and Apache cloudstack
Xen and Apache cloudstack  Xen and Apache cloudstack
Xen and Apache cloudstack
 
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
 
Andrija Panic - Ceph with CloudStack
Andrija Panic - Ceph with CloudStackAndrija Panic - Ceph with CloudStack
Andrija Panic - Ceph with CloudStack
 
Cassandra and docker
Cassandra and dockerCassandra and docker
Cassandra and docker
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 

Destacado

PuppetConf 2016: Puppet & Azure – Kenaz Kwa, Puppet
PuppetConf 2016: Puppet & Azure – Kenaz Kwa, PuppetPuppetConf 2016: Puppet & Azure – Kenaz Kwa, Puppet
PuppetConf 2016: Puppet & Azure – Kenaz Kwa, PuppetPuppet
 
Monitoring in the cloud with Puppet
Monitoring in the cloud with PuppetMonitoring in the cloud with Puppet
Monitoring in the cloud with PuppetKris Buytaert
 
Chef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do It
Chef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do ItChef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do It
Chef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do ItRightScale
 
(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...
(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...
(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...Amazon Web Services
 
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...Puppet
 
Getting Started with AWS Security
 Getting Started with AWS Security Getting Started with AWS Security
Getting Started with AWS SecurityAmazon Web Services
 
Large-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCLarge-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCAmazon Web Services
 
What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.Apigee | Google Cloud
 
Architecting for Greater Security on AWS
Architecting for Greater Security on AWSArchitecting for Greater Security on AWS
Architecting for Greater Security on AWSAmazon Web Services
 

Destacado (10)

PuppetConf 2016: Puppet & Azure – Kenaz Kwa, Puppet
PuppetConf 2016: Puppet & Azure – Kenaz Kwa, PuppetPuppetConf 2016: Puppet & Azure – Kenaz Kwa, Puppet
PuppetConf 2016: Puppet & Azure – Kenaz Kwa, Puppet
 
Monitoring in the cloud with Puppet
Monitoring in the cloud with PuppetMonitoring in the cloud with Puppet
Monitoring in the cloud with Puppet
 
Chef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do It
Chef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do ItChef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do It
Chef vs. Puppet in the Cloud: How Telepictures and MoneySuperMarket Do It
 
(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...
(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...
(ARC203) Expanding Your Data Center with Hybrid Infrastructure | AWS re:Inven...
 
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
 
Getting Started with AWS Security
 Getting Started with AWS Security Getting Started with AWS Security
Getting Started with AWS Security
 
Large-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCLarge-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSC
 
What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.
 
Architecting for Greater Security on AWS
Architecting for Greater Security on AWSArchitecting for Greater Security on AWS
Architecting for Greater Security on AWS
 
AWS Direct Connect
AWS Direct ConnectAWS Direct Connect
AWS Direct Connect
 

Similar a Automating Your CloudStack Cloud with Puppet

Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyPuppet
 
Chef and Apache CloudStack (ChefConf 2014)
Chef and Apache CloudStack (ChefConf 2014)Chef and Apache CloudStack (ChefConf 2014)
Chef and Apache CloudStack (ChefConf 2014)Jeff Moody
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platformnirajrules
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISORVanika Kapoor
 
Docker Based Hadoop Provisioning
Docker Based Hadoop ProvisioningDocker Based Hadoop Provisioning
Docker Based Hadoop ProvisioningDataWorks Summit
 
CloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief Comparison
CloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief ComparisonCloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief Comparison
CloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief Comparisonbizalgo
 
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18The lies we tell our code, LinuxCon/CloudOpen 2015-08-18
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18Casey Bisson
 
CloudStack Build A Cloud Day (SCaLE 2013)
CloudStack Build A Cloud Day (SCaLE 2013)CloudStack Build A Cloud Day (SCaLE 2013)
CloudStack Build A Cloud Day (SCaLE 2013)Clayton Weise
 
The Lies We Tell Our Code (#seascale 2015 04-22)
The Lies We Tell Our Code (#seascale 2015 04-22)The Lies We Tell Our Code (#seascale 2015 04-22)
The Lies We Tell Our Code (#seascale 2015 04-22)Casey Bisson
 
Getting Started with Apache CloudStack
Getting Started with Apache CloudStackGetting Started with Apache CloudStack
Getting Started with Apache CloudStackJoe Brockmeier
 
CloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestCloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestke4qqq
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Jérôme Petazzoni
 
Silicon Valley CloudStack User Group - Introduction to Apache CloudStack
Silicon Valley CloudStack User Group - Introduction to Apache CloudStackSilicon Valley CloudStack User Group - Introduction to Apache CloudStack
Silicon Valley CloudStack User Group - Introduction to Apache CloudStackShapeBlue
 
Docker based Hadoop provisioning - Hadoop Summit 2014
Docker based Hadoop provisioning - Hadoop Summit 2014 Docker based Hadoop provisioning - Hadoop Summit 2014
Docker based Hadoop provisioning - Hadoop Summit 2014 Janos Matyas
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSDocker, Inc.
 

Similar a Automating Your CloudStack Cloud with Puppet (20)

Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
 
Chef and Apache CloudStack (ChefConf 2014)
Chef and Apache CloudStack (ChefConf 2014)Chef and Apache CloudStack (ChefConf 2014)
Chef and Apache CloudStack (ChefConf 2014)
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
Deltacloud API
Deltacloud APIDeltacloud API
Deltacloud API
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
 
vBACD - Deploying Infrastructure-as-a-Service with CloudStack - 2/28
vBACD - Deploying Infrastructure-as-a-Service with CloudStack - 2/28vBACD - Deploying Infrastructure-as-a-Service with CloudStack - 2/28
vBACD - Deploying Infrastructure-as-a-Service with CloudStack - 2/28
 
Docker Based Hadoop Provisioning
Docker Based Hadoop ProvisioningDocker Based Hadoop Provisioning
Docker Based Hadoop Provisioning
 
CloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief Comparison
CloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief ComparisonCloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief Comparison
CloudStack vs OpenStack vs Eucalyptus: IaaS Private Cloud Brief Comparison
 
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18The lies we tell our code, LinuxCon/CloudOpen 2015-08-18
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18
 
CloudStack Build A Cloud Day (SCaLE 2013)
CloudStack Build A Cloud Day (SCaLE 2013)CloudStack Build A Cloud Day (SCaLE 2013)
CloudStack Build A Cloud Day (SCaLE 2013)
 
The Lies We Tell Our Code (#seascale 2015 04-22)
The Lies We Tell Our Code (#seascale 2015 04-22)The Lies We Tell Our Code (#seascale 2015 04-22)
The Lies We Tell Our Code (#seascale 2015 04-22)
 
Getting Started with Apache CloudStack
Getting Started with Apache CloudStackGetting Started with Apache CloudStack
Getting Started with Apache CloudStack
 
CloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestCloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWest
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...
 
aws.ppt
aws.pptaws.ppt
aws.ppt
 
Silicon Valley CloudStack User Group - Introduction to Apache CloudStack
Silicon Valley CloudStack User Group - Introduction to Apache CloudStackSilicon Valley CloudStack User Group - Introduction to Apache CloudStack
Silicon Valley CloudStack User Group - Introduction to Apache CloudStack
 
Txlf2012
Txlf2012Txlf2012
Txlf2012
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Docker based Hadoop provisioning - Hadoop Summit 2014
Docker based Hadoop provisioning - Hadoop Summit 2014 Docker based Hadoop provisioning - Hadoop Summit 2014
Docker based Hadoop provisioning - Hadoop Summit 2014
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
 

Más de buildacloud

The Future of SDN in CloudStack by Chiradeep Vittal
The Future of SDN in CloudStack by Chiradeep VittalThe Future of SDN in CloudStack by Chiradeep Vittal
The Future of SDN in CloudStack by Chiradeep Vittalbuildacloud
 
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapati
Policy Based SDN Solution for DC and Branch Office by Suresh BoddapatiPolicy Based SDN Solution for DC and Branch Office by Suresh Boddapati
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapatibuildacloud
 
L4-L7 services for SDN and NVF by Youcef Laribi
L4-L7 services for SDN and NVF by Youcef LaribiL4-L7 services for SDN and NVF by Youcef Laribi
L4-L7 services for SDN and NVF by Youcef Laribibuildacloud
 
Jenkins, jclouds, CloudStack, and CentOS by David Nalley
Jenkins, jclouds, CloudStack, and CentOS by David NalleyJenkins, jclouds, CloudStack, and CentOS by David Nalley
Jenkins, jclouds, CloudStack, and CentOS by David Nalleybuildacloud
 
Intro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew KirchIntro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew Kirchbuildacloud
 
Guaranteeing Storage Performance by Mike Tutkowski
Guaranteeing Storage Performance by Mike TutkowskiGuaranteeing Storage Performance by Mike Tutkowski
Guaranteeing Storage Performance by Mike Tutkowskibuildacloud
 
Cloud Application Blueprints with Apache Brooklyn by Alex Henevald
Cloud Application Blueprints with Apache Brooklyn by Alex HenevaldCloud Application Blueprints with Apache Brooklyn by Alex Henevald
Cloud Application Blueprints with Apache Brooklyn by Alex Henevaldbuildacloud
 
Managing infrastructure with Application Policy by Mike Cohen
Managing infrastructure with Application Policy by Mike CohenManaging infrastructure with Application Policy by Mike Cohen
Managing infrastructure with Application Policy by Mike Cohenbuildacloud
 
Intro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew KirchIntro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew Kirchbuildacloud
 
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
Monitoring CloudStack in context with Converged Infrastructure by Mike TurnlundMonitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlundbuildacloud
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reesebuildacloud
 
Enterprise grade firewall and ssl termination to ac by will stevens
Enterprise grade firewall and ssl termination to ac by will stevensEnterprise grade firewall and ssl termination to ac by will stevens
Enterprise grade firewall and ssl termination to ac by will stevensbuildacloud
 
State of the cloud by reuven cohen
State of the cloud by reuven cohenState of the cloud by reuven cohen
State of the cloud by reuven cohenbuildacloud
 
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
Securing Your Cloud With the Xen Hypervisor by Russell PavlicekSecuring Your Cloud With the Xen Hypervisor by Russell Pavlicek
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicekbuildacloud
 
DevCloud - Setup and Demo on Apache CloudStack
DevCloud - Setup and Demo on Apache CloudStack DevCloud - Setup and Demo on Apache CloudStack
DevCloud - Setup and Demo on Apache CloudStack buildacloud
 
Cloud Network Virtualization with Juniper Contrail
Cloud Network Virtualization with Juniper ContrailCloud Network Virtualization with Juniper Contrail
Cloud Network Virtualization with Juniper Contrailbuildacloud
 
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...buildacloud
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski buildacloud
 
CloudStack University by Sebastien Goasguen
CloudStack University by Sebastien GoasguenCloudStack University by Sebastien Goasguen
CloudStack University by Sebastien Goasguenbuildacloud
 
Building Scalable, Resilient Infrastructure on CloudStack by Sebastian Stadil
Building Scalable, Resilient Infrastructure on CloudStack by Sebastian StadilBuilding Scalable, Resilient Infrastructure on CloudStack by Sebastian Stadil
Building Scalable, Resilient Infrastructure on CloudStack by Sebastian Stadilbuildacloud
 

Más de buildacloud (20)

The Future of SDN in CloudStack by Chiradeep Vittal
The Future of SDN in CloudStack by Chiradeep VittalThe Future of SDN in CloudStack by Chiradeep Vittal
The Future of SDN in CloudStack by Chiradeep Vittal
 
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapati
Policy Based SDN Solution for DC and Branch Office by Suresh BoddapatiPolicy Based SDN Solution for DC and Branch Office by Suresh Boddapati
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapati
 
L4-L7 services for SDN and NVF by Youcef Laribi
L4-L7 services for SDN and NVF by Youcef LaribiL4-L7 services for SDN and NVF by Youcef Laribi
L4-L7 services for SDN and NVF by Youcef Laribi
 
Jenkins, jclouds, CloudStack, and CentOS by David Nalley
Jenkins, jclouds, CloudStack, and CentOS by David NalleyJenkins, jclouds, CloudStack, and CentOS by David Nalley
Jenkins, jclouds, CloudStack, and CentOS by David Nalley
 
Intro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew KirchIntro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew Kirch
 
Guaranteeing Storage Performance by Mike Tutkowski
Guaranteeing Storage Performance by Mike TutkowskiGuaranteeing Storage Performance by Mike Tutkowski
Guaranteeing Storage Performance by Mike Tutkowski
 
Cloud Application Blueprints with Apache Brooklyn by Alex Henevald
Cloud Application Blueprints with Apache Brooklyn by Alex HenevaldCloud Application Blueprints with Apache Brooklyn by Alex Henevald
Cloud Application Blueprints with Apache Brooklyn by Alex Henevald
 
Managing infrastructure with Application Policy by Mike Cohen
Managing infrastructure with Application Policy by Mike CohenManaging infrastructure with Application Policy by Mike Cohen
Managing infrastructure with Application Policy by Mike Cohen
 
Intro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew KirchIntro to Zenoss by Andrew Kirch
Intro to Zenoss by Andrew Kirch
 
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
Monitoring CloudStack in context with Converged Infrastructure by Mike TurnlundMonitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reese
 
Enterprise grade firewall and ssl termination to ac by will stevens
Enterprise grade firewall and ssl termination to ac by will stevensEnterprise grade firewall and ssl termination to ac by will stevens
Enterprise grade firewall and ssl termination to ac by will stevens
 
State of the cloud by reuven cohen
State of the cloud by reuven cohenState of the cloud by reuven cohen
State of the cloud by reuven cohen
 
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
Securing Your Cloud With the Xen Hypervisor by Russell PavlicekSecuring Your Cloud With the Xen Hypervisor by Russell Pavlicek
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
 
DevCloud - Setup and Demo on Apache CloudStack
DevCloud - Setup and Demo on Apache CloudStack DevCloud - Setup and Demo on Apache CloudStack
DevCloud - Setup and Demo on Apache CloudStack
 
Cloud Network Virtualization with Juniper Contrail
Cloud Network Virtualization with Juniper ContrailCloud Network Virtualization with Juniper Contrail
Cloud Network Virtualization with Juniper Contrail
 
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
 
CloudStack University by Sebastien Goasguen
CloudStack University by Sebastien GoasguenCloudStack University by Sebastien Goasguen
CloudStack University by Sebastien Goasguen
 
Building Scalable, Resilient Infrastructure on CloudStack by Sebastian Stadil
Building Scalable, Resilient Infrastructure on CloudStack by Sebastian StadilBuilding Scalable, Resilient Infrastructure on CloudStack by Sebastian Stadil
Building Scalable, Resilient Infrastructure on CloudStack by Sebastian Stadil
 

Automating Your CloudStack Cloud with Puppet

  • 1. Automating CloudStack with Puppet Puppet Camp Silicon Valley David Nalley david@gnsa.us @ke4qqq
  • 2. #whoami  Recovering sysadmin  Committer on Apache CloudStack  Fedora Project Contributor  Fan of “The Phoenix Project”
  • 3. The plan  Overview of Apache CloudStack  Using puppet to manage your CloudStack-based VMs  Using puppet to manage your VM deployment.
  • 4. What is CloudStack?  Open source IaaS platform  ASLv2 licensed  History tl;dr − began development in 2008 − production deployments by 2009 − open sourced in 2010 − moved to ASF in 2012
  • 5. Design goals  Integrate with untold number of yet to be identified hardware.  Provide an API platform on which to run cloud operations.  Orchestrate hardware resources that may be protected by a firewall.  Horizontally scalable management layer.  Enable the best data paths to accomplish cloud operations.  A beautiful and functional UI
  • 6. Architectural Overview  Division of physical resources  Storage  Borg drones VMs  Networking  Management and orchestration
  • 7. Physical hosts  Hypervisors − KVM − Xenserver − XCP − VMware  Baremetal (with IPMI)
  • 8. Clusters  Collections of hosts  Typically 1-15 hosts in a cluster  Homogenity − Network − Hypervisor − CPU type
  • 9. Clusters  Hosts share storage  Fault domain for individual VM availability  Lowest level for allocation decisions
  • 10. Pods  Collection of clusters  Typically a rack or row of racks  Can contain multiple types of hypervisors  Largely just an arbitrary division
  • 11. Zones  Typically a datacenter  Single networking model within a zone  Visible to the end user
  • 12. Storage  CloudStack doesn't really provide storage, but does consume and orchestrate it.
  • 13. Local Storage  Typically faster than SAN/NAS  Failure of a host means loss of a VM  Can be far more scalable than trying to scale a large traditional storage platform
  • 14. Primary (shared) storage  Shared at the cluster level  Where running disk images live  All hosts in the cluster can write to the resource  Most commonly NFS and iSCSI, but essentially anything the hypervisor can mount  'New' storage types like Ceph RBD
  • 15. Secondary Storage  Primary storage is focused on running VMs, Secondary storage is focused on immutable items. − Snapshots − Disk images − ISOs  Zone wide storage resource  Can employ object storage
  • 17. Console Proxy VM  AJAX-based VNC console access  Allows CloudStack to deal with auth{n,z} for console access.  Abstracts away hypervisor access  Not a replacement for ssh/RDP but no more painful than DRAC/iLO  Stateless; horizontally scalable
  • 18. Secondary Storage VM  Secondary Storage is the resource, the SSVM that handles the following operations: − Copying snapshots from primary to secondary storage − Copying disk images from secondary to primary storage − Making all items stored in secondary storage downloadable and a place to transfer items into secondary storage − Aging the snapshots according to policy
  • 19. Networking Model: VLANs  Traditional L2 isolation  CloudStack given a block of VLANs and allocates them on demand  Each account gets allocated at least one VLAN.  Inherent limitations of VLANs
  • 20. Networking model: L3 Isolation  L3 isolation; aka Security Groups  Pushes ACLs down to each hypervisor host  Far more scalable, decentralized (more Borg)  Filter at the bridge device
  • 23. Network Model: SDN  OVS (GRE overlay tunnels)  Nicira NVP  Others rapidly appearing: − BigSwitch − Midokura
  • 24. Virtual networking hardware  DHCP  VLAN allocation  Firewall  NAT/Port forwarding  Routing  VPN  Load Balancing
  • 25. Virtual networking hardware  Cisco Nexus 1000v  NetScaler VPX  F5 Big IP virtual edition
  • 26. Physical networking hardware  Juniper SRX  F5 BigIP LB  NetScaler
  • 27. Management Server  Management server is stateless, horizontally scalable platform for orchestrating all of the resources.  Provides isolation in what is assumed to be a multi-tenant environment
  • 28. UI
  • 29. API  EC2/S3 translation layer  CloudStack native API: − http://incubator.apache.org/cloudstack/docs/api
  • 30. More info  http://incubator.apache.org/cloudstack  #cloudstack on irc.freenode.net  cloudstack-users-subscribe@incubator.apache.org
  • 31. Using puppet to manage VMs  Being able to deploy 500 VMs in 10 minutes means you need some method to classify and apply configuration management.  Most of the work for this awesomeness was done by Jason Hancock (@jsnby)
  • 32. A couple of upfront goals  Minimize the number of templates  Have all instances receive config via Puppet  Zero manual intervention
  • 33. Make one API call to launch a VM, and get out of the way and watch the automation do wonderful things.
  • 34. A word about auto-signing  You can use auto-signing.  Automatically signs any cert from a given domain  Potential security issues if folks can connect to your puppetmaster  You can pre-seed templates with a signed key - but there are gotchas
  • 35. Run puppet ASAP  Turn off splay - you want to minimize the time that the box remains unconfigured.  Make sure puppet is configured to start on boot (enable the service, not cron)
  • 36. Classifying nodes - options  {site,node}.pp  hostname-based regex  PE/Dashboard  ENC  facts  $other_things
  • 37. facts
  • 38. What to base a fact on... http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/user/deployVirtualMachine.html userdata an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding.
  • 40. Custom fact for userdata  http://s.apache.org/acs_userdata
  • 41. Implementing ::role in puppet Everyone is a default node. No need to add nodes to site.pp or use an ENC.
  • 42. Sample, skeletonized, site.pp import 'base' node default { include base }
  • 43. Sample, skeletonized, base.pp class base.pp { # Includes that apply to all machines case $::role { 'somerole': { include somemodule } 'otherrole': { include someothermodule }
  • 44. This is only the beginning...  Setting environment, purging terminated instances, and more.  Check out Jason's blog: http://geek.jasonhancock.com
  • 45. Making puppet deploy your infrastructure in CloudStack  Most of the real work that follows was done by Dan Bode.
  • 46. deployVirtualMachine API  CloudStack provides an API for provisioning machines.
  • 47. Puppet...  converts freshly provisioned VMs into functional machines ready to do work.
  • 48. When combined.... you can start from nothing, deploy the machines and wind up with a completely automated deployment system.
  • 49. CloudStack resources in puppet https://github.com/bodepd/cloudstack_resources Still a bit raw....potentially unstable, use with caution, file bug reports and patches.
  • 50. Defining application stacks class my_app_stack { cloudstack_instance {'web1': ensure => present, group => 'role=web', } cloudstack_instance {'db1': ensure => present, group => 'role=db', }
  • 51. Setting defaults Cloudstack_instance { image => 'Fedora18_x86_64', flavor => 'm1.medium', zone => 'SanJose', network => 'default own', keypair => 'my_secret_keypair', } cloudstack_instance { 'web1': ensure => $::ensure,
  • 52. Now machines and their configuration are deployable all from puppet. (This also exists for GCE and OpenNebula.)