xen and cloudstack - huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · xen...

38
Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix Systems

Upload: hoangcong

Post on 04-Jun-2018

234 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Xen and CloudStack

Ewan Mellor

Director, Engineering, Open-source Cloud Platforms

Citrix Systems

Page 2: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• What is CloudStack?

• Move to the Apache Foundation

• CloudStack architecture on Xen

• The future for CloudStack

• Developing on CloudStack

Agenda

Page 3: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• Infrastructure-as-a-Service software

• For people to build Amazon-style clouds

– either as a public service,

– or as a private cloud within your own organization.

CloudStack is…

Page 4: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

CloudStack is…

Compute

XenServer Oracle VM KVM vSphere Bare metal

Hypervisor

Storage

Local Disk iSCSI NFS

Fiber

Channel Swift

Block & Object

Network

Network

Type Isolation

Load

balancer Firewall VPN

Network & Network Services

Page 5: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix
Page 6: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

CloudStack

Apache Foundation

(incubating)

2008-present

Java

Fairly centralized

Complete solution

CloudStack versus OpenStack

OpenStack

OpenStack Foundation

(founding in progress)

2010-present

Python

Aggressively distributed

More of a framework

Page 7: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• Citrix donated the CloudStack code to the

Apache Software Foundation and Apache

Incubator

• The project now needs to prove that it can

operate openly and independent of Citrix

• If it can do that, it can be accepted as a

top-level Apache project.

Apache incubation

Page 8: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Most CloudStack users choose Xen or XenServer

It is the combination that works the best!

CloudStack and Xen

Xen

VMware

KVM

Page 9: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• A cluster of management servers

• An orchestration engine

• State and user management

• Region, zone, pod, cluster model

• A large collection of effectors

• System VMs

• Usage reporting

• User interface

CloudStack is…

Page 10: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Router

L3 core switch

Access layer

switches

Servers

Management

cluster

Secondary

Storage

Pod 1 Pod 2 Pod 3 Pod N

Load balancer

Users

Page 11: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Pod 1

Host 2

Cluster 1

Host 1

Primary

storage

L3 switch

Secondary

storage

L2 switch

Two types of storage

• Stores virtual disks

• Configured at cluster level

• Close to hosts for better performance

• Requires high IOPS

Primary storage

• Stores templates, ISOs and snapshots

• Configured at zone level

• Zone can have one or more

• High capacity, low cost

Secondary storage

Page 12: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Router

L3 core switch

Access layer

switches

Servers

Management

cluster

Secondary

Storage

Pod 1 Pod 2 Pod 3 Pod N

Load balancer

Users

Page 13: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• Choice of network isolation – Physical, VLAN, L3 (anti-spoof), overlay (GRE)

• Multiple networks – Shared networks, project networks

• IPAM / DHCP

• Gateway (inc VRRP)

• VPN, stateful firewall, NAT, port forwarding

• Traffic monitoring

• Load balancing

• User-data / password-change services

Networking features

Page 14: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Virtual network topologies

Public network

Guest network

DHCP, DNS, NAT, LB, VPN

10.1.1.1

Guest

VM 1

10.1.1.3

Guest

VM 2

10.1.1.4

Guest

VM 3

10.1.1.5

Guest

VM 4

CS

Virtual

Router

Public network

DHCP, DNS

10.1.1.1

Guest

VM 1

10.1.1.3

Guest

VM 2

10.1.1.4

Guest

VM 3

10.1.1.5

Guest

VM 4

NetScaler

LB

CS Virtual Router provides network services External devices provide network services

CS

Virtual

Router

SRX

firewall

Guest network

Page 15: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Public network

Multi-tier virtual network topology

DHCP, DNS, user-data

10.1.1.1

Web VM

1

10.1.1.3

Web VM

2

10.1.1.4

Web VM

3

10.1.1.5

Web VM

4

Netscaler

LB

CS

Virtual

Router

CS

Virtual

Router

10.1.2.21

10.1.2.18

10.1.2.38

10.1.2.39

10.1.2.31

App VM

1 10.1.3.21

10.1.2.24

App VM

2 10.1.3.45

10.1.3.24

DB VM 1

DHCP, DNS,

user-data

DHCP, DNS user-data, NAT, VPN

Public network

Guest network Guest network Guest network

CS

Virtual

Router

SRX firewall

Page 16: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Router

L3 core switch

Access layer

switches

Servers

Management

cluster

Secondary

Storage

Pod 1 Pod 2 Pod 3 Pod N

Load balancer

Users

Page 17: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Router

L3 core switch

Access layer

switches

Servers

Management

cluster

Secondary

