For users
Documentation for minerva can be found here: https://minerva.pages.uni.lu/doc/
For developers
Installation
After cloning repo you need to install following tools:
- postgresql (>=9.1)
- tomcat (tested on tomcat7)
- Java8 - works on both OpenJDK 8 and Oracle Java 8
- maven
- ant
- node.js + npm
You need to create user and database:
username: map_viewer
password: 123qweasdzxc
dbname: map_viewer
If you want to use different credentials or your database in not hosted locally you can configure it by creating file /etc/minerva/db.properties
. Template of the file can be found here: https://git-r3lab.uni.lu/minerva/core/blob/master/persist/src/main/resources/db.properties
Database schema is managed automatically by flyway, so there is no need to populate the database with anything.
Now your dev environment is configured and ready to use. To test it you can run unit tests:
- back-end - go to one of the Java modules (ie 'persist') and call mvn test:
cd ~/workspace/minerva/commons/
mvn test
- front-end - go to module with front-end, install all npm dependencies and run tests:
cd ~/workspace/minerva/frontend-js/
npm install
npm test
Build
To build *.war
file that can be deployed on tomcat you need to call ant maven-build task:
cd ~/workspace/minerva/
ant maven-build
This will create ~/workspace/minerva/web/target/web-1.0.war
file which can be deployed on tomcat:
cp ~/workspace/minerva/web/target/web-1.0.war $CATALINA_HOME/webapps/minerva.war
After starting tomcat you can access minerva using http://localhost:8080/minerva/. Default credentials are:
login: admin
password: admin
Deployment and release
Before making new release update changelog file.
Debian packages
When all the changes are ready tag commit and push it to the repository. Gitlab ci will execute unit tests and prepare distribution files that can be released. For now we release minerva using debian repository. Therefore gitlab ci creates a deb package (for instance: https://git-r3lab.uni.lu/minerva/core/-/jobs/29918). This package should be uploaded to our repository:
echo 'PUT minerva_12.0.3_amd64.deb'| sftp -P 8022 repo-r3lab.lcsb.uni.lu
ssh repo 'sudo reprepro -b /var/www/html/debian includedeb test minerva_12.0.3_amd64.deb'
Remember to use proper repository:
- stable - for production ready debian packages
- test - for packages that are ready to test and probably will be moved to stable soon
- experimental - for packages that might crash, can be unstable are created during development process (anything that has
alpha
,beta
in the version number should be put here)
Moreover we store all debian packages on webdav:
echo 'put minerva_12.0.3_amd64.deb' | cadaver https://webdav-r3lab.uni.lu/public/minerva/
Docker image
There is Dockerfile that allows to build Docker image from currently released debian package. After releasing debian package crete a Docker image and deploy it:
cd ~/workspace/minerva/Docker/
docker build --no-cache -t minerva .
Check list of docker images to find DOCKER ID
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
minerva latest 26a9534e37ff About an hour ago 1.223 GB
debian jessie bb5d89f9b6cb 13 days ago 125.1 MB
Tag docker image (assume that your docker ID is "26a9534e37ff" and version is 9999) and push it to repo:
docker tag 26a9534e37ff docker-r3lab.uni.lu/minerva/minerva:9999
docker login https://docker-r3lab.uni.lu/
docker push docker-r3lab.uni.lu/minerva/minerva
VirtualBox images
We provide also VirtualBox images with minerva installed on it. Just create a new debian virtual box image and upload it to webdav:
echo 'put minerva-12.0.1_release.ova' | cadaver https://webdav-r3lab.uni.lu/public/minerva/
Image should have root account with 123qweasdzxc
password. It should also expose port 8080 on the host.