- OpenSILEX Developer's installation
- Required software
- Check your installed software
- Download sources
- Build project
- Create opensilex command alias
- Setup configuration
- Setup Databases with docker
- Initialize system data
- Start OpenSILEX development server with Netbeans
- Start OpenSILEX development server with command line
- Access to OpenSilex & tools
- Generate documentation
- Other maven build profiles and options
This repository contains source code for Phenotyping Hybrid Information System (PHIS) as an OpenSILEX instance
NOTE: OpenSILEX Production's installation available at: https://github.com/OpenSILEX/opensilex/blob/master/opensilex-doc/src/main/resources/installation/production.md
First you need to have this software installed :
- Java JDK 11+ (Our project is tested with JDK versions 11, 13 and 14)
- Maven 3.6+
- 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 where your specific 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 https://github.com/OpenSILEX/opensilex.git
cd opensilex
cd <BASE_DIR>/opensilex
mvn install
Create the file .bash_aliases
in your home directory if it doesn't exist.
Add this line to the file replacing the variable <BASE_DIR>:
alias opensilex=<BASE_DIR>/opensilex/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 the variable <BASE_DIR>:
path %PATH%;<BASE_DIR>\opensilex\opensilex-release\target\opensilex\
opensilex help
Edit <BASE_DIR>/opensilex/opensilex-dev-tools/src/main/resources/config/opensilex.yml
Be careful if you change the host and/or the port of databases as you will have to update the docker-compose configuration file accordingly.
Be sure to configure properly the read and write rights for your specific user on configured folders.
The only mandatory options to set up are:
- file-system.storageBasePath: Base directory for file storage
On Linux OS, you should add your current user <USER>
to the docker group in order 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/opensilex-dev-tools/src/main/resources/docker
docker-compose up -d
Docker containers will be automatically started on your machine at 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 previous command after each restart manually.
Right-click on OpenSILEX project and select "Open Required Projects" --> "Open All Projects"
Then right-click on the class org.opensilex.dev.Install
within the opensilex-dev-tools projet and select "run" or "debug".
If you want to reset all your databases, you can do the same with the class org.opensilex.dev.InstallReset
.
opensilex dev install
If you want to reset all your database use -r
flag with the previous command.
Right-click on the class org.opensilex.dev.StartServer
within the opensilex-dev-tools projet and select "run" or "debug".
Right-click on the class org.opensilex.dev.StartServerWithFront
within the opensilex-dev-tools projet and select "run" or "debug".
When using the command line you need to recompile all modules in order to have taken into account the changes in the Java source code (but not for Vue-JS code if using hot reload).
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 the server with Vue.js, the hot reload server will tell you on which port it is accessible (probably 8080 depending of which is available).
Set the 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
Upon first connection, you must configure RDF4J server URL with this value: http://opensilex-rdf4j:8080/rdf4j-server
MongoDB is accessible on port 8668
You could download MongoDB Compass to manage your database
cd <BASE_DIR>
mvn site -Pwith-test-report
All documentation will be available in <BASE_DIR>/opensilex-doc/src/main/doc directory.
mvn install -Drevision=X.Y.Z
A Zip file for revision will be available at <BASE_DIR>/opensilex-release/target/opensilex-release-X.Y.Z.zip
An uncompressed version is available in <BASE_DIR>/opensilex-release/target/opensilex-release-X.Y.Z/
It is not recommended, but it can be useful if you need to rebuild very often at some point in order to save time.
mvn install -DskipTests=true
This command can be useful 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
mvn site -Pwith-test-report -DskipFrontBuild
This build may be very very very long because it as to download a lot of stuff from internet (OWASP report).
It would be better to configure it periodically on an 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
# ------------------------------------------------------------------------------
# Base system configuration OpenSilex (OpenSilexConfig)
system:
# Default application language (String)
defaultLanguage: en
# ------------------------------------------------------------------------------
# Configuration for module: FileStorageModule (FileStorageConfig)
file-system:
# File storage service (FileStorageService)
fs:
# Service implementation class for: fs (FileStorageService)
implementation: org.opensilex.fs.service.FileStorageService
config:
# Default file system storage (String)
defaultFS: gridfs
# Map of custom path connection management (Map<String,String>)
# customPath:
# datafile/: irods
# Map of file storage connection definition by identifier (Map<String,FileStorageConnection>)
connections:
# irods:
# # Service implementation class for: irods (FileStorageConnection)
# implementation: org.opensilex.fs.irods.IrodsFileSystemConnection
# config:
# # Base path for file storage (String)
# basePath: /FranceGrillesZone/home/fg-phenome/PHIS
gridfs:
# Service implementation class for: gridfs (FileStorageConnection)
implementation: org.opensilex.fs.gridfs.GridFSConnection
config:
# MongoDB main host (String)
host: localhost
# MongoDB main host port (int)
port: 8668
timezone: UTC
# MongoDB database (String)
database: opensilex
local:
# Service implementation class for: local (FileStorageConnection)
implementation: org.opensilex.fs.local.LocalFileSystemConnection
config:
# Base path for file storage (String)
basePath: ../../opensilex-data
# ------------------------------------------------------------------------------
# Configuration for module: NoSQLModule (NoSQLConfig)
big-data:
# MongoDB data source (MongoDBService)
mongodb:
# Service implementation class for: mongodb (MongoDBService)
implementation: org.opensilex.nosql.mongodb.MongoDBService
config:
# MongoDB main host (String)
host: localhost
# MongoDB main host port (int)
port: 8668
# timezone (String)
timezone: UTC
# MongoDB database (String)
database: opensilex
# ------------------------------------------------------------------------------
# Configuration for module: SPARQLModule (SPARQLConfig)
ontologies:
# Platform base URI (String)
baseURI: http://opensilex.dev/
# SPARQL data source (SPARQLServiceFactory)
sparql:
# Service implementation class for: sparql (SPARQLServiceFactory)
implementation: org.opensilex.sparql.rdf4j.RDF4JServiceFactory
config:
# RDF4J repository name (String)
repository: opensilex
# RDF4J Server URI (String)
serverURI: http://localhost:8667/rdf4j-server/
# Platform base URI alias (String)
baseURIAlias: dev
# ------------------------------------------------------------------------------
# Configuration for module: CoreModule (CoreConfig)
core:
# Activate access logs by user (boolean)
enableLogs: false