Skip to content

Run RMap and its dependencies using docker-compose.

Notifications You must be signed in to change notification settings

rmap-project/rmap-docker

Repository files navigation

RMap in Docker

Quickstart

docker-machine users be sure to configure your environment using eval $(docker-machine env <machine-name>)

  1. Check out this repository, and cd into rmap-docker
  2. Edit .env
    • RMAP_BASE_URL and RMAP_ADMIN_AGENT_URI must be changed if you are on docker-machine
    • ACTIVE_SPRING_PROFILES (optional, e.g. to change the idservice used)
    • *_LOG_LEVEL (optional, e.g. to change the amount of logging to the console)
  3. One of:
    • docker-compose pull to retrieve the latest images on Docker Hub
    • docker-compose build --nocache to build images using the SNAPSHOTs from the Maven repository (SNAPSHOT builds represent successful builds of master)
  4. Run docker-compose up -d to launch the containers in the background
  5. Run docker logs -f rmap to determine when RMap is up and ready

If this is your very first time launching RMap from Docker, you'll need to complete some one-time startup tasks below.

Service locations

This boots RMap with the following:

docker-machine users substitute your active machine's IP address for localhost

  • RDF4J server running on port 8081, with a triplestore repository named docker.

    • Server available at: http://localhost:8081/rdf4j-server/
    • Workbench available at http://localhost:8081/rdf4j-workbench/
  • Postgres database running on port 5432 with a database named postgres, user: postgres, and no password.

    • Postgres JDBC url: jdbc:postgresql://localhost:5432/postgres
  • Solr running on port 8983 with the discos core

    • Solr url: http://localhost:8983/solr/#/discos
  • Kafka and Zookeeper running on ports 29092 and 32181 respectively

  • RMap API and HTML UI running on port 8080:

    • API available at: http://localhost:8080/api/
    • HTML UI available at: http://localhost:8080/app/
      • Admin login: http://localhost:8080/app/admin/login, user rmapAdmin, password changeme

Spring profiles

The Spring profiles that are in effect by default are:

  • persistent-db
  • inmemory-idservice
  • http-triplestore
  • http-solr
  • prod-kafka
  • auto-start-indexing

Modify the value of ACTIVE_SPRING_PROFILES in .env, then run docker stop rmap && docker-compose up -d to update.

Data persistence

Data generated by RMap and its services are persisted in Docker volumes. Index content, database content, triplestore content, and Kafka/Zookeeper content should be persisted across multiple invocations of docker-compose down and docker-compose up.

Start up tasks

These are tasks that need to be completed when first launching RMap with Docker. Because the containers use volumes to persist changes, the tasks performed below only need to be performed once (unless the Docker volumes are removed).

  1. Create a triple store named docker
  2. Login to the RMap application as an admin and create a user
  3. (optional) If using the rmap-loader, create a Postgres database named loader

Creating a triplestore

docker-machine users substitute your Docker machine IP address for localhost

  1. Navigate to the RDF4J Workbench: http://localhost:8081/rdf4j-workbench/
  2. Create a new repository
    • Name it docker
    • In order for the triplestore to persist across restarts, use Native Java Store as the type.
    • Accept defaults for indexes, strict mode etc.

Create a RMap user

docker-machine users substitute your Docker machine IP address for localhost

You must properly set the RMAP_BASE_URL and RMAP_ADMIN_AGENT_URI variables in .env if you are running on docker-machine

  1. Navigate to the RMap application and login as the rmapAdmin (password changeme): http://localhost:8080/app/admin/login
  2. Click on the "Manage Users" link, then "Add new user"
  3. Fill out the new user form, and insure that "User enabled?" and "Generate RMap:Agent" is set to "Yes"
  4. After creating the user, click on "Return to Users list", and you should see your newly created user in the list of users.
  5. Click on the "keys" link for the user, then "Create new key". Fill out the form and submit. You should see a newly created key in the list of keys for the user.
  6. Finally, click on the "download" link for the newly created key. The downloaded key is the "username" and "password" that you will use when authenticating to the RMap API (e.g. the value to the curl -u parameter)

Create the 'loader' database (optional)

docker-machine users substitute your Docker machine IP address for localhost

If you plan to run the RMap loader, you will need to login to the Postgres database at jdbc:postgresql://localhost:5432/ (user: postgres (no password)). After logging into the database, create a database named loader:

  • CREATE DATABASE loader WITH ENCODING = "UTF-8"

About

Run RMap and its dependencies using docker-compose.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published