6.2

Table Of Contents
For example, to deploy an Apache Tomcat server in a virtual machine, you might add the following
scripts:
INSTALL Download the Tomcat server installation bits and install the Tomcat service.
CONFIGURE Set the JAVA_OPTS, CATALINA_OPTS, and any other required
configuration.
START Start the Tomcat service using the start command in the Tomcat server.
UPDATE Modify the configuration of Tomcat service using the update script or
change the cluster size to scale a deployed application and manage the
clustered nodes using a load balancer.
ROLLBACK Modify the rollback script if the update process of the Tomcat service is
unsuccessful because of performance or security problems or the update
process is successful but the deployed application has errors.
TEARDOWN Modify the teardown script of the Tomcat service for example, to perform
specific actions in the application before a deployment is torn down.
The application architect can parameterize the script by declaring, for example, the installer location,
installation path, and Tomcat start command as properties in the script. The parameters render the scripts
generic. You can deploy the service on different environments without modifying these generic scripts.
You can also modify parameter values from the action script. These modified properties can be referred to
as property values for other components. See Using Application Services Library Services guide.
The scripts defined for an action are run in the /tmp/ directory. The Linux script is located
at /tmp/runId/ComponentName-LifecycleStageName. The runId is the unique job identifier for each
deployment, which is available on the Task Details status window of the deployment summary page. The
Windows script is located at \Users\darwin\AppData\Local\Temp.
Note Verify that no processes are prompting for user interaction when the action script is running.
Interruptions pause the script, causing it to remain in an idle state indefinitely, and eventually fail. In
addition, if a Windows CMD script exits with a non-zero exit status, the Application Services agent stops
the deployment and marks it as Failed Deployment. Use exit /b 0 to indicate success status and
exit /b non-zero for error status.
See Supported Action and Custom Task Scripts.
You can add a service or custom task in an application deployment and define the component action. See
Add a Service to the Library and Add a Custom Task to the Library.
Supported Action and Custom Task Scripts
Application Services supports authoring in Bash or BeanShell script for a Linux-based application and
authoring in Windows CMD, PowerShell, or BeanShell scripts for a Windows-based application.
Using Application Services
VMware, Inc. 102