SlideShare a Scribd company logo
Building CloudStack at Scale
                     Paul Angus
             Cloud Architect ShapeBlue
            paul.angus@shapeblue.com
                Twitter: @ShapeBlue




     www.shapeblue.com
Building CloudStack at Scale
Overview

 The design phase
 Redundancy & resilience
 Automation
 Documentation




               www.shapeblue.com
The Design Phase



  Tips for the design phase




www.shapeblue.com
The Design Phase


Get everyone in the room




           www.shapeblue.com
The Design Phase


Know the fine print




            www.shapeblue.com
The Design Phase


Understand your work loads




           www.shapeblue.com
Design Phase


Understand your bottlenecks




           www.shapeblue.com
Redundancy & Resilience


    Designing for Redundancy
         and Resiliency




  www.shapeblue.com
Redundancy & Resilience

CloudStack Management Server

MySQL Servers

Virtualised Management Farm



           www.shapeblue.com
Redundancy & Resilience
CloudStack Management Server

 Very easy to set up additional management servers

 Load balancing required to give high availabilty




             www.shapeblue.com
Redundancy & Resilience
MySQL

 Master / Slave is ‘standard’

 Alternatives include
   MySQL Proxy (Mirroring)
   Galera Cluster
   MMM

              www.shapeblue.com
Redundancy & Resilience

                                       Load
      Load
                                      Balancer
     Balancer




                              MySQL   MySQL      MySQL
CS Man      CS Man
                                       Galera


          www.shapeblue.com
Redundancy & Resilience
DC1                                         DC2

                F5                                          F5


      CS Man            CS Man                    CS Man            CS Man


                F5                                          F5


MySQL          MySQL      MySQL              MySQL         MySQL      MySQL

               Galera                                      Galera


                        www.shapeblue.com
Redundancy & Resilience
Server ‘pairs’

  MySQL masters and slaves
  CS Man & MySQL master
  vCenter & MS SQL server
  Any other redundant servers i.e. DNS



                 www.shapeblue.com
Redundancy & Resilience
Laws of probability….

  Same failure probability as raid 0
  If management server OR MySQL
  master fails – downtime for the
  whole management system.




               www.shapeblue.com
Automation


       Automation of the
      infrastructure build




www.shapeblue.com
Automation
Uses:
    Why automate
    Automation tools
    Examples
        Configuring management VMs
        Build a CloudStack 4.0 management server
        Deployment of hosts
        Configuration of CloudStack (through API)


                 www.shapeblue.com
Automation


Work smarter, not harder




            www.shapeblue.com
Automation
Automation gives you:

    Speed
    Efficiency
    Repeatability
    Accuracy




               www.shapeblue.com
Automation
Tools:

  Chef, Puppet

  KickStart, Python

  Shell scripting


               www.shapeblue.com
Automation
Example:



              Base Build of Management
              Servers using Shell Scripting




           www.shapeblue.com
Automation – Management VM Configuration



   Create Deployment VM
                                     Download CSV &      Make it executable,
    CentOS (Minimal) +               hostconfig script         run it.
          wget




                 www.shapeblue.com
Automation – Management VM Configuration
    The CSV:

                                       PrimaryNIC PrimaryNIC PrimaryNIC              SecondaryNIC SecondaryNIC              NTPSERVERIP
VMhostname Searchdomain PrimaryNICIP      Prefix   Gateway    Network SecondaryNICIP     Prefix     Network        DNS1          1

 CSMan1       cs4.net    10.14.16.67      27     10.14.16.65   Tools   10.144.72.21       21         Mgmt        10.128.9.9 64.238.19.20

 CSMan2       cs4.net    10.14.16.68      27     10.14.16.65   Tools   10.144.72.22       21         Mgmt        10.128.9.9 64.238.19.20

              cs4.net
 MySQL1                   10.14.1.35      27     10.14.1.33 Database   10.141.163.4       26         Mgmt        10.128.9.9 64.238.19.20

 MySQL2       cs4.net     10.14.1.36      27     10.14.1.33 Database   10.141.163.5       26         Mgmt        10.128.9.9 64.238.19.20




                                 www.shapeblue.com
Automation – Management VM Configuration
#!/bin/bash
echo "Please enter hostname [without domain]: ie CSMan1"
read VMHOSTNAME

SearchDomain=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $2}'`

PrimaryNICIP=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $3}'`
PrimaryNICIP=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $3}'`
PrimaryNICPrefix=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $4}'`
PrimaryNICGateway=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $5}'`
PrimaryNICNetwork=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $6}'`




                           www.shapeblue.com
Automation – Management VM Configuration
echo "DEVICE="eth0"                            nameserver $DNS2
BOOTPROTO=none                                   " > /etc/resolv.conf
NM_CONTROLLED="no"
ONBOOT=yes
TYPE="Ethernet"                                echo "# ShapeBlue Script created file
IPADDR=$PrimaryNICIP                             NETWORKING=yes
PREFIX=$PrimaryNICPrefix                         HOSTNAME=$VMHOSTNAME
GATEWAY=$PrimaryNICGateway                       " > /etc/sysconfig/network
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no                                      echo "$NTPSERVERIP1
NAME="$PrimaryNICNetwork"                      $NTPSERVERIP2" > /etc/ntp.conf
"> /etc/sysconfig/network-scripts/ifcfg-eth0
                                                 Reboot
echo "# ShapeBlue Script created file
search $SearchDomain
nameserver $DNS1



                             www.shapeblue.com
