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.
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, selectto view the predefined services.
Verify that properties are defined for the service version. See Define Service Version Properties.
- Open an existing service version and click Edit.
- 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.
- 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.
- Click the down arrow in the script type field to select an action script type for a life cycle stage.
- To insert the properties you defined, click the down arrow in the Select a property to insert list.
- (Optional) :
Select the Reboot check box to restart the virtual machine after the script runs successfully, during an application deployment.
- Click OK.
- 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.
- Click Reset to clear the script.
This operation does not remove the row for the life cycle stage.
- When you are finished creating the service version, click Save.
- Click OK.
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.