{"id":20178908,"url":"https://github.com/drsnowbird/blazegraph-docker","last_synced_at":"2025-04-10T04:45:18.628Z","repository":{"id":56365266,"uuid":"159455269","full_name":"DrSnowbird/blazegraph-docker","owner":"DrSnowbird","description":"Blazegraph docker container for deploying to Container Cluster Platforms (OpenShift, Kubernetes, etc)","archived":false,"fork":false,"pushed_at":"2023-02-06T23:54:05.000Z","size":611,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T06:02:50.394Z","etag":null,"topics":["bigdata","blazegraph","gpu-rdf","graph-database","kubernetes-deployment","openshift-deployment","rdf","semantic-web"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DrSnowbird.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-28T06:35:11.000Z","updated_at":"2025-03-22T18:53:51.000Z","dependencies_parsed_at":"2024-11-14T03:15:11.669Z","dependency_job_id":null,"html_url":"https://github.com/DrSnowbird/blazegraph-docker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSnowbird%2Fblazegraph-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSnowbird%2Fblazegraph-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSnowbird%2Fblazegraph-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSnowbird%2Fblazegraph-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrSnowbird","download_url":"https://codeload.github.com/DrSnowbird/blazegraph-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161237,"owners_count":21057552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigdata","blazegraph","gpu-rdf","graph-database","kubernetes-deployment","openshift-deployment","rdf","semantic-web"],"created_at":"2024-11-14T02:23:58.666Z","updated_at":"2025-04-10T04:45:18.604Z","avatar_url":"https://github.com/DrSnowbird.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlazeGraph Server 2.1.5 + OpenJDK Java 8 JDK + Maven 3.6 + Python 3.6/2.7 + pip 20 + node 15 + npm 7 + Gradle 6\n\n[![](https://images.microbadger.com/badges/image/openkbs/blazegraph-docker.svg)](https://microbadger.com/images/openkbs/blazegraph-docker \"Get your own image badge on microbadger.com\") [![](https://images.microbadger.com/badges/version/openkbs/blazegraph-docker.svg)](https://microbadger.com/images/openkbs/blazegraph-docker \"Get your own version badge on microbadger.com\")\n\n# Use Cases\nThis Blazegraph server is aiming for deployment over Container Cluster Platform such as Kubernetes, OpenShift, or other similar ones comparing to other light version of [openkbs/blazegrapy](https://hub.docker.com/r/openkbs/blazegraph-docker). In all, this implementation supports the following deployment uses:\n- Using ./run.sh or Portainer Container Desktop or other similar for standalone deployment.\n- Using 'docker-compose up -d' for standalone deployment.\n- Using Kubernetes, Openshift, or other platforms for cloud / cluster deployment.\n\n# Security\n* Non-root user for container:\n  We are tightening down the security of containerfor this container, we use non-root user (blzg as user) to run the Blazegraph. \n* Though, currently, you can go into container to use \"sudo\" to do admin work. \n  For production deployment, we recommend to remove sudo access inside container and other vulnerability codes. At this point, we are still relative relaxing in not fully locking down security yet.\n\n# Components\n* [BlazeGraph](https://www.blazegraph.com/) 2.1.5 service will be running at http://\u003cserver_ip:9999\u003e/\n* Ubuntu 18.04 LTS now (soon will use Ubuntu 20.04 as LTS Docker base image).\n* See [openkbs/jdk-mvn-py3 README.md](https://github.com/DrSnowbird/jdk-mvn-py3/blob/master/README.md)\n* See [Base Container Image: openkbs/jdk-mvn-py3](https://github.com/DrSnowbird/jdk-mvn-py3)\n* See [Base Components: OpenJDK, Python 3, PIP, Node/NPM, Gradle, Maven, etc.](https://github.com/DrSnowbird/jdk-mvn-py3#components)\n* Other tools: git wget unzip vim python python-setuptools python-dev python-numpy, ..., etc.\n\n# Persistence\n1. Using 'docker-compose up -d' will use Docker's volume to persist across multiple delete/create Docker container unless you change the volume name in 'docker-compose.yaml' file. Or, you intentionally use 'docker-compose down -v' to remove the volume and you will lost your previous data stored using Blazegraph.\n2. Using 'run.sh' will use the same Docker's volume as using 'docker-compose.yaml' since both of them using the same volume name.\n\n# Run (recommended for easy-start)\nImage is pulling from openkbs/blazegraph\n```\n./run.sh\n```\nA successfully starting of BlazeGraph will allow you to access the following URL:\n```\n    http://\u003cip_address\u003e:9999/blazegraph/ to get started.\n```\n\n# Run (manually)\nThe following example shows customized command to launch container:\n```\ndocker run --rm -d --name=blazegraph-docker --restart=no \\\n    --user 1000 \\ \n    -v /home/user1/data-docker/blazegraph-docker/data:/var/lib/blazegraph/data \\\n    -v /home/user1/data-docker/blazegraph-docker/.java:/home/developer/.java \\\n    -v /home/user1/data-docker/blazegraph-docker/.profile:/home/developer/.profile \\\n    -p 9999:9999 \\\n    openkbs/blazegraph-docker\n```\n# Demo\nTo demonstrate the Blazegraph with FreeText Search capability as powerful combination with RDF/Sparql query/search, you can load the \"Hello.rdf\" using the following steps after you login to Openshift/Minishift Web UI:\n```\nFirst, Create Project, say, [\"semantics-engine\"], then\nclick [UPDATE] tab \n    -\u003e select [Choose File] button at lower-left corner\n        -\u003e pick \"blazegraph-docker/rdf-samples/Hello.rdf\" from the pop-up file chooser, then click OK/done\n    -\u003e click [Update] button at the lower center of the screen.\n... You will see it is loading up the \"Hello.rdf\" file into Blazegraph database.\nclick upper-right corner [SEARCH], then type \"web\" then return key or hit magnify lens icon.\n... You will see it returns one tuple of \"www.w3schools.com\" with subject.\n... Congratulation! You have successfully launched, loaded, and tested the powerful RDF/FreeText Search Engine/Database - \"Blazegraph\"!\n```\n# Deployment\n## Kubernetes / Minikube \nSee [docs/Kubernetes-Dashboard-Deploy-Services.png](https://github.com/DrSnowbird/blazegraph-docker/blob/master/docs/Kubernetes-Dashboard-Deploy-Services.png) and [doc/Kubernetes-Dashboard-UI.png ](https://github.com/DrSnowbird/blazegraph-docker/blob/master/docs/Kubernetes-Dashboard-UI.png).\n```\n(Using Minikube's Web UI Dashboard http://192.168.99.102) -\u003e \"+CREATE\" -\u003e \"CREATE AN APP\"\nTo use non-default (1GB) memory for JVM, add the run-time env vars in the configuration, e.g. 4 GB Memory\n    JVM_MEM=4g\n```\nThen, you will access Blazegraph Docker container like the following except port will be different for yours:\n```\nhttp://192.168.99.100:32721/blazegraph/\n```\n## Openshift / Minishift \nSee [docs/OpenShift-blazegraph-docker-deployment.png](https://github.com/DrSnowbird/blazegraph-docker/blob/master/docs/OpenShift-blazegraph-docker-deployment.png).\n```\n(Using OpenShift's Web UI) -\u003e Deploy -\u003e Image, wait a few seconds for docker pod to up, then Create Route to expose to external Access.\n```\n## Portainer as Desktop\nSee [docs/Portainer-as-Docker-Desktop.png](https://github.com/DrSnowbird/blazegraph-docker/blob/master/docs/Portainer-as-Docker-Desktop.png).\n```\nUsing \"./run.sh\"\n```\n## Docker-compose\n```\nTo use non-default (e.g., 4GB) memory for JVM, add/change entry to \"docker-compose.yml\" file:\n      - JVM_MEM=4g\n```\n\n# Data Persistence\nAt this point, we only provide default host-based volume mapping persistence \n```\n(from file ./docker.env -- the \"#\" with no space is how \"run.sh\" pick up the volumes mapping you specify)\n#VOLUMES_LIST=\"data:/var/lib/blazegraph/data .java .profile\"\n```\nThen, running \"**./run.sh**\" will use the \"docker.env\" file's entry (as above) to create volume mapping\n```\n-v /home/\u003cYour UserName\u003e/data-docker/blazegraph-docker/data:/var/lib/blazegraph/data\n```\n# Distributed Data Persistence\n* Currently, we are working on the distributed data/file persistence solution using such as Gluster, Lustre, BeeGFS, etc. However, before we provide the cluster-enabled distributed persistence implementation, please use the above host-based volume mapping solution.\n* When deploying to OpenShift, Mesos, DC/OS, etc., you can use \"envrionment parameter to create your own host-based file mapping instead of default.\n\n# Build\nYou can build your own image locally.\n```\n./build.sh\n```\n\n# Build / Run your own image\n\nSay, you will build the image \"my/blazegraph\".\n\n```bash\ndocker build -t my/blazegraph .\n```\n\nTo run your own image, say, with some-blazegraph:\n\n```bash\nmkdir ./data\ndocker run -d --name some-blazegraph -v $PWD/data:/data -i -t my/blazegraph\n```\n\n# Shell into the Docker instance\n```bash\ndocker exec -it some-blazegraph /bin/bash\nor \n./shell.sh (if you use default ./run.sh -- not your local build)\n```\n\n# Web UI\n```http\nWeb UI: http://\u003cip_address\u003e:9999/\n```\n\n# Blazegraph Sparql, REST\nFor more information, please visit: \n* https://wiki.blazegraph.com/wiki/index.php/NanoSparqlServer \nFor SPARQL Endpoint, see more at \n* https://wiki.blazegraph.com/wiki/index.php/REST_API#SPARQL_End_Point\n\nTo use SPARQL REST API, from remote SPARQL Client:\n```http\nhttp://\u003cip_address\u003e:9999/bigdata\n```\n\n# (Optional Use) Run Python code\nTo run Python code \n\n```bash\ndocker run --rm openkbs/blazegraph python -c 'print(\"Hello World\")'\n```\n\nor,\n\n```bash\nmkdir ./data\necho \"print('Hello World')\" \u003e ./data/myPyScript.py\ndocker run -it --rm --name some-blazegraph -v \"$PWD\"/data:/data openkbs/blazegraph python myPyScript.py\n```\n\nor,\n\n```bash\nalias dpy='docker run --rm openkbs/blazegraph python'\ndpy -c 'print(\"Hello World\")'\n```\n# (Optional Use) Compile or Run java while no local installation needed\nRemember, the default working directory, /data, inside the docker container -- treat is as \"/\".\nSo, if you create subdirectory, \"./data/workspace\", in the host machine and\nthe docker container will have it as \"/data/workspace\".\n\n```java\n#!/bin/bash -x\nmkdir ./data\ncat \u003e./data/HelloWorld.java \u003c\u003c-EOF\npublic class HelloWorld {\n   public static void main(String[] args) {\n      System.out.println(\"Hello, World\");\n   }\n}\nEOF\ncat ./data/HelloWorld.java\nalias djavac='docker run -it --rm --name some-jre-mvn-py3 -v '$PWD'/data:/data openkbs/jre-mvn-py3 javac'\nalias djava='docker run -it --rm --name some-jre-mvn-py3 -v '$PWD'/data:/data openkbs/jre-mvn-py3 java'\n\ndjavac HelloWorld.java\ndjava HelloWorld\n```\nAnd, the output:\n```\nHello, World\n```\nHence, the alias above, \"djavac\" and \"djava\" is your docker-based \"javac\" and \"java\" commands and\nit will work the same way as your local installed Java's \"javac\" and \"java\" commands.\n\n# Related Tools\n* [OpenKBS/blazegraph-docker](https://github.com/DrSnowbird/blazegraph-docker) - Blazegraph RDF Database Engine (CPU + GPU)\n* [Google Refine w/RDF Extension](https://github.com/DrSnowbird/grefine-rdf-extension) - Google Refine with RDF Extension\n* [OpenKBS/GraphDB-Docker](https://github.com/DrSnowbird/graphdb) - Ontotext GraphDB / RDF Platform\n* [Docker-based Stanford Protege (RDF/OWL) IDE](https://hub.docker.com/r/openkbs/protege-docker)\n* [Web-based Protege Docker by openkbs/docker-webprotege](https://hub.docker.com/r/openkbs/docker-webprotege/)\n* [big-data-europe/docker-kafkasail](https://github.com/big-data-europe/docker-kafkasail) - Apache Tomcat with OpenRDF's (rdf4j) openrdf-workbench and openrdf-sesame server Apache Tomcat with OpenRDF's (rdf4j) openrdf-workbench and openrdf-sesame server \n* [yyz1989/docker-rdf4j](https://github.com/yyz1989/docker-rdf4j) - RDF4J Server (which is RDF database server and the SPARQL endpoint service) and RDF4J Workbench (which is the Web UI of RDF4J Server for database and data management tasks)\n\n# References\n* [Stanford Protege](https://protege.stanford.edu/)\n* [RDF4J (Java RDF)](http://rdf4j.org/)\n* [Semantic Analytics Stack (SANSA)](http://sansa-stack.net/) - Big Data Analytics + Semantic Technology Stacks\n* [FullTextSearch](https://wiki.blazegraph.com/wiki/index.php/FullTextSearch)\n* [BlazeGraph](https://www.blazegraph.com/)\n\n# Releases information\n* [See Releases Information](https://github.com/DrSnowbird/jdk-mvn-py3#releases-information)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrsnowbird%2Fblazegraph-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrsnowbird%2Fblazegraph-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrsnowbird%2Fblazegraph-docker/lists"}