Automation – Management VM Configuration
# if vm management use this one                      NETMASK4=255.255.255.248
if [ "$SecondaryNICNetwork" == “Mgmt" ]; then        GATEWAY4=10.141.163.1
      echo "ADDRESS0=10.128.9.9                      ADDRESS5=213.212.69.0
      NETMASK0=255.255.255.255                       NETMASK5=255.255.255.0
      GATEWAY0=10.14.16.1                            GATEWAY5=10.141.163.1" > /etc/sysconfig/network-
      ADDRESS1=10.128.3.13                      scripts/route-eth1
     NETMASK1=255.255.255.255                     fi
      GATEWAY1=10.14.16.1
      ADDRESS2=64.238.199.202
      NETMASK2=255.255.255.255
      GATEWAY2=10.141.163.1
      ADDRESS3=213.212.65.202
     NETMASK3=255.255.255.255
      GATEWAY3=10.141.163.1
      ADDRESS4=213.212.68.168



                           www.shapeblue.com
Automation
Example:



           Build a CS4 management server




           www.shapeblue.com
Automation – CS4 Management Server



Create Deployment VM         Set static IP address   Download the script,
 CentOS (Minimal) +          and ensure it has an    make it executable,
       wget                         FQDN                   run it.




              www.shapeblue.com
Automation – CS4 Management Server
#!/bin/bash                                                  chkconfig ntpd on
                                                             chkconfig mysqld on
setenforce permissive                                        chkconfig nfs on
sed -i "/SELINUX=/ cSELINUX=permissive" /etc/selinux/config chkconfig rpcbind on

echo "                                                               service ntpd restart
[cloudstack]                                                         service mysqld restart
name=cloudstack                                                      service rpcbind start
baseurl=http://cloudstack.apt-get.eu/rhel/4.0/                       service nfs start
enabled=1
gpgcheck=0" > /etc/yum.repos.d/cloudstack.repo                       /usr/bin/mysqladmin -u root password 'password'

yum update -y                                                        cloud-setup-databases cloud:cloud@localhost --deploy-
yum install ntp cloud-client mysql-server -y                         as=root:password

sed -i -e '/datadir/ ainnodb_rollback_on_timeout=1' -e '/datadir/   cloud-setup-management
ainnodb_lock_wait_timeout=600' -e '/datadir/
amax_connections=350' -e '/datadir/ alog-bin=mysql-bin' -e
"/datadir/ abinlog-format = 'ROW'" /etc/my.cnf




                                www.shapeblue.com
Automation
Example:



             Host deployment server build
                  using shell scipting




           www.shapeblue.com
Automation – Host Deployment



Create Deployment VM          Download to VM Hypervisor    Download build script,
                                installation media (inc.    make it executable,
CentOS (Minimal) + wget           XenServer Updates)              run it.




                www.shapeblue.com
Automation – Host Deployment
Deployment server (VM)

  The script downloads, builds and configures:
    DHCP
    PXE (TFTP)
    HTTP server
  Script writes the scripts needed to for PXE boot of XenServer &
  ESXi hosts
  Script also writes the answer files and post installation scripts to
  configure XenServer and ESXi hosts


                  www.shapeblue.com
Automation – Host Deployment
# write DHCP config file
                                               allow booting;
echo "# DHCP for PXE                           allow bootp;
                                               use-host-decl-names true;
ddns-update-style interim;                     option option-128 code 128 = string;
authoritative;                                 option option-129 code 129 = text;
log-facility local7;                           option space gpxe;
default-lease-time 600;                        option gpxe-encap-opts code 175 = encapsulate gpxe;
max-lease-time 7200;                           option gpxe.bus-id code 177 = string;
option subnet-mask $DHCPNETMASK;
option broadcast-address $DHCPBROADCAST;       next-server $PXESERVERIP;
option routers $DHCPGATEWAY;                   filename "/gpxelinux.0";
option domain-name-servers $DNS1;
option domain-name "$DOMAIN";                " > /etc/dhcp/dhcpd.conf
subnet $DHCPSUBNET netmask $DHCPMASK {
range $DHCPSTART $DHCPFINISH; }




                           www.shapeblue.com
Automation – Host Deployment
# create pxelinux.cfg/default file
echo "# script built pxeconfig

DEFAULT menu.c32
menu title ShapeBlue Host Deployment
timeout 0

LABEL ESXi5.0
           KERNEL http://$PXESERVERIP/esxi/mboot.c32
           APPEND -c http://$PXESERVERIP/esxipxeboot/boot.cfg pxebooting +++
           IPAPPEND 1
MENU LABEL ESXi-5.0.0

" > /tftpboot/pxelinux.cfg/default




                              www.shapeblue.com
Automation – Host Deployment
# Create xenserver answerfile
echo "<?xml version="1.0"?>
<installation srtype="ext">
<primary-disk gueststorage="yes">sda</primary-disk>
<keymap>uk</keymap>
<root-password>P@ssword</root-password>
<source type="url">http://$PXESERVERIP/xenserver/</source>
<script stage="filesystem-populated" type="url">http://$PXESERVERIP/xenpxeboot/postxeninstall.sh</script>
<admin-interface name="eth0" proto="dhcp" />
<timezone>Europe/Dublin</timezone>
<time-config-method>ntp</time-config-method>
<ntpservers>$NTPSERVER1</ntpservers>
<nameserver>$DNS1</nameserver>
</installation>
" > /var/www/html/xenpxeboot/xenanswerfile



                           www.shapeblue.com
Automation – Host Deployment
      MAC                     IP        HOSTNAME    STORAGEIP

80:c1:6e:6a:b5:9c         10.14.73.9    XenHost1    10.14.97.9

80:c1:6e:6a:b4:0c         10.14.73.10   XenHost2    10.14.97.10

80:c1:6e:6a:f3:fc         10.14.73.11   XenHost3    10.14.97.11

80:c1:6e:6a:f0:ec         10.14.73.12   ESXiHost1   10.14.97.12

80:c1:6e:6a:b5:a4         10.14.73.13   ESXiHost2   10.14.97.13




                    www.shapeblue.com
Automation – Host Deployment
echo “# sample XenServer post install script
wget http://$PXESERVERIP/hostconfig.csv

MACADD=`ifconfig | grep eth0 | awk '{print $NF}'`“
IPADDR=’grep -i $MACADD /tmp/arp_table.csv | awk -F ',' '{print $2}‘’
XENHOSTNAME =/`grep -i $MACADD /tmp/arp_table.csv | awk -F ',' '{print $3}‘/`
STORAGEIP=/`grep -i $MACADD /tmp/arp_table.csv | awk -F ',' '{print $4}‘/`
STORAGENICUUID=/’xe pif-list | awk '$0 ~ str{print b}{b=$0}' str="eth3" | awk '{print $NF}‘/`

xe host-list params=uuid --minimal > /tmp/tmphostuuid
xe pif-list management=true params=uuid --minimal > /tmp/tmpnicuuid
read NICUUID < /tmp/tmpnicuuid
read HOSTUUID < /tmp/tmphostuuid

xe host-set-hostname-live host-uuid=$HOSTUUID host-name=$XENHOSTNAME
xe host-param-set name-label=$XENHOSTNAME uuid=$HOSTUUID
xe pif-reconfigure-ip uuid=$NICUUID mode=static IP=$IPADDR netmask=$HOSTNETMASK gateway=$HOSTGATEWAY
DNS=$DNS1,$DNS2
xe pif-param-set uuid=$NICUUID other-config:domain=$DOMAIN
" > /var/www/html/xenpxeboot/firstfullbootxenscript.sh


                                   www.shapeblue.com
Automation – Host Deployment
echo "#!/bin/bash                                             if [ "$PATCHACTION" == "restartXAPI" ]; then
# Install XenServer Updates                                      xe-toolstack-restart
                                                              else
xe host-list params=uuid --minimal > /tmp/tmphostuuid            reboot
files=$(ls /tmp/*.xsupdate 2> /dev/null | wc -l)                exit
if [ "$files" != "0" ]; then                             fi
      read HOSTUUID < /tmp/tmphostuuid                        done
      cd /tmp                                            fi
      for updatefile in /tmp/*.xsupdate; do
      PATCHUUID=$(xe patch-upload file-                # Disable boot script for subsequent reboots
name=$updatefile)                                      rm -f /etc/rc3.d/S99postinstall
      xe patch-apply host-uuid=$HOSTUUID
uuid=$PATCHUUID                                        # Final Reboot
      rm -f $updatefile                                reboot
      PATCHACTION=$(xe patch-list uuid=$PATCHUUID     " > /var/www/html/xenpxeboot/xenupdatescript.sh
params=after-apply-guidance --minimal)
      echo "Patch Action:" $PATCHACTION

                              www.shapeblue.com
Automation


 Utilising the API when building
         the infrastructure




www.shapeblue.com
Automation
The API

 What it is

 How can you use it

 Examples


              www.shapeblue.com
Automation – The API
What is the API

  The API is the real engine of CloudStack

  The web GUI is simply making API calls

  Port 8096 by default


              www.shapeblue.com
Automation – The API
Using the API

  CloudStack GUI
  Browser
  Word, Excel
  Using Firebug/IE Developer Tools with CloudStack



                www.shapeblue.com
Automation – The API

API commands directly through a browser




Immediate response


             www.shapeblue.com
Automation – The API
API calls from a Word document or Excel spread sheet




              www.shapeblue.com
Automation – The API
Using Firebug / IE Developer Tools

  IE press F12 or ‘view developer tools’

  Firefox install Firebug add-on




               www.shapeblue.com
www.shapeblue.com
Automation – The API
Global Settings
http://csman:8096/client/api?command=updateConfiguration&name=vmware.management.portgroup&value=svc-
console

http://csman:8096/client/api?command=updateConfiguration&name=allow.user.create.projects&value=false

http://csman:8096/client/api?command=updateConfiguration&name=allow.public.user.templates&value=false

http://csman:8096/client/api?command=updateConfiguration&name=apply.allocation.algorithm.to.pods&value=true

http://csman:8096/client/api?command=updateConfiguration&name=cpu.overprovisioning.factor&value=2

http://csman:8096/client/api?command=updateConfiguration&name=vm.allocation.algorithm&value=random




                          www.shapeblue.com
Automation – The API
Getting information
  http://csman1:8096/client/api?command=listServiceOfferings
  http://csman1:8096/client/api?command=listTemplates&templatefilter=featur
  ed




                 www.shapeblue.com
Automation – The API
Deploying an instance
Base command:
http://csman1:8096/client/api?command=deployVirtualMachine

The required options:

The Service Offering and Template IDs
    &serviceofferingid=XXX
    &templateid=XXX
    &zoneid=XXX
    &domainid=XXX
    &account=XXX

Optional options:
   &displayname=xxx

                         www.shapeblue.com
Automation – The API
Deploying an instance

http://csman1:8096/client/api?command=deployVirtualMachine&serviceofferingi
d=XXX&templateid=XXX


Can be used to create a large number of instances very quickly




                 www.shapeblue.com
Documentation



    A word on documentation




www.shapeblue.com
Documentation
Dull, boring, tedious, slow – Crucial.

  Write what you’re going to do
  Follow what you wrote
  Update it
  With redundant servers; follow it again
  With scripts ‘snapshot’ and start again



             www.shapeblue.com
Any Questions ?
                    Paul Angus
                    paul.angus@shapeblue.com
                    Twitter: @ShapeBlue
                    www.shapeblue.com




www.shapeblue.com
Thank you

                Paul


www.shapeblue.com

More Related Content

What's hot (20)

PDF
Cialug August 2021
Andrew Denner
 
PDF
10 Million hits a day with WordPress using a $15 VPS
Paolo Tonin
 
PDF
Ansible best practices
StephaneFlotat1
 
PDF
Asadmin Webinar 12 Feb 2009
Eduardo Pelegri-Llopart
 
PDF
Vagrant for real codemotion (moar tips! ;-))
Michele Orselli
 
PDF
Capistrano
Bryan McLellan
 
PDF
Rackspace Hack Night - Vagrant & Packer
Marc Cluet
 
PDF
vert.x 소개 및 개발 실습
John Kim
 
PDF
Ansible
Raul Leite
 
PPTX
Ansible presentation
Kumar Y
 
PPTX
Building Windows Images with Packer
Matt Wrock
 
PDF
Automation with Ansible and Containers
Rodolfo Carvalho
 
PPTX
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
Erik Osterman
 
PPTX
How to create a multi tenancy for an interactive data analysis
Tiago Simões
 
PDF
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef
 
ODP
Puppet and Apache CloudStack
Puppet
 
PPTX
Ansible
Vladimír Smitka
 
PPTX
Javascript Bundling and modularization
stbaechler
 
PPT
Ansible presentation
John Lynch
 
Cialug August 2021
Andrew Denner
 
10 Million hits a day with WordPress using a $15 VPS
Paolo Tonin
 
Ansible best practices
StephaneFlotat1
 
Asadmin Webinar 12 Feb 2009
Eduardo Pelegri-Llopart
 
Vagrant for real codemotion (moar tips! ;-))
Michele Orselli
 
Capistrano
Bryan McLellan
 
Rackspace Hack Night - Vagrant & Packer
Marc Cluet
 
vert.x 소개 및 개발 실습
John Kim
 
Ansible
Raul Leite
 
Ansible presentation
Kumar Y
 
Building Windows Images with Packer
Matt Wrock
 
Automation with Ansible and Containers
Rodolfo Carvalho
 
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
Erik Osterman
 
How to create a multi tenancy for an interactive data analysis
Tiago Simões
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef
 
Puppet and Apache CloudStack
Puppet
 
Javascript Bundling and modularization
stbaechler
 
Ansible presentation
John Lynch
 

Viewers also liked (6)

PDF
4 virtual router CloudStack Developer Day
Kimihiko Kitase
 
PPTX
Cloudstack user group 4 july 2013
ShapeBlue
 
PPTX
CloudStack User Group Overview And News - 12 feb 2015
ShapeBlue
 
PPTX
CloudStack EU user group - fast SAP provisioning
ShapeBlue
 
PPTX
CloudStack News, Berlin 16 june 2016
ShapeBlue
 
PPTX
Cloudstack: the best kept secret in the cloud
ShapeBlue
 
4 virtual router CloudStack Developer Day
Kimihiko Kitase
 
Cloudstack user group 4 july 2013
ShapeBlue
 
CloudStack User Group Overview And News - 12 feb 2015
ShapeBlue
 
CloudStack EU user group - fast SAP provisioning
ShapeBlue
 
CloudStack News, Berlin 16 june 2016
ShapeBlue
 
Cloudstack: the best kept secret in the cloud
ShapeBlue
 
Ad

Similar to Building cloud stack at scale (20)

PPTX
Building virtualised CloudStack test environments
ShapeBlue
 
PPTX
Ansible & CloudStack - Configuration Management
ShapeBlue
 
PDF
TechUG Glasgow talk 22/Feb/17 Configuration Management Best Practices
Dag Sonstebo
 
PPTX
Apache cloud stack 4.1 new features deep dive
ShapeBlue
 
PPTX
Designing cloud stack clouds geoff higginbottom/shapeblue
ShapeBlue
 
PPTX
CloudStack EU user group - Trillian
ShapeBlue
 
PPTX
Cloud stack networking shapeblue technical deep dive
ShapeBlue
 
PDF
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Outlyer
 
DOCX
Network Manual
Jason Myers
 
PDF
5 scalability Cloudstack Developer Day
Kimihiko Kitase
 
PPTX
An introduction to Citrix CloudPlatform (powered by Apache CloudStack), Citri...
ShapeBlue
 
PDF
Building Clouds One 1.4
Ruben S. Montero
 
PDF
Boris Stoyanov - some new features in Apache cloudStack
ShapeBlue
 
PDF
Getting Started Hacking OpenNebula - Fosdem-2013
OpenNebula Project
 
PDF
All about linux gaining root remote exploitation
n0rz
 
PDF
Open nebula froscon
OpenNebula Project
 
PDF
CloudStack Architecture Future
Kimihiko Kitase
 
PPTX
Automating CloudStack and hypervisor installation and configuration
Dag Sonstebo
 
PPTX
Introduction to Apache cloudstack - Linuxcon
ShapeBlue
 
PPTX
Silicon Valley CloudStack User Group - Designing CloudStack Clouds
ShapeBlue
 
Building virtualised CloudStack test environments
ShapeBlue
 
Ansible & CloudStack - Configuration Management
ShapeBlue
 
TechUG Glasgow talk 22/Feb/17 Configuration Management Best Practices
Dag Sonstebo
 
Apache cloud stack 4.1 new features deep dive
ShapeBlue
 
Designing cloud stack clouds geoff higginbottom/shapeblue
ShapeBlue
 
CloudStack EU user group - Trillian
ShapeBlue
 
Cloud stack networking shapeblue technical deep dive
ShapeBlue
 
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Outlyer
 
Network Manual
Jason Myers
 
5 scalability Cloudstack Developer Day
Kimihiko Kitase
 
An introduction to Citrix CloudPlatform (powered by Apache CloudStack), Citri...
ShapeBlue
 
Building Clouds One 1.4
Ruben S. Montero
 
Boris Stoyanov - some new features in Apache cloudStack
ShapeBlue
 
Getting Started Hacking OpenNebula - Fosdem-2013
OpenNebula Project
 
All about linux gaining root remote exploitation
n0rz
 
Open nebula froscon
OpenNebula Project
 
CloudStack Architecture Future
Kimihiko Kitase
 
Automating CloudStack and hypervisor installation and configuration
Dag Sonstebo
 
Introduction to Apache cloudstack - Linuxcon
ShapeBlue
 
Silicon Valley CloudStack User Group - Designing CloudStack Clouds
ShapeBlue
 
Ad

More from ShapeBlue (20)

PPTX
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
PPTX
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
ShapeBlue
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
PPTX
Pushing the Limits: CloudStack at 25K Hosts
ShapeBlue
 
PPTX
Stretching CloudStack over multiple datacenters
ShapeBlue
 
PPTX
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
ShapeBlue
 
PPSX
CloudStack + KVM: Your Local Cloud Lab
ShapeBlue
 
PDF
I’d like to resell your CloudStack services, but...
ShapeBlue
 
PDF
Storage Setup for LINSTOR/DRBD/CloudStack
ShapeBlue
 
PDF
Apache CloudStack 101 - Introduction, What’s New and What’s Coming
ShapeBlue
 
PDF
Development of an Оbject Storage Plugin for CloudStack, Christian Reichert, s...
ShapeBlue
 
PDF
VM-HA with CloudStack and Linstor, Rene Peinthor
ShapeBlue
 
PDF
How We Use CloudStack to Provide Managed Hosting, Swen Brüseke, proIO
ShapeBlue
 
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
ShapeBlue
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Pushing the Limits: CloudStack at 25K Hosts
ShapeBlue
 
Stretching CloudStack over multiple datacenters
ShapeBlue
 
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
ShapeBlue
 
CloudStack + KVM: Your Local Cloud Lab
ShapeBlue
 
I’d like to resell your CloudStack services, but...
ShapeBlue
 
Storage Setup for LINSTOR/DRBD/CloudStack
ShapeBlue
 
Apache CloudStack 101 - Introduction, What’s New and What’s Coming
ShapeBlue
 
Development of an Оbject Storage Plugin for CloudStack, Christian Reichert, s...
ShapeBlue
 
VM-HA with CloudStack and Linstor, Rene Peinthor
ShapeBlue
 
How We Use CloudStack to Provide Managed Hosting, Swen Brüseke, proIO
ShapeBlue
 

Recently uploaded (20)

PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
Français Patch Tuesday - Juillet
Ivanti
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 

Building cloud stack at scale

  • 1. Building CloudStack at Scale Paul Angus Cloud Architect ShapeBlue [email protected] Twitter: @ShapeBlue www.shapeblue.com
  • 2. Building CloudStack at Scale Overview The design phase Redundancy & resilience Automation Documentation www.shapeblue.com
  • 3. The Design Phase Tips for the design phase www.shapeblue.com
  • 4. The Design Phase Get everyone in the room www.shapeblue.com
  • 5. The Design Phase Know the fine print www.shapeblue.com
  • 6. The Design Phase Understand your work loads www.shapeblue.com
  • 7. Design Phase Understand your bottlenecks www.shapeblue.com
  • 8. Redundancy & Resilience Designing for Redundancy and Resiliency www.shapeblue.com
  • 9. Redundancy & Resilience CloudStack Management Server MySQL Servers Virtualised Management Farm www.shapeblue.com
  • 10. Redundancy & Resilience CloudStack Management Server Very easy to set up additional management servers Load balancing required to give high availabilty www.shapeblue.com
  • 11. Redundancy & Resilience MySQL Master / Slave is ‘standard’ Alternatives include MySQL Proxy (Mirroring) Galera Cluster MMM www.shapeblue.com
  • 12. Redundancy & Resilience Load Load Balancer Balancer MySQL MySQL MySQL CS Man CS Man Galera www.shapeblue.com
  • 13. Redundancy & Resilience DC1 DC2 F5 F5 CS Man CS Man CS Man CS Man F5 F5 MySQL MySQL MySQL MySQL MySQL MySQL Galera Galera www.shapeblue.com
  • 14. Redundancy & Resilience Server ‘pairs’ MySQL masters and slaves CS Man & MySQL master vCenter & MS SQL server Any other redundant servers i.e. DNS www.shapeblue.com
  • 15. Redundancy & Resilience Laws of probability…. Same failure probability as raid 0 If management server OR MySQL master fails – downtime for the whole management system. www.shapeblue.com
  • 16. Automation Automation of the infrastructure build www.shapeblue.com
  • 17. Automation Uses: Why automate Automation tools Examples Configuring management VMs Build a CloudStack 4.0 management server Deployment of hosts Configuration of CloudStack (through API) www.shapeblue.com
  • 18. Automation Work smarter, not harder www.shapeblue.com
  • 19. Automation Automation gives you: Speed Efficiency Repeatability Accuracy www.shapeblue.com
  • 20. Automation Tools: Chef, Puppet KickStart, Python Shell scripting www.shapeblue.com
  • 21. Automation Example: Base Build of Management Servers using Shell Scripting www.shapeblue.com
  • 22. Automation – Management VM Configuration Create Deployment VM Download CSV & Make it executable, CentOS (Minimal) + hostconfig script run it. wget www.shapeblue.com
  • 23. Automation – Management VM Configuration The CSV: PrimaryNIC PrimaryNIC PrimaryNIC SecondaryNIC SecondaryNIC NTPSERVERIP VMhostname Searchdomain PrimaryNICIP Prefix Gateway Network SecondaryNICIP Prefix Network DNS1 1 CSMan1 cs4.net 10.14.16.67 27 10.14.16.65 Tools 10.144.72.21 21 Mgmt 10.128.9.9 64.238.19.20 CSMan2 cs4.net 10.14.16.68 27 10.14.16.65 Tools 10.144.72.22 21 Mgmt 10.128.9.9 64.238.19.20 cs4.net MySQL1 10.14.1.35 27 10.14.1.33 Database 10.141.163.4 26 Mgmt 10.128.9.9 64.238.19.20 MySQL2 cs4.net 10.14.1.36 27 10.14.1.33 Database 10.141.163.5 26 Mgmt 10.128.9.9 64.238.19.20 www.shapeblue.com
  • 24. Automation – Management VM Configuration #!/bin/bash echo "Please enter hostname [without domain]: ie CSMan1" read VMHOSTNAME SearchDomain=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $2}'` PrimaryNICIP=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $3}'` PrimaryNICIP=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $3}'` PrimaryNICPrefix=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $4}'` PrimaryNICGateway=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $5}'` PrimaryNICNetwork=`grep $VMHOSTNAME hostconfig.csv | awk -F ',' '{print $6}'` www.shapeblue.com
  • 25. Automation – Management VM Configuration echo "DEVICE="eth0" nameserver $DNS2 BOOTPROTO=none " > /etc/resolv.conf NM_CONTROLLED="no" ONBOOT=yes TYPE="Ethernet" echo "# ShapeBlue Script created file IPADDR=$PrimaryNICIP NETWORKING=yes PREFIX=$PrimaryNICPrefix HOSTNAME=$VMHOSTNAME GATEWAY=$PrimaryNICGateway " > /etc/sysconfig/network DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no echo "$NTPSERVERIP1 NAME="$PrimaryNICNetwork" $NTPSERVERIP2" > /etc/ntp.conf "> /etc/sysconfig/network-scripts/ifcfg-eth0 Reboot echo "# ShapeBlue Script created file search $SearchDomain nameserver $DNS1 www.shapeblue.com
  • 26. Automation – Management VM Configuration # if vm management use this one NETMASK4=255.255.255.248 if [ "$SecondaryNICNetwork" == “Mgmt" ]; then GATEWAY4=10.141.163.1 echo "ADDRESS0=10.128.9.9 ADDRESS5=213.212.69.0 NETMASK0=255.255.255.255 NETMASK5=255.255.255.0 GATEWAY0=10.14.16.1 GATEWAY5=10.141.163.1" > /etc/sysconfig/network- ADDRESS1=10.128.3.13 scripts/route-eth1 NETMASK1=255.255.255.255 fi GATEWAY1=10.14.16.1 ADDRESS2=64.238.199.202 NETMASK2=255.255.255.255 GATEWAY2=10.141.163.1 ADDRESS3=213.212.65.202 NETMASK3=255.255.255.255 GATEWAY3=10.141.163.1 ADDRESS4=213.212.68.168 www.shapeblue.com
  • 27. Automation Example: Build a CS4 management server www.shapeblue.com
  • 28. Automation – CS4 Management Server Create Deployment VM Set static IP address Download the script, CentOS (Minimal) + and ensure it has an make it executable, wget FQDN run it. www.shapeblue.com
  • 29. Automation – CS4 Management Server #!/bin/bash chkconfig ntpd on chkconfig mysqld on setenforce permissive chkconfig nfs on sed -i "/SELINUX=/ cSELINUX=permissive" /etc/selinux/config chkconfig rpcbind on echo " service ntpd restart [cloudstack] service mysqld restart name=cloudstack service rpcbind start baseurl=http://cloudstack.apt-get.eu/rhel/4.0/ service nfs start enabled=1 gpgcheck=0" > /etc/yum.repos.d/cloudstack.repo /usr/bin/mysqladmin -u root password 'password' yum update -y cloud-setup-databases cloud:cloud@localhost --deploy- yum install ntp cloud-client mysql-server -y as=root:password sed -i -e '/datadir/ ainnodb_rollback_on_timeout=1' -e '/datadir/ cloud-setup-management ainnodb_lock_wait_timeout=600' -e '/datadir/ amax_connections=350' -e '/datadir/ alog-bin=mysql-bin' -e "/datadir/ abinlog-format = 'ROW'" /etc/my.cnf www.shapeblue.com
  • 30. Automation Example: Host deployment server build using shell scipting www.shapeblue.com
  • 31. Automation – Host Deployment Create Deployment VM Download to VM Hypervisor Download build script, installation media (inc. make it executable, CentOS (Minimal) + wget XenServer Updates) run it. www.shapeblue.com
  • 32. Automation – Host Deployment Deployment server (VM) The script downloads, builds and configures: DHCP PXE (TFTP) HTTP server Script writes the scripts needed to for PXE boot of XenServer & ESXi hosts Script also writes the answer files and post installation scripts to configure XenServer and ESXi hosts www.shapeblue.com
  • 33. Automation – Host Deployment # write DHCP config file allow booting; echo "# DHCP for PXE allow bootp; use-host-decl-names true; ddns-update-style interim; option option-128 code 128 = string; authoritative; option option-129 code 129 = text; log-facility local7; option space gpxe; default-lease-time 600; option gpxe-encap-opts code 175 = encapsulate gpxe; max-lease-time 7200; option gpxe.bus-id code 177 = string; option subnet-mask $DHCPNETMASK; option broadcast-address $DHCPBROADCAST; next-server $PXESERVERIP; option routers $DHCPGATEWAY; filename "/gpxelinux.0"; option domain-name-servers $DNS1; option domain-name "$DOMAIN"; " > /etc/dhcp/dhcpd.conf subnet $DHCPSUBNET netmask $DHCPMASK { range $DHCPSTART $DHCPFINISH; } www.shapeblue.com
  • 34. Automation – Host Deployment # create pxelinux.cfg/default file echo "# script built pxeconfig DEFAULT menu.c32 menu title ShapeBlue Host Deployment timeout 0 LABEL ESXi5.0 KERNEL http://$PXESERVERIP/esxi/mboot.c32 APPEND -c http://$PXESERVERIP/esxipxeboot/boot.cfg pxebooting +++ IPAPPEND 1 MENU LABEL ESXi-5.0.0 " > /tftpboot/pxelinux.cfg/default www.shapeblue.com
  • 35. Automation – Host Deployment # Create xenserver answerfile echo "<?xml version="1.0"?> <installation srtype="ext"> <primary-disk gueststorage="yes">sda</primary-disk> <keymap>uk</keymap> <root-password>P@ssword</root-password> <source type="url">http://$PXESERVERIP/xenserver/</source> <script stage="filesystem-populated" type="url">http://$PXESERVERIP/xenpxeboot/postxeninstall.sh</script> <admin-interface name="eth0" proto="dhcp" /> <timezone>Europe/Dublin</timezone> <time-config-method>ntp</time-config-method> <ntpservers>$NTPSERVER1</ntpservers> <nameserver>$DNS1</nameserver> </installation> " > /var/www/html/xenpxeboot/xenanswerfile www.shapeblue.com
  • 36. Automation – Host Deployment MAC IP HOSTNAME STORAGEIP 80:c1:6e:6a:b5:9c 10.14.73.9 XenHost1 10.14.97.9 80:c1:6e:6a:b4:0c 10.14.73.10 XenHost2 10.14.97.10 80:c1:6e:6a:f3:fc 10.14.73.11 XenHost3 10.14.97.11 80:c1:6e:6a:f0:ec 10.14.73.12 ESXiHost1 10.14.97.12 80:c1:6e:6a:b5:a4 10.14.73.13 ESXiHost2 10.14.97.13 www.shapeblue.com
  • 37. Automation – Host Deployment echo “# sample XenServer post install script wget http://$PXESERVERIP/hostconfig.csv MACADD=`ifconfig | grep eth0 | awk '{print $NF}'`“ IPADDR=’grep -i $MACADD /tmp/arp_table.csv | awk -F ',' '{print $2}‘’ XENHOSTNAME =/`grep -i $MACADD /tmp/arp_table.csv | awk -F ',' '{print $3}‘/` STORAGEIP=/`grep -i $MACADD /tmp/arp_table.csv | awk -F ',' '{print $4}‘/` STORAGENICUUID=/’xe pif-list | awk '$0 ~ str{print b}{b=$0}' str="eth3" | awk '{print $NF}‘/` xe host-list params=uuid --minimal > /tmp/tmphostuuid xe pif-list management=true params=uuid --minimal > /tmp/tmpnicuuid read NICUUID < /tmp/tmpnicuuid read HOSTUUID < /tmp/tmphostuuid xe host-set-hostname-live host-uuid=$HOSTUUID host-name=$XENHOSTNAME xe host-param-set name-label=$XENHOSTNAME uuid=$HOSTUUID xe pif-reconfigure-ip uuid=$NICUUID mode=static IP=$IPADDR netmask=$HOSTNETMASK gateway=$HOSTGATEWAY DNS=$DNS1,$DNS2 xe pif-param-set uuid=$NICUUID other-config:domain=$DOMAIN " > /var/www/html/xenpxeboot/firstfullbootxenscript.sh www.shapeblue.com
  • 38. Automation – Host Deployment echo "#!/bin/bash if [ "$PATCHACTION" == "restartXAPI" ]; then # Install XenServer Updates xe-toolstack-restart else xe host-list params=uuid --minimal > /tmp/tmphostuuid reboot files=$(ls /tmp/*.xsupdate 2> /dev/null | wc -l) exit if [ "$files" != "0" ]; then fi read HOSTUUID < /tmp/tmphostuuid done cd /tmp fi for updatefile in /tmp/*.xsupdate; do PATCHUUID=$(xe patch-upload file- # Disable boot script for subsequent reboots name=$updatefile) rm -f /etc/rc3.d/S99postinstall xe patch-apply host-uuid=$HOSTUUID uuid=$PATCHUUID # Final Reboot rm -f $updatefile reboot PATCHACTION=$(xe patch-list uuid=$PATCHUUID " > /var/www/html/xenpxeboot/xenupdatescript.sh params=after-apply-guidance --minimal) echo "Patch Action:" $PATCHACTION www.shapeblue.com
  • 39. Automation Utilising the API when building the infrastructure www.shapeblue.com
  • 40. Automation The API What it is How can you use it Examples www.shapeblue.com
  • 41. Automation – The API What is the API The API is the real engine of CloudStack The web GUI is simply making API calls Port 8096 by default www.shapeblue.com
  • 42. Automation – The API Using the API CloudStack GUI Browser Word, Excel Using Firebug/IE Developer Tools with CloudStack www.shapeblue.com
  • 43. Automation – The API API commands directly through a browser Immediate response www.shapeblue.com
  • 44. Automation – The API API calls from a Word document or Excel spread sheet www.shapeblue.com
  • 45. Automation – The API Using Firebug / IE Developer Tools IE press F12 or ‘view developer tools’ Firefox install Firebug add-on www.shapeblue.com
  • 47. Automation – The API Global Settings http://csman:8096/client/api?command=updateConfiguration&name=vmware.management.portgroup&value=svc- console http://csman:8096/client/api?command=updateConfiguration&name=allow.user.create.projects&value=false http://csman:8096/client/api?command=updateConfiguration&name=allow.public.user.templates&value=false http://csman:8096/client/api?command=updateConfiguration&name=apply.allocation.algorithm.to.pods&value=true http://csman:8096/client/api?command=updateConfiguration&name=cpu.overprovisioning.factor&value=2 http://csman:8096/client/api?command=updateConfiguration&name=vm.allocation.algorithm&value=random www.shapeblue.com
  • 48. Automation – The API Getting information http://csman1:8096/client/api?command=listServiceOfferings http://csman1:8096/client/api?command=listTemplates&templatefilter=featur ed www.shapeblue.com
  • 49. Automation – The API Deploying an instance Base command: http://csman1:8096/client/api?command=deployVirtualMachine The required options: The Service Offering and Template IDs &serviceofferingid=XXX &templateid=XXX &zoneid=XXX &domainid=XXX &account=XXX Optional options: &displayname=xxx www.shapeblue.com
  • 50. Automation – The API Deploying an instance http://csman1:8096/client/api?command=deployVirtualMachine&serviceofferingi d=XXX&templateid=XXX Can be used to create a large number of instances very quickly www.shapeblue.com
  • 51. Documentation A word on documentation www.shapeblue.com
  • 52. Documentation Dull, boring, tedious, slow – Crucial. Write what you’re going to do Follow what you wrote Update it With redundant servers; follow it again With scripts ‘snapshot’ and start again www.shapeblue.com
  • 53. Any Questions ? Paul Angus [email protected] Twitter: @ShapeBlue www.shapeblue.com www.shapeblue.com
  • 54. Thank you Paul www.shapeblue.com

Editor's Notes

  • #2: End of day So we’ll start gentlyHopefully something for everyonePlease bear with me if seems obvious to you.Bear with my english accent and phrases/terminologyBasics and more advanced ideasPaul AngusEngineering and Science degreesCloudStack 2.13
  • #3: Design Phase – some tips from experienceRedundancy &amp; resilience – again some thoughts on building redundancy and resilience into the infrastructureAutomation – some examples of automation in the building of a cs architecture.Finanally a ‘word’ on documentation.
  • #5: Storage, networking, overall architects technical and managerialEverything is interconnected and feels like everything relies on everything elseSomeone chipping in can be invaluable – particularly if they have past experience.
  • #6: One that gets everyone:Switchsupports 4096 VLANs - but not at the same time.Gotchas…[add more]
  • #7: Private clouds – you have your current usage to judgePublic clouds harder to predict – is guided by offerings.
  • #8: Performance and / or capacityStorageNetworkNetwork (to storage) is often the limiting factor as jump to 10 Gbe is large(Although LACP in XenServer 6.1 and ESXi 5.1 will help to mitigate this)Not much point being able to run VMs per host if only 1Gb/s link Not much point to 256GB RAM with a single quad core processor unless a specific workload.
  • #9: A few words on designing the infrastructure to maximise uptime.
  • #10: I’ll look at the major CloudStack management elements – CSMan MySQLAnd then look at considerations if you’ve virtualised your management farm
  • #11: CSMan internally, worth having a second management server as a ‘hot spare’Otherwise you’re going to need to load balance your connections to them.
  • #12: Master / Slave is the ‘supported’ configuration, manual switchover not idealbut in a opensource environment anything goes.Some alternatives..
  • #13: Example of active/active load balanced elements
  • #14: Really cool setup – trader media group &gt;autotraderThey can suffer the loss of an entire datacenterUserightscale to burst to amazon.
  • #15: As well as what you have; ‘where’ you have it is importantRedundant pairs – DNS ServersWant anti-affinity (two MySQL servers)Want Affinity CSMan and MySQL Master
  • #16: Similar to RAID 0In similar 2 hosts – if split the double the probability of loss of systemWLB / DRS rules or switch off WLB/DRS
  • #18: Look at:Advantages of automationTools – from behemoth infrastructures to the simplest of toolsHost deployment, configuring management vms and configuration of cloudstack+ a couple of odds and ends
  • #19: How do we achieve that…&gt;
  • #20: Aim to remove as much human error as possibleSame time speed deployment up.Running a script is also quicker than typing and far more repeatableKick a ‘load’ of scripts off at the same time
  • #21: Automation can come in multiple formsChef &amp; Puppet – enterprise grade automation – works for in-house use (required infrastructure makes it less useful for SIs)KickStart and Python – enables to learn one language and stick to it, requires the interpreter to be installed, but Python is Shell scripts don’t have to be fancy – have to learn awk &amp; sed – have to learn the different languages.API calls
  • #22: Simple example using BASH scripting.A management farm with a reasonable level of redundancy can easily have more than a dozen servers.The particular installation that this example is based on was a multi-tiered network with three interfaces on each vm plus static routes, but one of the networks I worked on had 7 tiers and used proxy servers to reach the internet-a lot of typing and to configure it all
  • #23: We actually tend to combine these steps and create a VM template with these baked in.But essentially this is all we’d do
  • #24: We have a single CSV with all the networking information.The actual one this is based on had 3 interfaces in each VM
  • #25: Script itself:Ask for the hostname thenRead values from the csv usinggrep and awk based on hostname
  • #26: Write theifcfg-ethx files, ntp and network files.
  • #27: In this case there were routes which changed depending on which network the ‘secondary’ interface was connected to...takes out human error
  • #30: Req: static IP and fdqnPure management server (no nfs or kvm)Separate scripts to add nfs and kvm(thanks to Wido who built the repo)
  • #31: Again BASH scripting to build the server, however the configuring of hypervisors requires other scripting languagesInckickstart for ESXi
  • #32: Use a management VM created by previous scriptRepeat with new script to configure the server
  • #33: Write configuration file. Conscious decision to limit the number of files required.Self contained (requires hypervisor installation files)Look at some elements of the file &gt;
  • #34: After yum install of DHCP, suselinux and httpSee that script writes files rather than importing / downloading themAdds complexity in script because of escape characters
  • #35: This section writes the default file for pxe bootingThis section is just shows the ESXi option XenServer or XCP as wellCould have a different script for each host, but then need to generate a new file for each host to tie it to its mac address.Simpler to add a line in the final CSV
  • #36: Xenserver answer fileNote escape characters for quotes, but variables come from earlier in full script
  • #37: CSV file for hosts
  • #38: Note escape characters \\Weird stuff because of Xen XE command syntaxESXi has the ESXCli and vicfg commands
  • #39: Xen updates are usually painful
  • #45: In word or excel click on link in documentationImagine a spread sheet of the required storage with the final command built at the endWe don’t tend to fully automate this as ‘press-and-go’ because we want to keep an eye on what’s actually happeningThrough the GUI itself
  • #46: Cheat for finding out what the cloudstackgui is actually up to
  • #47: See the call in the to the API and the resulting responseCan we used to ‘see how the gui does it’
  • #48: Example of global settings(still need to restart the management server)
  • #49: Can retrieve information using the guiOtherwise only available through database
  • #50: Example of deploying a virtual machine
  • #51: Paste into browser and keep pressing refreshSpin up 150 hosts to stress test an environment
  • #53: Take your pickOnly way to remember what you did,only way for others to replicateRun scripts from scratch impossible to update code and separately make changes