working on docker install
authorFrank Greguska <francis.greguska@jpl.nasa.gov>
Sat, 27 Jan 2018 02:03:45 +0000 (18:03 -0800)
committerFrank Greguska <francis.greguska@jpl.nasa.gov>
Sat, 27 Jan 2018 02:03:45 +0000 (18:03 -0800)
docker/Dockerfile [new file with mode: 0644]
docker/entrypoint.sh [new file with mode: 0755]
docker/install_nexusproto.sh [new file with mode: 0755]
docker/install_ningester.sh [new file with mode: 0755]
docker/install_ningesterpy.sh [new file with mode: 0755]
gradle/wrapper/gradle-wrapper.jar [deleted file]
gradle/wrapper/gradle-wrapper.properties
gradlew

diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644 (file)
index 0000000..0199e53
--- /dev/null
@@ -0,0 +1,71 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM openjdk:8-jdk
+
+MAINTAINER dev@sdap.apache.org
+
+ARG APACHE_NEXUSPROTO=https://github.com/apache/incubator-sdap-nexusproto.git
+ARG APACHE_NEXUSPROTO_BRANCH=master
+
+ARG APACHE_NINGESTERPY=https://github.com/apache/incubator-sdap-ningesterpy.git
+ARG APACHE_NINGESTERPY_BRANCH=master
+
+ARG APACHE_NINGESTER=https://github.com/apache/incubator-sdap-ningester.git
+ARG APACHE_NINGESTER_BRANCH=master
+
+RUN apt-get update && apt-get install -y \
+    bzip2 \
+    git \
+    python3 \
+    wget && \
+    addgroup ningester && \
+    adduser --system --group ningester && \
+    rm -rf /var/lib/apt/lists/* && \
+    chgrp ningester /usr/local
+
+USER ningester
+WORKDIR /tmp
+
+# ########################
+# # Anaconda   #
+# ########################
+RUN wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O install_anaconda.sh && \
+    /bin/bash install_anaconda.sh -b -p /usr/local/anaconda2 && \
+    rm install_anaconda.sh && \
+    /usr/local/anaconda2/bin/conda config --add channels conda-forge
+ENV PATH /usr/local/anaconda2/bin:$PATH
+
+
+COPY --chown=ningester:ningester *.sh ./
+
+# Install nexusproto
+RUN ./install_nexusproto.sh $APACHE_NEXUSPROTO $APACHE_NEXUSPROTO_BRANCH
+
+# Install ningesterpy
+#COPY --chown=ningester:ningester install_ningesterpy.sh ./install_ningesterpy.sh
+RUN ./install_ningesterpy.sh $APACHE_NINGESTERPY $APACHE_NINGESTERPY_BRANCH
+
+# Install ningester
+#COPY --chown=ningester:ningester install_ningester.sh ./install_ningester.sh
+RUN ./install_ningester.sh $APACHE_NINGESTER $APACHE_NINGESTER_BRANCH && \
+  export NINGESTER_JAR=`find ningester/build/libs -name ningester*.jar`
+
+VOLUME /data
+VOLUME /config
+
+#COPY --chown=ningester:ningester entrypoint.sh ./entrypoint.sh
+
+ENTRYPOINT ["./entrypoint.sh"]
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
new file mode 100755 (executable)
index 0000000..fe1fe4e
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -e
+
+NINGESTER_JAR=`find ningester/build/libs -name ningester*.jar`
+CONFIG_FILES=`find /config -name "*.yml" | awk -vORS=, '{ print $1 }'`
+GRANULE=`find /data -type f`
+
+java -Dspring.profiles.active=$1 -Dspring.config.locations=${CONFIG_FILES} -jar ${NINGESTER_JAR} granule=${GRANULE}
\ No newline at end of file
diff --git a/docker/install_nexusproto.sh b/docker/install_nexusproto.sh
new file mode 100755 (executable)
index 0000000..ce60cb9
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+set -e
+
+APACHE_NEXUSPROTO="https://github.com/apache/incubator-sdap-nexusproto.git"
+MASTER="master"
+
+GIT_REPO=${1:-$APACHE_NEXUSPROTO}
+GIT_BRANCH=${2:-$MASTER}
+
+mkdir nexusproto
+pushd nexusproto
+git init
+git pull ${GIT_REPO} ${GIT_BRANCH}
+
+./gradlew pythonInstall --info
+
+./gradlew install --info
+popd
\ No newline at end of file
diff --git a/docker/install_ningester.sh b/docker/install_ningester.sh
new file mode 100755 (executable)
index 0000000..c4701fd
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -e
+
+APACHE_NINGESTER="https://github.com/apache/incubator-sdap-ningester.git"
+MASTER="master"
+
+GIT_REPO=${1:-APACHE_NINGESTER}
+GIT_BRANCH=${2:-$MASTER}
+
+mkdir ningester
+pushd ningester
+git init
+git pull ${GIT_REPO} ${GIT_BRANCH}
+
+./gradlew bootRepackage
+popd
\ No newline at end of file
diff --git a/docker/install_ningesterpy.sh b/docker/install_ningesterpy.sh
new file mode 100755 (executable)
index 0000000..0925be9
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -e
+
+APACHE_NINGESTERPY="https://github.com/apache/incubator-sdap-ningesterpy.git"
+MASTER="master"
+
+GIT_REPO=${1:-APACHE_NINGESTERPY}
+GIT_BRANCH=${2:-$MASTER}
+
+mkdir ningesterpy
+pushd ningesterpy
+git init
+git pull ${GIT_REPO} ${GIT_BRANCH}
+
+python setup.py install
+popd
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644 (file)
index abaa743..0000000
Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
index ec6a0c3..2c2bbe5 100644 (file)
@@ -1,6 +1,5 @@
-#Thu Oct 12 17:50:39 PDT 2017
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
diff --git a/gradlew b/gradlew
index 4453cce..cccdd3d 100755 (executable)
--- a/gradlew
+++ b/gradlew
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
 
-warn ( ) {
+warn () {
     echo "$*"
 }
 
-die ( ) {
+die () {
     echo
     echo "$*"
     echo
@@ -155,7 +155,7 @@ if $cygwin ; then
 fi
 
 # Escape application args
-save ( ) {
+save () {
     for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
     echo " "
 }