Skip to content

Commit

Permalink
stack: update demo stack
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovicm67 committed May 28, 2024
1 parent 0f753fb commit 8284e80
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 9,593 deletions.
24 changes: 0 additions & 24 deletions nilea.Dockerfile

This file was deleted.

11 changes: 6 additions & 5 deletions stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
Run the complete demo stack using the following command:

```sh
docker-compose up -d --build
docker compose pull
docker compose up -d --build
```

Here is where each component is exposed:

- Nilea: http://127.0.0.1:8081/
- Blueprint: http://127.0.0.1:8081/
- Fuseki (the triple store): http://127.0.0.1:3030/ (credentials: `admin` / `admin`)
- Trifid: http://127.0.0.1:8080/

Expand All @@ -27,7 +28,7 @@ Here is the list of graphs that are used for this demo:
Once you started the Docker Compose stack, you can run the following command:

```sh
docker-compose -f docker-compose.data.yaml up add-demo-k8s-data --build
docker compose -f docker-compose.data.yaml up add-demo-k8s-data --build
```

This will run a job that will import the triples that are in the `demo-data/k8s.ttl` file.
Expand Down Expand Up @@ -64,5 +65,5 @@ The `demo-data/k8s.ttl` was was generated that way, using a Kubernetes cluster c

Importing generated triples to the Fuseki triplestore (run one of both):

- for the custom file with your cluster (`volumes/k8s-data/data.ttl`): `docker-compose -f docker-compose.data.yaml up add-custom-k8s-data --build`
- for the demo file (`demo-data/k8s.ttl`): `docker-compose -f docker-compose.data.yaml up add-demo-k8s-data --build`
- for the custom file with your cluster (`volumes/k8s-data/data.ttl`): `docker compose -f docker-compose.data.yaml up add-custom-k8s-data --build`
- for the demo file (`demo-data/k8s.ttl`): `docker compose -f docker-compose.data.yaml up add-demo-k8s-data --build`
5 changes: 3 additions & 2 deletions stack/nilea/config.json → stack/blueprint/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"endpointUrl": "http://127.0.0.1:3030/nilea/sparql",
"endpointUrl": "http://127.0.0.1:8080/query",
"sparqlConsoleUrl": "http://127.0.0.1:8080/sparql/#query",
"graphExplorerUrl": "http://127.0.0.1:8080/graph-explorer/?resource"
"graphExplorerUrl": "http://127.0.0.1:8080/graph-explorer/?resource",
"fullTextSearchDialect": "fuseki"
}
10 changes: 4 additions & 6 deletions stack/docker-compose.data.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
version: "3"

services:
# add k8s demo data (for those who don't have a Kubernetes cluster)
# Add k8s demo data (for those who don't have a Kubernetes cluster)
add-demo-k8s-data:
build:
context: ./alpine-curl/
dockerfile: Dockerfile
restart: "no"
command: 'curl -vvv --fail-with-body -u admin:admin http://store:3030/nilea/data?graph=urn:graph:k8s --data-binary @data.ttl --header "Content-Type: text/turtle"'
command: 'curl -vvv --fail-with-body -u admin:admin http://store:3030/blueprint/data?graph=urn:graph:k8s --data-binary @data.ttl --header "Content-Type: text/turtle"'
volumes:
- ./demo-data/k8s.ttl:/app/data.ttl:ro

# add custom k8s data generated locally (will not be in the git history)
# Add custom k8s data generated locally (will not be in the git history)
add-custom-k8s-data:
build:
context: ./alpine-curl/
dockerfile: Dockerfile
restart: "no"
command: 'curl -vvv --fail-with-body -u admin:admin http://store:3030/nilea/data?graph=urn:graph:k8s --data-binary @data.ttl --header "Content-Type: text/turtle"'
command: 'curl -vvv --fail-with-body -u admin:admin http://store:3030/blueprint/data?graph=urn:graph:k8s --data-binary @data.ttl --header "Content-Type: text/turtle"'
volumes:
- ./volumes/k8s-data/data.ttl:/app/data.ttl:ro
16 changes: 6 additions & 10 deletions stack/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
version: "3"

services:
store:
image: ghcr.io/zazuko/fuseki-geosparql:v2.2.0
image: ghcr.io/zazuko/fuseki-geosparql:v3
ports:
- 3030:3030
environment:
Expand All @@ -20,23 +18,21 @@ services:
volumes:
- ./fuseki-data:/app/data:ro

nilea:
blueprint:
build:
context: ..
dockerfile: nilea.Dockerfile
dockerfile: Dockerfile
volumes:
- ./nilea/config.json:/app/config.json:ro
- ./blueprint/config.json:/app/config.json:ro
ports:
- 8081:80

trifid:
build:
context: ./trifid/
dockerfile: Dockerfile
image: ghcr.io/zazuko/trifid:v5
ports:
- 8080:8080
environment:
- DATASET_BASE_URL=
- SPARQL_ENDPOINT_URL=http://store:3030/nilea/query
- SPARQL_ENDPOINT_URL=http://store:3030/blueprint/query
- SPARQL_USERNAME=admin
- SPARQL_PASSWORD=admin
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion stack/fuseki-data/load-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo ""
for f in /app/data/*.ttl; do
graph=$(basename -s .ttl "${f}")
echo "Loading '${f}' in graph urn:graph:${graph}"
curl -s --fail-with-body -u admin:admin "http://store:3030/nilea/data?graph=urn:graph:${graph}" --data-binary "@${f}" --header "Content-Type: text/turtle"
curl -s --fail-with-body -u admin:admin "http://store:3030/blueprint/data?graph=urn:graph:${graph}" --data-binary "@${f}" --header "Content-Type: text/turtle"
echo ""
done

Expand Down
6 changes: 3 additions & 3 deletions stack/fuseki/config.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
.

<#service> rdf:type fuseki:Service ;
fuseki:name "nilea" ;
fuseki:name "blueprint" ;

fuseki:endpoint [ fuseki:operation fuseki:query ; ] ;
fuseki:endpoint [ fuseki:operation fuseki:query ; fuseki:name "sparql" ] ;
Expand All @@ -53,12 +53,12 @@
.

<#dataset> rdf:type tdb2:DatasetTDB2 ;
tdb2:location "databases/nilea" ;
tdb2:location "databases/blueprint" ;
tdb2:unionDefaultGraph true ;
.

<#indexLucene> a text:TextIndexLucene ;
text:directory <file:/fuseki/databases/nilea/INDEX> ;
text:directory <file:/fuseki/databases/blueprint/INDEX> ;
text:entityMap <#entMap> ;
text:storeValues true ;
text:analyzer [ a text:StandardAnalyzer ] ;
Expand Down
2 changes: 0 additions & 2 deletions stack/trifid/.dockerignore

This file was deleted.

3 changes: 0 additions & 3 deletions stack/trifid/.eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion stack/trifid/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions stack/trifid/Dockerfile

This file was deleted.

51 changes: 0 additions & 51 deletions stack/trifid/config.yaml

This file was deleted.

Loading

0 comments on commit 8284e80

Please sign in to comment.