Skip to content

Commit a5b1ab5

Browse files
Dr.SnowbirdDr.Snowbird
Dr.Snowbird
authored and
Dr.Snowbird
committed
post beta test
1 parent d4babc6 commit a5b1ab5

8 files changed

+51
-33
lines changed

Dockerfile

+25-27
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ FROM openkbs/jdk-mvn-py3
22

33
MAINTAINER DrSnowbird "[email protected]"
44

5-
## -------------------------------------------------------------------------------
6-
## ---- USER_NAME is defined in parent image: openkbs/jdk-mvn-py3-x11 already ----
7-
## -------------------------------------------------------------------------------
8-
ENV USER_NAME=${USER_NAME:-blgz}
9-
ENV HOME=/home/${USER_NAME}
5+
ARG VCS_REF=${VCS_REF}
6+
ARG VCS_URL=${VCS_URL}
107

11-
## ----------------------------------------------------------------------------
12-
## ---- To change to different Product version:! ----
13-
## ----------------------------------------------------------------------------
8+
LABEL org.label-schema.vcs-ref=$VCS_REF \
9+
org.label-schema.vcs-url="https://github.com/${VCS_URL}"
10+
11+
## ---------------------------------
12+
## ---- Product Specifications: ----
13+
## ---------------------------------
1414

1515
## -- 0.) Product Provider and Name: -- ##
1616
ARG PRODUCT_INSTALL_ROOT_DIR=${PRODUCT_INSTALL_ROOT_DIR:-/var/lib}
@@ -59,9 +59,9 @@ ENV PRODUCT_DATA=${PRODUCT_DATA}
5959
ARG PRODUCT_WORKSPACE=${PRODUCT_WORKSPACE:-${HOME}/workspace}
6060
ENV PRODUCT_WORKSPACE=${PRODUCT_WORKSPACE:-${HOME}/workspace}
6161

62-
#### ------------------------ ####
63-
#### ---- BlazeGraph Server ####
64-
#### ------------------------ ####
62+
#### ----------------------------
63+
#### ---- BlazeGraph Server -----
64+
#### ----------------------------
6565
#### (Mapping from PRODUCCT_HOME to product-specific HOME)
6666
ARG BLZG_HOME=${PRODUCT_HOME}
6767
ENV BLZG_HOME=${PRODUCT_HOME}
@@ -125,19 +125,18 @@ RUN \
125125
## (not exist yet) mv ${BLZG_HOME}/war/WEB-INF/classes/RWStore.properties ${BLZG_HOME}/war/WEB-INF/classes/RWStore.properties.ORIG && \
126126
mv ${PRODUCT_FULL_PATH_EXE} ${PRODUCT_FULL_PATH_EXE}.ORIG
127127

