summaryrefslogtreecommitdiffstats
path: root/kubernetes/so/resources/config/docker-files
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2018-02-12 15:54:03 -0500
committerMike Elliott <mike.elliott@amdocs.com>2018-02-23 15:09:17 -0500
commitd32d36e3219cc0f17e2fe81e6ac50866e4025140 (patch)
treee30ef0e7c453a1b5e6a4d0c4b0f6eca9fa5a31fe /kubernetes/so/resources/config/docker-files
parenta70775c54d244fe769293ea3bba1d99881416e6e (diff)
Add standardized helm chart for so
This is a standardization (based on helm community best practices) of a Helm chart for the Service Orchestrator (so) in ONAP. How to deploy the so chart (outside of the parent onap chart) from the local oom/kubernetes codebase. ** need to create/update dependencies defined in the chart's ** requirements.yaml helm dep update so/ ** deploy the so helm chart with the "release" name of 'onap' helm install so/ -n onap Change-Id: I22471eb9fe0dec32941e14dc63857222c80ebe20 Issue-ID: OOM-727 Signed-off-by: Mike Elliott <mike.elliott@amdocs.com>
Diffstat (limited to 'kubernetes/so/resources/config/docker-files')
-rwxr-xr-xkubernetes/so/resources/config/docker-files/scripts/start-jboss-server.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/kubernetes/so/resources/config/docker-files/scripts/start-jboss-server.sh b/kubernetes/so/resources/config/docker-files/scripts/start-jboss-server.sh
new file mode 100755
index 0000000000..3280253743
--- /dev/null
+++ b/kubernetes/so/resources/config/docker-files/scripts/start-jboss-server.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+# Copyright 2015 AT&T Intellectual Properties
+##############################################################################
+# Script to initialize the chef-repo branch and.chef
+#
+##############################################################################
+# Copy the certificates
+echo 'Copying the *.crt provided in /shared folder'
+cp --verbose /shared/*.crt /usr/local/share/ca-certificates
+update-ca-certificates
+
+echo 'Running in JBOSS'
+su - jboss
+
+DEBUG=''
+if [ "$JBOSS_DEBUG" = true ] ; then
+ DEBUG="--debug"
+fi
+
+#Start the chef-solo if mso-docker.json contains some data.
+if [ -s /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json ]
+then
+ echo "mso-docker.json has some configuration, replay the recipes."
+ chef-solo -c /var/berks-cookbooks/${CHEF_REPO_NAME}/solo.rb -o recipe[mso-config::apih],recipe[mso-config::bpmn],recipe[mso-config::jra]
+else
+ echo "mso-docker.json is empty, do not replay the recipes."
+fi
+
+JBOSS_PIDFILE=/tmp/jboss-standalone.pid
+$JBOSS_HOME/bin/standalone.sh ${DEBUG} -c standalone-full-ha-mso.xml &
+JBOSS_PID=$!
+# Trap common signals and relay them to the jboss process
+trap "kill -HUP $JBOSS_PID" HUP
+trap "kill -TERM $JBOSS_PID" INT
+trap "kill -QUIT $JBOSS_PID" QUIT
+trap "kill -PIPE $JBOSS_PID" PIPE
+trap "kill -TERM $JBOSS_PID" TERM
+if [ "x$JBOSS_PIDFILE" != "x" ]; then
+ echo $JBOSS_PID > $JBOSS_PIDFILE
+fi
+# Wait until the background process exits
+WAIT_STATUS=128
+while [ "$WAIT_STATUS" -ge 128 ]; do
+ wait $JBOSS_PID 2>/dev/null
+ WAIT_STATUS=$?
+ if [ "$WAIT_STATUS" -gt 128 ]; then
+ SIGNAL=`expr $WAIT_STATUS - 128`
+ SIGNAL_NAME=`kill -l $SIGNAL`
+ echo "*** JBossAS process ($JBOSS_PID) received $SIGNAL_NAME signal ***" >&2
+ fi
+done
+if [ "$WAIT_STATUS" -lt 127 ]; then
+ JBOSS_STATUS=$WAIT_STATUS
+else
+ JBOSS_STATUS=0
+fi
+if [ "$JBOSS_STATUS" -ne 10 ]; then
+ # Wait for a complete shudown
+ wait $JBOSS_PID 2>/dev/null
+fi
+if [ "x$JBOSS_PIDFILE" != "x" ]; then
+ grep "$JBOSS_PID" $JBOSS_PIDFILE && rm $JBOSS_PIDFILE
+fi