Version 48 (modified by yxin, 9 years ago)

--

Prerequisites

Software Prerequisites

Building GENI-ORCA

1. Create a work directory and change into it.

$ mkdir orca
$ cd orca

2. Retrieve the bootstrap directory from subversion.

For the latest version of the code (unstable, currently in development, may be broken) use:

$ svn co https://geni-orca.renci.org/svn/orca/build-all/trunk build-all

For the official release version of the code use:

$ svn co https://geni-orca.renci.org/svn/orca/build-all/tags/<substitute release number>/ build-all

This will create the subdirectory build-all in the current directory.

NOTE1: The above command checks out the development trunk. To get the appropriate stable release follow the instructions for the release.

NOTE2: The ORCA directory structure and these instructions support versions of subversion before 1.5, which didn't have shallow extractions. Thus some of the instructions may seem unusual to svn 1.5+ users.

3. Soft link to the build.xml file.

$ ln -s build-all/build.xml build.xml

4. Use ant to get the source.

$ ant get.all

NOTE: You may get an error message about the --trust-server-cert option. Edit build-all/helper.sh file (look for the option and remove it).

5. If this is the first time you are building orca, you will need to register the certificate of our web server, so that maven can download the necessary dependencies (our server uses https). You should omit this step if you have already installed the certificate.

The web server certificate must be installed in the keystore of your java installation. To do this, we require that you set JAVA_HOME to point to the root of your java installation. Note also that $JAVA_HOME/bin must be on the path. Please do not use Open JDK, since it has issues with its keytool implementation.

Our scripts assume that your installation's keystore is under: $JAVA_HOME/lib/security/cacerts.

Note: Mac users, your JAVA_HOME should be set to something like this: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

If you do not require sudo to modify your installation's keystore use the following command:

$ ant get.certificate

If this fails with permission denied errors, please try the following:

$ ant get.certificate.sudo

6. Prepare the source tree for building

$ ant prepare.build

Note: maven will download a large number of files. If some of the downloads fail, please retry the command. You need to be connected to the Internet while performing this step.

7. Build the whole tree and install all artifacts to the local repository (the resulting jars end up in ~/.m2/repository/)

$ mvn install

NOTE 1: maven will download a large number of files. If some of the downloads fail, please retry the command. You need to be connected to the Internet while performing this step for the first time.

NOTE 2: if maven fails due to a unit test in one of the modules, you can install without running unit tests like so:

$ mvn install -DskipTests

NOTE 3: ant up will do incremental updates of the source tree.

NOTE 4: Once you have the entire project built and installed to your local repository, you can reinstall any subproject by running mvn install in the projects subdirectory. This is much faster than recompiling the entire tree.

Preparing GENI-ORCA for Use

1.1-alpha and previous releases

Once you have built and installed all artifacts in your local maven repository you have some more setup steps to go through before you can use the system. These have to do with generating a certificate and a keystore and linking/copying them in the right place. If your filesystem supports symbolic links, simply use the provided ant task:

$ ant prepare.use

This task will generate the admin security configuration and place links to it in the relevant directories. It will also initialize and link other directories needed to build/test drivers.

If your file system does not support symbolic links or you want more control over the process you can try the following steps:

1. Create the security configuration by going to tools/config and running

$ cd tools/config
$ ant security.create.admin.config

NOTE: Make sure there is no existing runtime directory before you run this command unless you know what you are doing.

2. Copy or softlink the resulting runtime/ directory to the orca/webapp directory.

1.2 and following releases

Once you have built and installed all artifacts in your local maven repository you have some more setup steps to go through before you can use the system. These have to do with generating a certificate and a keystore and linking/copying them in the right place. Note that starting from release 1.2 ORCA no longer packages config/ or runtime/ directories into the webapp.

$ cd tools/config
$ ant security.create.admin.config

Define $ORCA_HOME (e.g. export ORCA_HOME=/opt/orca)

$ cp -r runtime/ $ORCA_HOME
$ cp -r scripts/ $ORCA_HOME

Edit the configuration files (container.properties etc.) under webapp/ and similarly copy it under the $ORCA_HOME

$ cd ../../webapp
$ vi config/container.properties
$ cp -r config/ $ORCA_HOME

Edit the tomcat startup script start.sh by adding statement

export ORCA_HOME=/opt/orca

to it.