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.

About this task

You are not required to add scripts for all the life cycle stages. If you do not need a particular stage, ignore it.

Prerequisites

  • Log in to Application Services as an application cloud administrator and an application publisher and deployer.

  • 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.

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

  • To view examples about how to add scripts to a service, select Library > Services to view the predefined services.

  • 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.
  8. In the Reboot column, select the check box so that the agent bootstrap can restart the virtual machine after an action script runs successfully.

    After the virtual machine is restarted, the agent proceeds to the next life cycle stage script defined in the service version.

  9. Click Reset to clear the script.

    This operation does not remove the row for the life cycle stage.

  10. When you are finished creating the service version, click Save.
  11. Click OK.

Results

The service you created is added to the page.

What to do next

Create a copy of an existing service version, or edit the service. See Maintain Service Versions.