summaryrefslogtreecommitdiffstats
path: root/aai-traversal/src/main/resources/docker
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2018-02-06 15:06:44 -0500
committerVenkata Harish K Kajur <vk250x@att.com>2018-03-07 10:02:36 -0500
commita0d3e8ee8d78d41e4a58437983bc4c894d0024df (patch)
tree37f4698a9481349548eec326f2845f8cb1abd06f /aai-traversal/src/main/resources/docker
parente688a3115c5de57ca9ac3e218fad6ecb50d6f8b1 (diff)
Update traversal from AJSC 2 to Spring Boot
Issue-ID: AAI-799 Change-Id: I6500f661db704726f529f665203a9c0605e8193e Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'aai-traversal/src/main/resources/docker')
-rw-r--r--aai-traversal/src/main/resources/docker/Dockerfile31
-rw-r--r--aai-traversal/src/main/resources/docker/aai.sh44
-rw-r--r--aai-traversal/src/main/resources/docker/commonLibs/README1
-rw-r--r--aai-traversal/src/main/resources/docker/docker-entrypoint.sh134
-rw-r--r--aai-traversal/src/main/resources/docker/init-chef.sh61
5 files changed, 0 insertions, 271 deletions
diff --git a/aai-traversal/src/main/resources/docker/Dockerfile b/aai-traversal/src/main/resources/docker/Dockerfile
deleted file mode 100644
index dc28e15..0000000
--- a/aai-traversal/src/main/resources/docker/Dockerfile
+++ /dev/null
@@ -1,31 +0,0 @@
-FROM aaionap/aai-common:1.1.0
-
-RUN mkdir -p /opt/aaihome/aaiadmin /opt/aai/logroot/AAI-RES /opt/app/aai-traversal/bin /opt/app/aai-traversal/extApps;
-
-# Add the proper files into the docker image from your build
-ADD ./opt/app/aai-traversal /opt/app/aai-traversal
-ADD ./commonLibs/ /opt/app/commonLibs/
-ADD init-chef.sh /opt/app/aai-traversal/init-chef.sh
-ADD docker-entrypoint.sh /opt/app/aai-traversal/docker-entrypoint.sh
-ADD aai.sh /etc/profile.d/aai.sh
-
-# Change the permissions of aai shell script and all scripts in the microservice to be executable
-RUN chmod 644 /etc/profile.d/aai.sh && \
- find /opt/app/aai-traversal -name "*.sh" -exec chmod 755 {} +
-
-# Set the log directory to be mountable so the logs will be persisted
-VOLUME /opt/aai/logroot/AAI-GQ
-
-# Expose the ports that needs to be available from the container
-EXPOSE 8447
-
-# During the startup of the container, this will be the starting directory
-WORKDIR /opt/app/aai-traversal
-
-# When the container is started this is the entrypoint script
-# that docker will run. Make sure this script doesn't end abruptly
-# Docker entrypoint will run exec command to make that main process
-# Using the exec form here will ensure the java process is main
-
-ENTRYPOINT ["/bin/bash", "/opt/app/aai-traversal/docker-entrypoint.sh"]
-
diff --git a/aai-traversal/src/main/resources/docker/aai.sh b/aai-traversal/src/main/resources/docker/aai.sh
deleted file mode 100644
index a253775..0000000
--- a/aai-traversal/src/main/resources/docker/aai.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# ============LICENSE_START=======================================================
-# org.onap.aai
-# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed 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.
-# ============LICENSE_END=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
-
-PROJECT_HOME=/opt/app/aai-traversal
-export PROJECT_HOME
-
-JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
-export JAVA_HOME
-
-AAIENV=dev
-export AAIENV
-
-PATH=/usr/lib/jvm/java-8-openjdk-amd64:$PATH
-
-PROJECT_OWNER=aaiadmin
-PROJECT_GROUP=aaiadmin
-PROJECT_UNIXHOMEROOT=/opt/aaihome
-export PROJECT_OWNER PROJECT_GROUP PROJECT_UNIXHOMEROOT
-umask 0022
-
-export idns_api_url=
-export idnscred=
-export idnstenant=
-
-
diff --git a/aai-traversal/src/main/resources/docker/commonLibs/README b/aai-traversal/src/main/resources/docker/commonLibs/README
deleted file mode 100644
index 00e36c0..0000000
--- a/aai-traversal/src/main/resources/docker/commonLibs/README
+++ /dev/null
@@ -1 +0,0 @@
-// this file's presence ensures commonLibs folder is present when image is created \ No newline at end of file
diff --git a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
deleted file mode 100644
index 1a57d9a..0000000
--- a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
+++ /dev/null
@@ -1,134 +0,0 @@
-#
-# ============LICENSE_START=======================================================
-# org.onap.aai
-# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed 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.
-# ============LICENSE_END=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
-
-# Set the current path to be the application home and common libs home
-export APP_HOME=$(pwd);
-COMMONLIBS_HOME="/opt/app/commonLibs";
-
-export CHEF_CONFIG_REPO=${CHEF_CONFIG_REPO:-aai-config};
-export CHEF_GIT_URL=${CHEF_GIT_URL:-http://gerrit.onap.org/r/aai};
-export CHEF_CONFIG_GIT_URL=${CHEF_CONFIG_GIT_URL:-$CHEF_GIT_URL};
-export CHEF_DATA_GIT_URL=${CHEF_DATA_GIT_URL:-$CHEF_GIT_URL};
-
-export RESOURCES_HOSTNAME=${RESOURCES_HOSTNAME:-aai-resources.api.simpledemo.onap.org};
-export RESOURCES_PORT=${RESOURCES_PORT:-8447};
-
-USER_ID=${LOCAL_USER_ID:-9001}
-
-if [ $(cat /etc/passwd | grep aaiadmin | wc -l) -eq 0 ]; then
- useradd --shell=/bin/bash -u ${USER_ID} -o -c "" -m aaiadmin || {
- echo "Unable to create the user id for ${USER_ID}";
- exit 1;
- }
-fi;
-
-chown -R aaiadmin:aaiadmin /opt/app /var/chef /opt/aai/logroot
-
-gosu aaiadmin ./init-chef.sh || {
- echo "Unable to run init chef script, please check logs";
- exit 1;
-}
-
-httpPort=8086;
-httpsPort=8446;
-
-AAI_CORE_JAR=$(ls ${APP_HOME}/extJars/aai-core*.jar);
-
-# Get the basename of the aai-core-X.Y.Z-SNAPSHOT.jar
-# Then extract the X.Y.Z-SNAPSHOT part
-AAI_CORE_VERSION=$(basename ${AAI_CORE_JAR} | grep -o '[0-9]*\.[0-9]*\.[0-9]*[^.]*');
-
-
-cd ${APP_HOME};
-
-# If the variable DISABLE_UPDATE_QUERY is empty
-# then the update query date shell script will be ran
-# This makes it configurable to run update query or not
-
-if [ -z ${DISABLE_UPDATE_QUERY} ]; then
-
- while ! nc -z ${RESOURCES_HOSTNAME} ${RESOURCES_PORT} ;
- do
- echo "Waiting for resources to be up";
- sleep 5;
- done
-
- UPDATE_QUERY_RAN_FILE="updateQueryRan.txt";
-
- AAICONFIG_FILE=/opt/app/aai-traversal/bundleconfig/etc/appprops/aaiconfig.properties;
-
- if [ ! -f ${UPDATE_QUERY_RAN_FILE} ]; then
- OLD_RESOURCES_URL=$(grep -o "^aai.server.url=.*" ${AAICONFIG_FILE} | cut -d"=" -f2-);
- TEMP_RESOURCES_URL=https://${RESOURCES_HOSTNAME}:${RESOURCES_PORT}/aai/v11/;
- sed -i "s%^aai.server.url=.*$%aai.server.url=${TEMP_RESOURCES_URL}%g" ${AAICONFIG_FILE};
- gosu aaiadmin /opt/app/aai-traversal/bin/install/updateQueryData.sh
- touch ${UPDATE_QUERY_RAN_FILE};
- sed -i "s%^aai.server.url=.*$%aai.server.url=${OLD_RESOURCES_URL}%g" ${AAICONFIG_FILE};
- fi
-fi
-
-CP=${COMMONLIBS_HOME}/*;
-CP="$CP":${APP_HOME}/etc;
-CP="$CP":${APP_HOME}/lib/*;
-CP="$CP":${APP_HOME}/extJars/logback-access-1.1.7.jar;
-CP="$CP":${APP_HOME}/extJars/logback-core-1.1.7.jar;
-CP="$CP":${AAI_CORE_JAR};
-
-# You can add additional jvm options by adding environment variable JVM_PRE_OPTS
-# If you need to add more jvm options at the end then you can use JVM_POST_OPTS
-JVM_OPTS="${JVM_PRE_OPTS} ${JVM_OPTS}";
-JVM_OPTS="${JVM_OPTS} -server -XX:NewSize=512m -XX:MaxNewSize=512m";
-JVM_OPTS="${JVM_OPTS} -XX:SurvivorRatio=8";
-JVM_OPTS="${JVM_OPTS} -XX:+DisableExplicitGC -verbose:gc -XX:+UseParNewGC";
-JVM_OPTS="${JVM_OPTS} -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled";
-JVM_OPTS="${JVM_OPTS} -XX:+UseConcMarkSweepGC -XX:-UseBiasedLocking";
-JVM_OPTS="${JVM_OPTS} -XX:ParallelGCThreads=4";
-JVM_OPTS="${JVM_OPTS} -XX:LargePageSizeInBytes=128m ";
-JVM_OPTS="${JVM_OPTS} -XX:+PrintGCDetails -XX:+PrintGCTimeStamps";
-JVM_OPTS="${JVM_OPTS} -Xloggc:${APP_HOME}/logs/gc/graph-query_gc.log";
-JVM_OPTS="${JVM_OPTS} -XX:+HeapDumpOnOutOfMemoryError";
-JVM_OPTS="${JVM_OPTS} ${JVM_POST_OPTS}";
-
-# You can add additional java options by adding environment variable JAVA_PRE_OPTS
-# If you need to add more jvm options at the end then you can use JAVA_POST_OPTS
-JAVA_OPTS="${JAVA_PRE_OPTS} ${JAVA_OPTS}";
-JAVA_OPTS="${JAVA_OPTS} -Dsun.net.inetaddr.ttl=180";
-JAVA_OPTS="${JAVA_OPTS} -Dhttps.protocols=TLSv1.1,TLSv1.2";
-JAVA_OPTS="${JAVA_OPTS} -DSOACLOUD_SERVICE_VERSION=1.0.1";
-JAVA_OPTS="${JAVA_OPTS} -DAJSC_HOME=${APP_HOME}";
-JAVA_OPTS="${JAVA_OPTS} -DAJSC_CONF_HOME=${APP_HOME}/bundleconfig";
-JAVA_OPTS="${JAVA_OPTS} -DAJSC_SHARED_CONFIG=${APP_HOME}/bundleconfig";
-JAVA_OPTS="${JAVA_OPTS} -DAFT_HOME=${APP_HOME}";
-JAVA_OPTS="${JAVA_OPTS} -DAAI_CORE_VERSION=${AAI_CORE_VERSION}";
-JAVA_OPTS="${JAVA_OPTS} -Daai-core.version=${AAI_CORE_VERSION}";
-JAVA_OPTS="${JAVA_OPTS} -Dlogback.configurationFile=${APP_HOME}/bundleconfig/etc/logback.xml";
-JAVA_OPTS="${JAVA_OPTS} ${JAVA_POST_OPTS}";
-
-JAVA_ARGS="${JAVA_PRE_ARGS} ${JAVA_ARGS}";
-JAVA_ARGS="${JAVA_ARGS} context=/";
-JAVA_ARGS="${JAVA_ARGS} port=$httpPort";
-JAVA_ARGS="${JAVA_ARGS} sslport=$httpsPort";
-JAVA_ARGS="${JAVA_ARGS} ${JAVA_POST_ARGS}";
-
-JAVA_CMD="exec gosu aaiadmin java";
-# Run the following command as aai-admin using gosu and make that process main
-${JAVA_CMD} -cp ${CLASSPATH}:${CP} ${JVM_OPTS} ${JAVA_OPTS} com.att.ajsc.runner.Runner ${JAVA_ARGS} "$@"
diff --git a/aai-traversal/src/main/resources/docker/init-chef.sh b/aai-traversal/src/main/resources/docker/init-chef.sh
deleted file mode 100644
index a8802db..0000000
--- a/aai-traversal/src/main/resources/docker/init-chef.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# org.onap.aai
-# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed 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.
-# ============LICENSE_END=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
-
-##############################################################################
-# Script to initialize the chef-repo branch and.chef
-#
-##############################################################################
-
-cd /var/chef;
-
-if [ ! -d "aai-config" ]; then
-
- git clone --depth 1 -b ${CHEF_BRANCH} --single-branch ${CHEF_CONFIG_GIT_URL}/${CHEF_CONFIG_REPO}.git aai-config || {
- echo "Error: Unable to clone the aai-config repo with url: ${CHEF_GIT_URL}/${CHEF_CONFIG_REPO}.git";
- exit 1;
- }
-
-fi
-
-if [ -d "aai-config/cookbooks/aai-traversal" ]; then
-
- (cd aai-config/cookbooks/aai-traversal/ && \
- for f in $(ls); do mv $f ../; done && \
- cd ../ && rmdir aai-traversal);
-
-fi;
-
-if [ ! -d "aai-data" ]; then
-
- git clone --depth 1 -b ${CHEF_BRANCH} --single-branch ${CHEF_DATA_GIT_URL}/aai-data.git aai-data || {
- echo "Error: Unable to clone the aai-data repo with url: ${CHEF_GIT_URL}";
- exit 1;
- }
-
-fi
-
-chef-solo \
- -c /var/chef/aai-data/chef-config/dev/.knife/solo.rb \
- -j /var/chef/aai-config/cookbooks/runlist-aai-traversal.json \
- -E ${AAI_CHEF_ENV};
-