You can configure your environment using a YAML (.yml) config file, which will be read by the dld.py bootstrap script.
Just create a file named dld.yml and the script will look out for this file. The script behaviour can also be adjusted with
some command line switches:
-c or --config-f or --filedatasets entry with a file key)-l or --locationdatasets entry with a file key)-u or --uridefault_graph key under settings)-w or --working-directorydld.py will process the configuraion YAML, taking care of the following steps for you:
The provided containers of the resulting orchestration will coordinate themselves so that load components will perform bulk-imports to the store component. present components will know how to use the SPARQL-endpoint exposed by the store to allow for navigation (and possibly authoring).
The main part of the scripts work is to translate the dld.yml file to a Docker Compose file. The script also downloads or copies your data into a given or default working directory and informs docker compose about the location of the provisioned data.
With the following list you can understand all keywords usable within the dld configuration file:
datasets statement.datasets statement.datasets statement.datasets statement.datasets statement.settings statement.components statement.
aksw/dld-store-virtuoso7
components statement.components statement.aksw/dld-present-ontowiki
The keys under components and present (e.g. store, load, ontowiki) will be part of the created docker containers. The corresponding values can be either just image names or key-value mappings themselves. These sub-ordinated key-value pairs are copied unaltered as docker-compose settings for the created containers (see the docker-compose YAML reference).
The following shows a simple example of a `dld.yml` file. Keys marked in yellow are introduced and processed by the dld bootstrap script and keys marked in blue are docker-compose keys.
datasets:
site: #identifier for dataset
graph_name: "http://example.org/"
file: "hello.ttl"
components:
store:
image: aksw/dld-store-virtuoso7
ports: ["8895:8890"]
environment:
PWDDBA: "dba"
load:
image: aksw/dld-load-virtuoso
settings:
default_graph: "http://example.org/"
load:
environment:
DEFAULT_GRAPH: 'http://example.org/'
image: aksw/dld-load-virtuoso
links:
- store
volumes:
- '/usr/src/app/examples/simple/wd-dld/models:/import'
volumes_from:
- store
store:
environment:
DEFAULT_GRAPH: 'http://example.org/'
PWDDBA: dba
image: aksw/dld-store-virtuoso7
ports:
- '8895:8890'
And now a more complicated example. Again, the yellow marked keys are processed by the dld bootstrap script and keys marked in blue are docker-compose keys.
datasets:
site:
graph_name: "http://pfarrerbuch.comiles.eu/"
file: "pfarrerbuch.ttl"
sachsen:
graph_name: "http://pfarrerbuch.comiles.eu/sachsen/"
file: "sachsen.ttl"
hp-vocab:
graph_name: "http://purl.org/voc/hp/"
file: "hp-vocab.ttl"
components:
store:
image: aksw/dld-store-virtuoso7
volume: /tmp/volumes/virtuoso/
environment:
PWDDBA: "aslkdcoiqwecpqow"
load:
image: aksw/dld-load-virtuoso
backup:
image: aksw/dld-backup-virtuoso
target:
git: git@git.aksw.org:/pfarrerbuch.models
sshkey: "id_rsa"
present:
ontowiki:
image: aksw/dld-present-pfarrerbuch
ports: '8080:80'
settings:
default_graph: "http://pfarrerbuch.comiles.eu/"
load:
environment:
DEFAULT_GRAPH: 'http://pfarrerbuch.comiles.eu/'
image: aksw/dld-load-virtuoso
links:
- store
volumes:
- '/usr/src/app/examples/pfarrerbuch/wd-dld/models:/import'
volumes_from:
- store
presentontowiki:
environment:
DEFAULT_GRAPH: 'http://pfarrerbuch.comiles.eu/'
image:
- aksw/dld-present-pfarrerbuch
links:
- store
ports:
- '8080:80'
store:
environment:
DEFAULT_GRAPH: 'http://pfarrerbuch.comiles.eu/'
PWDDBA: aslkdcoiqwecpqow
image: aksw/dld-store-virtuoso7
volume: /tmp/volumes/virtuoso/