Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Server configuration
Requirements
In order to install BioNetDB, the following packages are required:
- Java 1.8.0_60+
- Neo4j graph database
- Apache Maven (when building BioNetDB from sources)
- Apache Tomcat Web server
Installing Neo4j
In order to install Neo4j, follow the instructions from the Neo4j Operation Manual powered by the Neo4j Team. This describes how to install Neo4j in different deployment contexts, such as Linux, Mac OS, Windows, Debian, Docker.
Installing Tomcat
In order to install Tomcat Web server, follow the instruction from the Apache Software Foundation.
Configuration
BioNetDB installation requires the configuration file configuration.yml written in YAML format and located in the $BIONETDB_HOME folder. The configuration file contains mainly Neo4j database configuration, e.g.:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
--- logLevel: null logFile: null ## More than one database can be defined, you can pass the database id to BioNetDbManager. ## If not passed the default database will always be the first one. databases: - id: "hsapiens" species: "hsapiens" ## examples: hsapiens, mmusculus, ... host: "localhost" port: "7687" user: "neo4j" password: "neo4j" options: null ## map containing specific database options |
Installing BioNetDB
In order to build BioNetDB from source code you must first get the source code of BioNetDB 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.
As mentioned, you get the BioNetDB source code from GitHub. You can download the tar ball or clone the Git repository. Next sections describe both methods to get the source code.
Downloading the tar ball
Download the latest release from GitHub (tar.gz or zip file).
Extract the contents of the archive using tar -xfz <filename> for the tar.gz file, or gunzip <filename> for the zip file.
Cloning the BioNetDB Git repository
Execute one of the following Git commands:
Code Block language bash theme RDark title Shell ## Latest stable version git clone -b master https://github.com/opencb/bionetdb.git ## Develop branch, for this to work remember to clone and build BioNetDB dependencies (see below) git clone -b develop https://github.com/opencb/bionetdb.g
Compiling BioNetDB source code
BioNetDB has dependencies from other OpenCB projects such as CellBase while others are third-party dependencies such as MongoDB. All BioNetDB stable releases are always merged and tagged at master branch (users are encouraged to use latest stable release for production), you can find all releases at BioNetDB Releases. We guarantee that all the dependencies needed for building stable releases are deployed at Maven Central Repository, this is true for both OpenCB and third-party dependencies. Therefore for building a stable release you only need to clone BioNetDB repository itself since all the dependencies will be fetched form Maven Central repository.
This is different for development branches. Active BioNetDB development is carried out at develop branch, in this branch third-party dependencies will be still fetched from Maven Central Repository but this is not true for OpenCB dependencies since it is very likely they are still in development and therefore they are not deployed. Keep in mind that we only guarantee that develop compiles and that bugs are expected, use this branch for development or for testing new functionalities. So, for building develop branch you may require to download and install the following OpenCB repositories in this order:
- java-common-libs:https://github.com/opencb/java-common-libs (branch 'develop')
- biodata: https://github.com/opencb/biodata (branch 'develop')
- cellbase: https://github.com/opencb/cellbase (branch 'develop')
As you can see one of our rules is that develop branch of all major applications such as BioNetDB and CellBase always depend on develop branches. So, if you really want to build develop the you can clone and build dependencies by executing:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
## Clone develop branc git clone -b develop https://github.com/opencb/java-common-libs.git git clone -b develop https://github.com/opencb/biodata.git git clone -b develop https://github.com/opencb/cellbase.git ## Now you can execute the following command in each of the folders the specified order above mvn clean install -DskipTests |
Now you can compile the BioNetDB source code by executing the following command from your BioNetDB folder (i.e., the root of the cloned repository):
Code Block | ||||
---|---|---|---|---|
| ||||
$ mvn clean install -DskipTests |
After compiling successfully, you should see the following messages:
Code Block | ||||
---|---|---|---|---|
| ||||
... ... [INFO] Executed tasks [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] BioNetDB project ................................... SUCCESS [ 1.423 s] [INFO] bionetdb-core ...................................... SUCCESS [ 12.854 s] [INFO] bionetdb-server .................................... SUCCESS [ 3.576 s] [INFO] bionetdb-app ....................................... SUCCESS [ 1.200 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.213 s [INFO] Finished at: 2018-06-26T10:24:12+01:00 [INFO] Final Memory: 38M/716M [INFO] ------------------------------------------------------------------------ |
Anchor | ||||
---|---|---|---|---|
|
Once BioNetDB compiled, the WAR file (bionetdb.war) is located at the $BIONETDB_HOME folder. The WAR file consists of a set of RESTful webservices acting as an interface to BioNetDB. In order to start the web services follow the next steps:
Install and start the Apache Tomcat Web server. Be sure you set the environment variable $BIONETDB_HOME pointing to your BioNetDB folder before starting Tomcat server.
Deploy bionetdb.war by just copying it from the BioNetDB folder (i.e., $BIONETDB_HOME) into the Tomcat
webapps
folder (check the folder where you downloaded Tomcat, or probably/var/lib/tomcat8
if you installed via apt-get):Code Block language text theme RDark $ cp $BIONETDB_HOME/bionetdb.war $(path_to_tomcat)/webapps
- Then, you should be able to see the swagger page at
http://localhost:8080/bionetdb/webservices/
. See Using RESTful web services for a tutorial.
Table of Contents:
Table of Contents | ||
---|---|---|
|