You are viewing an old version of this page. View the current version.
In order to build OpenCGA from source code you must first get the source code of OpenCGA from GitHub, most of the dependencies - including OpenCB dependencies - will be fetched from Maven Central repository, however in some scenarios OpenCB dependencies will need to be built from GitHub source code. Compiling and building processes are carried out by Apache Maven. The following tools are required for successful build :
- Java 1.8.0_60+
- Apache Maven
You can learn how to install them in this section at Installation Guide > Server Configuration.
Stable releases are merged and tagged at master branch, users are encouraged to use latest stable release for production. Current active development is carried out at develop branch and need Java 8, only compilation is guaranteed and bugs are expected, use this branch for development or for testing new functionalities. Only dependencies of master branch are ensured to be deployed at Maven Central Repository, develop branch may require users to download and install other active OpenCB repositories:
- biodata: https://github.com/opencb/biodata (branch 'develop')
- datastore: https://github.com/opencb/datastore (branch 'develop')
- cellbase: https://github.com/opencb/cellbase (branch 'develop')
- hpg-bigdata: https://github.com/opencb/hpg-bigdata (branch 'develop')
Clone And Compile Dependencies
User must clone and compile all of the above dependencies using the following commands :
Latest stable release at master branch can be downloaded executing:
OpenCGA can be compiled directly, just by executing
mvn install -DskipTests, but some configuration files can be customized with the content of the file
User don't need this file for the installation, but it makes easier to compile, install and configure at the same time the program, by filtering the resources files. Also, this information is used to run the tests. In that case, this file is required.
An example of that file can be found in the README. The description of each property can be found below:
- OPENCGA.CATALOG.DB.HOSTS: This property should be configured with the host and port of the MongoDB installation. By default, for development purposes, we have it set with "localhost:27017".
- OPENCGA.CATALOG.DB.DATABASE: This property indicates the database name that will be created to store the catalog information. Default: opencga_catalog.
- OPENCGA.CATALOG.DB.USER: This property should only be set if the MongoDB needs authentication. In this case, this property will contain the user name with permissions for the database. *This can be left empty in any case. The admin will be able to set this credentials using the command line.
OPENCGA.CATALOG.DB.PASSWORD: This property should only be set if the MongoDB needs authentication. In this case, this property will contain the password of the user with permissions for the database. *Like in the user property, this can be left empty. The admin will be able to set this credentials using the command line.
OPENCGA.INSTALLATION.DIR: This property is extremely important when using Tomcat to deploy the webservices. This property will have to point to the final OpenCGA installation directory after everything has been built. This property will be used by Tomcat to locate the configuration files. If this is not properly set, none of the webservices will work. Default: /opt/opencga.
OPENCGA.CATALOG.ROOTDIR: In Catalog, users are allowed to build their own directory structure, upload their own files, run analysis, etc. This path should be pointing to a physical location where Catalog will be storing those files and directory structure. By default, we normally put it in a folder called "sessions" within the installation directory (file:///opt/opencga/sessions/). Be aware of the "file://" annotation. In version 0.8 this is still necessary but will not be needed for future releases (see issue).
OPENCGA.ANALYSIS.EXECUTION.MANAGER: OpenCGA Catalog allows users to run jobs. This property indicates how the jobs will be launched. At the moment we only support two types: LOCAL to run the jobs locally in a thread or SGE to run the jobs using Sun Grid Engine. More queuing systems will be supported soon.
OPENCGA.CLIENT.HOST: This property should be pointing to the URL where the webservices will be available. For development purposes, the default is http://localhost:8080/opencga/. This property is read by the command line opencga.sh in order to communicate with the webservices.
You can copy this example from main pom.xml to ./m2/settings.xml:
The next XML code has been updated on , please make sure you update your settings.xml, sorry for any inconvenience caused.
After creating and configuring the default profile, you can build OpenCGA by executing the following command from the root of the cloned repository:
After successful building, user should find the following file structure under a build folder:
Table of Contents:
- No labels