6.2

Table Of Contents
Add Action Scripts to the Service Version
The application catalog administrator must provide an action script for at least one of the life cycle stages.
For deploying an application, you can create an install, configure, start, rollback, and teardown script, or
create an update script to update an existing deployment. These scripts are customized to use the
component properties.
You are not required to add scripts for all the life cycle stages. If you do not need a particular stage,
ignore it.
Prerequisites
n
Log in to Application Services as an application cloud administrator and an application publisher
and deployer.
n
If you plan to use a script that downloads software from an external Web site, verify that the virtual
machine you use for deploying the application has access to an external network.
n
Familiarize yourself with the basic concepts of defining and configuring component properties and
actions. See Chapter 12 Developing Application Services Components.
n
To view examples about how to add scripts to a service, select Library > Services to view the
predefined services.
n
Verify that properties are defined for the service version. See Define Service Version Properties.
Procedure
1 Open an existing service version and click Edit.
2 From the drop-down menu, select a script type for your action script.
You can author in Bash or BeanShell script for Linux-based applications, or Windows CMD,
PowerShell, or BeanShell script for Windows-based applications.
3 In the Script column, click the hyperlink to open the Edit Script dialog box.
You can write the script or copy a script into the dialog box.
An application catalog administrator can parameterize the installation and configuration of services.
The properties that are defined for a service can be used inside the script.
4 Click the down arrow in the script type field to select an action script type for a life cycle stage.
5 To insert the properties you defined, click the down arrow in the Select a property to insert list.
6 (Optional)
Select the Reboot check box to restart the virtual machine after the script runs successfully, during
an application deployment.
7 Click OK.
Using Application Services
VMware, Inc. 124