Run Deployment Utility (runDeployment.sh/.bat)

The runDeployment command-line tool lets you deploy an interactive channel for a specific server group from the command line, using the settings provided by a deployment.properties file that outlines all the possible parameters and is available in the same location as the runDeployment tool itself. The ability to run an interactive channel deployment from the command line is specifically useful when you are using the OffersBySQL feature. For example, you might configure a Unica Campaign batch flowchart to run on a periodic basis. When the flowchart run completes, a trigger can be called to initialize deployment of the offers in the OffersBySQL table using this command line tool.

Description

You can find the runDeployment command-line tool installed automatically on the Unica Interact Design Time server, in the following location:

Interact_home/interactDT/tools/deployment/runDeployment.sh (or runDeployment.bat on a Windows server)

The only argument passed in to the command is the location of a file called deployment.properties that describes all of the possible parameters needed to deploy the interactive channel/runtime server group combination. A sample file is provided for reference.

Note: Before using the runDeployment utility, you must first edit it with any text editor to provide the location of the Java runtime environment on the server. For example, you might specify Interact_home/jre or Platform_home/jre as the path, if either of those directories contains the Java runtime you want the utility to use. Alternatively, you could provide the path to any Java runtime environment that is supported for use with this release of the products.

Using the runDeployment utility in a secure (SSL) environment

To use the runDeployment utility when security has been enabled on the Unica Interact server (and therefore connecting over an SSL port), you need to add the trust store Java property as follows:

  1. When you are editing the deployment.properties file for your interactive channel deployment, modify the deploymentURL property to use the secure SSL URL, as in this example:

    deploymentURL=https://<HOST>.<DOMAIN>:<PORT>/Campaign/interact/InvokeDeploymentServlet

  2. Edit the runDeployment.sh or runDeployment.bat script using any text editor to add the following argument to the line beginning with ${JAVA_HOME}:

    -Djavax.net.ssl.trustStore=<TrustStorePath>

    For example, the line might look like this after you add the trust store argument:

    
    ${JAVA_HOME}/bin/java -Djavax.net.ssl.trustStore=<TrustStorePath> 
    -cp ${CLASSPATH}com.unicacorp.Campaign.interact.deployment.tools.
    InvokeDeploymentClient $1

    Replace <TrustStorePath> with the path to the actual SSL trust store.

Running the utility

After you have edited the utility to provide the Java runtime environment, and you have customized a copy of the deployment.properties file to match your environment, you can run the utility with this command:

Interact_home/interactDT/tools/deployment/runDeployment.sh deployment.properties

Replace Interact_home with the actual value of the Unica Interact design time installation, and replace deployment.properties with the actual path and name of the properties file you have customized for this deployment.

Sample deployment.properties file

The sample deployment.properties file contains a commented listing of all of the parameters you must customize to match your own environment. The sample file also contains comments that explain what each parameter is, and why you might need to customize a particular value.


###############################################################################
#
# The following properties feed into the InvokeDeploymentClient program.
# The program will look for a deploymentURL setting.  The program will post a
# request against that url; all other settings are posted as parameters in
# that request. The program then checks the status of the deployment and 
# returns back when the deployment is at a terminal state (or if the 
# specified waitTime has been reached).
#
# the output of the program will be of this format:
# <STATE> : <Misc Detail>
#
# where state can be one of the following:
# ERROR
# RUNNING
# SUCCESS
#
# Misc Detail is data that would normally populate the status message area
#  in the deployment gui of the IC summary page. NOTE: HTML tags may exist
# in the Misc Detail
#
###############################################################################

###############################################################################
# deploymentURL: url to the InvokeDeployment servlet that resides in Interact
# Design time.  should be in the following format: 
# http://dt_host:port/Campaign/interact/InvokeDeploymentServlet
###############################################################################
deploymentURL=http://localhost:7001/Campaign/interact/InvokeDeploymentServlet

###############################################################################
# dtLogin:  this is the login that you would use to login to the Design Time if
# you had wanted to deploy the IC via the deployment gui inside the IC summary
# page.
###############################################################################
dtLogin=asm_admin

###############################################################################
# dtPW:  this is the PW that goes along with the dtLogin
###############################################################################
dtPW=

###############################################################################
# icName:  this is the name of the Interactive Channel that you want to deploy
###############################################################################
icName=ic1

###############################################################################
# partition:  this is the name of the partition
###############################################################################
partition=partition1

###############################################################################
# request:  this is the type of request that you want this tool to execute
# currently, there two behaviors.  If the value is "deploy", then the deployment
# will be executed.  All other values would cause the tool to simply return the
# status of the last deployment of the specified IC. 
###############################################################################
request=deploy

###############################################################################
# serverGroup:  this is the name of the server group that you would like to
# deploy the IC.
###############################################################################
serverGroup=defaultServerGroup

###############################################################################
# serverGroupType:  this will indicate whether or not this deployment is going
# against production server group or a test server group. 1 denotes production
# 2 denotes test. 
###############################################################################
serverGroupType=1

###############################################################################
# rtLogin:  this is the account used to authenticate against the server group
# that you are deploying to.
###############################################################################
rtLogin=asm_admin

###############################################################################
# rtPW:  this is the password associated to the rtLogin
###############################################################################
rtPW=

###############################################################################
# waitTime:  Once the tool submits the deployment request, the tool will check
# the status of the deployment.  If the deployment has not completed (or
# failed), then the tool will continue to poll the system for the status until 
# a completed state has been reached, OR until the specified waitTime (in
# seconds) has been reached.
###############################################################################
waitTime=5

###############################################################################
# pollTime: If the status of a deployment is still in running state, then the 
# tool will continue to check the status.  It will sleep in between status 
# checks a number of seconds based on the pollTime setting .
###############################################################################
pollTime=3

###############################################################################
# global: Setting to false will make the tool NOT deploy the global settings.
# Non-availability of the property will still deploy the global settings.
###############################################################################
global=true