Storage

Pod 1 Pod 2 Pod 3 Pod N

Load balancer

Users

System VMs

Customer VMs

Page 18: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

18

Driver domains

Xen Hypervisor

Control domain (dom0)

Host HW

Guest VMn

Apps

Memory CPUs I/O

HW Drivers

PV Back Ends PV Front Ends

Driver Domain e.g. • Disk • Network

HW Driver

PV Back End

Kernel Guest OS

Page 19: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

The road ahead

Page 20: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• Disentangle some core components

– Make it easier for people to work on

subsystems

– Make it easier to scale the API layers

The future for CloudStack

Page 21: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

… … …

S3 API

VM

S3 API

VM

S3 API

VM

Object store

(e.g., NetApp, Hadoop, …)

S3 API

NFS, CIFS,

HDFS, 3rd-

party object

store API, …

S3 API system VM

Page 22: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• Absorb new changes from Xen and XS

– Storage migration

– The Windsor architecture

– I/O subsystem changes

The future for CloudStack

Page 23: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• New object storage systems

– Caringo CAStor

– HDFS

– Riak CS

• New block storage systems

– GlusterFS?

– Ceph?

• Open vSwitch / OpenFlow / VXLAN

The future for CloudStack

Page 24: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

DevCloud

Page 25: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

DevCloud – What is inside?

• VirtualBox VM

– Xen Cloud Platform

– Ubuntu 12.04 dom0 (aka Kronos)

• JVM, Tomcat, developer tools

• NFS server

• MySQL

– Working, pre-configured CloudStack

– System VMs

– Tiny Linux template

Page 26: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix
Page 27: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Why?

• Eliminates

– need for another machine / hypervisor

– Primary and secondary storage

– Networking, VLAN, etc

– Install and configuration of environment

• Disposable changes

– Revert to snapshot

Page 28: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Run

• Start the DevCloud VM from VirtualBox UI

• Access the CloudStack UI

– http://localhost:8080/client

• Access the dom0

– ssh root@localhost –p 2222

• From the UI, enable the zone

– System VMs will start up

Page 29: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix
Page 30: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix
Page 31: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

CloudStack architecture

Page 32: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Management Server Cluster

Replica

Infrastructure

Resources

User API

Admin API

Load

Balancer

Management

Server

Management

Server

MySQL

MS is stateless. MS can be deployed as physical server or VM

Single MS node can manage up to 10K hosts. Multiple nodes can be deployed for scale or redundancy

Replication

Page 33: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

• Hosts • Servers onto which services will be

provisioned

• Primary Storage • VM disk storage

• Cluster • A grouping of hosts and their associated

storage

• Pod • Collection of clusters in the same failure

boundary

• Network • Logical network associated with service

offerings

• Secondary Storage • Template, snapshot and ISO storage

• Zone • Collection of pods, network offerings and

secondary storage

• Management Server Farm • Management and provisioning tasks

Components

Zone

CloudStack Pod

Cluster

Host

Host

Network

Primar

y

Storag

e

VM

VM

CloudStack Pod

Cluster Seconda

ry

Storage

Page 34: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Pod 1

….

Cluster N

L2

Host 2

Cluster 1

Deployment Architecture

Host 1

Hypervisor is the basic unit of scale.

Cluster consists of one ore more hosts of same hypervisor

All hosts in cluster have access to shared (primary) storage

Pod is one or more clusters, usually with L2 switches.

Availability Zone has one or more pods, has access to secondary storage.

One or more zones represent cloud

Primary

Storage

Zone 1

….

L3

Secondar

y

Storage

Pod N

Management

Server

Cluster

Internet

Page 35: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

DevCloud step-by-step

Page 36: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Overview

• Install Virtual Box

• Download DevCloud virtual machine

• Install DevCloud VM

• Run the VM

• Login to the CloudStack GUI

• Start a CloudStack VM.

Page 37: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

Virtual Box

• Download / install from Oracle

• Ensure that VT-d and virtualization

extensions are enabled in your laptop

CPU

• Recommend at least 2 GB for DevCloud

VM

Page 38: Xen and CloudStack - Huihoodocs.huihoo.com/xen/summit/2012/aug27/7b-xen-and-cloudstack.pdf · Xen and CloudStack Ewan Mellor Director, Engineering, Open-source Cloud Platforms Citrix

DevCloud VM

• Download from http://download.cloud.com/templates/devcloud/DevCloud.ova

• Latest install instructions here:

http://wiki.cloudstack.org/display/COMM/DevCloud

• Import DevCloud into VirtualBox

– Change memory allocation to 2 GB

• Snapshot for known good state