Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CheatSheet for setting up CloudStack Dev environment on Windows

Step 1) Install

...

Cygwin. This will give you a unix like bash shell for your windows.

To install Cygwin, you download and run the setup.

...

  • Unfortunately, the download can be slow depending on the mirror you select (~30 min or more).
    • Set unnecessary package categories to 'Uninstall', e.g. KDE and Games.\
  • After completing the install, you can run it again.  In that case, it will use the packages you last selected as the defaults.

...

  • .

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.

...

NB: Test your environment variables by opening a Cygwin shell and typing 'which Tomcat6'. This should return the path to the Tomcat executable.

Step 4) Install the JDK.

You can download the latest JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
*Pick the self-installing executable corresponding to your O/S type (32 or 64bits)
*Note where you're installing it. Set the Windows System variable JAVA_HOME to this path.
**I removed the user 'JAVA_HOME' variable to prevent the System variable from being overriden.

Step 5) Install mysql for windows.

Download the self-installing exe from http://dev.mysql.com/downloads/mysql/5.0.html#downloads
*The most recent 5.1.x is recommended; however, developers are also using 5.5
*Check the box that asks whether you want to include mysql bin directory in the PATH. The option is a checkbox towards the end of the config wizard.

Step

...

6) Install Ant for Windows.

Ant is available from http://ant.apache.org/bindownload.cgi

  • Ant does not have an O/S-specific installer. Thus, the .zip you download does not include an .MSI file
  • Place the unzipped download in the folder you want to run Ant from.

To inform the Cygwin environment of where Ant is, update your Windows environment variables.

  • Define ANT_HOME as a Windows System environment variable, and give it the value of the install folder for Tomcat. E.g. C:\Program Files\Apache Software Foundation\apache-ant-1.8.4
  • Add '%ANT_HOME%\bin' to the Windows System environment variable PATH

NB: Test your environment variables by opening a Cygwin shell and typing 'which ant'. This should return the path to the ant executable.

Step 7) Download cloudstack-oss source

From a Cygwin window:
*Create               -> create a cloudstack-oss directory, cd into it and fire:
*Use git clone to download the a cone of the git repo from
**E.g.               -> git clone ssh://<username>@git.cloud.com/var/lib/git/cloudstack-oss

...

Copy over the above exe some place in C:\, and set the PATH env variable for Windows 7 to point to this directory.

Step 8) If you don't have JDK installed, install it. Note where you're installing it, that would be JAVA_HOME. You will need this for later. Get JDK 1.7 from: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html

I installed mine under :

C:\Program Files\Java\jdk1.7.0_02\

Step 10) Install ant for Windows. Follow the instructions on this link if you're using Win 7 :            -> http://madhukaudantha.blogspot.com/2010/06/installing-ant-for-windows-7.html

Step 11) You will need to set a parameter DBROOTPW= in the build/override/replace.properties file. Here is how my file looks –

...