docker-machineusers be sure to configure your environment usingeval $(docker-machine env <machine-name>)
- Check out this repository, and cd into
rmap-docker - Edit
.envRMAP_BASE_URLandRMAP_ADMIN_AGENT_URImust be changed if you are ondocker-machineACTIVE_SPRING_PROFILES(optional, e.g. to change the idservice used)*_LOG_LEVEL(optional, e.g. to change the amount of logging to the console)
- One of:
docker-compose pullto retrieve the latest images on Docker Hubdocker-compose build --nocacheto build images using theSNAPSHOTs from the Maven repository (SNAPSHOTbuilds represent successful builds ofmaster)
- Run
docker-compose up -dto launch the containers in the background - Run
docker logs -f rmapto 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.
This boots RMap with the following:
docker-machineusers substitute your active machine's IP address forlocalhost
-
RDF4J server running on port
8081, with a triplestore repository nameddocker.- Server available at:
http://localhost:8081/rdf4j-server/ - Workbench available at
http://localhost:8081/rdf4j-workbench/
- Server available at:
-
Postgres database running on port
5432with a database namedpostgres, user:postgres, and no password.- Postgres JDBC url:
jdbc:postgresql://localhost:5432/postgres
- Postgres JDBC url:
-
Solr running on port
8983with thediscoscore- Solr url:
http://localhost:8983/solr/#/discos
- Solr url:
-
Kafka and Zookeeper running on ports
29092and32181respectively -
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, userrmapAdmin, passwordchangeme
- Admin login:
- API available at:
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 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.
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).
- Create a triple store named
docker - Login to the RMap application as an admin and create a user
- (optional) If using the rmap-loader, create a Postgres database named
loader
docker-machineusers substitute your Docker machine IP address forlocalhost
- Navigate to the RDF4J Workbench:
http://localhost:8081/rdf4j-workbench/ - Create a new repository
- Name it
docker - In order for the triplestore to persist across restarts, use
Native Java Storeas the type. - Accept defaults for indexes, strict mode etc.
- Name it
docker-machineusers substitute your Docker machine IP address forlocalhost
You must properly set the
RMAP_BASE_URLandRMAP_ADMIN_AGENT_URIvariables in.envif you are running ondocker-machine
- Navigate to the RMap application and login as the
rmapAdmin(passwordchangeme):http://localhost:8080/app/admin/login - Click on the "Manage Users" link, then "Add new user"
- Fill out the new user form, and insure that "User enabled?" and "Generate RMap:Agent" is set to "Yes"
- After creating the user, click on "Return to Users list", and you should see your newly created user in the list of users.
- 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.
- 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 -uparameter)
docker-machineusers substitute your Docker machine IP address forlocalhost
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"