Browse Source

Add fuseki

Arkadiusz Ryś 2 years ago
parent
commit
838aba52b6
6 changed files with 95 additions and 87 deletions
  1. 0 10
      .dockerignore
  2. 0 13
      README.rst
  3. 64 64
      docker-compose.yml
  4. 2 0
      fuseki.env
  5. 26 0
      fuseki/config.ttl
  6. 3 0
      stage.sh

+ 0 - 10
.dockerignore

@@ -1,10 +0,0 @@
-__pycache__/
-*$py.class
-/.git
-/.idea
-/docs
-/data
-/.dockerignore
-/.gitignore
-/.gitlab-ci.yml
-/README.rst

+ 0 - 13
README.rst

@@ -5,16 +5,3 @@ Deployer
    I am become boredom, the deployer of tools.
 
 Tool to easily deploy a demo for FlandersMake Digital Twin Design project Work Package 2.
-
-
-
-..
-   .. image:: docs/ui.png
-      :alt: Screenshot of the user interface
-
-   Installation
-   ------------
-
-   .. code-block:: shell
-
-      pip install --index-url https://pip:glpat-m8mNfhxZAUnWvy7rLS1x@git.rys.one/api/v4/projects/264/packages/pypi/simple --deployer

+ 64 - 64
docker-compose.yml

@@ -1,9 +1,9 @@
 version: "3.8"
 
 services:
-  models:
-    image: registry.rys.one/dtdesign/models:1.0.0
-    container_name: models
+  fuseki:
+    image: registry.rys.one/dtdesign/fuseki
+    container_name: fuseki
     networks:
       web:
         ipv4_address: 172.30.200.10
@@ -14,15 +14,23 @@ services:
       - 8.8.8.8
       - 8.8.4.4
     labels:
+      - "traefik.enable=true"
+      - "traefik.http.routers.fuseki.entrypoints=web-secure"
+      - "traefik.http.routers.fuseki.rule=Host(`fuseki.rys.app`)"
+      - "traefik.http.routers.fuseki.tls.certresolver=letsencrypt"
+      - "traefik.http.routers.fuseki.service=fuseki-svc"
+      - "traefik.http.services.fuseki-svc.loadbalancer.server.port=3030"
       - "diun.enable=true"
+      - "diun.watch_repo=true"
     restart: unless-stopped
     volumes:
-      - "./build:/app/build"
+      - "./fuseki:/fuseki"
+      - "./fuseki-extra:/fuseki-extra"
     env_file:
-      - "./config/models.env"
+      - "fuseki.env"
 
   spendpoint:
-    image: registry.rys.one/dtdesign/spendpoint:1.0.0
+    image: registry.rys.one/dtdesign/spendpoint
     container_name: spendpoint
     networks:
       web:
@@ -34,13 +42,13 @@ services:
       - 8.8.8.8
       - 8.8.4.4
     labels:
-      - "traefik.enable=true"
-      - "traefik.http.routers.spendpoint.entrypoints=web-secure"
+#      - "traefik.enable=true"
+#      - "traefik.http.routers.spendpoint.entrypoints=web-secure"
 #      - "traefik.http.routers.spendpoint.rule=Host(`ontology.rys.app`) && PathPrefix(`/sparql/`)"
-      - "traefik.http.routers.spendpoint.rule=Host(`ontology.rys.app`)"
-      - "traefik.http.routers.spendpoint.tls.certresolver=letsencrypt"
-      - "traefik.http.routers.spendpoint.service=spendpoint-svc"
-      - "traefik.http.services.spendpoint-svc.loadbalancer.server.port=80"
+#      - "traefik.http.routers.spendpoint.rule=Host(`ontology.rys.app`)"
+#      - "traefik.http.routers.spendpoint.tls.certresolver=letsencrypt"
+#      - "traefik.http.routers.spendpoint.service=spendpoint-svc"
+#      - "traefik.http.services.spendpoint-svc.loadbalancer.server.port=80"
       - "diun.enable=true"
     depends_on:
       - models
@@ -50,59 +58,8 @@ services:
     env_file:
       - "./config/spendpoint.env"
 
