summaryrefslogtreecommitdiffstats
path: root/src/main/swm
diff options
context:
space:
mode:
authorVarun Gudisena <vg411h@att.com>2017-08-31 10:56:56 -0500
committerVarun Gudisena <vg411h@att.com>2017-08-31 10:57:12 -0500
commitacc3ce02997219825091a2e4ed7fd493f2d440b2 (patch)
treede1db5979894f0dadd6752ae1841fdeb743a5830 /src/main/swm
parent3306e2f9cc17833d5816936e0ea2973d9013b00e (diff)
Revert package name changes
Reverted package name changes to avoid any potential issues. Renamed maven group id only. Issue-id: DMAAP-74 Change-Id: I4ca4537d48e5723b2939148e5bd83645ee20dd30 Signed-off-by: Varun Gudisena <vg411h@att.com>
Diffstat (limited to 'src/main/swm')
-rw-r--r--src/main/swm/common/common.env19
-rw-r--r--src/main/swm/common/deinstall.env15
-rw-r--r--src/main/swm/common/deinstall_postproc.sh26
-rw-r--r--src/main/swm/common/deinstall_preproc.sh45
-rw-r--r--src/main/swm/common/install.env37
-rw-r--r--src/main/swm/common/install_postproc.sh191
-rw-r--r--src/main/swm/common/install_preproc.sh46
-rw-r--r--src/main/swm/common/utils/findreplace.sh94
-rw-r--r--src/main/swm/deinstall/postproc/post_proc4
-rw-r--r--src/main/swm/deinstall/preproc/pre_proc4
-rw-r--r--src/main/swm/descriptor.xml386
-rw-r--r--src/main/swm/fallback/postproc/post_proc4
-rw-r--r--src/main/swm/fallback/preproc/install_preproc.sh26
-rw-r--r--src/main/swm/fallback/preproc/pre_proc4
-rw-r--r--src/main/swm/initinst/postproc/post_proc25
-rw-r--r--src/main/swm/initinst/preproc/pre_proc4
-rw-r--r--src/main/swm/install/postproc/post_proc4
-rw-r--r--src/main/swm/install/preproc/pre_proc4
-rw-r--r--src/main/swm/notes.txt8
19 files changed, 946 insertions, 0 deletions
diff --git a/src/main/swm/common/common.env b/src/main/swm/common/common.env
new file mode 100644
index 0000000..b6ae68a
--- /dev/null
+++ b/src/main/swm/common/common.env
@@ -0,0 +1,19 @@
+
+# This file is used to source variables from the generated archetype
+# Because the *proc.sh scripts may contain variables that conflict with
+# Maven variables, we exclude those scripts and only replace values here
+ROOT_DIR=${INSTALL_ROOT}${distFilesRoot}; export ROOT_DIR
+LRMCLI=${INSTALL_ROOT}/opt/app/aft/scldlrm/bin/lrmcli
+PATH=$PATH:`dirname $0`/utils; export PATH
+
+
+# Fail - used to quickly exit with a rc and error message
+fail() {
+ rc=$1
+ shift;
+ echo "PROC_USER_MSG: [$rc]: $@" >&2
+ exit ${rc}
+}
+
+
+
diff --git a/src/main/swm/common/deinstall.env b/src/main/swm/common/deinstall.env
new file mode 100644
index 0000000..9a54c67
--- /dev/null
+++ b/src/main/swm/common/deinstall.env
@@ -0,0 +1,15 @@
+
+# This file is used to set the environment which the install_*.sh files
+# will use when executing. Only set variables that must be derived at
+# installation time here. For variables that should be set by the installer
+# in SWM, add VariableDescriptor elements to the descriptor.xml. Place
+# logical steps in the install_preproc.sh or install_postproc.sh.
+
+. `dirname $0`/common.env
+
+# CHECK FOR ABSOLUTELY REQUIRED VARIABLES HERE
+#derive version components for lrm.xml
+MAJOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $1}'`; export MAJOR_VERSION
+MINOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $2}'`; export MINOR_VERSION
+PATCH_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $3}'`; export PATCH_VERSION
+
diff --git a/src/main/swm/common/deinstall_postproc.sh b/src/main/swm/common/deinstall_postproc.sh
new file mode 100644
index 0000000..b761056
--- /dev/null
+++ b/src/main/swm/common/deinstall_postproc.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#*******************************************************************************
+# ============LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+#*******************************************************************************
+
+. `dirname $0`/deinstall.env
+rm -rf ${ROOT_DIR}
+exit 0
diff --git a/src/main/swm/common/deinstall_preproc.sh b/src/main/swm/common/deinstall_preproc.sh
new file mode 100644
index 0000000..9ee8c93
--- /dev/null
+++ b/src/main/swm/common/deinstall_preproc.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+#*******************************************************************************
+# ============LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+#*******************************************************************************
+
+. `dirname $0`/deinstall.env
+
+LRMCLI=${INSTALL_ROOT}/opt/app/aft/scldlrm/bin/lrmcli
+PATH=$PATH:`dirname $0`/utils; export PATH
+
+runningCount=`${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} | wc -l` || fail 300 "Unable to determine how many instances are running prior to notifying LRM of the upgrade"
+
+if [ "${runningCount}" -eq 0 ]; then
+
+${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101
+
+ else
+ ${LRMCLI} -shutdown -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} || exit 100
+ ${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101
+
+fi
+
+rm -rf ${INSTALL_ROOT}/${ROOT_DIR}/logs || {
+ echo "WARNING: Unable to purge logs directory during deinstall"
+}
+
+exit 0
diff --git a/src/main/swm/common/install.env b/src/main/swm/common/install.env
new file mode 100644
index 0000000..c98a29a
--- /dev/null
+++ b/src/main/swm/common/install.env
@@ -0,0 +1,37 @@
+
+# This file is used to set the environment which the install_*.sh files
+# will use when executing. Only set variables that must be derived at
+# installation time here. For variables that should be set by the installer
+# in SWM, add VariableDescriptor elements to the descriptor.xml. Place
+# logical steps in the install_preproc.sh or install_postproc.sh.
+
+. `dirname $0`/common.env
+
+# CHECK FOR ABSOLUTELY REQUIRED VARIABLES HERE
+test -z "${SCLD_ENV}" && fail 1 "SCLD_ENV required"
+test -z "${LATITUDE}" && fail 2 "LATITUDE required"
+test -z "${LONGITUDE}" && fail 3 "LONGITUDE required"
+test -z "${AFT_ENVIRONMENT}" && fail 4 "AFT_ENVIRONMENT required"
+
+#derive version components for lrm.xml
+MAJOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $1}'`; export MAJOR_VERSION
+MINOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $2}'`; export MINOR_VERSION
+PATCH_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $3}'`; export PATCH_VERSION
+
+# special handling for introscope...
+if [ ! -z "${INTROSCOPE_LIB}" ]; then
+ if [ -z "${INTROSCOPE_AGENTPROFILE}" ]; then
+ fail 100 "INTROSCOPE_AGENTPROFILE must be set"
+ fi
+
+ if [ -f ${INTROSCOPE_LIB}/Agent.jar ] && [ -f ${INTROSCOPE_AGENTPROFILE} ]; then
+ if [ -f ${TEMPLATE_RSRC_XML} ]; then
+ INTROSCOPE_VARS="-javaagent:${INTROSCOPE_LIB}/Agent.jar -noverify -Dcom.wily.introscope.agentProfile=${INTROSCOPE_AGENTPROFILE} -Dintroscope.agent.agentName=${AFTSWM_ACTION_ARTIFACT_NAME}"
+ export INTROSCOPE_VARS
+ fi
+ else
+ INTROSCOPE_VARS=""; export INTROSCOPE_VARS
+ fi
+else
+ INTROSCOPE_VARS=""; export INTROSCOPE_VARS
+fi
diff --git a/src/main/swm/common/install_postproc.sh b/src/main/swm/common/install_postproc.sh
new file mode 100644
index 0000000..cdad299
--- /dev/null
+++ b/src/main/swm/common/install_postproc.sh
@@ -0,0 +1,191 @@
+#!/bin/sh
+#*******************************************************************************
+# ============LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+#*******************************************************************************
+
+if [ -f "/tmp/exitdmaapMRpostproc" ]; then
+echo "file /tmp/exitdmaapMRpostproc found .exiting..........."
+exit 0;
+fi
+. `dirname $0`/install.env
+
+mkdir -p ${ROOT_DIR}/conf || fail 100 "Error on creating the conf directory."
+mkdir -p ${ROOT_DIR}/docs || fail 100 "Error on creating the docs directory."
+mkdir -p ${ROOT_DIR}/lib || fail 100 "Error on creating the lib directory."
+mkdir -p ${ROOT_DIR}/log || fail 100 "Error on creating the logs directory."
+
+##############################################################################
+# REMOVING THE DATA DIRECTORY
+# The following if statement is checking to see if a new version is being installed
+# on top of another version. If a new version is installed on top of the current
+# version WITHOUT a proper deinstall, this will remove the data directory which
+# is necessary to cleanup old AJSC route metadata. If CSTEM chooses to re-run
+# the install_postproc.sh to update swm node variables, this if statement will NOT
+# remove the data directory which is necessary for the SAME version to utilize the
+# correct data directory route metadata.
+##############################################################################
+if [ "${AFTSWM_ACTION_NEW_VERSION}" != "${AFTSWM_ACTION_PREVIOUS_VERSION}" ]
+then
+rm -rf ${ROOT_DIR}/data
+fi
+
+# Cleaning the jetty directory which contains the AJSC exploded war as well as
+# any other apps running under jetty directory
+rm -rf ${ROOT_DIR}/jetty
+
+# A simple override for the SOA Cloud platform value. Normally this is not
+# needed outside of SOA Cloud development sandboxes
+# this is used in the template.lrm.xml file during startup of the service
+if [ ! -z "${SCLD_PLATFORM}" ]; then
+ SCLD_OPTIONAL_PLATFORM_FLAG="-Dplatform=${SCLD_PLATFORM}"; export SCLD_OPTIONAL_PLATFORM_FLAG
+fi
+
+##############################################################################
+# PROCESS TEMPLATE FILES FROM ENVIRONMENT
+# pattern: looks for all files starting with "template.", processes them using the
+# current environment, then renames them by removing the "template." in the same
+# directory
+##############################################################################
+utilpath=`dirname $0`/utils
+for tfile in `ls ${ROOT_DIR}/bundleconfig/etc/sysprops/template.* ${ROOT_DIR}/bundleconfig/etc/appprops/template.* ${ROOT_DIR}/bin/template.* ${ROOT_DIR}/etc/template.* 2>/dev/null`; do
+ dfile=`echo ${tfile} | sed -e 's@/template\.@/@g'`
+ sh ${utilpath}/findreplace.sh ${tfile} ${dfile} || exit 200
+done
+
+runningCount=`${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} | wc -l` || fail 300 "Unable to determine how many instances are running prior to notifying LRM of the upgrade"
+
+##############################################################################
+# DEPLOY CONTAINER TO LRM
+##############################################################################
+
+if [ -z "${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS}" ]
+then
+ RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS=180
+ export RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS
+fi
+
+
+
+DTE_TME_STAMP=`date +%Y%m%d_%H%M%S`
+
+LRM_ADD_LOG=/tmp/${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME}_ADD_${DTE_TME_STAMP}.out
+ echo "Adding resource to lrm"
+ echo "${LRMCLI} -add -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS}"
+ ${LRMCLI} -add -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} > ${LRM_ADD_LOG}
+ LRM_ADD_RC=$?
+ echo "LRMCLI ADD RC : ${LRM_ADD_RC}"
+ if [ "${LRM_ADD_RC}" -ne "0" ]; then
+
+ RSRC_EXIST=`cat ${LRM_ADD_LOG} | grep SCLD-LRM-1024` # resource is already added
+ if [ "${RSRC_EXIST:-}x" = "x" ]; then
+ echo "LRM add for Resource ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} failed..."
+ cat ${LRM_ADD_LOG}
+ rm -f ${LRM_ADD_LOG}
+ exit 1
+ fi
+ echo "LRM Resource for ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} already exists. Proceeding with either addOrUpgrade or modify"
+ echo "Get the number of configured ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} instance"
+ versionCtr=`${LRMCLI} -configured | grep ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} | awk {'print $3'} | wc -l`
+ if [ ${versionCtr} -eq 1 ]; then
+ echo "Updating lrm resource"
+ echo "${LRMCLI} -addOrUpgrade -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS}"
+ ${LRMCLI} -addOrUpgrade -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} || abort "lrmcli addOrUpgrade failed"
+ else
+ echo "Modifying lrm resource"
+ echo "${LRMCLI} -modify -file ${ROOT_DIR}/etc/lrm.xml"
+ ${LRMCLI} -modify -file ${ROOT_DIR}/etc/lrm.xml || abort "lrmcli modify failed"
+ fi
+ fi
+
+ echo "LRMCLI execution on ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} executed succesfully!"
+
+ls ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties
+
+if [ ! -z $CONFIG_ZK_SERVERS ]; then
+sed -i '/config.zk.servers=/c\config.zk.servers='$CONFIG_ZK_SERVERS ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties
+fi
+
+if [ ! -z $TRANSID_REQD ]; then
+sed -i '/transidUEBtopicreqd=/c\transidUEBtopicreqd='$TRANSID_REQD ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties
+fi
+
+if [ ! -z $MR_TOPICFACTOTRYCLASS ]; then
+sed -i '/msgRtr.topicfactory.aaf=/c\msgRtr.topicfactory.aaf='$MR_TOPICFACTOTRYCLASS ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties
+fi
+
+if [ ! -z $MR_NAMESPACE ]; then
+sed -i '/msgRtr.namespace.aaf=/c\msgRtr.namespace.aaf='$MR_NAMESPACE ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties
+fi
+
+
+if [ ! -z $CADI_KEYFILE ]; then
+sed -i '/cadi_keyfile=/c\cadi_keyfile='$CADI_KEYFILE ${ROOT_DIR}/etc/cadi.properties
+fi
+
+if [ ! -z $AAF_URL ]; then
+sed -i '/aaf_url=/c\aaf_url='$AAF_URL ${ROOT_DIR}/etc/cadi.properties
+fi
+
+if [ ! -z $AAF_ID ]; then
+sed -i '/aaf_id=/c\aaf_id='$AAF_ID ${ROOT_DIR}/etc/cadi.properties
+fi
+
+if [ ! -z $AAF_PWD ]; then
+sed -i '/aaf_password=/c\aaf_password='$AAF_PWD ${ROOT_DIR}/etc/cadi.properties
+fi
+
+if [ ! -z $MR_LOGLOC ]; then
+sed -i '/<property name="logDirectory" value=/c\<property name="logDirectory" value="'$MR_LOGLOC'"/>' ${ROOT_DIR}/bundleconfig/etc/logback.xml
+fi
+
+if [ ! -z $MR_KSPATH ]; then
+sed -i '/<Set name="KeyStorePath">/c\<Set name="KeyStorePath">'$MR_KSPATH'</Set>' ${ROOT_DIR}/etc/ajsc-jetty.xml
+fi
+
+if [ ! -z $MR_KSPWD ]; then
+sed -i '/<Set name="KeyStorePassword">/c\<Set name="KeyStorePassword">'$MR_KSPWD'</Set>' ${ROOT_DIR}/etc/ajsc-jetty.xml
+fi
+
+
+if [ ! -z $MR_KMPWD ]; then
+sed -i '/<Set name="KeyManagerPassword">/c\<Set name="KeyManagerPassword">'$MR_KMPWD'</Set>' ${ROOT_DIR}/etc/ajsc-jetty.xml
+fi
+
+
+
+if [ "${runningCount}" -eq 0 ]; then
+ if [ "${LRM_START_SVC}" = "true" ]; then
+ echo "${LRMCLI} -start -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} | egrep SUCCESS\|SCLD-LRM-1041"
+ ${LRMCLI} -start -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} | egrep SUCCESS\|SCLD-LRM-1041
+ if [ $? -ne 0 ]; then
+ fail 500 "Start of ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} with routeOffer ${AFT_SERVICE_ENV} failed"
+ fi
+ echo "${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME}"
+ ${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME}
+ else
+ echo "PROC_USER_MSG: LRM_START_SVC is set to false and no running instances were found prior to upgrading so ending install with no running service instances."
+ fi
+else
+ ${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME}
+fi
+
+
+exit 0
diff --git a/src/main/swm/common/install_preproc.sh b/src/main/swm/common/install_preproc.sh
new file mode 100644
index 0000000..461c74d
--- /dev/null
+++ b/src/main/swm/common/install_preproc.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+#*******************************************************************************
+# ============LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+#*******************************************************************************
+
+. `dirname $0`/deinstall.env
+
+LRMCLI=${INSTALL_ROOT}/opt/app/aft/scldlrm/bin/lrmcli
+PATH=$PATH:`dirname $0`/utils; export PATH
+if [ -d $LRMCLI ]; then
+runningCount=`${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_PREVIOUS_VERSION} | wc -l` || fail 300 "Unable to determine how many instances are running prior to notifying LRM of the upgrade"
+
+if [ "${runningCount}" -eq 0 ]; then
+
+${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_PREVIOUS_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101
+
+ else
+ ${LRMCLI} -shutdown -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_PREVIOUS_VERSION} -routeoffer ${AFT_SERVICE_ENV} -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} || exit 100
+ ${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_PREVIOUS_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101
+
+fi
+
+rm -rf ${INSTALL_ROOT}/${ROOT_DIR}/logs || {
+ echo "WARNING: Unable to purge logs directory during deinstall"
+}
+fi
+
+exit 0
diff --git a/src/main/swm/common/utils/findreplace.sh b/src/main/swm/common/utils/findreplace.sh
new file mode 100644
index 0000000..efd8a77
--- /dev/null
+++ b/src/main/swm/common/utils/findreplace.sh
@@ -0,0 +1,94 @@
+#!/bin/sh
+#*******************************************************************************
+# ============LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+#*******************************************************************************
+# Copyright 2011 AT&T Intellectual Properties
+##############################################################################
+# findreplace.sh <template> <destination>
+#
+# This script searches a provided file for templatized variable names
+# in the format __varname__ and, if found in the current environment
+# replaces those. Once complete, it will move the final copy of the file
+# to <destination>.
+#
+##############################################################################
+TEMPLATE=${1:?"Template file path required"}
+DESTINATION=${2:?"Destination file path required"}
+
+if [ ! -f "${TEMPLATE}" ]; then
+ echo "ERROR: Specified template file does not exist: ${TEMPLATE}"
+ exit 100
+fi
+
+DIRECTORY=`dirname ${DESTINATION}`
+if [ ! -d "${DIRECTORY}" ]; then
+ echo "ERROR: Destination directory does not exist: ${DIRECTORY}"
+ exit 200
+fi
+
+SED_SCR=/tmp/sed.$$
+echo "{" > ${SED_SCR}
+
+# create a sed script for replacing variables from current environment
+for i in `env | awk -F= '{ print $1}'`; do
+ if [ "$i" = "IFS" ] ; then
+ continue;
+ fi
+
+ VALUE=`eval echo '$'${i}` || {
+ echo 'WARNING: Unable to format '${i}' for sed replacement'
+ continue;
+ }
+
+ for x in '@' '^' '&' '?' '#' '~' '%' '|' '+' '/'; do
+ echo ${VALUE} | grep "$x" 2>/dev/null 1>/dev/null
+ if [ $? != 0 ]; then
+ CCHAR="$x"
+ break
+ fi
+ done
+
+ if [ -z "${CCHAR}" ]; then
+ echo "WARNING: Unable to find a suitable sed replacement character for ${VALUE}, will ignore setting ${KEY} in templates"
+ continue;
+ fi
+
+ echo " s${CCHAR}__${i}__${CCHAR}${VALUE}${CCHAR}g" >> ${SED_SCR}
+done
+
+sed -e 's/\\\@/\\\\@/g' ${SED_SCR} > ${SED_SCR}.1 || exit 300
+
+if [ -f ${DESTINATION} ]; then
+ TIMESTAMP=`date +%Y%m%d%H%M%S`
+ o_dir=`dirname ${DESTINATION}`
+ o_file=`basename ${DESTINATION}`
+ mv ${DESTINATION} ${o_dir}/bu.${o_file}.${TIMESTAMP}
+fi
+
+mv -f ${SED_SCR}.1 ${SED_SCR} || exit 400
+
+echo "}" >> ${SED_SCR} || exit 500
+
+sed -f ${SED_SCR} ${TEMPLATE} > ${DESTINATION} || exit 600
+
+rm -f $SED_SCR
+
+exit 0 \ No newline at end of file
diff --git a/src/main/swm/deinstall/postproc/post_proc b/src/main/swm/deinstall/postproc/post_proc
new file mode 100644
index 0000000..b79a8ab
--- /dev/null
+++ b/src/main/swm/deinstall/postproc/post_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../../common
+exec sh -x ./deinstall_postproc.sh
diff --git a/src/main/swm/deinstall/preproc/pre_proc b/src/main/swm/deinstall/preproc/pre_proc
new file mode 100644
index 0000000..7127ba3
--- /dev/null
+++ b/src/main/swm/deinstall/preproc/pre_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../../common
+exec sh -x ./deinstall_preproc.sh \ No newline at end of file
diff --git a/src/main/swm/descriptor.xml b/src/main/swm/descriptor.xml
new file mode 100644
index 0000000..d42cf1b
--- /dev/null
+++ b/src/main/swm/descriptor.xml
@@ -0,0 +1,386 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ org.onap.dmaap
+ ================================================================================
+ Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+
+ -->
+
+<!-- This file is the main deployment descriptor for the SWM package generated
+ for the project. -->
+
+<!-- For installing multiple versions of a Service onto the same SOA Cloud Node and maintaining former versions to switch between the
+ versions installed, you will have to change the following line to this:
+
+ <descriptor version="1" concurrent="true" xmlns="http://aft.att.com/swm/descriptor">
+
+ Adding the 'concurrent="true"' will allow for the concurrency of this Service. Please, NOTE, however, before creating a SWM Package
+ with this Service, you MUST update your Service through SWMCLI with the following command:
+ swmcli component update -c <componentName> -conc true
+ Once your Service has been updated to be concurrent, you MUST add the 'concurrent="true"' to ALL Versions of the Service -->
+
+<descriptor version="1" xmlns="http://aft.att.com/swm/descriptor">
+ <!-- This section describes what OS's and architectures are supported. Since
+ this is Java, we'll default to supporting any OS and architecture. -->
+ <platforms>
+ <platform os="*" architecture="*" osVersions="*" />
+ </platforms>
+ <!-- This section describes the file locations and permissions and ownership
+ of those files. Only authorized users and groups for the component may be
+ used. -->
+ <paths>
+ <path name="${absoluteDistFilesRoot}" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755,0644"
+ recursive="true" />
+ <path name="${distFilesRoot}" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755,0644"
+ recursive="true" />
+ <path name="${distFilesRoot}/bundleconfig" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/etc" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/extJars" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/extApps" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/conf" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/lib" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/docs" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/runtime" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+ <path name="${distFilesRoot}/services" type="d"
+ user="${installOwnerUser}" group="${installOwnerGroup}" permissions="0755"
+ recursive="true" />
+
+ </paths>
+ <!-- This section describes the package lifecycle scripts and the users
+ and groups they should run as. Only authorized users and groups for the component
+ may be used. -->
+ <actions>
+ <action type="DINST">
+ <proc stage="POST" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ <proc stage="PRE" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ </action>
+ <action type="FALL">
+ <proc stage="POST" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ <proc stage="PRE" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ </action>
+ <action type="INIT">
+ <proc stage="POST" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ <proc stage="PRE" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ </action>
+ <action type="INST">
+ <proc stage="POST" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ <proc stage="PRE" user="${installOwnerUser}" group="${installOwnerGroup}" />
+ </action>
+ </actions>
+ <!-- This section describes the variables that are used during package installation.
+ Where required=true, the installer must ensure the environment contains this
+ variable by attaching a value for the variable to the SWM node or a node
+ group which the SWM node is a member of. The installer may also override
+ items that have a defaultValue. Additional variables can be added to this
+ list and used in template.* files in your project. To use one, put template
+ replacement text starting and ending with double-underscores and the variable
+ key in between. Example: __MY_VAR_KEY__. During installation, these are replaced
+ in the template.* file and the template.* file is renamed to remove the template.
+ from the name. -->
+ <variableDescriptions>
+ <variableDescription key="JAVA_VERSION"
+ description="The Java version to use." defaultValue="1.7" required="false" />
+ <variableDescription key="JAVA_PRE_CLASSPATH"
+ description="Additional classpath information to preprend to the installed classpath."
+ defaultValue=":" required="false" />
+ <variableDescription key="JAVA_POST_CLASSPATH"
+ description="Additional classpath information to preprend to the installed classpath."
+ defaultValue=":" required="false" />
+ <variableDescription key="PRE_JVM_ARGS"
+ description="Additional JVM arguments to prepend to the JVM startup command."
+ defaultValue=" " required="false" />
+ <variableDescription key="POST_JVM_ARGS"
+ description="Additional JVM arguments to append to the end of the JVM startup command."
+ defaultValue=" " required="false" />
+ <variableDescription key="MAX_PERM_SIZE"
+ description="The maximum perm size to use when starting the JVM"
+ defaultValue="256m" required="false" />
+ <variableDescription key="PERM_SIZE"
+ description="The initial perm size to use when starting the JVM"
+ defaultValue="32m" required="false" />
+ <variableDescription key="MIN_HEAP_SIZE"
+ description="The mimimum heap size to use when starting the JVM."
+ defaultValue="512m" required="false" />
+ <variableDescription key="MAX_HEAP_SIZE"
+ description="The maximum heap size to use when starting the JVM."
+ defaultValue="512m" required="false" />
+ <variableDescription key="LRM_VALIDATEPID_WAITTIME_SECONDS"
+ description="The amount of time LRM should wait to validate the health of the PID after startup"
+ defaultValue="4" required="false" />
+ <variableDescription key="LRM_RESOURCE_START_TYPE"
+ description="The type of startup LRM should perform on the resource."
+ defaultValue="MANUAL" required="false" />
+ <variableDescription key="LRM_START_PRIORITY"
+ description="The priority sequence to use when starting the resource."
+ defaultValue="0" required="false" />
+ <variableDescription key="LRM_START_TIMEOUT"
+ description="The timeout on the startup." defaultValue="100"
+ required="false" />
+ <variableDescription key="RESOURCE_MIN_COUNT"
+ description="The default minimum number of instances LRM should maintain."
+ defaultValue="1" required="false" />
+
+ <variableDescription key="LRM_START_SVC"
+ description="To auto start the service."
+ defaultValue="true" required="false" />
+
+
+ <variableDescription key="RESOURCE_MAX_COUNT"
+ description="The maximum number of instances LRM should allow."
+ defaultValue="5" required="false" />
+ <variableDescription key="LRM_RESOURCE_MAX_RESTART"
+ description="The maximum number of restarts LRM should perform before giving up."
+ defaultValue="10" required="false" />
+ <variableDescription key="LRM_RESOURCE_HEARTBEAT"
+ description="Time in seconds indicating how long to wait between heartbeat attempts."
+ defaultValue="180" required="false" />
+ <variableDescription key="LRM_RESOURCE_HEARTBEAT_FAILED_LIMIT"
+ description="Consecutive heartbeat failure threshold before an error is assumed and appropriate action taken."
+ defaultValue="3" required="false" />
+ <variableDescription key="LRM_RESOURCE_HEARTBEAT_TIMEOUT"
+ description="Timeout of heartbeats" defaultValue="2" required="false" />
+ <variableDescription key="RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS"
+ description="Indicates the time in seconds that LRM waits for the resource to shutdown."
+ defaultValue="180" required="false" />
+ <variableDescription key="LRM_RESOURCE_REGISTRATION"
+ description="Flag that indicates if resource needs to be registered in the SOA Cloud."
+ defaultValue="true" required="false" />
+ <variableDescription key="PROC_SKIP_START_NEW_ON_ZERO_INSTANCES"
+ description="Indicates that the postproc should not start an initial instance of the service during installation."
+ defaultValue="false" required="false" />
+ <variableDescription key="AJSC_RUNTIME_VERSION"
+ description="the version of ajsc" defaultValue="${ajscRuntimeVersion}"
+ required="false" />
+ <variableDescription key="AJSC_CONF_HOME"
+ description="External location where AJSC can locate all required config files for its boot up"
+ defaultValue="$INSTALL_ROOT${distFilesRoot}/bundleconfig" required="false" />
+ <variableDescription key="AJSC_SHARED_CONFIG"
+ description="External location where AJSC can locate the logback configuration file for system wide logging"
+ defaultValue="$INSTALL_ROOT${distFilesRoot}/bundleconfig" required="false" />
+ <variableDescription key="AJSC_CONTEXT"
+ description="The context in which the service will run. Defaults to the root context, /"
+ defaultValue="/" required="false" />
+ <variableDescription key="AJSC_APP_SERVLET_URL_PATTERN"
+ description="This is required for proper GRM Registration of your att-dme2-serlet endpoints. This should match the value from ajsc-override-web.xml"
+ defaultValue="/services" required="false" />
+ <variableDescription key="AJSC_SVC_PORT"
+ description="the port for the embedded jetty server to listen on. A value of 0 will utilize ephemeral port selection"
+ defaultValue="${serverPort}" required="false" />
+ <variableDescription key="AJSC_SSL_PORT"
+ description="the port for SSL" defaultValue="${sslport}" required="false" />
+ <variableDescription key="AJSC_AUTH_SCHEME"
+ description="AJSC Basic Authentication scheme - authentication-scheme-1 turns on, authentication-scheme-2 turns off" defaultValue="authentication-scheme-2"
+ required="false" />
+ <variableDescription key="AJSC_PERSISTENCE"
+ description="meta data persistence. Can be riak, cassandra, or file" defaultValue="file"
+ required="false" />
+ <variableDescription key="AJSC_ENABLE_SSL"
+ description="ssl true/false. A value of true will enable, and will register your service as https" defaultValue="false"
+ required="false" />
+ <variableDescription key="CSI_ENABLE"
+ description="csi logging true/false. A value of true will enable, and a value of false will disable" defaultValue="true"
+ required="false" />
+ <variableDescription key="IS_CAET_ENABLE"
+ description="CAET enable/disable " defaultValue="true"
+ required="false" />
+ <variableDescription key="ENABLE_EJB"
+ description="enable EJB container true/false. A value of true will enable, and a value of false will disable the container" defaultValue="false"
+ required="false" />
+ <variableDescription key="OSGI_ENABLE"
+ description="enable OSGI container true/false. A value of true will enable OSGI, and a value of false will disable OSGI" defaultValue="false"
+ required="false" />
+ <variableDescription key="JMS_TIBCO_PROVIDER_URL"
+ description="JMS TIBCO PROVIDER URL" defaultValue="tcp://q27csi1c3.vci.att.com:27812"
+ required="false" />
+ <variableDescription key="JMS_LOGGER_USER_NAME"
+ description="JMS LOGGER USER NAME" defaultValue="sg"
+ required="false" />
+ <variableDescription key="JMS_LOGGER_PASSWORD"
+ description="JMS LOGGER PASSWORD" defaultValue="its4test"
+ required="false" />
+ <variableDescription key="JMS_LOGGER_AUDIT_QUEUE_BINDING"
+ description="JMS LOGGER AUDIT QUEUE_BINDING" defaultValue="pub.m2e.AJSC.Audit.logger.queue"
+ required="false" />
+ <variableDescription key="JMS_LOGGER_PERF_QUEUE_BINDING"
+ description="JMS LOGGER PERF QUEUE BINDING" defaultValue="pub.m2e.AJSC.Perf.logger.queue"
+ required="false" />
+ <variableDescription key="LOGBACK_CONFIG_FILE"
+ description="The location of the logback.xml file which controls the loggin configuration."
+ defaultValue="$INSTALL_ROOT${distFilesRoot}/bundleconfig/etc/logback.xml" required="false" />
+ <variableDescription key="LOGBACK_LOG_LEVEL"
+ description="The logging level to use when configuring logback logging backend."
+ defaultValue="INFO" required="false" />
+ <variableDescription key="END_POINT_LEVEL_LOGGING"
+ description="endpointLogging true/false. A value of true will enable, and a value of false will disable" defaultValue="false"
+ required="false" />
+ <variableDescription key="AJSC_CADI_AUTHN"
+ description="Cadi enabled/disabled. If you are using GLO Cadi filter, use authentication-scheme-1.
+ If you do NOT want to use the Cadi filter, use authentication-scheme-2" defaultValue="authentication-scheme-1"
+ required="false" />
+ <variableDescription key="AJSC_SERVICE_NAMESPACE"
+ description="AJSC Service Namespace" defaultValue="${module.ajsc.namespace.name}"
+ required="false" />
+ <variableDescription key="AJSC_SERVICE_VERSION"
+ description="AJSC Service Version" defaultValue="${module.ajsc.namespace.version}"
+ required="false" />
+ <variableDescription key="AJSC_JETTY_ThreadCount_MIN"
+ description="AJSC Jetty Min Thread Count" defaultValue="10" required="false" />
+ <variableDescription key="AJSC_JETTY_ThreadCount_MAX"
+ description="AJSC Jetty Max Thread Count" defaultValue="200"
+ required="false" />
+ <variableDescription key="AJSC_JETTY_IDLETIME_MAX"
+ description="AJSC Jetty Max Idle TimeOut" defaultValue="60000"
+ required="false" />
+ <variableDescription key="SOA_CLOUD_NAMESPACE"
+ description="the Namespace used for GRM service registrations"
+ defaultValue="com.att.ajsc" required="false" />
+ <variableDescription key="AFT_SERVICE_ENV"
+ description="the AFT Servie Env found within CSI used for GRM service registrations (routeOffer)"
+ defaultValue="DEFAULT" required="false" />
+ <variableDescription key="SOA_CLOUD_ENV"
+ description="Set to TRUE for service to register with DME2 in a SOA Cloud Environment"
+ defaultValue="TRUE" required="false" />
+ <variableDescription key="SOACLOUD_ENV_CONTEXT"
+ description="This is the value that will be used as envContext in DME2 registration of service and should match the SCLD_ENV of the Node already set"
+ defaultValue="DEV" required="false" />
+ <variableDescription key="AJSC_ENV"
+ description="Production Environment for the AJSC. Select from SOACLOUD, DEV, QA, PROD, and PREPROD"
+ defaultValue="DEV" required="false" />
+ <variableDescription key="SOACLOUD_PROTOCOL"
+ description="Protocol being used by the service"
+ defaultValue="http" required="false" />
+ <variableDescription key="SCAMPER_ENABLED"
+ description="Indicate if Scamper config file generation is enabled"
+ defaultValue="false" required="false" />
+ <variableDescription key="DME2_LIB"
+ description="DME2 Library Location for external dme2 library"
+ defaultValue="$INSTALL_ROOT/opt/app/aft/dme2/lib" required="false" />
+ <variableDescription key="CSM_LIB"
+ description="CSM Library Location for external dme2 library"
+ defaultValue="$INSTALL_ROOT/appl/external_libs/csi-csm/1.1.1/lib" required="false" />
+ <variableDescription key="AJSC_SSF_FILE_MONITOR_POLLING_INTERVAL"
+ description="AJSC Internal File Monitor Polling Interval in Seconds" defaultValue="5"
+ required="false" />
+ <variableDescription key="AJSC_SSF_FILE_MONITOR_THREAD_POOL_SIZE"
+ description="AJSC Internal File Monitor ThreadPool Size" defaultValue="10"
+ required="false" />
+ <variableDescription key="AFT_DME2_CONN_IDLE_TIMEOUTMS"
+ description="DME2 Idle Connection TimeOut In ms" defaultValue="5000"
+ required="false" />
+ <variableDescription key="HAWTIO_AUTHENTICATION_ENABLED"
+ description="HawtIO Authentication Flag" defaultValue="false"
+ required="false" />
+ <variableDescription key="HAWTIO_CONFIG_PULLONSTARTUP"
+ description="HawtIO Config Pull on Startup" defaultValue="false"
+ required="false" />
+ <variableDescription key="CAMEL_POOL_SIZE"
+ description="Pool size to set in default threadPool profile for Camel Context" defaultValue="10"
+ required="false" />
+ <variableDescription key="CAMEL_MAX_POOL_SIZE"
+ description="Max pool size to set in default threadPool profile for Camel Context" defaultValue="20"
+ required="false" />
+ <variableDescription key="CAMEL_KEEP_ALIVE_TIME"
+ description="Idle time (in Seconds) for excess threads to wait before they are discarded." defaultValue="60"
+ required="false" />
+ <variableDescription key="CAMEL_MAX_QUEUE_SIZE"
+ description="The task queue can contain up to n tasks before the pool is exhausted." defaultValue="1000"
+ required="false" />
+ <variableDescription key="LOGBACK_CONFIG_FILE"
+ description="Logback configuration file location" defaultValue="${distFilesRoot}/etc/logback.xml"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_CONTROLLER_DAEMON"
+ description="Indicates if the controller thread should be a daemon (not blocking JVM exit)." defaultValue="true"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_CONTROLLER_SLEEP_TIME_MS"
+ description="Time for the controller thread to sleep between each control." defaultValue="100"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_INBOUND_BUFFER_SIZE"
+ description="The size of the buffer when reading messages." defaultValue="8192"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_MIN_THREADS"
+ description="Minimum threads waiting to service requests." defaultValue="1"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_MAX_THREADS"
+ description="Maximum threads that will service requests." defaultValue="10"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_LOW_THREADS"
+ description="Number of worker threads determining when the connector is considered overloaded." defaultValue="8"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_MAX_QUEUED"
+ description="Maximum number of calls that can be queued if there aren't any worker thread available to service them." defaultValue="0"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_MAX_CONNECTIONS_PER_HOST"
+ description="Maximum number of concurrent connections per host (IP address)." defaultValue="-1"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_MAX_TOTAL_CONNECTIONS"
+ description="Maximum number of concurrent connections in total." defaultValue="-1"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_OUTBOUND_BUFFER_SIZE"
+ description="The size of the buffer when writing messages." defaultValue="8192"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_PERSISTING_CONNECTIONS"
+ description="Indicates if connections should be kept alive after a call." defaultValue="true"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_PIPELINING_CONNECTIONS"
+ description="Indicates if pipelining connections are supported." defaultValue="false"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_THREAD_MAX_IDLE_TIME_MS"
+ description="Time for an idle thread to wait for an operation before being collected." defaultValue="60000"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_USE_FORWARDED_HEADER"
+ description="Lookup the X-Forwarded-For header supported by popular proxies and caches and uses it to populate the Request.getClientAddresses() method result." defaultValue="false"
+ required="false" />
+ <variableDescription key="RESTLET_COMPONENT_REUSE_ADDRESS"
+ description="Enable/disable the SO_REUSEADDR socket option. See java.io.ServerSocket#reuseAddress property for additional details." defaultValue="true"
+ required="false" />
+ <variableDescription key="AJSC_EXTERNAL_LIB_FOLDERS"
+ description="Location of external libs to be used by AJSC. Values here will be in addition to libs in template.sys-props.properties." defaultValue=""
+ required="false" />
+ <variableDescription key="AJSC_EXTERNAL_PROPERTIES_FOLDERS"
+ description="Location of external property folders that may be needed on the classpath (ex: csm) to be used by AJSC. Values here will be in addition to libs in template.sys-props.properties." defaultValue=""
+ required="false" />
+ <variableDescription key="ENABLE_TRAIL_LOGGING"
+ description="enable logging of the routes" defaultValue="false"
+ required="false" />
+ <variableDescription key="ENABLE_TRAIL_LOGGING_SUMMARY"
+ description="enable logging of the routes and summary" defaultValue="false"
+ required="false" />
+ <variableDescription key="API_DOC"
+ description="enable generation of metadata for swagger UI" defaultValue="false"
+ required="false" />
+ </variableDescriptions>
+</descriptor>
+
diff --git a/src/main/swm/fallback/postproc/post_proc b/src/main/swm/fallback/postproc/post_proc
new file mode 100644
index 0000000..d017750
--- /dev/null
+++ b/src/main/swm/fallback/postproc/post_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../../common
+exec sh -x ./install_postproc.sh
diff --git a/src/main/swm/fallback/preproc/install_preproc.sh b/src/main/swm/fallback/preproc/install_preproc.sh
new file mode 100644
index 0000000..e200912
--- /dev/null
+++ b/src/main/swm/fallback/preproc/install_preproc.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#*******************************************************************************
+# ============LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+#*******************************************************************************
+
+. `dirname $0`/install.env
+
+exit 0 \ No newline at end of file
diff --git a/src/main/swm/fallback/preproc/pre_proc b/src/main/swm/fallback/preproc/pre_proc
new file mode 100644
index 0000000..3f1b26f
--- /dev/null
+++ b/src/main/swm/fallback/preproc/pre_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../../common
+exec sh -x ./install_preproc.sh
diff --git a/src/main/swm/initinst/postproc/post_proc b/src/main/swm/initinst/postproc/post_proc
new file mode 100644
index 0000000..7561171
--- /dev/null
+++ b/src/main/swm/initinst/postproc/post_proc
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ ${SCAMPER_ENABLED} == "true" ]
+ then
+
+if [ ! -d /opt/app/${AFTSWM_ACTION_ARTIFACT_GROUP}/${AFTSWM_ACTION_ARTIFACT_NAME}/bin/config2 ]
+ then
+ mkdir /opt/app/${AFTSWM_ACTION_ARTIFACT_GROUP}/${AFTSWM_ACTION_ARTIFACT_NAME}/bin/config2
+ echo "Creating directory " /opt/app/${AFTSWM_ACTION_ARTIFACT_GROUP}/${AFTSWM_ACTION_ARTIFACT_NAME}/bin/config2
+fi
+
+
+. /opt/app/${AFTSWM_ACTION_ARTIFACT_GROUP}/${AFTSWM_ACTION_ARTIFACT_NAME}/bin/scamper.sh
+
+#Check to see if the scamper.sh script executed without errors.
+#If an error occurred, then exit, stop the install and cause a failed install.
+if [ ! $? -eq 0 ]
+ then
+ exit $?
+fi
+
+echo "Finished Scamper file generation"
+fi
+cd ../../common
+exec sh -x ./install_postproc.sh
diff --git a/src/main/swm/initinst/preproc/pre_proc b/src/main/swm/initinst/preproc/pre_proc
new file mode 100644
index 0000000..3f1b26f
--- /dev/null
+++ b/src/main/swm/initinst/preproc/pre_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../../common
+exec sh -x ./install_preproc.sh
diff --git a/src/main/swm/install/postproc/post_proc b/src/main/swm/install/postproc/post_proc
new file mode 100644
index 0000000..b0c49dc
--- /dev/null
+++ b/src/main/swm/install/postproc/post_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../../common
+exec sh -x ./install_postproc.sh \ No newline at end of file
diff --git a/src/main/swm/install/preproc/pre_proc b/src/main/swm/install/preproc/pre_proc
new file mode 100644
index 0000000..2f0eb3f
--- /dev/null
+++ b/src/main/swm/install/preproc/pre_proc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../../common
+exec sh -x ./install_preproc.sh \ No newline at end of file
diff --git a/src/main/swm/notes.txt b/src/main/swm/notes.txt
new file mode 100644
index 0000000..7c617d6
--- /dev/null
+++ b/src/main/swm/notes.txt
@@ -0,0 +1,8 @@
+# (c) 2012 AT&T Intellectual Property. All rights reserved.
+
+NOTES FOR com.att.nsa:dmaap - Version 0.0.1-SNAPSHOT
+=======================================================
+
+This package was created at ${maven.build.timestamp}.
+
+No additional notes are available. \ No newline at end of file