ICT role in 21st century education and its challenges
Building virtualised CloudStack test environments
1. Building Virtualised CloudStack
Test Environments
Geoff Higginbottom
CTO ShapeBlue
geoff.higginbottom@shapeblue.com
Twitter: @CloudStackGuru
2. Cloud Architect & ShapeBlue CTO
www.shapeblue.com @CloudStackGuru
Specialise in….
Designing & Building Clouds based on Apache CloudStack / Citrix
CloudPlatform
Developing CloudStack training
Blogging and sharing CloudStack knowledge
Involved with CloudStack before donation to Apache
Designed Clouds for Cloudera, Everyware, SunGard, Ascenty, BskyB,
Trader Media, M5 Hosting, Team Cymru, Interoute, University of
Pennsylvania.…
CloudStack Committer
About Me
3. Requirements
Portable Test / Training / Demo Environment
Windows, MAC and Linux Support
www.shapeblue.com @CloudStackGuru
Open Source Software
Reflect Production CloudStack deployments
Basic Networking
With and Without Security Groups
Advanced Networking
VLANs for Traffic Isolation
Utilise XenServer Hypervisor(s)
Shared / Local Primary Storage
Dedicated Storage Networks for Shared Primary, and Secondary Storage
100% CloudStack Feature Support
4. Additional Requirements
www.shapeblue.com @CloudStackGuru
Flexible Architecture
Remote access to system
Manage external Hypervisors
Use External Storage
Test HA Failover
Dual Management Servers with Load Balancing
Dual MySQL Servers with Replication
Dual DNS for ‘Internal DNS’
Configuration Management (Ansible)
5. VirtualBox
Cross Platform Virtualisation Application
Support to Windows, OSX and Linux
OpenSource (unlike VMware Workstation / Fusion)
Capable of running XenServer (but without HVM support)
Downloads available from
https://www.virtualbox.org/wiki/Downloads
www.shapeblue.com @CloudStackGuru
6. www.shapeblue.com @CloudStackGuru
Management Server VM
CentOS 6.5 VM
CloudStack Management Server
MySQL Server
NFS Storage Server
NGINX (for hosting templates)
XenServer VM
XenServer 6.2
Sandbox Deployment
7. Storage
Host Only Network 2
Public
Host Only Network 1
www.shapeblue.com @CloudStackGuru
NAT
Network Design
Management
Guest
XenServer VM
Host Only Network 0
Internal Network
Management VM
NFS Storage
Templates
11. VirtualBox Configuration
Management VM Networks
www.shapeblue.com @CloudStackGuru
Adapter 2:
NAT to enable access
to internet for install
and updating etc
12. VirtualBox Configuration
Management VM Networks
www.shapeblue.com @CloudStackGuru
Adapter 3:
‘Public’ Traffic to
allow the hosting
of Templates via
nginx
13. VirtualBox Configuration
Management VM Networks
www.shapeblue.com @CloudStackGuru
Adapter 4:
Storage Traffic
acting as NFS Server
for Primary and
Secondary Storage
14. VirtualBox Configuration
XenServer VM Resources
www.shapeblue.com @CloudStackGuru
1.5GB (4GB RAM Host)
2vCPU
Enable I/O APIC, PAE/NX, VT-x/AMD-v
4 NICs
16 GB disk minimum – more if testing local storage
24. Management Server Install
Install CentOS 6.5 Minimal and update
Follow the ‘Quick Installation Guide for CentOS’
http://docs.cloudstack.apache.org/projects/cloudstack-installation/
en/latest/qig.html
Install and configure the following:
www.shapeblue.com @CloudStackGuru
MySQL Server
NFS
CloudStack-Management
25. Configuration Tweaks
Install nginx so it can be used to host Templates
Once installed download the default CentOS template and place in the
nginx web folder
# cd /usr/share/nginx/html
# wget -nc http://download.cloud.com/templates/builtin/centos56-
x86_64.vhd.bz2
Update the CloudStack DB to change the location of the default
template
# mysql –p<password> cloud -e "UPDATE cloud.vm_template SET
url='http://192.168.56.11/centos56-x86_64.vhd.bz2' WHERE
unique_name='centos56-x86_64-xen';"
www.shapeblue.com @CloudStackGuru
26. Configuration Tweaks
Enable use of Non-HVM XenServer
# mysql –p<password> cloud -e "INSERT INTO cloud.configuration
(category, instance, component, name, value, description) VALUES
('Advanced', 'DEFAULT', 'management-server', 'xen.check.hvm', 'false',
'Shoud we allow only the XenServers support HVM');"
www.shapeblue.com @CloudStackGuru
27. Configuration Tweaks
Reduce the RAM allocations for System VMs
# mysql -u root –p<password> cloud -e "UPDATE cloud.service_offering SET
ram_size='128', speed='128' WHERE vm_type='domainrouter';"
# mysql -u root –p<password> cloud -e "UPDATE cloud.service_offering SET
ram_size='128', speed='128' WHERE vm_type='elasticloadbalancervm';"
# mysql -u root –p<password> cloud -e "UPDATE cloud.service_offering SET
ram_size='128', speed='128' WHERE vm_type='secondarystoragevm';"
# mysql -u root –p<password> cloud -e "UPDATE cloud.service_offering SET
ram_size='128', speed='128' WHERE vm_type='internalloadbalancervm';"
# mysql -u root –p<password> cloud -e "UPDATE cloud.service_offering SET
ram_size='128', speed='128' WHERE vm_type='consoleproxy';"
www.shapeblue.com @CloudStackGuru
30. XenServer Install
Install XenServer 6.2 from ISO
Apply latest patches in line with
http://support.citrix.com/cms/kc/cloud-troubleshooting/
cloudplatform-compatibility-matrix/
www.shapeblue.com @CloudStackGuru
31. CloudStack Settings
www.shapeblue.com @CloudStackGuru
Zone Name – Test
IPv4 DNS1 – 8.8.8.8
Internal DNS 1 – 192.168.56.11
Hypervisor – XenServer
Guest CIDR – 10.1.1.0/24
Zone Setup
34. CloudStack Settings
Public Traffic
www.shapeblue.com @CloudStackGuru
Gateway – 172.30.0.1
Netmask – 255.255.255.0
VLAN - <blank>*
Start IP – 172.30.0.21
End IP -172.30.0.30
* Leave VLAN blank so the Host Laptop can access the Public
Network
35. CloudStack Settings
POD Settings
www.shapeblue.com @CloudStackGuru
POD Name – POD1
Reserved System Gateway – 192.168.56.1
Reserved System Netmask – 255.255.255.0
Start Reserved System IP – 192.168.56.21
End Reserved System IP – 192.168.56.30
37. CloudStack Settings
Storage Traffic
www.shapeblue.com @CloudStackGuru
Gateway – 10.10.101.1
Netmask – 255.255.255.0
VLAN – <blank>*
Start IP – 10.10.101.21
End IP – 10.10.101.30
* Storage VLAN is left blank as it is being set by XenServer on its
virtual network, if you also set it here it will not work
42. Enhanced Deployment
Sandbox configuration limits access to only the Host laptop
Enhanced configuration allows external access to system:
www.shapeblue.com @CloudStackGuru
Management Server
Secondary Storage VM and Console Proxy VM
XenServer Management (via XenCenter)
Also enables:
External Hypervisors (e.g. ESXi Cluster)
External Storage
43. Changes to VirtualBox
Replace ‘Host Only’ Networks with ‘Bridged’ Networks
Requires Physical NIC as VirtualBox does not support Promiscuous
www.shapeblue.com @CloudStackGuru
mode over Wifi
Public IP Range should be compatible with Hosts Physical Network
Management Network
Replace 192.168.56.x with 192.168.57.x (prevents conflict with VB)
Add 192.168.57.x IP to Host Laptop as secondary IP
Configure external devices with 192.168.57.x IP to access UI
Will still operate as a ‘Sandbox’ config when not connected to
Bridged Network
44. Get Ambitious!
2x CloudStack Management
2x MySQL - Master / Slave
www.shapeblue.com @CloudStackGuru
2x HAProxy Keepalived
2x Bind Servers
2x Citrix XenServers
All on an 8GB RAM Laptop
Quick Demo (if time allows)
45. Building Virtualised CloudStack
Test Environments
Geoff Higginbottom
CTO ShapeBlue
geoff.higginbottom@shapeblue.com
Twitter: @CloudStackGuru