-  graph-exploring-tool:
-    image: registry.rys.one/dtdesign/graph-exploring-tool:1.0.0
-    container_name: graph-exploring-tool
-    networks:
-      web:
-        ipv4_address: 172.30.200.30
-    dns:
-      - 192.168.0.11
-      - 1.1.1.1
-      - 1.0.0.1
-      - 8.8.8.8
-      - 8.8.4.4
-    labels:
-      - "diun.enable=true"
-    depends_on:
-      - models
-      - spendpoint
-    restart: unless-stopped
-    volumes:
-      - "./palette:/app/palette:ro"
-    env_file:
-      - "./config/graph-exploring-tool.env"
-
-  fuseki:
-    image: registry.rys.one/dtdesign/fuseki:1.0.0
-    container_name: fuseki
-    networks:
-      web:
-        ipv4_address: 172.30.200.40
-    dns:
-      - 192.168.0.11
-      - 1.1.1.1
-      - 1.0.0.1
-      - 8.8.8.8
-      - 8.8.4.4
-    labels:
-      - "traefik.enable=true"
-      - "traefik.http.routers.fuseki.entrypoints=web-secure"
-      - "traefik.http.routers.fuseki.rule=Host(`fuseki.rys.app`)"
-      - "traefik.http.routers.fuseki.tls.certresolver=letsencrypt"
-      - "traefik.http.routers.fuseki.service=fuseki-svc"
-      - "traefik.http.services.fuseki-svc.loadbalancer.server.port=80"
-      - "diun.enable=true"
-    depends_on:
-      - spendpoint
-    restart: unless-stopped
-    volumes:
-      - "./build:/app/ingest:ro"
-    env_file:
-      - "./config/fuseki.env"
-
   outlier:
-    image: registry.rys.one/dtdesign/models/outlier:1.0.0
+    image: registry.rys.one/dtdesign/dtdesign/outlier
     container_name: outlier
     networks:
       web:
@@ -124,3 +81,46 @@ services:
 networks:
   web:
     external: true
+
+#  models:
+#    image: registry.rys.one/dtdesign/models
+#    container_name: models
+#    networks:
+#      web:
+#        ipv4_address: 172.30.200.10
+#    dns:
+#      - 192.168.0.11
+#      - 1.1.1.1
+#      - 1.0.0.1
+#      - 8.8.8.8
+#      - 8.8.4.4
+#    labels:
+#      - "diun.enable=true"
+#    restart: unless-stopped
+#    volumes:
+#      - "./build:/app/build"
+#    env_file:
+#      - "./config/models.env"
+
+#  graph-exploring-tool:
+#    image: registry.rys.one/dtdesign/graph-exploring-tool
+#    container_name: graph-exploring-tool
+#    networks:
+#      web:
+#        ipv4_address: 172.30.200.30
+#    dns:
+#      - 192.168.0.11
+#      - 1.1.1.1
+#      - 1.0.0.1
+#      - 8.8.8.8
+#      - 8.8.4.4
+#    labels:
+#      - "diun.enable=true"
+#    depends_on:
+#      - models
+#      - spendpoint
+#    restart: unless-stopped
+#    volumes:
+#      - "./palette:/app/palette:ro"
+#    env_file:
+#      - "./config/graph-exploring-tool.env"

+ 2 - 0
fuseki.env

@@ -0,0 +1,2 @@
+ADMIN_PASSWORD=FusekiAdminPasswordForAccess
+JVM_ARGS=-Xmx2g

+ 26 - 0
fuseki/config.ttl

@@ -0,0 +1,26 @@
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+[] rdf:type fuseki:Server ;
+  fuseki:services (
+    :service
+  )
+  .
+
+:service rdf:type fuseki:Service ;
+  rdfs:label  "Generic dataset" ;
+  fuseki:name "dataset" ;
+  fuseki:endpoint [ fuseki:operation fuseki:query ] ;
+  fuseki:endpoint [ fuseki:operation fuseki:gsp-rw ] ;
+  fuseki:endpoint [
+    fuseki:operation fuseki:shacl ;
+    fuseki:name "shacl"
+  ] ;
+  ##fuseki:dataset :dataset ;
+  fuseki:dataset <#dataset> ;
+  .
+
+<#dataset> rdf:type ja:MemoryDataset .

+ 3 - 0
stage.sh

@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+docker-compose exec fuseki ./load.sh