aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsblimkie <steven.blimkie@amdocs.com>2018-02-23 12:33:06 -0500
committersblimkie <steven.blimkie@amdocs.com>2018-02-23 12:34:24 -0500
commitff681ef0a970535e5da5f90478fa59100bb6208d (patch)
treeebff63db91c8ab64590bdcdc75d1e4e80ccbc3f0
parent9c7f302c627e498bf0838726a3203a81e7309e1c (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>
-rw-r--r--bundleconfig-local/etc/sysprops/sys-props.properties9
-rw-r--r--src/main/bin/start.sh33
2 files changed, 24 insertions, 18 deletions
diff --git a/bundleconfig-local/etc/sysprops/sys-props.properties b/bundleconfig-local/etc/sysprops/sys-props.properties
index a55e6ea..25725d9 100644
--- a/bundleconfig-local/etc/sysprops/sys-props.properties
+++ b/bundleconfig-local/etc/sysprops/sys-props.properties
@@ -1,4 +1,3 @@
-#Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
#This file is used for defining AJSC system properties for different configuration schemes and is necessary for the AJSC to run properly.
#The sys-props.properties file is used for running locally. The template.sys-props.properties file will be used when deployed
#to a SOA/CSI Cloud node.
@@ -53,8 +52,9 @@ SOA_CLOUD_ENV=false
CONTINUE_ON_LISTENER_EXCEPTION=false
#Jetty Container ThreadCount Configuration Variables
-AJSC_JETTY_ThreadCount_MIN=1
+AJSC_JETTY_ThreadCount_MIN=10
AJSC_JETTY_ThreadCount_MAX=200
+AJSC_JETTY_BLOCKING_QUEUE_SIZE=200
AJSC_JETTY_IDLETIME_MAX=3000
#Camel Context level default threadPool Profile configuration
@@ -112,5 +112,8 @@ RESTLET_COMPONENT_REUSE_ADDRESS=true
#AJSC_EXTERNAL_PROPERTIES_FOLDERS=__basedir__/ajsc-shared-config/etc
#End of AJSC System Properties
-#Service System Properties. Please, place any Service related System Properties below.
+# This is the default keystore password for the example keystore included in the test-config
+# repository. It can be overwritten using the deploy.yaml env params
+KEY_STORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+KEY_MANAGER_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
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: "