128-
##################################
129-
#### Install Libs or Plugins ####
130-
##################################
131-
# (debug use only)
128+
#### ---------------------------------
129+
#### ---- Install Libs or Plugins ----
130+
#### ---------------------------------
132131
# ... add Product plugin if any
133132
RUN \
134133
apt-get update -y && \
135134
apt-get install -y sudo ack-grep && \
136135
rm -rf /var/lib/apt/lists/*
137136

138-
#### ------------------------ ####
137+
#### -----------------------------
139138
#### ---- Blazegraph Override ----
140-
#### ------------------------ ####
139+
#### -----------------------------
141140
## /opt/blazegraph/conf/RWStore.properties
142141
COPY ./override/RWStore.properties ${BIGDATA_PROPERTY}
143142
COPY ./override/log4j.properties ${BLZG_HOME}/war/WEB-INF/classes/log4j.properties
@@ -149,9 +148,9 @@ COPY ./override/blazegraph.sh ${PRODUCT_FULL_PATH_EXE}
149148
COPY ./rdf-samples ${PRODUCT_HOME}/
150149
COPY ./docker-entrypoint.sh /
151150

152-
################################
153-
#### ---- user: Non-root ----
154-
################################
151+
#### ------------------------
152+
#### ---- user: Non-root ----
153+
#### ------------------------
155154
## ---- user: developer ----
156155
ENV USER_NAME=blgz
157156
ENV HOME=/home/${USER_NAME}
@@ -168,9 +167,9 @@ RUN groupadd -g ${GROUP_ID} ${USER_NAME} && \
168167
export uid=${USER_ID} gid=${GROUP_ID} && \
169168
mkdir -p ${HOME}
170169

171-
#################################
172-
#### Set up run environments ####
173-
#################################
170+
#### ---------------------------------
171+
#### ---- Set up run environments ----
172+
#### ---------------------------------
174173
ARG PRODUCT_PROFILE=${PRODUCT_PROFILE:-${HOME}/.${PRODUCT_NAME}-${PRODUCT_VERSION}}
175174

176175
RUN mkdir -p ${PRODUCT_WORKSPACE} ${PRODUCT_PROFILE} ${PRODUCT_DATA} ${DATA_DIR} && \
@@ -187,14 +186,13 @@ VOLUME ${DATA_DIR}
187186
ARG PRODUCT_PORTS=${PRODUCT_PORTS:-9999}
188187
EXPOSE ${PRODUCT_PORTS}
189188

190-
#####################################
191-
#### ---- Start Application ---- ####
192-
#####################################
189+
#### ---------------------------
190+
#### ---- Start Application ----
191+
#### ---------------------------
193192

194193
USER ${USER_NAME}
195194

196195
WORKDIR ${PRODUCT_HOME}
197-
#WORKDIR ${HOME}
198196

199197
#CMD ["/bin/bash", "-c", "${PRODUCT_FULL_PATH_EXE}","start"]
200198
ENTRYPOINT ["/docker-entrypoint.sh"]

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# !!!!!!!! --- BETA testing mode --- !!!!!!!!!!
2-
# !!!!!!!! --- NOT-READY-for-Public-Consumption Yet --- !!!!!!!!!!
31
# BlazeGraph Server 2.1.4 + Java 8 (1.8.0_191) JDK + Maven 3.5 + Python 3.5 + Gradle 4.9
42
[![](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")
53

@@ -59,16 +57,19 @@ click upper-right corner [SEARCH], then type "web" then return key or hit magnif
5957
```
6058
# Deployment
6159
**Kubernetes / Minikube**:
60+
- (See docs/Kubernetes-Dashboard-Deploy-Services.png)
6261
```
6362
(Using Minikube's Web UI Dashboard http://192.168.99.102) -> Deployments -> "CREATE AN APP"
6463
To use non-default (1GB) memory for JVM, add the run-time env vars in the configuration
6564
JVM_MEM=4g
6665
```
6766
**Openshift / Minishift**:
67+
- (See docs/OpenShift-blazegraph-docker-deployment.png)
6868
```
6969
(Using OpenShift's Web UI) -> Deploy, then Create Route to expose to external Access.
7070
```
7171
**Portainer / Local host**:
72+
- (See docs/Portainer-as-Docker-Desktop.png)
7273
```
7374
Using "./run.sh"
7475
```
@@ -180,6 +181,11 @@ Hello, World
180181
Hence, the alias above, "djavac" and "djava" is your docker-based "javac" and "java" commands and
181182
it will work the same way as your local installed Java's "javac" and "java" commands.
182183

184+
# See Also
185+
* [Semantic Analytics Stack (SANSA)](http://sansa-stack.net/) - Big Data Analytics + Semantic Technology Stacks
186+
* [OpenKBS/GraphDB-Docker](https://github.com/DrSnowbird/graphdb) - Ontotext GraphDB / RDF Platform
187+
* [OpenKBS/blazegraph-docker](https://github.com/DrSnowbird/blazegraph-docker) - Blazegraph RDF Database Engine (CPU + GPU)
188+
* [Google Refine w/RDF Extension](https://github.com/DrSnowbird/grefine-rdf-extension) - Google Refine with RDF Extension
183189

184190
# Reference
185191
* [BlazeGraph](https://www.blazegraph.com/)

build.sh

+12-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MY_DIR=$(dirname "$(readlink -f "$0")")
1313
DOCKERFILE=${1:-Dockerfile}
1414

1515
###################################################
16-
#### ---- Change this only if want to use your own
16+
#### ---- Change this if you want to use your own
1717
###################################################
1818
ORGANIZATION=openkbs
1919

@@ -37,11 +37,21 @@ function detectDockerEnvFile() {
3737
}
3838
detectDockerEnvFile
3939

40+
###################################################
41+
#### ---- Container package information ----
42+
###################################################
43+
DOCKER_IMAGE_REPO=`echo $(basename $PWD)|tr '[:upper:]' '[:lower:]'|tr "/: " "_" `
44+
imageTag=${1:-"${ORGANIZATION}/${DOCKER_IMAGE_REPO}"}
4045

4146
###################################################
4247
#### ---- Generate build-arg arguments ----
4348
###################################################
4449
BUILD_ARGS=""
50+
BUILD_DATE="`date -u +"%Y-%m-%dT%H:%M:%SZ"`"
51+
VCS_REF="`git rev-parse --short HEAD`"
52+
VCS_URL="https://github.com/`echo $(basename $PWD)`"
53+
BUILD_ARGS="--build-arg BUILD_DATE=${BUILD_DATE} --build-arg VCS_REF=${VCS_REF}"
54+
4555
## -- ignore entries start with "#" symbol --
4656
function generateBuildArgs() {
4757
for r in `cat ${DOCKER_ENV_FILE} | grep -v '^#'`; do
@@ -55,10 +65,8 @@ generateBuildArgs
5565
echo "BUILD_ARGS=${BUILD_ARGS}"
5666

5767
###################################################
58-
#### ---- Container package information ----
68+
#### ---- Build Container ----
5969
###################################################
60-
DOCKER_IMAGE_REPO=`echo $(basename $PWD)|tr '[:upper:]' '[:lower:]'|tr "/: " "_" `
61-
imageTag=${1:-"${ORGANIZATION}/${DOCKER_IMAGE_REPO}"}
6270

6371
docker build --rm -t ${imageTag} \
6472
${BUILD_ARGS} \

docker.env

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
USER_ID=1000
33
GROUP_ID=1000
44

5+
#### ---- Build Specification ----
6+
# ARG BUILD_DATE="`date -u +"%Y-%m-%dT%H:%M:%SZ"`"
7+
# ARG VERSION=1.0.0
8+
# ARG VCS_REF="`git rev-parse --short HEAD`"
9+
# ARG VCS_URL="https://github.com/openDrSnowbird/blazegraph-docker"
10+
511
#########################################
612
#### ---- Product Specificatons ---- ####
713
#########################################
109 KB
Loading

docs/Kubernetes-Dashboard-UI.png

71.6 KB
Loading
Loading

docs/Portainer-as-Docker-Desktop.png

159 KB
Loading

0 commit comments

Comments
 (0)