Transcript
Page 1: Apache CloudStack from API to UI

Apache CloudStack:From API to UI

Joe BrockmeierPMC Member Apache CloudStack

[email protected]: @jzb | Freenode: jzb

Page 2: Apache CloudStack from API to UI

Five Six Characteristics of Clouds

• On-Demand Self-Service• Broad Network Access• Resource Pooling• Rapid Elasticity• Measured Service• API Access

Page 3: Apache CloudStack from API to UI

Cloud Service ModelsUSER CLOUD a.k.a. SOFTWARE AS A SERVICE

Single application, multi-tenancy, network-based, one-to-many delivery of applications, all users have same access to features.

Examples: Salesforce.com, Google Docs, Red Hat Network/RHEL

DEVELOPMENT CLOUD a.k.a. PLATFORM-AS-A-SERVICE

Application developer model, Application deployed to an elastic service that autoscales, low administrative overhead. No concept of virtual machines or operating system. Code it and deploy it.

Examples: VMware CloudFoundry, Google AppEngine, Windows Azure, Rackspace Sites, Red Hat OpenShift, Active State Stackato, Appfog

SYSTEMS CLOUD a.k.a INFRASTRUCTURE-AS-A-SERVICE

Servers and storage are made available in a scalable way over a network.

Examples: EC2,Rackspace CloudFiles, OpenStack, CloudStack, Eucalyptus, OpenNebula

SaaS

PaaS

IaaS

Page 4: Apache CloudStack from API to UI

Deployment Models

Page 5: Apache CloudStack from API to UI

What is Apache CloudStack?

• Open Source (Apache-Licensed) IaaS• Community of Users and Providers• Written in Java*• Provides a Turn-Key “Stack” for Running

Public, Private, or Hybrid Clouds• Hypervisor Agnostic*• Time-Based Releases

Page 6: Apache CloudStack from API to UI

In the beginning…

• Started as VMOps Cloud Stack (2008)• Became Cloud.com in 2010• Released CloudStack under GPLv3 – but Open

Core (May 2010)• Acquired by Citrix (July 2011)• Entirely Open Source (August 2011)

Page 7: Apache CloudStack from API to UI

Going to Apache

• Relicensed & Proposed to Apache (April 3, 2012)

• Accepted as an Incubating Project (April 16, 2012)

• First Major Release, 4.0.0-incubating (November 6, 2012)

• First Minor Release, 4.0.1-incubating (February 12, 2013)

Page 8: Apache CloudStack from API to UI

Why Apache?

• Known and Proven Governance Model• Active Mentoring of New Projects• 100% Community-Driven• More than 3,000 Developers• Many Successful Projects: Apache HTTPD,

Tomcat, Hadoop, Cassandra, Lucene, etc.

Page 9: Apache CloudStack from API to UI

Apache Process

• 100% Community-Driven• “If It Didn’t Happen on the Mailing List…”• Clear Governance (PPMC, Committer,

Contributor, etc.) • Community Over Code• Rigorous Attention to Licenses• Can Seem Bureaucratic

Page 10: Apache CloudStack from API to UI

Results!

Page 11: Apache CloudStack from API to UI

What CloudStack Provides

Page 12: Apache CloudStack from API to UI

Hypervisor Support

• KVM• XenServer• Xen Cloud Platform• VMware via vCenter• Bare Metal via IPMI

Page 13: Apache CloudStack from API to UI

CloudStack Terminology

• Zone: Availability zone, aka Regions. Could be worldwide. Different data centers

• Pods: Racks or aisles in a data center

• Clusters: Group of machines with a common type of Hypervisor

• Host: A Single server• Primary Storage: Shared

storage across a cluster• Secondary Storage: Shared

storage in a single Zone

Page 14: Apache CloudStack from API to UI

Pod 1

….

Cluster N

Access Layer

Host 2

Cluster 1

CloudStack 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

PrimaryStorage

Zone 1

….

L3 core

SecondaryStorage

Pod N

CloudStack Management

Server

Internet

Page 15: Apache CloudStack from API to UI

CloudStack Storage• Primary Storage:

– Anything that can be mounted on the node of a cluster. – Cluster LVM…iSCSI…– Holds disk images of running VMs– Support for CEPH with KVM hypervisors

