DevCloud is a virtual appliance shipped as an OVA image which runs on VirtualBox (an opensource type-2 or desktop hypervisor) and can be used for CloudStack’s development and testing. The original DevCloud required 2G of RAM, and ran Ubuntu Precise as dom0 over xen.org’s Xen server which runs as a VM on VirtualBox.
A developer would build and deploy CloudStack artifacts (jars, wars) and files to DevCloud, deploy database and start the management server inside DevCloud. The developer may then use CloudStack running inside DevCloud to add DevCloud as a host and whatnot. DevCloud is now used by a lot of people, especially during the first release of Apache CloudStack, the 4.0.0-incubating, DevCloud was used for the release testing.
1. Get the new DevCloud 2.0 virtual appliance. The new image was created using this process. Note: it could take some time as the image is about 900MB.
2. Install VirtualBox 4.2 or latest.
3. Create a "host-only" network in VirtualBox, if you don't have one.
3.1 To create a network, go to File -> Preferences -> Network -> "Add host only network", it would usually have a name like vboxnet0 etc.
3.2 To config the network created in step 3.1, right click and select "Edit host-only network", then uncheck "Enable server" in the "DHCP server" tab
4. Import the DevCloud ova image into VirtualBox.
5. Start the DevCloud VM. After VM boots up, login into VM with username: root, password: password
Network
The default IP of DevCloud is 192.168.56.10, if you want a different IP (say you want to work with multiple DevClouds), change in /etc/network/interfaces and reboot.
7. Checkout the latest master code, then start management server on your laptop:
mvn -P developer,systemvm clean install mvn -P developer -pl developer,tools/devcloud -Ddeploydb mvn -pl :cloud-client-ui jetty:run
Then wait until management server is up
8. Deploy DevCloud (make sure mysql-connector-python is installed and that the management server is running)
$ mvn -P developer -pl tools/devcloud -Ddeploysvr # Or, if the above does not work, maybe you're running mvn in debug mode using some MAVEN_OPTS, try marvin: $ cd tools/devcloud; python ../marvin/marvin/deployDataCenter.py -i devcloud.cfg
The above will deploy a zone with settings defined in tools/devcloud/devcloud.cfg which sets some global settings and will take some time. After this, you should restart management server and destroy any system vms which may have started for the global settings to take effect.
9. You can also run your setup inside of DevCloud as a all in one box solution, "ssh root@192.168.56.10". All the build tools (git, java, maven, mkisofs, etc.), mysql and nfs is preinstalled and setup. The recommended way is to run the mgmt server on your host os, work with the code and debug using an IDE like IntelliJ or Eclipse and use DevCloud as a replacement/alternative to your hypervisor host, storage and network infra.
You can skip step 8 above and use one of the advanced network marvin configurations. For full functionality, these require that you set up a DNS resolver on your devcloud so that the management network can resolve names.
(remove me when fixed): These will not fully function until the traffic labels apply properly via marvin. In the meantime, you can manually edit the guest/management/public traffic labels via the UI after applying the cfg, per the setting that are in the cfg
$ apt-get install dnsmasq $ cd tools/devcloud; python ../marvin/marvin/deployDataCenter.py -i devcloud-advanced.cfg
or, if you want to run the management server in the devcloud:
$ apt-get install dnsmasq $ cd tools/devcloud; python ../marvin/marvin/deployDataCenter.py -i devcloud-advanced_internal-mgt.cfg
It's possible to run the management console in debug mode for interactive debugging with Eclipse or similar. Instead of running the jetty:run command in the previous section, run...
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n" mvn -pl :cloud-client-ui jetty:run export MAVEN_OPTS=""
java -cp $CP com.cloud.api.doc.ApiXmlDocWriter -d "$DISTDIR" $*
java -cp .$CP com.cloud.api.doc.ApiXmlDocWriter -d "$DISTDIR" $*
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.12</version> </plugin>
mvn -P developer,systemvm clean install
[INFO] Apache CloudStack apidoc Tools .................... SUCCESS [41.071s] [INFO] Apache CloudStack Developer Tools ................. SUCCESS [0.125s] [INFO] Apache CloudStack Developer Tools: marvin ......... FAILURE [0.158s] [INFO] Apache CloudStack Developer Tools: cloudmonkey cli SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10:28.807s [INFO] Finished at: Tue Dec 04 17:16:54 PST 2012 [INFO] Final Memory: 34M/145M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (compile) on project cloud-marvin: Command execution failed. Cannot run program "python" (in directory "C:\src\asf-acl\incubator-cloudstack\tools\marvin\marvin"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
mvn -P systemvm clean install