diff options
author | sblimkie <steven.blimkie@amdocs.com> | 2018-02-23 12:33:06 -0500 |
---|---|---|
committer | sblimkie <steven.blimkie@amdocs.com> | 2018-02-23 12:34:24 -0500 |
commit | ff681ef0a970535e5da5f90478fa59100bb6208d (patch) | |
tree | ebff63db91c8ab64590bdcdc75d1e4e80ccbc3f0 /src/main/bin | |
parent | 9c7f302c627e498bf0838726a3203a81e7309e1c (diff) |
Make container parameters configurable
Params such as number of threads, Queue sizes, Heap size
are now configurable when deploying Gizmo
Change-Id: Ib58ff9cdf9e96378db7feaf3e7168267d05fd1e9
Issue-ID: AAI-807
Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
Diffstat (limited to 'src/main/bin')
-rw-r--r-- | src/main/bin/start.sh | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh index 843e4c5..1447175 100644 --- a/src/main/bin/start.sh +++ b/src/main/bin/start.sh @@ -1,28 +1,31 @@ -#!/bin/sh +#!/bin/bash BASEDIR="/opt/app/crud-api/" AJSC_HOME="$BASEDIR" AJSC_CONF_HOME="$AJSC_HOME/bundleconfig/" +# List of ajsc properties which are exposed for modification at deploy time +declare -a MODIFY_PROP_LIST=("KEY_STORE_PASSWORD" + "KEY_MANAGER_PASSWORD" + "AJSC_JETTY_ThreadCount_MIN" + "AJSC_JETTY_ThreadCount_MAX" + "AJSC_JETTY_BLOCKING_QUEUE_SIZE") +PROP_LIST_LENGTH=${#MODIFY_PROP_LIST[@]} + +for (( i=1; i<${PROP_LIST_LENGTH}+1; i++ )); +do + PROP_NAME=${MODIFY_PROP_LIST[$i-1]} + PROP_VALUE=${!PROP_NAME} + if [ ! -z "$PROP_VALUE" ]; then + sed -i "s/$PROP_NAME.*$/$PROP_NAME=$PROP_VALUE/g" $AJSC_CONF_HOME/etc/sysprops/sys-props.properties + fi +done + if [ -z "$CONFIG_HOME" ]; then echo "CONFIG_HOME must be set in order to start up process" exit 1 fi -if [ -z "$KEY_STORE_PASSWORD" ]; then - echo "KEY_STORE_PASSWORD must be set in order to start up process" - exit 1 -else - echo "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties -fi - -if [ -z "$KEY_MANAGER_PASSWORD" ]; then - echo "KEY_MANAGER_PASSWORD must be set in order to start up process" - exit 1 -else - echo "KEY_MANAGER_PASSWORD=$KEY_MANAGER_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties -fi - # Add any spring bean configuration files to the Gizmo deployment if [ -n "$SERVICE_BEANS" ]; then echo "Adding the following dynamic service beans to the deployment: " |