Skip to content

Commit

Permalink
post beta test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr.Snowbird authored and Dr.Snowbird committed Dec 1, 2018
1 parent d4babc6 commit a5b1ab5
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 33 deletions.
52 changes: 25 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ FROM openkbs/jdk-mvn-py3

MAINTAINER DrSnowbird "DrSnowbird@openkbs.org"

## -------------------------------------------------------------------------------
## ---- USER_NAME is defined in parent image: openkbs/jdk-mvn-py3-x11 already ----
## -------------------------------------------------------------------------------
ENV USER_NAME=${USER_NAME:-blgz}
ENV HOME=/home/${USER_NAME}
ARG VCS_REF=${VCS_REF}
ARG VCS_URL=${VCS_URL}

## ----------------------------------------------------------------------------
## ---- To change to different Product version:! ----
## ----------------------------------------------------------------------------
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/${VCS_URL}"

## ---------------------------------
## ---- Product Specifications: ----
## ---------------------------------

## -- 0.) Product Provider and Name: -- ##
ARG PRODUCT_INSTALL_ROOT_DIR=${PRODUCT_INSTALL_ROOT_DIR:-/var/lib}
Expand Down Expand Up @@ -59,9 +59,9 @@ ENV PRODUCT_DATA=${PRODUCT_DATA}
ARG PRODUCT_WORKSPACE=${PRODUCT_WORKSPACE:-${HOME}/workspace}
ENV PRODUCT_WORKSPACE=${PRODUCT_WORKSPACE:-${HOME}/workspace}

#### ------------------------ ####
#### ---- BlazeGraph Server ####
#### ------------------------ ####
#### ----------------------------
#### ---- BlazeGraph Server -----
#### ----------------------------
#### (Mapping from PRODUCCT_HOME to product-specific HOME)
ARG BLZG_HOME=${PRODUCT_HOME}
ENV BLZG_HOME=${PRODUCT_HOME}
Expand Down Expand Up @@ -125,19 +125,18 @@ RUN \
## (not exist yet) mv ${BLZG_HOME}/war/WEB-INF/classes/RWStore.properties ${BLZG_HOME}/war/WEB-INF/classes/RWStore.properties.ORIG && \
mv ${PRODUCT_FULL_PATH_EXE} ${PRODUCT_FULL_PATH_EXE}.ORIG

##################################
#### Install Libs or Plugins ####
##################################
# (debug use only)
#### ---------------------------------
#### ---- Install Libs or Plugins ----
#### ---------------------------------
# ... add Product plugin if any
RUN \
apt-get update -y && \
apt-get install -y sudo ack-grep && \
rm -rf /var/lib/apt/lists/*

#### ------------------------ ####
#### -----------------------------
#### ---- Blazegraph Override ----
#### ------------------------ ####
#### -----------------------------
## /opt/blazegraph/conf/RWStore.properties
COPY ./override/RWStore.properties ${BIGDATA_PROPERTY}
COPY ./override/log4j.properties ${BLZG_HOME}/war/WEB-INF/classes/log4j.properties
Expand All @@ -149,9 +148,9 @@ COPY ./override/blazegraph.sh ${PRODUCT_FULL_PATH_EXE}
COPY ./rdf-samples ${PRODUCT_HOME}/
COPY ./docker-entrypoint.sh /

################################
#### ---- user: Non-root ----
################################
#### ------------------------
#### ---- user: Non-root ----
#### ------------------------
## ---- user: developer ----
ENV USER_NAME=blgz
ENV HOME=/home/${USER_NAME}
Expand All @@ -168,9 +167,9 @@ RUN groupadd -g ${GROUP_ID} ${USER_NAME} && \
export uid=${USER_ID} gid=${GROUP_ID} && \
mkdir -p ${HOME}

#################################
#### Set up run environments ####
#################################
#### ---------------------------------
#### ---- Set up run environments ----
#### ---------------------------------
ARG PRODUCT_PROFILE=${PRODUCT_PROFILE:-${HOME}/.${PRODUCT_NAME}-${PRODUCT_VERSION}}

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

#####################################
#### ---- Start Application ---- ####
#####################################
#### ---------------------------
#### ---- Start Application ----
#### ---------------------------

USER ${USER_NAME}

WORKDIR ${PRODUCT_HOME}
#WORKDIR ${HOME}

#CMD ["/bin/bash", "-c", "${PRODUCT_FULL_PATH_EXE}","start"]
ENTRYPOINT ["/docker-entrypoint.sh"]
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# !!!!!!!! --- BETA testing mode --- !!!!!!!!!!
# !!!!!!!! --- NOT-READY-for-Public-Consumption Yet --- !!!!!!!!!!
# BlazeGraph Server 2.1.4 + Java 8 (1.8.0_191) JDK + Maven 3.5 + Python 3.5 + Gradle 4.9
[![](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")

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

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

# Reference
* [BlazeGraph](https://www.blazegraph.com/)
Expand Down
16 changes: 12 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MY_DIR=$(dirname "$(readlink -f "$0")")
DOCKERFILE=${1:-Dockerfile}

###################################################
#### ---- Change this only if want to use your own
#### ---- Change this if you want to use your own
###################################################
ORGANIZATION=openkbs

Expand All @@ -37,11 +37,21 @@ function detectDockerEnvFile() {
}
detectDockerEnvFile

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

###################################################
#### ---- Generate build-arg arguments ----
###################################################
BUILD_ARGS=""
BUILD_DATE="`date -u +"%Y-%m-%dT%H:%M:%SZ"`"
VCS_REF="`git rev-parse --short HEAD`"
VCS_URL="https://github.com/`echo $(basename $PWD)`"
BUILD_ARGS="--build-arg BUILD_DATE=${BUILD_DATE} --build-arg VCS_REF=${VCS_REF}"

## -- ignore entries start with "#" symbol --
function generateBuildArgs() {
for r in `cat ${DOCKER_ENV_FILE} | grep -v '^#'`; do
Expand All @@ -55,10 +65,8 @@ generateBuildArgs
echo "BUILD_ARGS=${BUILD_ARGS}"

###################################################
#### ---- Container package information ----
#### ---- Build Container ----
###################################################
DOCKER_IMAGE_REPO=`echo $(basename $PWD)|tr '[:upper:]' '[:lower:]'|tr "/: " "_" `
imageTag=${1:-"${ORGANIZATION}/${DOCKER_IMAGE_REPO}"}

docker build --rm -t ${imageTag} \
${BUILD_ARGS} \
Expand Down
6 changes: 6 additions & 0 deletions docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
USER_ID=1000
GROUP_ID=1000

#### ---- Build Specification ----
# ARG BUILD_DATE="`date -u +"%Y-%m-%dT%H:%M:%SZ"`"
# ARG VERSION=1.0.0
# ARG VCS_REF="`git rev-parse --short HEAD`"
# ARG VCS_URL="https://github.com/openDrSnowbird/blazegraph-docker"

#########################################
#### ---- Product Specificatons ---- ####
#########################################
Expand Down
Binary file added docs/Kubernetes-Dashboard-Deploy-Services.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Kubernetes-Dashboard-UI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/OpenShift-blazegraph-docker-deployment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Portainer-as-Docker-Desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a5b1ab5

Please sign in to comment.