3 #########################################################################
7 #########################################################################
10 echo -n "syntax: $(basename $0) "
12 echo -n "[--install base|pap|pdp|console|mysql|elk|brmsgw|paplp|pdplp] | "
13 echo -n "[--configure base|pap|pdp|console|mysql|elk|brmsgw|paplp|pdplp] | "
16 function check_java() {
17 if [[ $DEBUG == y ]]; then
18 echo "-- ${FUNCNAME[0]} $@ --"
22 TARGET_JAVA_VERSION=$1
24 if [[ -z ${JAVA_HOME} ]]; then
25 echo "error: ${JAVA_HOME} is not set"
29 if ! check_x_file "${JAVA_HOME}/bin/java"; then
30 echo "error: ${JAVA_HOME}/bin/java is not accessible"
34 INSTALLED_JAVA_VERSION=$("${JAVA_HOME}/bin/java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
35 if [[ -z $INSTALLED_JAVA_VERSION ]]; then
36 echo "error: ${JAVA_HOME}/bin/java is invalid"
40 if [[ "${INSTALLED_JAVA_VERSION}" != ${TARGET_JAVA_VERSION}* ]]; then
41 echo "error: java version (${INSTALLED_JAVA_VERSION}) does not"\
42 "march desired version ${TARGET_JAVA_VERSION}"
46 echo "OK: java ${INSTALLED_JAVA_VERSION} installed"
50 function process_configuration() {
51 if [[ $DEBUG == y ]]; then
52 echo "-- ${FUNCNAME[0]} $@ --"
57 while read line || [ -n "${line}" ]; do
58 if [[ -n ${line} ]] && [[ ${line} != \#* ]]; then
59 name=$(echo "${line%%=*}")
60 value=$(echo "${line#*=}")
61 # escape ampersand so that sed does not replace it with the search string
63 if [[ -z ${name} ]] || [[ -z $value ]]; then
64 echo "WARNING: ${line} missing name or value"
66 export ${name}="${value}"
67 eval "${name}" "${value}" 2> /dev/null
73 function component_preconfigure() {
74 if [[ $DEBUG == y ]]; then
75 echo "-- ${FUNCNAME[0]} $@ --"
79 /bin/sed -i -e 's!${{POLICY_HOME}}!'"${POLICY_HOME}!g" \
80 -e 's!${{FQDN}}!'"${FQDN}!g" \
81 *.conf > /dev/null 2>&1
84 function tomcat_component() {
85 if [[ $DEBUG == y ]]; then
86 echo "-- ${FUNCNAME[0]} $@ --"
90 TOMCAT_TARGET_INSTALL_DIR=${POLICY_HOME}/servers/${COMPONENT_TYPE}
91 if [[ -d ${TOMCAT_TARGET_INSTALL_DIR} ]]; then
92 echo "error: ${TOMCAT_TARGET_INSTALL_DIR} exists."
96 TOMCAT_INSTALL_DIR=${POLICY_HOME}/install/3rdparty/${TOMCAT_PACKAGE_NAME}/
97 if [[ -d ${TOMCAT_INSTALL_DIR} ]]; then
98 echo "error: ${TOMCAT_INSTALL_DIR} exists."
102 tar -C "${POLICY_HOME}/servers" -xf "${POLICY_HOME}/install/3rdparty/${TOMCAT_PACKAGE_NAME}.tar.gz"
104 mv "${POLICY_HOME}/servers/${TOMCAT_PACKAGE_NAME}" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
105 /bin/cp "${POLICY_HOME}"/install/servers/common/tomcat/bin/* "${POLICY_HOME}/servers/${COMPONENT_TYPE}/bin"
106 /bin/cp "${POLICY_HOME}"/install/servers/common/tomcat/conf/* "${POLICY_HOME}/servers/${COMPONENT_TYPE}/conf"
108 /bin/cp "${POLICY_HOME}/install/servers/common/tomcat/init.d/tomcatd" "${POLICY_HOME}/etc/init.d/${COMPONENT_TYPE}"
109 /bin/sed -i -e "s!\${{COMPONENT_TYPE}}!${COMPONENT_TYPE}!g" "${POLICY_HOME}/etc/init.d/${COMPONENT_TYPE}" >/dev/null 2>&1
112 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/webapps/* "${POLICY_HOME}/servers/${COMPONENT_TYPE}/webapps"
113 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/bin/* "${POLICY_HOME}/servers/${COMPONENT_TYPE}/bin" >/dev/null 2>&1
114 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/conf/* "${POLICY_HOME}/servers/${COMPONENT_TYPE}/conf" >/dev/null 2>&1
116 /bin/rm -fr "${POLICY_HOME}/servers/${COMPONENT_TYPE}/webapps/docs" \
117 "${POLICY_HOME}/servers/${COMPONENT_TYPE}/webapps/examples" \
118 "${POLICY_HOME}/servers/${COMPONENT_TYPE}/webapps/ROOT" \
119 "${POLICY_HOME}/servers/${COMPONENT_TYPE}/webapps/manager" \
120 "${POLICY_HOME}/servers/${COMPONENT_TYPE}/webapps/host-manager"
122 if [[ ${COMPONENT_TYPE} == console ]]; then
123 install_onap_portal_settings
129 function configure_tomcat_component() {
130 configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
133 function configure_component() {
134 if [[ $DEBUG == y ]]; then
135 echo "-- ${FUNCNAME[0]} $@ --"
139 if ! process_configuration "${COMPONENT_TYPE}.conf"; then
140 echo "error: aborting ${COMPONENT_TYPE} installation: cannot process configuration ${COMPONENT_TYPE}.conf"
145 COMPONENT_ROOT_DIR=$2
148 SED_LINE+=" -e 's!\${{POLICY_HOME}}!${POLICY_HOME}!g' "
149 SED_LINE+=" -e 's!\${{POLICY_USER}}!${POLICY_USER}!g' "
150 SED_LINE+=" -e 's!\${{POLICY_GROUP}}!${POLICY_GROUP}!g' "
151 SED_LINE+=" -e 's!\${{KEYSTORE_PASSWD}}!${KEYSTORE_PASSWD}!g' "
152 SED_LINE+=" -e 's!\${{JAVA_HOME}}!${JAVA_HOME}!g' "
153 SED_LINE+=" -e 's!\${{COMPONENT_TYPE}}!${COMPONENT_TYPE}!g' "
154 SED_LINE+=" -e 's!\${{POLICY_LOGS}}!${POLICY_LOGS}!g' "
156 while read line || [ -n "${line}" ]; do
157 if [[ -n $line ]] && [[ $line != \#* ]]; then
158 name=$(echo "${line%%=*}")
159 value=$(echo "${line#*=}")
160 # escape ampersand so that sed does not replace it with the search string
161 value=${value//&/\\&}
162 if [[ -z ${name} ]] || [[ -z ${value} ]]; then
163 echo "WARNING: ${line} missing name or value"
165 SED_LINE+=" -e 's!\${{${name}}}!${value}!g' "
171 for sed_file in $(find "${COMPONENT_ROOT_DIR}" -name '*.xml' -o -name '*.sh' -o -name '*.properties' -o -name '*.conf' -o -name '*.cfg' -o -name '*.template' -o -name '*.conf' -o -name '*.cron' -o -name '*.json' | grep -v /backup/); do
172 if fgrep -l '${{' ${sed_file} > /dev/null 2>&1; then
173 SED_FILES+="${sed_file} "
177 if [[ -f $HOME/.m2/settings.xml ]]; then
178 SED_FILES+="$HOME/.m2/settings.xml "
182 if [[ -z ${SED_FILES} ]]; then
183 echo "WARNING: no xml, sh, properties, or conf files to perform configuration expansion"
185 SED_LINE+=${SED_FILES}
189 list_unexpanded_files ${POLICY_HOME}
192 function install_onap_portal_settings() {
193 echo "Install onap portal settings"
195 # unpack onap war file
196 mkdir -p "${POLICY_HOME}"/servers/console/webapps/onap
197 cd "${POLICY_HOME}"/servers/console/webapps/onap
201 # copy over the configured settings
202 /bin/cp -fr "${POLICY_HOME}"/install/servers/onap/* "${POLICY_HOME}/servers/console/webapps/onap"
205 function check_r_file() {
206 if [[ $DEBUG == y ]]; then
207 echo "-- ${FUNCNAME[0]} $@ --"
212 if [[ ! -f ${FILE} || ! -r ${FILE} ]]; then
219 function check_x_file() {
220 if [[ $DEBUG == y ]]; then
221 echo "-- ${FUNCNAME[0]} $@ --"
226 if [[ ! -f ${FILE} || ! -x ${FILE} ]]; then
233 function install_prereqs() {
234 if [[ $DEBUG == y ]]; then
235 echo "-- ${FUNCNAME[0]} $@ --"
241 if ! check_r_file "${CONF_FILE}"; then
242 echo "error: aborting ${COMPONENT_TYPE} installation: ${CONF_FILE} is not accessible"
246 if ! process_configuration "${CONF_FILE}"; then
247 echo "error: aborting ${COMPONENT_TYPE} installation: cannot process configuration ${CONF_FILE}"
251 # if ! check_java "1.8"; then
252 # echo "error: aborting ${COMPONENT_TYPE} installation: invalid java version"
256 if [[ -z ${POLICY_HOME} ]]; then
257 echo "error: aborting ${COMPONENT_TYPE} installation: ${POLICY_HOME} is not set"
261 HOME_OWNER=$(ls -ld "${POLICY_HOME}" | awk '{print $3}')
262 if [[ ${HOME_OWNER} != ${POLICY_USER} ]]; then
263 echo "error: aborting ${COMPONENT_TYPE} installation: ${POLICY_USER} does not own ${POLICY_HOME} directory"
267 echo -n "Starting ${OPERATION} of ${COMPONENT_TYPE} under ${POLICY_USER}:${POLICY_GROUP} "
268 echo "ownership with umask $(umask)."
271 function list_unexpanded_files() {
273 SEARCH_LIST=$(find ${ROOT_DIR} -type f -name '*.properties' -o -name '*.sh' -o -name '*.conf' -o -name '*.yml' -o -name '*.template' -o -name '*.xml' -o -name '*.cfg' -o -name '*.json' -o -path "${ROOT_DIR}/etc/init.d/*" | egrep -v '/m2/|/install/|/logs/')
274 NOT_EXPANDED_BASE_FILES=$(grep -l '${{' ${SEARCH_LIST} 2> /dev/null)
275 if [[ -n ${NOT_EXPANDED_BASE_FILES} ]]; then
276 echo "error: component installation has completed but some base files have not been expanded:"
277 echo "${NOT_EXPANDED_BASE_FILES}"
283 function install_base() {
284 if [[ $DEBUG == y ]]; then
285 echo "-- ${FUNCNAME[0]} $@ --"
289 install_prereqs "${BASE_CONF}"
291 if [[ -z ${POLICY_HOME} ]]; then
292 echo "error: ${POLICY_HOME} is not set"
296 POLICY_HOME_CONTENTS=$(ls -A "${POLICY_HOME}" 2> /dev/null)
297 if [[ -n ${POLICY_HOME_CONTENTS} ]]; then
298 echo "error: aborting base installation: ${POLICY_HOME} directory is not empty"
302 if [[ ! -d ${POLICY_HOME} ]]; then
303 echo "error: aborting base installation: ${POLICY_HOME} is not a directory."
307 if ! /bin/mkdir -p "${POLICY_HOME}/servers/" > /dev/null 2>&1; then
308 echo "error: aborting base installation: cannot create ${POLICY_HOME}/servers/"
312 if ! /bin/mkdir -p "${POLICY_HOME}/logs/" > /dev/null 2>&1; then
313 echo "error: aborting base installation: cannot create ${POLICY_HOME}/logs/"
317 BASE_TGZ=$(ls base-*.tar.gz)
318 if [ ! -r ${BASE_TGZ} ]; then
319 echo "error: aborting base installation: ${POLICY_USER} cannot access tar file: ${BASE_TGZ}"
323 tar -tzf ${BASE_TGZ} > /dev/null 2>&1
324 if [[ $? != 0 ]]; then
325 echo >&2 "error: aborting base installation: invalid base package tar file: ${BASE_TGZ}"
329 BASH_PROFILE_LINE=". ${POLICY_HOME}/etc/profile.d/env.sh"
330 PROFILE_LINE="ps -p \$\$ | grep -q bash || . ${POLICY_HOME}/etc/profile.d/env.sh"
332 tar -C ${POLICY_HOME} -xf ${BASE_TGZ} --no-same-owner
333 if [[ $? != 0 ]]; then
334 # this should not happened
335 echo "error: aborting base installation: base package cannot be unpacked: ${BASE_TGZ}"
339 /bin/mkdir -p ${POLICY_HOME}/etc/ssl > /dev/null 2>&1
340 /bin/mkdir -p ${POLICY_HOME}/etc/init.d > /dev/null 2>&1
341 /bin/mkdir -p ${POLICY_HOME}/tmp > /dev/null 2>&1
342 /bin/mkdir -p ${POLICY_HOME}/var > /dev/null 2>&1
344 #list_unexpanded_files ${POLICY_HOME}
348 function configure_base() {
349 if [[ $DEBUG == y ]]; then
350 echo "-- ${FUNCNAME[0]} $@ --"
354 # check if fqdn is set in base.conf and use that value if set
355 if [[ -z ${INSTALL_FQDN} ]]
357 echo "FQDN not set in config...using the default FQDN ${FQDN}"
359 echo "Using FQDN ${INSTALL_FQDN} from config"
363 configure_component "${BASE_CONF}" "${POLICY_HOME}"
365 BASH_PROFILE_LINE=". ${POLICY_HOME}/etc/profile.d/env.sh"
366 PROFILE_LINE="ps -p \$\$ | grep -q bash || . ${POLICY_HOME}/etc/profile.d/env.sh"
368 if ! fgrep -x "${BASH_PROFILE_LINE}" "${HOME}/.bash_profile" >/dev/null 2>&1; then
369 echo "${BASH_PROFILE_LINE}" >> "${HOME}/.bash_profile"
372 if ! fgrep -x "${PROFILE_LINE}" "${HOME}/.profile" >/dev/null 2>&1; then
373 echo "${PROFILE_LINE}" >> "${HOME}/.profile"
377 function install_tomcat_component() {
378 if [[ $DEBUG == y ]]; then
379 echo "-- ${FUNCNAME[0]} $@ --"
383 install_prereqs "${BASE_CONF}"
385 if ! process_configuration "${COMPONENT_TYPE}.conf"; then
386 echo "error: aborting ${COMPONENT_TYPE} installation: cannot process configuration ${COMPONENT_TYPE}.conf"
390 if ! tomcat_component; then
391 echo "error: aborting ${COMPONENT_TYPE} installation: tomcat installation failed."
397 # This function installs mysql related shell scripts and sql files in the proper locations
398 # under $POLICY_HOME. It also adds the MySQL client bin to the PATH based on configuration.
400 function install_mysql() {
401 if [[ $DEBUG == y ]]; then
402 echo "-- ${FUNCNAME[0]} $@ --"
406 install_prereqs "${BASE_CONF}"
408 if ! process_configuration "${COMPONENT_TYPE}.conf"; then
409 echo "error: aborting ${COMPONENT_TYPE} installation: cannot process configuration ${COMPONENT_TYPE}.conf"
413 MYSQL_DATA_PATH=${POLICY_HOME}/data/mysql
414 /bin/mkdir -p ${MYSQL_DATA_PATH} > /dev/null 2>&1
416 /bin/cp -f "${POLICY_HOME}"/install/mysql/data/* "${MYSQL_DATA_PATH}"
417 /bin/chmod 555 "${MYSQL_DATA_PATH}"/*
419 MYSQL_BIN_SOURCE=${POLICY_HOME}/install/mysql/bin
420 /bin/mkdir -p ${POLICY_HOME}/bin > /dev/null 2>&1
421 for script in $(/bin/ls "${MYSQL_BIN_SOURCE}"); do
422 /bin/cp ${MYSQL_BIN_SOURCE}/${script} ${POLICY_HOME}/bin
423 /bin/chmod 555 "${POLICY_HOME}/bin/${script}"
427 function configure_mysql() {
428 if [[ $DEBUG == y ]]; then
429 echo "-- ${FUNCNAME[0]} $@ --"
436 # This function installs elk related shell scripts and sql files in the proper locations
437 # under $POLICY_HOME. It also adds the Elk to the PATH based on configuration.
439 function configure_elk() {
440 if [[ $DEBUG == y ]]; then
441 echo "-- ${FUNCNAME[0]} $@ --"
448 function install_elk() {
449 if [[ $DEBUG == y ]]; then
450 echo "-- ${FUNCNAME[0]} $@ --"
454 if [[ -f "${HOME}/.bash_profile" ]]; then
455 source "${HOME}/.bash_profile"
458 if [[ -f "${HOME}/.profile" ]]; then
459 source "${HOME}/.profile"
462 ELK_TARGET_INSTALL_DIR="${POLICY_HOME}"/elk
464 if [[ -d ${ELK_TARGET_INSTALL_DIR} ]]; then
465 echo "WARNING: ${ELK_TARGET_INSTALL_DIR} exists."
469 /bin/mkdir -p "${ELK_TARGET_INSTALL_DIR}" > /dev/null 2>&1
471 if [[ ! -d ${ELK_TARGET_INSTALL_DIR} ]]; then
472 echo "WARNING: ${ELK_TARGET_INSTALL_DIR} doesn't exist."
476 cd ${ELK_TARGET_INSTALL_DIR}
477 curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.tar.gz
479 tar xvzf elasticsearch-5.4.0.tar.gz -C .
480 /bin/rm -fr elasticsearch-5.4.0.tar.gz
481 /bin/mv ${ELK_TARGET_INSTALL_DIR}/elasticsearch-5.4.0/* .
482 /bin/rm -fr ${ELK_TARGET_INSTALL_DIR}/elasticsearch-5.4.0
484 /bin/cp "${POLICY_HOME}"/install/elk/bin/* "${POLICY_HOME}/bin"
485 /bin/cp -f "${POLICY_HOME}"/install/elk/config/* "${ELK_TARGET_INSTALL_DIR}/config"
486 /bin/cp -f "${POLICY_HOME}/install/elk/init.d/elkd" "${POLICY_HOME}/etc/init.d/elk"
488 install_prereqs "${COMPONENT_TYPE}.conf"
490 /bin/sed -i -e "s!\${{POLICY_HOME}}!${POLICY_HOME}!g" \
491 -e "s!\${{FQDN}}!${FQDN}!g" \
492 -e "s!\${{ELK_JMX_PORT}}!${ELK_JMX_PORT}!g" \
493 "${ELK_TARGET_INSTALL_DIR}"/config/* "${POLICY_HOME}/etc/init.d/elk" > /dev/null 2>&1
496 list_unexpanded_files ${POLICY_HOME}
501 # This function installs brmsgw related shell scripts and config files in the proper
502 # locations under $POLICY_HOME.
505 function install_brmsgw() {
506 if [[ $DEBUG == y ]]; then
507 echo "-- ${FUNCNAME[0]} $@ --"
511 install_prereqs "${BASE_CONF}"
513 if ! process_configuration "${COMPONENT_TYPE}.conf"; then
514 echo "error: aborting ${COMPONENT_TYPE} installation: cannot process configuration ${COMPONENT_TYPE}.conf"
518 if [ -z "$M2_HOME" ]; then
519 echo "error: aborting ${COMPONENT_TYPE} installation: M2_HOME must be set in brmsgw.conf"
523 echo "export M2_HOME=$M2_HOME" >>$POLICY_HOME/etc/profile.d/env.sh
525 /bin/cp -f "${POLICY_HOME}/install/servers/brmsgw/init.d/brmsgw" "${POLICY_HOME}/etc/init.d/brmsgw"
527 if ! /bin/mkdir -p "${POLICY_HOME}/servers/${COMPONENT_TYPE}" > /dev/null 2>&1; then
528 echo "error: aborting base installation: cannot create ${POLICY_HOME}/servers/${COMPONENT_TYPE}"
532 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/BRMSGateway.jar "${POLICY_HOME}/servers/${COMPONENT_TYPE}"
533 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/*.properties "${POLICY_HOME}/servers/${COMPONENT_TYPE}"
534 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/config "${POLICY_HOME}/servers/${COMPONENT_TYPE}"
535 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/dependency.json "${POLICY_HOME}/servers/${COMPONENT_TYPE}"
537 /bin/mv $POLICY_HOME/m2 $HOME/.m2
543 function install_logparser() {
544 if [[ $DEBUG == y ]]; then
545 echo "-- ${FUNCNAME[0]} $@ --"
549 install_prereqs "${BASE_CONF}"
551 if ! process_configuration "${COMPONENT_TYPE}.conf"; then
552 echo "error: aborting ${COMPONENT_TYPE} installation: cannot process configuration ${COMPONENT_TYPE}.conf"
556 LP_TARGET_DIR=${POLICY_HOME}/servers/${COMPONENT_TYPE}
557 /bin/mkdir -p ${LP_TARGET_DIR}/bin > /dev/null 2>&1
558 /bin/mkdir -p ${LP_TARGET_DIR}/logs > /dev/null 2>&1
560 # copy binaries, initialization script and configuration
561 /bin/cp "${POLICY_HOME}"/install/servers/common/logparser/bin/*jar "${LP_TARGET_DIR}/bin"
562 /bin/cp "${POLICY_HOME}/install/servers/common/logparser/init.d/logparserd" "${POLICY_HOME}/etc/init.d/${COMPONENT_TYPE}"
563 /bin/cp "${POLICY_HOME}/install/servers/${COMPONENT_TYPE}/bin/parserlog.properties" "${LP_TARGET_DIR}/bin"
564 /bin/cp -fr "${POLICY_HOME}"/install/servers/${COMPONENT_TYPE}/bin/config "${POLICY_HOME}/servers/${COMPONENT_TYPE}/bin"
568 #########################################################################
570 ## script execution body
572 #########################################################################
581 TOMCAT_PACKAGE_NAME=apache-tomcat-8.0.23
585 export POLICY_USER=$(/usr/bin/id -un)
587 # command line options parsing
588 until [[ -z "$1" ]]; do
593 -i|--install) OPERATION=install
597 -c|--configure) OPERATION=configure
608 # component-type validation
609 case $COMPONENT_TYPE in
620 *) echo "invalid component type (${COMPONENT_TYPE}): must be in {base|pdp|pap|console|mysql|elk|brmsgw|paplp|pdplp}";
626 # operation validation
628 install|configure) ;;
629 *) echo "invalid operation (${OPERATION}): must be in {install|configure}";
635 if [[ -n ${POLICY_GROUP} ]]; then
637 if ! echo ${groups} | grep -qP "\b${POLICY_GROUP}"; then
638 echo "error: ${POLICY_GROUP} is not a valid group for account ${POLICY_USER}"
643 if [[ -z ${POLICY_GROUP} ]]; then
644 numGroups=$(groups | sed "s/^.*: *//g" | wc -w)
645 if [ ${numGroups} -eq 1 ]; then
646 export POLICY_GROUP=$(groups ${POLICY_USER} | sed "s/^.*: *//g")
648 echo "error: ${POLICY_USER} belongs to multiple groups, one group \
649 must be provided for the installation"
655 if [[ -z ${POLICY_GROUP} ]]; then
656 echo "error: installation of root section must not provide the \
657 installation group owner argument."
662 if [[ -z ${POLICY_LOGS} ]]; then
663 echo "POLICY_LOGS environment variable NOT set, default to /var/log/onap"
664 export POLICY_LOGS="/var/log/onap"
667 FQDN=$(hostname -f 2> /dev/null)
668 if [[ $? != 0 || -z ${FQDN} ]]; then
669 echo "error: cannot determine the FQDN for this host $(hostname)."
673 if [[ ${OPERATION} == install ]]; then
674 case $COMPONENT_TYPE in
679 install_tomcat_component
682 install_tomcat_component
685 install_tomcat_component
700 echo "invalid component type (${COMPONENT_TYPE}): must be in {base|pdp|pap|console|mysql|elk|brmsgw|paplp|pdplp}";
706 if [[ ${OPERATION} == configure ]]; then
708 install_prereqs "${BASE_CONF}"
710 case $COMPONENT_TYPE in
713 component_preconfigure
716 configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
719 configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
722 configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
731 configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
734 configure_component "${COMPONENT_TYPE}.conf" "${POLICY_HOME}/servers/${COMPONENT_TYPE}/"
737 echo "invalid component type (${COMPONENT_TYPE}): must be in {base|pdp|pap|console|mysql|elk|brmsgw|paplp|pdplp}";
745 echo -n "Successful ${OPERATION} of ${COMPONENT_TYPE} under ${POLICY_USER}:${POLICY_GROUP} "
746 echo "ownership with umask $(umask)."