This repository contains source code for Phenotyping Hybrid Information System (PHIS) as an OpenSILEX instance
First you need to have these software installed :
- Java JDK 9+ (Our project is tested with JDK versions 9, 11, 13 and 14)
- Maven 3.5+
- Git 2.17.1+
- docker 19.03.1+
- docker-compose 1.24.1+
Note: the <BASE_DIR>
variable referenced in this documentation is the root folder of your installation whee your user must have read and write permissions.
Following commands should work from everywhere in your system without errors:
java -version
mvn --version
git --version
docker --version
docker-compose --version
cd <BASE_DIR>
git clone --recurse-submodules https://github.com/OpenSILEX/opensilex-dev.git
cd opensilex-dev/phis-ws
git pull origin modularity
cd ..
cd <BASE_DIR>/opensilex-dev
mvn install
Create file .bash_aliases
in your home folder if it doesn't exists.
Add this line in it replacing <BASE_DIR> variable:
alias opensilex=<BASE_DIR>/opensilex-dev/opensilex-release/target/opensilex/opensilex.sh
Reload bash aliases and test it:
cd ~
source .bash_aliases
opensilex help
Add the following directory to your PATH environment variable replacing <BASE_DIR> variable:
path %PATH%;<BASE_DIR>\opensilex-dev\opensilex-release\target\opensilex\
opensilex help
Edit <BASE_DIR>/opensilex-dev/opensilex-dev-tools/src/main/resources/config/opensilex.yml
Be careful if you change host and port of databases as you will have to update docker-compose configuration file accordingly.
Be sure to configure properly read and write rights for your user on configured folders.
The only mandatory options to setup are:
- file-system.storageBasePath: Base directory for file storage
- phisws.uploadFileServerUsername: Name of your Linux user running the application
- phisws.uploadFileServerPassword: Password of your Linux user running the application
For usage with phis-webapp you should also configure these options if your app is not installed in /var/www/html:
- layerFileServerDirectory: Folder to store layer files used by phis-webapp
- layerFileServerAddress: Base uri for accessing layerFileServerDirectory folder through apache
- uploadImageServerDirectory: Folder to store images files used by phis-webapp
- imageFileServerDirectory: Base uri for accessing uploadImageServerDirectory folder through apache
On linux, you should add your current user <USER>
to docker group to avoid using sudo:
sudo usermod -aG docker <USER>
You need to log out and log in again to make it work.
cd <BASE_DIR>
cd opensilex-dev/opensilex-dev-tools/src/main/resources/docker
docker-compose up -d
Docker containers will be automatically started on your machine startup.
You can change the "restart" parameter in "docker-compose.yml" file if you don't want this behavior but you will have to run the preious command after each restart manually.
Right-click on opensilex-dev project and select "Open Required Projects" --> "Open All Projects"
Then right-click on org.opensilex.dev.Install
class in opensilex-dev-tools projet and select "run" or "debug"
If you want to reset all your database, you can do the same with class org.opensilex.dev.InstallRestet
opensilex dev install
If you want to reset all your database use -r
flag with the previous command
Right-click on org.opensilex.dev.StartServer
class in opensilex-dev-tools projet and select "run" or "debug"
Right-click on org.opensilex.dev.StartServerWithFront
class in opensilex-dev-tools projet and select "run" or "debug"
With command line you need to recompile all modules to have your change in Java source code taking into account (but not for Vue-JS code if using hot relaod).
opensilex dev start --no-front-dev
opensilex dev start
-
OpenSilex Vue App is accessible at: http://localhost:8666/
-
OpenSILEX API is accessible at: http://localhost:8666/api-docs
If you start server with Vue.js, the hot reload server tell you on which port it's accessible (probably 8080 depending of which is available).
Default Super Admin user which will give you access to all web services is created with:
- login: admin@opensilex.org
- password: admin
RDF4J workbench is accessible by default at: http://localhost:8667/rdf4j-workbench
At first connection, you must configure RDF4J server URL with this value: http://opensilex-rdf4j:8080/rdf4j-server
MongoDB is accessible on port 8668
-
PostGreSQL is accessible on port 8669
-
PGAdmin is accessible by default at: http://localhost:8670/
PGAdmin default user: admin@opensilex.org
PGAdmin default password: opensilex
You must configure a new server connection for PGAdmin with the following parameters:
- host: opensilex-psql
- port: 5432
- user: opensilex
- password opensilex
cd <BASE_DIR>
mvn site -Pwith-test-report
All documentation will be available in <BASE_DIR>/opensilex-doc/src/main/doc folder.
mvn install -Drevision=X.Y.Z
Zip for revision will be available in <BASE_DIR>/opensilex-release/target/opensilex-release-X.Y.Z.zip
Uncompressed version is available in <BASE_DIR>/opensilex-release/target/opensilex-release-X.Y.Z/
Avoid to do it, but it could be usefull if you need to rebuild very often at some point.
mvn install -DskipTests=true
This could be usefull if you work only on web services to speed up build.
mvn install -DskipFrontBuild
Make sure the environment variable JAVA_HOME
is defined.
cd <BASE_DIR>/opensilex-dev
mvn site -Pwith-test-report -DskipFrontBuild
This buid may be very very very long because it as to download a lot of stuff from internet (OWASP report).
You should better configure it periodicaly on a automated platform.
mvn site -Pwith-test-report -Pwith-security-check -DskipFrontBuild
mvn verify -DskipFrontAudit=false
If you are using eclipse you may need to enable this profile to avoid build errors
mvn install -Pfor-eclipse