Developer environment setup (Windows)

Multiple components are necessary to be installed and configured in order to start developing for the XLcloud project. Here is a how-to guide to configure a development environment.

 

Java

Java is kind of tricky to install.

First, please follow this link to download it: http://www.oracle.com/technetwork/java/javase/downloads/index.html; click on the Download button of Java Platform (JDK). In the Java SE Development Kitsection, accept the agreement, and then proceed the download the latest version corresponding to your operating system.

Note; I found out that even with a x64 environment, you'll need to also install the x86 version of Java, otherwise Glassfish will fail on install. Don't ask me why. So if you have a problem during the Glassfish install later on, you'll need to come back here and install the x86 version.

After the Java installation, set the three environment variables PATH, JAVA_HOME and CLASSPATH. For more information about this subject, please read to this blog post which contains many useful information: http://tecnoesis.wordpress.com/2009/08/18/java-installation-configuration/

Cygwin

This software may become handy if you're familiar with the UNIX environment and you want to emulate this kind of commands on Windows. Therefore, the installation is not necessary but recommanded.

You can download the installer from here: http://www.cygwin.com/

If you plan on using specific components of xlcloud such as the Python client, dont forget to install the appropriate packages during the installation process.

 

VirtualBox

Download and install VirtualBox: https://www.virtualbox.org/wiki/Downloads

Get the VM (containing OpenAM and OpenStack) from a member of the project; it should be named like XLcloudDevWithOpenstack.ova. Import it to VirtualBox, and define a virtual hard-drive for that VM.

If your computer doesn't have a lot of memory (i.e. less than 8 GB), you may want to reduce the memory allocated to the VM. It works fine with 3 GB, probably even 2.5 GB.

After that, start the VM with the login and password: xlcloud. Go to the /devstack directory and run the stack.sh script in order to install all of the components.

If everything went well, the IP address of the web server inside the VM should be displayed: we'll use it later. Leave the VM running while working and go to the next step.

Git

Install the Git client first: http://git-scm.com/downloads.

You must have a Gitorious account (http://gitorious.ow2.org/) and be added to the xlcloud-team and XLcloud project in order to access all of the repositories of the project. You will most likely work on the xlcloud-ci branch (http://gitorious.ow2.org/~xlcloud-continuous-integration/xlcloud/xlcloud-ci). In any case, copy the SSH url of the repository you will be working on.

Go to your Gitorious dashboard; click on Manage SSH keys, then Add SSH Key. Add your public key to the text area, and click on Save.

If you've never generated and SSH key for your computer and you're on Windows, you can use the key generator integrated in PuTTy (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html).

Open the Git bash, an go to the location on your drive where you would like to pull repositories. Then execute the command: git clone <url-of-the-repository> /xlcloud-ci.

Once it has downloaded the content of the repository, you will need to download also the content of the submodules. To do that, go to the /xlcloud-ci folder and then the following command:

  • git submodule status
  • git submodule update --init
  • git submodule foreach 'git fetch'
  • git submodule foreach 'git checkout master'

Maven

Download Maven: http://maven.apache.org/download.cgi and extract it somewhere on your hard drive. No need to install.

If on Windows, you must add the /bin folder of Maven to your PATH. To test if it works, open a command line and run mvn. It will generate an error, but the command must be recognized.

Download the xlcloud-dev.properties file and put it somewhere on your hard drive (remember the location). You have 4 parameters to edit within this file.

Then, you have to download the settings.xml file and put it in the .m2 folder of your home directory. Edit it to add the absolute path to the xlcloud-dev.properties file on your hard drive.

Go to the main folder of the repository and run mvn clean install -DskipTests to compile every submodules.

MySQL

Download and install MySQL: http://dev.mysql.com/downloads/installer/ (you may already have it if you installed an all-in-one web-server like wamp).

Follow the Initial data section of this page: MySQL Database in order to create the xms database, as well as the xms user an set its permissions.

You can find below the first data to insert in the xms database. Don't forget to edit it to set the path to the local repositories (instead of <insert-your-path>) before importing from the phpMyAdmin interface:

Glassfish

Download and install Glassfish: http://glassfish.java.net/fr/ (OpenSource edition, latest version, full edition).

If the install process won't start because it can't find Java, open a command line and run: <glassfish_executable_filename>.exe "<path_to_java>". If it still fails, you'll need to install the x86 version of Java.

Follow the instructions here to configure Glassfish: GlassFish 3.1 Application Server.

Eclipse IDE

Download and install the Eclipse IDE for Java developers from here: http://www.eclipse.org/downloads/.

One recurrent problem happening when first opening Eclipse is that you have Eclipse 64 bits but only the 32 bits Java SDK. Download the appropriate SDK version from step one, and add it to your path.

Read this section: Coding Guidelines in order to configure Eclipse properly.

Go to File, Import, Maven, and click on Existing Maven Projects. Select the main directory where you fetched the Git repositories and finish the import.

acceptFinally! You should now be ready to work on the XLcloud project.

Please advise the author of this article of any missing or wrong instructions.


This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 5.4.6 - Documentation - Legal Notice

Site maintained by