• Secondary Storage:– Available across the zone– Holds snapshots and templates (image repo)– Can use OpenStack swift or any object store (Gluster FS…)– New support for Caringo

• Can use NFS for both to start• Storage abstraction refactoring underway in 4.1.0 and 4.2.0

Page 16: Apache CloudStack from API to UI

Networking• Extremely flexible to:

– Provide isolation with VLANs– Provide isolation at L3 with shared L2 (scalability)– Support hardware devices that exposes API– Deployed on existing networking infrastructure– Support new networking paradigm (SDN)

• Support for Nicira Virtual P• Extensive use of Open VSwitch

Page 17: Apache CloudStack from API to UI

Management Server

• All UI functionality is available as an API call• Restful API

– Unauthenticated API on 8096 for localhost (disabled by default)

– Authenticated on port 8080– Responses in XML or JSON

Page 18: Apache CloudStack from API to UI

Highly Scalable

• Up to 10K resources managed per management server node

• Internal testing w/software simulators shows up to 30K physical resources and 30K VMs managed by 4 management server nodes.

• Real production deployments of tens of thousands of resources

• See Alex Huang’s presentation: http://is.gd/alexh_scale

Page 19: Apache CloudStack from API to UI

CloudStack Allocation• How are VMs placed, storage allocated, etc.?• CloudStack has several defaults

– First fit– Fill first– Disperse

• Don’t like those? Create your own!• Allows over-provsioning• OS Preference

Page 20: Apache CloudStack from API to UI

High Availability• RFMTTR – “really fast mean time to recovery.”• CloudStack is not (alone) a magical HA

solution.• Watches HA-enabled VMs to ensure they’re

up, and that the hypervisor it’s on is up. Will restart on another if the hypervisor goes down.

• Redundant router.

Page 21: Apache CloudStack from API to UI

Load Balancing• Uses HA Proxy• CloudStack supports load-balancing for

distributing traffic to its instances• Choose between round-robin, source, or least

connections• Choose stickiness policy (source, lbcookie,

appcookie)

Page 22: Apache CloudStack from API to UI

Snapshots• CloudStack allows you to take snapshots

manually or set up recurring snapshots.• Snapshots can be managed automagically

(keep N number) and manually (delete snapshot manually).

• Can be turned into templates or volumes to be used by other instances.

Page 23: Apache CloudStack from API to UI

CloudStack Networking• CloudStack manages

– DHCP– VLAN allocation– Firewall– NAT/Port forwarding– Routing– VPN– Load Balancing

• CloudStack can manage physical network hardware (F5-Big IP, NetScaler, Juniper SRX)

Page 24: Apache CloudStack from API to UI

CloudStack Networking Types

• CloudStack offers Basic and Advanced Networking– Basic: Easy, can only be one physical network

• Every host, system VM, and guest instance has a unique IP

– Advanced: Allows multiple physical networks• Each account has a public IP, assigned to virtual router,

guest IP range (e.g. 10.0.1.10/24), and VLAN ID for the isolated guest network

• Guests communicate via their own dedicated VLAN

Page 25: Apache CloudStack from API to UI

CloudStack Networks

• Management Network: Used by hypervisors and management server to communicate

• Private Network: Default network for system VMs (virtual router, secondary storage VM, console proxy VM)

• Public Network: Public-facing (e.g. the Internet)• Guest Network: Network VMs are provisioned on• Link-local Network: Network used for

communication between hypervisor and system VMs. (RFC 3927)

Page 26: Apache CloudStack from API to UI

Security Groups• Traditional isolation has been via VLAN• VLANs provide isolation, but at the cost of

scaling– Standard limit is 4,096 VLANs– Hardware that supports upper limit is expensive– What happens with 4,097?

• Amazon and others use Layer 3 isolation (Security Groups)

Page 27: Apache CloudStack from API to UI

Security Groups• Assumes a quasi-trusted Layer 2 network• Filtering/isolation happens at the bridge level

(think ebtables)• Deny by default

Page 28: Apache CloudStack from API to UI

Accounts, Domains, and Projects

• CloudStack has a top-level domain called ROOT• You can create sub-domains• You can create 3 types of accounts, admins,

domain-admins, or users• Projects can be used to hold resources for time-

limited projects• Supports LDAP integration• CloudStack’s account system is very simple – don’t

make it more complicated!

Page 29: Apache CloudStack from API to UI

Usage Accounting

