Académique Documents
Professionnel Documents
Culture Documents
Agenda
Welcome and Introduction
What is CloudStack?
CloudStack Basics Cloudstack Deployment Architecture Networking Deep Dive Software Architecture Current Architecture Future Architecture Q&A
Lunch
Agenda (cont.)
CloudStack Integration
UI Customization API Deep Dive Future UI Plugin Framework
Q&A/Break
Apache Community
Why Apache and the Apache Server Foundation (ASF)? How to contribute to CloudStack
Closing Remarks
Sheng Liang
Cloud Visionary and Founder of Cloud.com CTO, CloudPlatforms Group at Citrix Systems
What is CloudStack?
Apache CloudStack
Secure, multi-tenant cloud orchestration platform
Turnkey platform for delivering IaaS clouds Over 100 commercial deployments: private and public Full featured GUI, end-user API and admin API
Build your cloud the way the worlds most successful clouds are built
Apache CloudStack
Open Source
Apache License Incubating in the Apache Software Foundation since April 2012 Open Source since May 2010
Build your cloud the way the worlds most successful clouds are built
Apache CloudStack
Flexibility and scale
Hypervisor agnostic Flexible network topologies
Image Mgmt.
Dashboard
Identity Mgmt.
Load Balancers
Storage
Compute
Network
146 Companies
238 Developers
Service Providers
Server Virtualization++
Cloud
Public Clouds
Multi-tenant Public Cloud
Dedicated resources Security & total control Internal network Managed by Enterprise or 3rd party
Dedicated resources Security SLA bound 3rd party owned and operated
Mix of shared and dedicated resources Elastic scaling Pay as you go Public internet, VPN access
Multi-tier Apps
Multi-tier VLANs OVF
Server Racks
Server Racks
Server Racks
Server Racks
CloudFormation
Deployment Architecture
Zone 1
Load Balancer Firewall
Host is the basic unit of scale. Runs a hypervisor or is bare metal Cluster consists of one ore more hosts of same hypervisor All hosts in cluster have access to shared (primary) storage
Pod N
Secondary Storage
L3 switch
Pod 1
L2 switch
.
Cluster N
Pod is one or more clusters, usually with a L2 switch. Represents a rack Availability Zone has one or more pods, has access to secondary storage. Firewall and Load balancers separate public and private networks
.
Cluster 1
Host 1
Host 2
Primary Storage
L2 switch
Secondary Storage
Secondary Storage
Host 2
Primary Storage
Configured at Zone-level
Stores all Templates, ISOs and Snapshots Zone can have one or more secondary storages
Deployment Architecture
Zone1 Zone 4
Data Center 2
Zone 2
Zone 3
Zone1
User API
Management Server
MySQL DB
User API
Load Balancer
Management Server
Admin API
Admin API
Management Server
MySQL DB
Back Up DB Replication
Infrastructure Resources
Single MS node can manage up to 5K hosts. Multiple nodes can be deployed for scale or redundancy
Commercial: RHEL 5.4+; FOSS: Ubuntu 10.0.4, Fedora 16
Infrastructure Resources
XAPI
HTTP
vCenter
XenServer ESX
XS 5.6, 5.6FP1, 5.6 SP2, 6.0 Incremental Snapshots VHD NFS, iSCSI, FC & Local disk Storage over-provisioning: NFS ESX 4.1, 5.0 (coming) Full Snapshots VMDK NFS, iSCSI, FC & Local disk Storage over-provisioning: NFS, iSCSI
Agent
Agent
KVM
RHEL 6.0, 6.1, 6.2 (coming) Full Snapshots (not live) QCOW2 NFS, iSCSI & FC Storage over-provisioning: NFS OVM 2.2
OVM
Network Flexibility
Network Services
L2 connectivity IPAM
DNS
Routing
VLAN isolation
Overlays L3 isolation
ACL
Firewall
NAT
VPN LB IDS IPS
Security Group 1
65.11.1.2 Guest VM 1
Guest VM 1
65.11.1.3
Guest VM 2
65.11.1.3
Guest VM 2
EIP, ELB
65.11.1.4 Guest VM 3 65.11.1.5 65.11.1.5 65.11.1.4 Guest VM 3
Guest VM 4
CS Virtual Router
Guest VM 4
CS Virtual Router
DHCP, DNS
Security Group 2
DHCP, DNS
Security Group 2
Guest Virtual Network 10.0.0.0/8 VLAN 100 Public Network/Internet 10.1.1.1 Public IP 65.37.141.11
CS Virtual Router
Guest VM 1
Public IP 65.37.141.11 1
Private IP 10.1.1.111
10.1.1.1
Guest VM 1
Guest VM 2
10.1.1.4
Guest VM 3
10.1.1.5
Guest VM 4
CS Virtual Router
10.1.1.5
Guest VM 4
DHCP, DNS
Network Offerings
Same concept with disk and service offerings
What can you control?
Name Enable Redundant Router Control Network Rate Specify Network Services (Firewall, Loadbalancer, etc) Specify Network Provider (VR, SRX, Netscaler, F5, etc) Specify access (All, Domain, Account)
Guest Virtual Network 10.1.1.0/24 VLAN 100 Public Network/Internet Gateway address 10.1.1.1
CS Virtual Router
10.1.1.2
10.1.2.2
App VM 1
DB VM 1
Public IP 65.37.141.11
10.1.1.3
Web VM 3
10.1.2.3
App VM 2
10.1.3.3
DB VM 2
10.1.1.4
Web VM 4
10.1.2.4
App VM 3
UI
Cloud Portal
CLI
Other Clients
Management Server
REST API
OAM&P API
Console Proxy Management
EC2 API
Other APIs
ACL & Authentication Accounts, Domains, and Projects ACL, limits checking Services API Plugin API
Template Access
DB
Services API
HA
Usage Calculations Additional Services
Orchestration Engine
Drives long running VM operations Syncs between resources managed and DB Generates events
Database Access
Usage Server
Image Resources Snapshot Resources
Resource API
Hypervisor Resources Network Resources Storage Resources
Orchestration Engine
Understands how to orchestrate long running processes (i.e. VM starts, Snapshot copies, Template propagation) Well defined process steps Calls Plugin API to execute functionalities that it needs
Plugins
Various ways to add more capability to CloudStack
Implements clearly defined interfaces All calls are at transaction boundaries Compiles only against the Plugin API module
Anatomy of a Plugin
Can be two jars: server component to be deployed on management server and an optional ServerResource component to be deployed co-located with the resource Server component can implement multiple Plugin APIs to add its feature Can expose its own API through Pluggable Service so administrators can configure the plugin As an example, OVS plugin actually implements both NetworkGuru and NetworkElement
Rest API
Optional. Required only if needs to expose configuration API to admin.
Plugin API
Implementation
Data Access Layer
ServerResource
Optional. Required if Plugin needs to be co-located with the resource Implements translation layer to talk to resource Communicates with server component via JSON
CloudStack Integration
Demo
CloudStack UI
Reference implementation of the CloudStack API
Built on HTML 4.0, CSS, and jQuery Uses Java Server Pages for localization only Three types of customizations
Minor customizations logo changes, minor CSS changes Major customizations Changing tabs, adding additional links Complete rewrite user UI is completely offloaded to a portal
#header div.logo { background: url("../images/logo.png") no-repeat scroll 0 center transparent; float: left; height: 47px; #navigation ul li { margin: 4px 0 0 19px; background: url("../images/bg-navposition: relative; item.png") width: 170px; repeat-x scroll 0 0 } transparent; cursor: pointer; height: 50px; text-shadow: 0 1px 1px #FFFFFF; }
.dashboard.admin .dashboard-container .top { background: url("../images/ bg-breadcrumb.png") repeat-x scroll 0 -1px transparent; border-radius: 7px 7px 0 0; color: #FFFFFF; float: left; margin: 0 0 9px; padding: 4px 4px 8px; width: 100%; }
sectionPreFilter: function(args) { if(isAdmin()) { return ["dashboard", "instances", "storage", "network", "templates", "accounts", "domains", "events", "system", "global-settings", "configuration", "projects"]; },
sectionPreFilter: function(args) { if(isAdmin()) { return ["dashboard", "instances", "storage", "network", "templates", "accounts", "domains", "events", "system", "global-settings", "configuration", "projects", // New section "testSection"]; }, ...
security.singlesignon.tolerance.millis SAML?
Localization
Support for Japanese and Simplified Chinese Takes advantage of the Java ResourceBundle to do localization Simply create a /WEB-INF/classes/resources/messages_<language code>.properties Server side vs Client side processing
Asynchronous Commands
Starting with 3.0, in your standard CRUD (Create, Read, Update, Delete) of any first class objects in CloudStack, CUD are automatically asynchronous. R is synchronous. Rather than returning a response object, it will return a job ID. If it is a Create command, it will also return the object ID. With the job ID, you can query the async job status via the queryAsyncJobResult command. The queryAsyncJobResult response will return the following possible job status code: 0 - Job is still in progress. Continue to periodically poll for any status changes. 1 - Job has successfully completed. The job will return any successful response values associated with
command that was originally executed. 2 - Job has failed to complete. Please check the <jobresultcode> tag for failure reason code and <jobresult> for the failure reason.
Response Formats
CloudStack supports two formats as the response to an API call. The default response is XML. If you would like the response to be in JSON, add &response=json to the Command String.
{ "listipaddressesresponse" : { "allocatedipaddress" : [ { "ipaddress" : "192.168.10.141", "allocated" : "2009-09-18T13:16:10-0700", "zoneid" : "4", "zonename" : "WC", "issourcenat" : "true" } ]
Pagination
Using the page and pagesize parameter
page defines the current cursor to the list pagesize defines the number of items per request Pagesize is limited by the administrator Sample: listVirtualMachines&page=1&pagesize=500 listVirtualMachines&page=2&pagesize=500
UI Plugin Framework
Problems today?
Any major customizations require modification of CloudStack UI code. Modifications require deep knowledge of CloudStack UI code. Versioning becomes difficult.
Apache Community
Ecosystem above
Best governance
15+ years, 100+ projects 2500+ Developers
April: proposal for donation; get accepted to Incubator May: donation, mailing lists, enter Incubation
Sept : Apache CloudStack 4.0 release 2012: work in the Apache Way
Graduate to Top Level Project, contingent on: Community involvement Follow legal requirements and Apache standards
Apache license provides more options for enhancements More direct influence possible
Better visibility into CloudStack development
Citrix CloudPlatform
Citrix released CloudPlatform 3.0.3 mid June.
Citrix plans to contribute 100% of development back into CloudStack
Monetization remains the same before and after Apache. We expect Apache CloudStack to be 3 months ahead of CloudPlatform
Citrix CloudPlatform will have a release schedule separate from CloudStack and will be determined by business needs.
How to Contribute
Apache Roles
User
A user is someone that uses our software. They contribute to the Apache projects by providing feedback to developers in the form of bug reports and feature suggestions. Users participate in the Apache community by helping other users on mailing lists and user support forums.
Developer
A developer is a user who contributes to a project in the form of code or documentation. They take extra steps to participate in a project, are active on the developer mailing list, participate in discussions, provide patches, documentation, suggestions, and criticism. Developers are also known ascontributors .
PMC Member
A PMC member is a developer or a committer that was elected due to merit for the evolution of the project and demonstration of commitment. They have write access to the code repository, an apache.org mail address, the right to vote for the community-related decisions and the right to propose an active user for committership. The PMC as a whole is the entity that controls the project, nobody else.
Development Environment
Development Machine
Apache Tomcat, version 6.0.33. Set environment variable CATALINA_HOME to point to your apache install directory. Mysql, version 5.1.58 Git, the latest version Java, the latest version Ant, the latest version
To build CloudStack
ant clean-all build-all deploy-server deploydb
Demo
How to Contribute
Clone ASF cloudstack repo:
git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git
Write code, make sure it's properly unit-tested. Unit-tests have to be submitted as a part of the patch
Resources
CloudStack docs and knowledge base:
http://docs.cloudstack.org/ http://wiki.cloudstack.org/
Resources (Cont.)
Exceptions handling in CloudStack:
http://wiki.cloudstack.org/display/dev/Cloudstack+Error+Codes+and+Exception +handling
devCloud
What is devCloud?
DevCloud is a VirtualBox image, on which CloudStack management server + Xen hypervisor are installed. CloudStack management server is running on Ubuntu 12.04 dom0, can also add dom0 itself as a Xen hypervisor host and create Linux virtual machines on it. As a developer, you can push your modified CloudStack code into DevCloud, then deploy and run the CloudStack management server in DevCloud. As an user, you can access CloudStack management server running inside DevCloud through web UI, large part of functionality of CloudStack are supported in DevCloud, such as creating VM, taking snapshot, creating template, console proxy, etc. http://wiki.cloudstack.org/display/COMM/DevCloud