Developing MOLGENIS
Last updated
Last updated
To develop MOLGENIS on you machine we recommend to use IntelliJ as IDE. You need to install the prerequisites as well.
The components needed to run MOLGENIS locally are:
You can download, install and use MOLGENIS for free under license LGPLv3.
Optional: OpenCPU 2.1 and R 3.5.x (enables R scripting feature)
Optional: Python 3.6 (enables Python scripting feature)
Deploy Apache Tomcat, and place the molgenis-app WAR as the ROOT.war in your apache-tomcat/webapps folder. If you are unfamiliar with Apache Tomcat, follow one of their Apache Tomcat installation guides.
Now that your Apache Tomcat is running and MOLGENIS is deployed, you will notice it will not work yet. This is because your database needs to be configured, and a single properties file needs to be set.
The properties file supplies information to the application regarding the database URL, and the initial administrator password. To make it clear to Tomcat where to find your properties file, you have to edit the setenv.sh file in the apache-tomcat folder.
The -Dmolgenis.home property tells tomcat where to find your properties file. Replace the ${molgenis_home_folder} with the location of your molgenis home. Note that you should NOT use relative paths in your apache-tomcat configuration. Always use absolute paths to point to your molgenis-server.properties.
Inside the specified molgenis home folder, create a file called molgenis-server.properties, and depending on the version of your MOLGENIS, write the following:
Remember the molgenis specified in your db_uri, because this will be the name of the database you will create later on in PostgreSQL. This effectively means that whatever you call your database, your db_uri should point to it.
Setting up your PostgreSQL If you are unfamiliar with PostgreSQL, follow one of their PostgreSQL installation guides. Once you have a PostgreSQL server running, open up the included pgAdmin application that is supplied with most PostgreSQL installations, and perform the following actions:
Add a database 'molgenis'
Add a user 'molgenis' (password 'molgenis') under Login Roles
Add 'can create databases' privilege to user 'molgenis'
For example, in psql terminal type:
Set the credentials of the database in the molgenis-server.properties. See Setting your molgenis-server.properties
Open elasticsearch.yml in the Elasticsearch config directory and set the following properties:
Start Elasticsearch from the command line:
By default MOLGENIS will try to connect to a node within cluster 'molgenis' on address 127.0.0.1:9300 (not to be confused with port 9200 which is used for REST communication). If the cluster is named differently or is running on another address then you will have to specify these properties in molgenis-server.properties:
Create account on github.com.
Copy the clone URL.
Optionally select stable molgenis version:
We use IntelliJ as IDE to run the code in.