This project is currently under development. This document describes how to set up a local dev environment.
See https://flexo-mms-deployment-guide.readthedocs.io/en/latest/
You will need to run a local quadstore. There are a few other complementary services that help with authentication and uploading RDF data, but they are not strictly required (i.e., the stack can operate without them, but may require special configuration or in some cases may impact performance).
Therefore, the simplest way to get started is to stand up the prescribed service set:
docker-compose -f src/test/resources/docker-compose.yml up -d
Apache Jena's Fuseki quadstore will bind locally on port 3030. Should you want to issue SPARQL queries directly against the quadstore itself, Fuseki exposes the following HTTP APIs by default:
Endpoint | Purpose |
---|---|
http://localhost:3030/ds/sparql |
SPARQL 1.1 Query |
http://localhost:3030/ds/update |
SPARQL 1.1 Update |
http://localhost:3030/ds/data |
SPARQL 1.1 Graph Store Protocol |
The next step is to populate the quadstore with configuration data since Flexo MMS stores all of its state information in the quadstore alongside user data.
This configuration data is unique to your deployment.
To generate a new deployment configuration:
cd deploy
npx ts-node src/main.ts $APP_URL > ../src/test/resources/cluster.trig
Where $APP_URL
is the root URL for where the Flexo MMS Layer 1 instance is deployed, e.g., https://mms.openmbee.org/
. For local development, we simply use the stand-in http://layer1-service
.
Once the initialization file has been generated at src/test/resources/cluster.trig
, this file will automatically be used when running tests. Otherwise, make sure to apply this file to your empty quadstore (for example, by using its Graph Store Protocol API) before using Flexo MMS.
Make sure the following environment variables are set when running the application. If running tests, make sure these variables are set in the test configuration. These will be picked up by src/main/resources/application.conf.*
which you can also configure for further customization.
FLEXO_MMS_ROOT_CONTEXT=http://layer1-service
FLEXO_MMS_QUERY_URL=http://localhost:3030/ds/sparql
FLEXO_MMS_UPDATE_URL=http://localhost:3030/ds/update
FLEXO_MMS_GRAPH_STORE_PROTOCOL_URL=http://localhost:3030/ds/data