• Provides stats that can be used for billing (but is not a billing solution)

• Usage stats show: VM count, CPU usage, disk allocation and use, network usage over time.

• Integration howtos for importing to Excel, Ubersmith, Amysta, and Cloud Portal.

Page 30: Apache CloudStack from API to UI

APIs

• Root Admin, Domain Admin, User• Set of methods available over HTTP(S)• Authenticated on 8080 w/Keys• Unauthenticated on 8096 (off by default)• Python + Ruby clients available

Page 31: Apache CloudStack from API to UI
Page 32: Apache CloudStack from API to UI

AWS EC2 and S3 Compatibility

• Includes an EC2/S3 compatibility layer• See:

– http://wiki.cloudstack.org/display/RelOps/EC2+API+support+in+CloudStack

– http://www.slideshare.net/sebastiengoasguen/cloudstack-ec2-configuration

• Euca Tools, Boto, etc. should work with CloudStack

Page 33: Apache CloudStack from API to UI

CloudMonkey• New ASF CloudStack CLI• Python code, built using Marvin• https://cwiki.apache.org/CLOUDSTACK/clouds

tack-cloudmonkey-cli.html• Available from CloudStack source or pypi:

– http://pypi.python.org/pypi/cloudmonkey/

Page 34: Apache CloudStack from API to UI

Use Cases

• Private Cloud• Dual-Workload Private Cloud• Public Cloud (ISP/Providers)• Hybrid Cloud• Small to Very, Very Large

Page 35: Apache CloudStack from API to UI

Zynga

• Online Games• Hybrid Cloud (Move

workloads between “zCloud” and public cloud) 80/20 split

• North of 30K Nodes

Page 36: Apache CloudStack from API to UI

Datapipe

• Public Cloud• Geo-distributed:

– U.S. (NJ & San Jose, CA)– Hong Kong– Shanghai– London– Iceland (w/in 90 days)

• Smaller (< 100 Hosts) but massively distributed

• See: http://is.gd/datapipe_cs

Page 37: Apache CloudStack from API to UI

ISWest

• Hosted IaaS Clouds (Private Environment) from Dedicated Servers

• Most Customers are Small (< 15 VMs)

• Mix of Hypervisors• Functioning Cloud in “a

little over a month.”

Page 38: Apache CloudStack from API to UI

Trying CloudStack

Page 39: Apache CloudStack from API to UI

DevCloud

• DevCloud is a VirtualBox image w/nested virt.• Grab the DevCloud image from:http://wiki.cloudstack.org/display/COMM/DevCloud• Log in via the GUI: http://localhost:8080/client• SSH to DevCloud:ssh -p 2222 root@localhostUsername: admin Password: password• DevCloud KVM – effort to run DevCloud on a KVM host

Page 40: Apache CloudStack from API to UI

CloudStack Runbook

• Minimal install (1 server)• Written by David Nalley w/fixes from the

community• http://people.apache.org/~ke4qqq/runbook/• Focuses on CentOS w/KVM – other runbooks

in process for Ubuntu w/Xen or KVM.

Page 41: Apache CloudStack from API to UI

Direction

• Currently on a Four-Month Release Cycle• 4.1.0 Expected Early April, 4.2.0 in August• 4.0.2 “Any Day Now”• Releases Supported Until Next Major Feature

Release (e.g., 4.0.0, 4.0.x until 4.1.0)• Last Major Release Will Receive Support for 12

Months (hasn’t happened yet)

Page 42: Apache CloudStack from API to UI

Expected in 4.1.0

• AutoScale: Work with loadbalancers (like NetScaler) to scale up/down resources.

• Resize Volumes for Instances• OpenVSwitch Support for KVM• API Request Throttling• AWS-like Regions• Persistent Networks without Running

Instances

Page 43: Apache CloudStack from API to UI

Get Involved

• Main Site: CloudStack.org• IRC: #cloudstack and #cloudstack-dev• Follow @cloudstack on Twitter• Lots of Presos:

http://slideshare.net/cloudstack• Mailing Lists:

http://cloudstack.org/discuss/mailing-lists.html

Page 44: Apache CloudStack from API to UI

Contact Me

Email: [email protected]

Phone: +1 314-669-4JZB (4592)

Blog: http://dissociatedpress.net/

Twitter: @jzb and @cloudstack


Top Related