diff options
author | DR695H <dr695h@att.com> | 2017-02-07 13:11:03 -0500 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2017-02-07 13:12:28 -0500 |
commit | 13ce0552dc7156b6e3e226c00295705f27780a40 (patch) | |
tree | a9ada50d0a86c0fdc253c188d1328f6e880bfaf5 /deliveries/src/main/scripts | |
parent | 77b87f76ff2799bd1f5fe85552f1c5e7081eb4df (diff) |
actually adding the files to the initial commit
Change-Id: I2f0c09692c2ae70be61b8bb552fd1bd2983eb661
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'deliveries/src/main/scripts')
-rw-r--r-- | deliveries/src/main/scripts/localize.sh | 18 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_asdc.sh | 17 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_cache.sh | 15 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_log4j.sh | 19 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_logback.sh | 16 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_portal.sh | 22 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_quartz.sh | 20 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_system.sh | 40 | ||||
-rw-r--r-- | deliveries/src/main/scripts/localize_war.sh | 31 |
9 files changed, 198 insertions, 0 deletions
diff --git a/deliveries/src/main/scripts/localize.sh b/deliveries/src/main/scripts/localize.sh new file mode 100644 index 000000000..3966f7023 --- /dev/null +++ b/deliveries/src/main/scripts/localize.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +#Extract the WAR so it can be customized by the localization script +cd /tmp/vid/stage +jar -xf vid.war + +source /tmp/vid/localize_war.sh || { + echo "ERROR: Localization script failed" + exit 2 +} + +#Create the customized WAR and deploy it to Tomcat +mkdir -p /tmp/vid/deployed +cd /tmp/vid/stage +jar -cvf /tmp/vid/deployed/vid.war . +cd +mv -f /tmp/vid/deployed/vid.war /usr/local/tomcat/webapps +catalina.sh run diff --git a/deliveries/src/main/scripts/localize_asdc.sh b/deliveries/src/main/scripts/localize_asdc.sh new file mode 100644 index 000000000..549c17af1 --- /dev/null +++ b/deliveries/src/main/scripts/localize_asdc.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/asdc.properties +TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/asdc_template.properties + +echo "Localizing the ASDC client configuration" + +sed -e 's ${ASDC_CLIENT_TYPE} '${ASDC_CLIENT_TYPE}' g' \ + -e 's ${ASDC_CLIENT_REST_HOST} '${ASDC_CLIENT_REST_HOST}' g' \ + -e 's ${ASDC_CLIENT_REST_PORT} '${ASDC_CLIENT_REST_PORT}' g' \ + -e 's ${ASDC_CLIENT_REST_PROTOCOL} '${ASDC_CLIENT_REST_PROTOCOL}' g' \ + -e 's/${ASDC_CLIENT_REST_AUTH}/'"${ASDC_CLIENT_REST_AUTH}"'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { + echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" + exit 4 + } + +echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/deliveries/src/main/scripts/localize_cache.sh b/deliveries/src/main/scripts/localize_cache.sh new file mode 100644 index 000000000..d25949ccc --- /dev/null +++ b/deliveries/src/main/scripts/localize_cache.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/cache.ccf +TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/cache_template.ccf + +echo "Localizing the VID cache configuration" + +mkdir -p "${CACHE_DIRECTORY}" + +sed -e 's,${CACHE_DIRECTORY},'${CACHE_DIRECTORY}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { + echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" + exit 3 + } + +echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/deliveries/src/main/scripts/localize_log4j.sh b/deliveries/src/main/scripts/localize_log4j.sh new file mode 100644 index 000000000..d2ab2bba4 --- /dev/null +++ b/deliveries/src/main/scripts/localize_log4j.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/log4j.properties +TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/log4j_template.properties + +echo "Localizing the VID log4j configuration" + +mkdir -p ${LOG4J_LOGS_DIRECTORY} + +sed -e 's/${LOG4J_LOGLEVEL}/'${LOG4J_LOGLEVEL}'/g' \ + -e 's/${LOG4J_APPENDER}/'${LOG4J_APPENDER}'/g' \ + -e 's,${LOG4J_LOGS_DIRECTORY},'${LOG4J_LOGS_DIRECTORY}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { + echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" + exit 3 + } + +echo "Localized ${FINAL_CONFIG_FILE} successfully." + + diff --git a/deliveries/src/main/scripts/localize_logback.sh b/deliveries/src/main/scripts/localize_logback.sh new file mode 100644 index 000000000..43798eb84 --- /dev/null +++ b/deliveries/src/main/scripts/localize_logback.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/logback.xml +TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/logback_template.xml + +echo "Localizing the VID logback configuration" + +mkdir -p "${VID_LOG_DIR}" + +sed -e 's/${VID_LOG_LEVEL}/'${VID_LOG_LEVEL}'/g' \ + -e 's,${VID_LOG_DIR},'${VID_LOG_DIR}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { + echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" + exit 3 + } + +echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/deliveries/src/main/scripts/localize_portal.sh b/deliveries/src/main/scripts/localize_portal.sh new file mode 100644 index 000000000..7d630c56b --- /dev/null +++ b/deliveries/src/main/scripts/localize_portal.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/portal.properties +TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/portal_template.properties + +echo "Localizing the VID portal configuration" + +sed -e 's ${VID_WJ_LOGOUT_URL} '${VID_WJ_LOGOUT_URL}' g' \ + -e 's ${VID_ECOMP_REDIRECT_URL} '${VID_ECOMP_REDIRECT_URL}' g' \ + -e 's ${VID_ECOMP_REST_URL} '${VID_ECOMP_REST_URL}' g' \ + -e 's ${VID_UEB_URL_LIST} '${VID_UEB_URL_LIST}' g' \ + -e 's ${VID_ECOMP_PORTAL_INBOX_NAME} '${VID_ECOMP_PORTAL_INBOX_NAME}' g' \ + -e 's ${VID_UEB_APP_KEY} '${VID_UEB_APP_KEY}' g' \ + -e 's ${VID_UEB_APP_SECRET} '${VID_UEB_APP_SECRET}' g' \ + -e 's ${VID_UEB_APP_MAILBOX_NAME} '${VID_UEB_APP_MAILBOX_NAME}' g' \ + -e 's ${VID_UEB_LISTENERS_ENABLE} '${VID_UEB_LISTENERS_ENABLE}' g' \ + -e 's/${VID_UEB_CONSUMER_GROUP}/'${VID_UEB_CONSUMER_GROUP}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { + echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" + exit 4 + } + +echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/deliveries/src/main/scripts/localize_quartz.sh b/deliveries/src/main/scripts/localize_quartz.sh new file mode 100644 index 000000000..c284e6c24 --- /dev/null +++ b/deliveries/src/main/scripts/localize_quartz.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/quartz.properties +TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/quartz_template.properties + +echo "Localizing the VID quartz configuration" + +sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \ + -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \ + -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \ + -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \ + -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \ + -e 's/${VID_MYSQL_MAXCONNECTIONS}/'${VID_MYSQL_MAXCONNECTIONS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { + echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" + exit 4 + } + +echo "Localized ${FINAL_CONFIG_FILE} successfully." + + diff --git a/deliveries/src/main/scripts/localize_system.sh b/deliveries/src/main/scripts/localize_system.sh new file mode 100644 index 000000000..7cd7be68d --- /dev/null +++ b/deliveries/src/main/scripts/localize_system.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/system.properties +TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/system_template.properties + +echo "Localizing the VID system configuration" + +mkdir -p "${VID_MYLOGIN_FEED_DIRECTORY}" + +sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \ + -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \ + -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \ + -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \ + -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \ + -e 's/${VID_AAI_HOST}/'${VID_AAI_HOST}'/g' \ + -e 's/${VID_AAI_PORT}/'${VID_AAI_PORT}'/g' \ + -e 's,${AAI_TRUSTSTORE_FILENAME},'${AAI_TRUSTSTORE_FILENAME}',g' \ + -e 's/${AAI_TRUSTSTORE_PASSWD_X}/'${AAI_TRUSTSTORE_PASSWD_X}'/g' \ + -e 's,${AAI_KEYSTORE_FILENAME},'${AAI_KEYSTORE_FILENAME}',g' \ + -e 's/${AAI_KEYSTORE_PASSWD_X}/'${AAI_KEYSTORE_PASSWD_X}'/g' \ + -e 's/${VID_APP_DISPLAY_NAME}/'${VID_APP_DISPLAY_NAME}'/g' \ + -e 's ${VID_ECOMP_SHARED_CONTEXT_REST_URL} '${VID_ECOMP_SHARED_CONTEXT_REST_URL}' g' \ + -e 's ${VID_ECOMP_REDIRECT_URL} '${VID_ECOMP_REDIRECT_URL}' g' \ + -e 's ${VID_ECOMP_REST_URL} '${VID_ECOMP_REST_URL}' g' \ + -e 's ${VID_MSO_SERVER_URL} '${VID_MSO_SERVER_URL}' g' \ + -e 's/${VID_MSO_USER}/'${VID_MSO_USER}'/g' \ + -e 's/${VID_MSO_PASS}/'${VID_MSO_PASS}'/g' \ + -e 's,${VID_MYLOGIN_FEED_DIRECTORY},'${VID_MYLOGIN_FEED_DIRECTORY}',g' \ + -e 's,${MSO_DME2_CLIENT_TIMEOUT},'${MSO_DME2_CLIENT_TIMEOUT}',g' \ + -e 's,${MSO_DME2_CLIENT_READ_TIMEOUT},'${MSO_DME2_CLIENT_READ_TIMEOUT}',g' \ + -e 's,${MSO_DME2_SERVER_URL},'${MSO_DME2_SERVER_URL}',g' \ + -e 's,${MSO_DME2_ENABLED},'${MSO_DME2_ENABLED}',g' \ + -e 's,${MSO_POLLING_INTERVAL_MSECS},'${MSO_POLLING_INTERVAL_MSECS}',g' \ + -e 's,${VID_TRUSTSTORE_FILE},'${VID_TRUSTSTORE_FILE}',g' \ + -e 's/${VID_TRUSTSTORE_PASS}/'${VID_TRUSTSTORE_PASS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { + echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" + exit 4 + } + +echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/deliveries/src/main/scripts/localize_war.sh b/deliveries/src/main/scripts/localize_war.sh new file mode 100644 index 000000000..f0669e0e6 --- /dev/null +++ b/deliveries/src/main/scripts/localize_war.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +source /tmp/vid/localize_logback.sh || { + echo "ERROR: Localizing logback.xml failed" + exit 1 +} + +source /tmp/vid/localize_portal.sh || { + echo "ERROR: Localizing portal.properties failed" + exit 1 +} + +source /tmp/vid/localize_quartz.sh || { + echo "ERROR: Localizing quartz.properties failed" + exit 1 +} + +source /tmp/vid/localize_system.sh || { + echo "ERROR: Localizing system.properties failed" + exit 1 +} + +source /tmp/vid/localize_cache.sh || { + echo "ERROR: Localizing cache.ccf failed" + exit 1 +} + +source /tmp/vid/localize_asdc.sh || { + echo "ERROR: Localizing asdc.properties failed" + exit 1 +} |