7.1

Table Of Contents
Table 437. Life Cycle Actions (Continued)
Life Cycle Actions Description
Start Start your software. For example, you might start the Tomcat service using the start
command in the Tomcat server. Start scripts run after the congure action completes.
Update If you are designing your software component to support scalable blueprints, handle any
updates that are required after a scale in or scale out operation. For example, you might
change the cluster size for a scaled deployment and manage the clustered nodes using a
load balancer. Design your update scripts to run multiple times (idempotent) and to
handle both the scale in and the scale out cases. When a scale operation is performed,
update scripts run on all dependent software components.
Uninstall Uninstall your software. For example, you might perform specic actions in the application
before a deployment is destroyed. Uninstall scripts run whenever software components are
destroyed.
Include exit and status codes in your action scripts. Each supported script type has unique exit and
status code requirements.
Script Type Success Status Error Status Unsupported Commands
Bash
n
return 0
n
exit 0
n
return non-zero
n
exit non-zero
None
Windows CMD
exit /b 0 exit /b non-zero Do not use exit 0 or exit non-zero codes.
PowerShell
exit 0 exit non-zero; Do not use warning, verbose, debug, or host calls.
8 Select the Reboot checkbox for any script that requires you to reboot the machine.
After the script runs, the machine reboots before starting the next life cycle script.
9 Click Finish.
10 Select your Software component and click Publish.
You congured and published a Software component. Other software architects, IaaS architects, and
application architects can use this Software component to add software to application blueprints.
What to do next
Add your published Software component to an application blueprint. See Assembling Composite
Blueprints,” on page 349.
Scenario: Create a MySQL Software Component for Rainpole
Using your software architect privileges, create a MySQL Software component to install MySQL on vSphere
CentOS machines. When you design the MySQL Software component for a CentOS virtual machine, you
congure the install, congure, and start parameters, and the scripts for Linux operating systems.
Procedure
1 Select Design > Software Components.
2
Click the New icon (
).
3 Enter MySQL for Linux Virtual Machines in the Name text box.
4 Verify that the identier populates based on the provided name.
For example, Software.MySQLforLinuxVirtualMachines
5 Enter MySQL installation and configuration in the Description text box.
Chapter 4 Providing On-Demand Services to Users
VMware, Inc. 297