aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-04-25 12:53:23 -0500
committerJorge Hernandez <jh1730@att.com>2018-04-25 12:55:39 -0500
commit693138b08a04a8027de64dc093e872bac963630a (patch)
treea74e5ef58dbd5d825fb8b96080ccff3aec015bd9
parent5e10681059449e28f0e49a2088cf671e75f42f19 (diff)
cook policy-keystore into pe image
OOM team reported issues with ONAP installation in terms of config map sizes. After discussion with OOM team, one solution is to cook it in the docker image itself. This will solve the size issue on the OOM side. Change-Id: I2ca20bdc3aa8ee959c5e4c1d07483fe5f0c14607 Issue-ID: POLICY-747 Signed-off-by: Jorge Hernandez <jh1730@att.com>
-rw-r--r--packages/base/src/files/etc/ssl/policy-keystorebin0 -> 114865 bytes
-rw-r--r--packages/docker/src/main/docker/do-start.sh7
-rw-r--r--packages/docker/src/main/docker/docker-install.sh17
3 files changed, 20 insertions, 4 deletions
diff --git a/packages/base/src/files/etc/ssl/policy-keystore b/packages/base/src/files/etc/ssl/policy-keystore
new file mode 100644
index 000000000..c3890965b
--- /dev/null
+++ b/packages/base/src/files/etc/ssl/policy-keystore
Binary files differ
diff --git a/packages/docker/src/main/docker/do-start.sh b/packages/docker/src/main/docker/do-start.sh
index 47b835ac9..0179fad70 100644
--- a/packages/docker/src/main/docker/do-start.sh
+++ b/packages/docker/src/main/docker/do-start.sh
@@ -64,9 +64,10 @@ else
. /opt/app/policy/etc/profile.d/env.sh
- # install policy keystore
- mkdir -p $POLICY_HOME/etc/ssl
- cp config/policy-keystore $POLICY_HOME/etc/ssl
+ if [[ -f config/policy-keystore ]]; then
+ # install policy keystore
+ cp config/policy-keystore $POLICY_HOME/etc/ssl
+ fi
if [[ -f config/$container-tweaks.sh ]] ; then
# file may not be executable; running it as an
diff --git a/packages/docker/src/main/docker/docker-install.sh b/packages/docker/src/main/docker/docker-install.sh
index a4dd0ceb1..62289c591 100644
--- a/packages/docker/src/main/docker/docker-install.sh
+++ b/packages/docker/src/main/docker/docker-install.sh
@@ -356,7 +356,6 @@ function install_base() {
exit 1
fi
- /bin/mkdir -p ${POLICY_HOME}/etc/ssl > /dev/null 2>&1
/bin/mkdir -p ${POLICY_HOME}/etc/init.d > /dev/null 2>&1
/bin/mkdir -p ${POLICY_HOME}/tmp > /dev/null 2>&1
/bin/mkdir -p ${POLICY_HOME}/var > /dev/null 2>&1
@@ -394,6 +393,21 @@ function configure_base() {
fi
}
+function configure_keystore() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ local DEFAULT_KEYSTORE_PASSWORD="Pol1cy_0nap"
+
+ if [[ -n ${KEYSTORE_PASSWD} ]]; then
+ keytool -storepasswd -storepass ${DEFAULT_KEYSTORE_PASSWORD} -keystore ${POLICY_HOME}/etc/ssl/policy-keystore -new ${KEYSTORE_PASSWD}
+ keytool -list -keystore ${POLICY_HOME}/etc/ssl/policy-keystore -storepass ${KEYSTORE_PASSWD}
+ fi
+}
+
+
function install_tomcat_component() {
if [[ $DEBUG == y ]]; then
echo "-- ${FUNCNAME[0]} $@ --"
@@ -731,6 +745,7 @@ if [[ ${OPERATION} == configure ]]; then
base)
configure_base
component_preconfigure
+ configure_keystore
;;
pdp)
configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"