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>
. /opt/app/policy/etc/profile.d/env.sh
. /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
if [[ -f config/$container-tweaks.sh ]] ; then
# file may not be executable; running it as an
- /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
/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
+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]} $@ --"
function install_tomcat_component() {
if [[ $DEBUG == y ]]; then
echo "-- ${FUNCNAME[0]} $@ --"
base)
configure_base
component_preconfigure
base)
configure_base
component_preconfigure
;;
pdp)
configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
;;
pdp)
configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"