With vCloud Application Director, you can create a custom task to perform customized tasks in the application deployment such as run security patches.

The vCloud Application Director catalog contains predefined tasks to configure APT or YUM repositories, a script to register a machine to the Red Hat network, or a script to enable a virtual machine to connect to the designated Windows Active Directory domain. You can add these customized tasks to the execution plan in a deployment profile. In some cases, rather than creating a custom task, you might prefer to edit a predefined task.

Save your changes frequently. The vCloud Application Director user interface session expires after 30 minutes of inactivity. If the session expires, any changes that were not saved are lost.

Verify that your user account has the ROLE_CATALOG_ADMIN catalog administrator role assigned to it.

Verify whether you must add items to the operating systems and descriptive tag lists. See Add Operating Systems to the Catalog and Add Tags to the Catalog.

If a script in a task requires access to URLs from outside the corporate firewall, configure the applicable services and application components to use a proxy. See Configure vCloud Application Director to Use a Proxy for External URLs.

Familiarize yourself with the basic concepts of defining and configuring component properties and actions. See Developing vCloud Application Director Components.

1

On the vCloud Application Director title bar, click the drop-down menu and select Catalog > Tasks.

2

Click New in the toolbar.

3

Set the name of the custom task, add a description, and click Save.

As a best practice, use a name that corresponds to the task the script performs.

4

Click Create Task Version to create a custom task version.

You can create multiple versions for a custom task.

A page appears for creating a custom task version.

5

Complete the custom task version information.

Option

Description

Name

Task version name stays the same.

Description

Add detailed information about the custom task. For example, describe what the script does when added to a node in the execution plan.

Version

You can specify major, minor, or micro releases, with or without qualifiers. For example, you might use unique version numbers such as 1.0 or 1.5.

Supported OSes

If the scripts used in this task can run only on particular operating systems, select those operating systems here. In the execution plan, vCloud Application Director prevents the custom task from appearing in the Catalog Task Name list unless it contains one of these operating systems. You must add at least one operating system in the text box.

To create an operating system name that is not in the list, click Cancel, and select Catalog > Operating Systems.

6

In the Properties section, define the variables used for a custom task.

Option

Description

Property Name

Click the first row of the Property Name column to define a variable. For example, you might create a custom task to configure a repository or create a custom email task to send a notification email when the deployment task for a service or application component successfully finishes.

Description

Include details about the custom task.

Type

To change the type, select a type from the drop-down menu. The available property types are String, Content, and Array. You cannot add types to the menu.

Value

Type the value to substitute for this property when the custom task runs. For example, for a property called remove_all, you might type either true or false in this text box.

Secured

Select the check box for passwords you define or other properties whose values you want to obscure. For example, the JBOSS_JMX_PWD property in the JBoss service is secured.

If a property is changed from Secured to Unsecured, vCloud Application Director resets the property value, for security purposes. You must set a new value for the property.

Delete button

Removes the selected row from the Properties section.

7

In the Script Editor section, add a script for the custom task.

A catalog administrator can parameterize the installation and configuration of services. The properties that are defined for a service can be used inside the script.

a

Expand the Edit script dialog box, set the script type from the drop-down menu to write a script or copy a script.

b

Select the Reboot check box to restart the virtual machine after the script runs successfully, during an application deployment.

c

Click the down arrow in the Select a property to insert list to add custom task properties.

d

Click OK when you are finished.

8

When you finish creating the custom task, click Save.

The custom task you created is added to the Tasks page.

You can add a custom task in the execution plan and deploy it to a deployment environment. See Review the Execution Plan and Add Custom Tasks. Modify the custom task to support your current needs. See Maintain Custom Task Versions.