Automating CloudStack and hypervisor installation and configuration
AUTOMATING CLOUDSTACK AND
Cloud and virtualization technical architect with background in
the banking and service provider industry.
Specialize and great interest in:
Virtualisation - VMware vSphere, Citrix XenServer, KVM, Hyper-V.
Cloud orchestration – vCloud, OpenStack, CloudStack.
The small print…
Any opinion or view expressed are my own and do not in any way reflect the
opinions or views of my present or previous employers or clients.
Why consider private cloud?
What are your options?
What is it and how does work?
Automation and builds:
Zero touch hypervisor builds
Automated CloudStack builds
Why consider private / hybrid cloud options?
Do nothing – stick with traditional IT:
Danger of shadow IT.
Lack of automation and orchestration means increased turnaround time.
Going fully public comes at a cost:
AWS: Windows t2.medum @ 2vCPU + 4GB RAM costs ~£500 / year
RackSpace: General purpose Windows @ 4GB RAM costs ~£1000 / year
Azure: A2 Windows @ 2vCPU + 3.5GB RAM costs ~£660 / year
Building own private clouds gives the benefit of quick self service,
automation and multi-tenancy within your own data centre.
What are your choices?
A long list of others:
Or – build your own……
BUILDING YOUR OWN CLOUD
Launched in May 2010 as Vmops, rebranded to Cloud.com.
Acquired by Citrix in July 2011. Donated to the Apache Software
Foundation in April 2012 and continue being developed as an open
source Apache Software Foundation project on the Apache License v2.
Citrix maintain their own commercial fork from the the open source
project, and have rebranded this Citrix CloudPlatform.
Citrix also developed the proprietary CloudPortal Business Manager to
provide a commercial front end for automated provisioning, billing,
metering and user management.
Version at time of writing:
Apache CloudStack 4.4.2 development version
Apache CloudStack 4.3.2 production version.
Citrix CloudPlatform 4.5.
CLOUDSTACK – A BACKGROUND
The list is long… http://cloudstack.apache.org/users.html
WHAT ARE OUR BUILDING BLOCKS?
•User friendly web GUI to manage IaaS resources on demand
•Native API with optional compatibility with Amazon EC2 / S3 API
•Automatic management and orchestration of all hypervisor resources, storage and networking
•Full multi tenancy segregation
•User / domain / project management and accounting / billing
•Single management role (compared to OpenStack which need 8-10 service to deliver the same functionality)
•Citrix XenServer 5.x + 6.x as well as Xen Project
•VMware ESXi 5.0, 5.1, 5.5
CLOUDSTACK – FEATURES
Network segregation and SDN technologies:
•Basic L3 networks
•OVS – Open vSwitch
End user network offerings:
•Basic networking with security groups (similar to Amazon EC2), provides
guest isolation on L3 networks hosted on single flat L2 network.
•Advanced networking providing L2 tenant isolation using VLANs and SDN.
•Per client routing, DHCP, DNS, VPN, firewall, NAT, port forwarding, VPC
•Loadbalancer and firewall integration with physical F5 / Netscaler / Juniper
CLOUDSTACK – FEATURES
CloudStack management server(s)
Primary storage for hypervisor clusters
Secondary storage for ISOs, templates and snapshots.
Physical data centre networking
Logical traffic types across physical networks
HIGH LEVEL CLOUDSTACK BUILDING
•Sets of KVM hosts
•Primary storage: NFS / iSCSI / FC SAN / SMB-CIFS
(Hyper-V) / VMFS (vSphere)
•A rack or row of racks including one or more
•Typically single data center or part of DC
•Contains one or more pods and zone wide
•Collection of one or more AZ’s in close proximity
managed by one or more management servers
Image courtesy of Apache.org
Handles routing for guest networks, routes between guest isolated
network and public network.
DHCP and DNS
VPN, firewall, NATing, and port forwarding
Secondary storage VM:
Handles export and import of templates, ISOs and snapshots
Console proxy VM:
Provides console access to guest VMs.
CLOUDSTACK SYSTEM VMS
• Basic zone networking
• Advanced zone networking
Traffic types (tags):
• Guest: isolated VLAN or SDN networks.
• Management traffic
• Public: internet or internal intranet.
Connecting to private LAN networks
• Client networks can be connected directly to e.g. enterprise LAN
What we’ll cover:
Automating hypervisor builds
Automating CloudStack build
Other things to consider:
Data centre networking and associated cost
Hardware choice – branded vs. white label kit
BUILDING HYPERVISORS AND
CD install ….
Fast and consistent builds.
Quick RTO in DR / BCM scenarios
Compensates for less technical teams with little time and bandwidth
Zero touch builds – why?
Minimal input to build cuts out error prone operations
CMDB / inventory DB / source control CI integration
Scripting for hypervisors:
XenServer: relatively easy to create scripted installs due to full bash shell
ESXi: tricky due to low functionality ash shell
KVM: Linux build
AUTOMATING YOUR HYPERVISOR BUILD
PXE: DHCP + TFTP/FTP/HTTP infrastructure
Fully dynamic build scripts
Per host answer files
How do you detect individual hosts?
Known MAC addresses supplied by vendor prior to delivery allows for true
zero touch builds.
PXE menu host selection allows for single touch builds.
Puppet Razor was developed to do builds based on policies around
ZERO TOUCH BUILDS
Management / MySQL server prerequisites:
•64-bit CentOS/RHEL 6.3+ or Ubuntu 12.04 preferred, 4 GB of memory, CPU cores
according to load, 250 GB of local disk minimum,500 GB recommended.
Configuration of RPM / DEB repositories.
Installation using yum / apt-get.
•Can be installed on the same node as CloudStack management, or running separately.
•Configuration of CloudStack DB
Prepare the system VM template on secondary storage
HIGH LEVEL BUILD STEPS
All CloudStack installation steps in one Ansible playbook:
–tags=base: NTP, Selinux, CloudStack and EPEL yum repos
–tags=mysql: all MySQL and DB installation and configuration steps
–tags=csmanagement: installs and configures base CloudStack build
INSTALLING CLOUDSTACK USING
Base install is now complete – but needs configuration:
Regions, zones, pods and clusters
Primary and secondary storage
Network model – including network segregation mechanism
Public, private and guest network IP ranges, as well as VLAN / SDN
Manually through the CloudStack GUI
Or again using Ansible – the following utilises CloudMonkey under
COMPLETED CLOUDSTACK INSTALL AND
Expansion to further regions, zones, pods and clusters
Commercial offerings, e.g. Citrix CloudPlatform Business manager
or you write your own…
Configure reporting and billing
Add additional management servers
Configure MySQL master/slave or MySQL / Galera cluster
Integrate hardware load balancers:
CLOUDSTACK – NEXT STEPS
Apache CloudStack site:
My blog: https://dsonstebo.wordpress.com
My Github repo: https://github.com/dagsonstebo