Cygwin will give you a unix like bash shell for your windows.
To install Cygwin, you download and run the setup.
NB: When you open a Cygwin shell, the Windows environment variables, including PATH, are imported into the shell environment. When we install the following items, we will update the Windows environment variables.
You can download the latest JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
CloudStack includes portions of Python code. I know you just installed the Cygwin Python but some parts of the maven build process also require a "native" python installation as it won't be able to access the Cygwin installation.
Eclipse is available from http://www.eclipse.org/downloads/
OPTIONAL: CloudStack includes portions of Python code, which is best edited with the PyDev Eclipse plug-in
PyDev enhances the Eclipse environment Python specific features.
The M2E plug-in allows Eclipse to import CloudStack's pom.xml Thus, pom.xml files become a substitute for the .project files that Eclipse normally uses.
Install M2E using Eclipse
Add M2Eclipse
OPTIONAL: Install EGit to provide integration to git from Eclipse
For development purposes, you do not need Apache Tomcat. There are Maven scripts available to launch the management server in Jetty, which provides Tomcat functionality.
Apache Tomcat is the open source web server and servlet container that hosts CloudStack's management server.
You can download Tomcat from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.exe
Use C:\cstoosls\Tomcat6.0
insteadTo inform the Cygwin environment of where Tomcat is, update your Windows environment variables.
C:\cstoosls\Tomcat6.0
NB: Test your environment variables by opening a Cygwin shell and typing 'which Tomcat6'. This should return the path to the Tomcat executable.
Download the self-installing exe from http://dev.mysql.com/downloads/mysql/5.0.html#downloads
Download the self-installing exe for Python 2.7 from http://dev.mysql.com/downloads/connector/python/
A manual installation of Ant is only required for building CloudStack 4.0.
Ant is available from http://ant.apache.org/bindownload.cgi
To inform the Cygwin environment of where Ant is, update your Windows environment variables.
C:\Program Files\Apache Software Foundation\apache-ant-1.8.4
NB: Test your environment variables by opening a Cygwin shell and typing 'which ant'. This should return the path to the ant executable.
Maven is available from http://maven.apache.org/download.html
C:\bin\maven
To inform the Cygwin environment of where Maven is, update your Windows environment variables.
C:\cstools\maven
NB: Test your environment variables by opening a Cygwin shell and typing 'which mvn'. This should return the path to the maven executable.
From a Cygwin window:
Cygwin's mkisofs is a soft link. These do not work with the build.
Instead, downloan the .exe from http://svnpenn.blogspot.com/2011/06/mkisofs-for-windows_24.html
NB: Test your environment variables by opening a Cygwin shell and typing 'which mkisofs'. This should return the path to the mkisofs executable.
Password is assigned to DBROOTPW= in the build/replace.properties file.
E.g.
{{$ cat build/override/replace.properties
DBUSER=cloud
DBPW=cloud
DBROOTPW=
MSLOG=vmops.log
APISERVERLOG=api.log
DBHOST=localhost
AGENTLOGDIR=logs
AGENTLOG=logs/agent.log
MSMNTDIR=/mnt
COMPONENTS-SPEC=components-premium.xml}}
To clean out existing artifacts, go to the cloudstack source folder and run:
mvn clean
To compile Apache CloudStack, go to the cloudstack source folder and run:
mvn install
To deploy the database:
mvn -P developer -pl developer -Ddeploydb
To run in a local Jetty server:
mvn -pl :cloud-client-ui jetty:run
Open the mgmt server console using http://localhost:8080 and configure it as required.
DevCloud provides a self-contained CloudStack development environment, which runs in a VirtualBox VM. For details, refer to DevCloud
1) Problem: Server will not start and throws following exception
WARN utils.script.Script (main-) Exception: /usr/local/bin/bash
> > -c echo
> ~scvmm
> > java.io.IOException: Cannot run program "/usr/local/bin/bash":
> CreateProcess error=2, The system cannot find the file specified
> > at java.lang.ProcessBuilder.start(Unknown Source)
> > at com.cloud.utils.script.Script.execute(Script.java:184)
> >
> > ....
> > ....
> > ERROR cloud.servlet.CloudStartupServlet (main-) Exception starting
> management server
> > com.cloud.utils.exception.CloudRuntimeException: Cannot get home
> directory for account: scvmm
Workaround: Skip key generation and cloudstack works fine. This is done by setting developer=true in the configuration table, by running the following SQL statement in MySQL
Update configuration set value='false' where key='developer';
This changes the developer mode to false which combined with a non 'cloud' username will skip the key generation.
Caveat: KVM stops working after this workaround. Any help from community on fixing KVM support as well is needed.