• 120 likes • 360 Views
Developing for CloudStack. Mandar Barve. Agenda. What is CloudStack ? Where is the code? How can I build it? How can I test it? Using DevCloud References DevCloud in action, Q & A. What is CloudStack ?.
E N D
Developing for CloudStack MandarBarve
Agenda • What is CloudStack? • Where is the code? • How can I build it? • How can I test it? • Using DevCloud • References • DevCloud in action, Q & A
What is CloudStack? • Apache Software Foundation’s open source software platform for pooling compute, storage, network resources to build public, private, hybrid IaaS clouds • Multi-hypervisor support (Xen, KVM, Vmware) • Provides GUI for administration and management of cloud resources • Provides virtual appliances that provide services such as firewalls, routers, load balancers • Provides well documented API for programmatic control
What is CloudStack? • Overall deployment architecture looks as below zone P O D Cluster Management Server host Secondary storage host Primary storage host MySQL DB
What is CloudStack? • Management server controls the infrastructure. Single management server can control multiple zones with PODs, clusters, hosts, storage and networking gear. • Zone is like a data center with one or more PODs. • POD is a rack of servers, access switches and primary storage. • Servers are part of hypervisor clusters. CloudStack supports multiple hypervisors including Xen, KVM, Vmware. • Primary storage is shared by all servers in a cluster. • Each Zone can have shared secondary storage to store images, backups for the entire zone.
CloudStack code • Source code is hosted at: https://git-wip-us.apache.org/repos/asf/cloudstack.git • The master git branch is what Apache Cloudstack developers work with. To clone this branch, you will need to do - • git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git • Apache CloudStack has a Project Management Committee, Review board,developer mailing list and JIRA for tracking issues. • There are a set of designated committers who can commit a patch into the repository. • Anyone can contribute to the project by either posting the patches on the review board, mailing list or creating a JIRA and attaching patch to the JIRA.
Development Environment on Linux • CloudStack code is Java code. • Install maven 3.0.4 or higher version. • Install tomcat. • Install MySQL server for management server database. • Install OpenJDK • Set the environment variables. Ref: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment+on+Linux
Run CloudStackcode • Once built CloudStack code can be kick started in a Jetty or tomcat container. • You can create debian/rpm packages to be served over HTTP to multiple management server nodes for deployment. • Tools like Eclipse support maven plugins that can be used for building CloudStack code in Eclipse. • Once Management server starts running you should be able to get the management server log messages on the console if running through jetty. • If you have installed packages then the logs go to /etc/cloudstack/management/managementserver.log
DevCloud • DevCloud is a prepackaged virtual appliance (OVA) that can be downloaded and imported into Virtual Box. • It comes prepackaged with required development tools such as maven, Java. • It comes with preinstalled mysql server, python tools. • All you need to do is get the CloudStack code, build it and start it to start the management server
References • Development 101 https://cwiki.apache.org/confluence/display/CLOUDSTACK/Development+101 • DevCloudhttps://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud • API documentation http://cloudstack.apache.org/docs/api/ • CloudMonkeyhttps://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+cloudmonkey+CLI • CloudStack developer mailing lists http://cloudstack.apache.org/mailing-lists.html • CloudStack Issues https://issues.apache.org/jira/browse/CLOUDSTACK
Devcloud in action Q & A • Useful log files • Management Server: vmops.log, api.log • XenServer: • /var/log/xcp-xapi.log • /var/log/Smlog SunGard Availability Services