Skip to main content

Local environment

A local environment runs the whole platform on a workstation, for development, evaluation or a demonstration. It is not meant for production.

Two setups are possible:

  • Fully local. Supporting services run in containers, and the modules run in one Java process started by the launcher.
  • Hybrid. Modules that are already built run on a remote cluster; only the module being developed runs locally.

This page covers the fully local setup, in three steps: the shared data directory, the supporting services, then the launcher.

Both the services and the launcher need the data directory, so create it first.

1. Shared data directory​

The starter directory of the repository holds the files the platform needs to start, including sample data. Modules reach it through the mount point /open-ent/data.

Clone the repository, then point /open-ent/data at its starter directory. In this example the repository is cloned under /dev/ent:

git clone https://github.com/open-ent/open-ent
mkdir /open-ent
sudo ln -s /dev/ent/open-ent/starter /open-ent/data

2. Supporting services​

Docker Compose starts the supporting services: Neo4j, PostgreSQL, MongoDB and the search engine. It does not start the Open ENT modules.

Start the services:

cd starter
docker-compose -f docker-compose.yml up

On first start, open the Neo4j browser at http://localhost:7474/browser/, sign in with the default account neo4j / neo4j, and create the account openent / openent.

Stop the services:

cd starter
docker-compose -f docker-compose.yml stop

Remove the containers, for example to apply a change made to docker-compose.yml:

cd starter
docker-compose -f docker-compose.yml down

The Neo4j account must be created again each time the containers are removed.

The containers read two configuration files:

ServiceFilePurpose
Neo4jstarter/neo4j-conf/neo4j.confRuns Neo4j without authentication, for development only
PostgreSQLstarter/docker-entrypoint-initdb.d/init.sqlCreates the apps database user

3. Launcher​

The launcher starts all the selected modules in a single Java process.

Build the platform from the root of the repository:

mvn install -Dquarkus.container-image.build=true -Dquarkus.container-image.tag=1.0.0 -Dquarkus.container-image.push=false

With the supporting services running, start the launcher in development mode, which reloads code as you edit it. Local tests assume port 8090, so set it explicitly:

cd launcher
mvn quarkus:dev -Dquarkus.http.port=8090

Any mvn quarkus: command has an equivalent in the Quarkus command line:

quarkus dev -Dquarkus.http.port=8090

The platform is then available at http://localhost:8090. Sign in with one of the test accounts.