Server for ICGC DCC Data Portal.
Technical Documentation: SERVER.md
Executable API documentation is available at:
http://localhost:8080/docs
Administration is available at:
http://localhost:8081
Pre-build: maven is an obvious pre-requisite, but also make sure to install yarn.
Build: The Portal Server is built with maven:
cd dcc-portal/dcc-portal-server
mvn -am
The following commands assume the current directory is the root directory, dcc-portal
.
To run a basic test setup, execute the following:
mvn -pl dcc-portal-server spring-boot:run -Drun.profiles=test
Note that you may need to tweak application.yml
to point to various systems for this to work.
To run a basic development setup, execute the following supplying information about the config server:
mvn -pl dcc-portal-server spring-boot:run -Drun.profiles=development -Drun.arguments='--spring.cloud.config.uri=http://<user>:<password>@<config-server-host>'
See the spring-boot:run documentations for further configuration details.
From Eclipse or IntelliJ:
Property | Value |
---|---|
Main Class | org.icgc.dcc.portal.server.ServerMain |
VM Options | -Xmx6G |
Arguments | --spring.profiles.active=test |
Note: If Eclipse or IntelliJ are taking a long time to build before running, try excluding the dcc-portal-ui as a module.
To configure the portal for running, the elastic
and icgc
portions of the application.yml
file
to be used must be set.
The elastic
portion of the configuration must point to an existing and running elasticsearch index.
For the icgc
portion, the API endpoints and credentials must be configured. You must provide substitutes to any
ICGC systems and APIs you do not have access to should that case arise, such as your own Centralized User Directory.
To run the application once built:
cd dcc-portal/dcc-portal-server
java -jar target/dcc-portal-server-[version].jar --spring.profiles.active=test --spring.config.location=src/main/resources/application.yml
To import certs generated from letsencrypt:
# Create new letsencrypt.jks keystore
openssl pkcs12 -export -in cert.pem -inkey privkey.pem -out cert_and_key.p12 -name tomcat -CAfile chain.pem -caname root
keytool -importkeystore -deststorepass password -destkeypass password -destkeystore letsencrypt.jks -srckeystore cert_and_key.p12 -srcstoretype PKCS12 -srcstorepass password -alias tomcat
Based from: gist