With Application Services, you can create an update profile for an existing deployment to scale out the clusters of a node for example, to improve the performance and maintain the needs of the scalable application deployment. When you scale out a clustered node of a deployed application, you can configure only the cluster size of the node that were modeled as clusters in the application blueprint.
About this task
During an update process to scale out a deployed application, based on the update settings, virtual machines are created and required action scripts are run on the new virtual machines. In a multitiered application, if a node depends on the scaled out clustered node other than the external services, an update script must run on the dependent node.
For example, in a deployed Clustered Dukes Bank App, you can scale the AppServer node to handle additional load. During the update process, the AppServer install, configuration, and start scripts run on the newly scaled out virtual machine. Because the http_node_ips and appsrv_routes properties of the Apache_LB service are dependent on the AppServer node, changes in the AppServer cluster size affect the Apache_LB service and initiate the update script to run.
You define the UPDATE life cycle stage script for a dependent service or application component during the initial application deployment. You can also add or modify the update script during the update process. When you configure the update script during the update process, the script is saved for future deployments in the update profile.
You cannot modify the install, configure, or start scripts during an update process. You can configure only the update script.
You can also initiate an update process to scale out a deployed application from the command-line interface. See Deploying and Updating an Application Using CLI. With REST APIs in Application Services, you can automate the scale out of a deployed application. See Using Application Services REST APIs document document.
An update process to scale a deployment might fail sometimes. A cleanup to delete the new virtual machines is required following the scaleout update failure. Deprovisioning the newly created virtual machines manually is a tedious task and is difficult for external services users. To avoid the manual effort, automatic deletion of virtual machines is considered. Set the following flag to true, to enable automatic cleanup of virtual machines after a scaleout failure:
You can set the flag post deployment and scaleout or rollback at a later time. If you do not wish to deprovision the virtual machines automatically, set the flag to False.
Log in to Application Services as an application publisher and deployer.
Familiarize yourself with the basic concepts of defining and configuring component properties and actions. See Developing Application Services Components.
The deployed application must include at least one clustered node. See Specify a Node as a Cluster.
If you plan to add a custom task, verify that at least one custom task is created in the Application Services library. See Add a Custom Task to the Library.
Verify that the initial deployment is successfully deployed to a cloud environment.
You cannot scale clustered nodes from a failed deployment or after a failed scale operation.
Contact your cloud administrator to get information about the deployment environment storage space limit.
- On the Application Services title bar, click the drop-down menu and select Deployments.
- Select an application deployment that is successfully deployed.
- From the Operations drop-down menu in the toolbar, select Update.
The Update Profiles page opens.
- Select Create Update Profile.
The Update Profile dialog box opens.
- In the Update Type drop-down menu, select Scale Out.
- Name the scaled update process, add an optional description, and click OK.
In the description, you can add information about the changes included in this update.
- (Optional) Click the blueprint image to review the highlighted dependencies between services or application components.
Note all of the dependent components so that you can create an update script if one does not exist or modify an existing one.
- From the Node tab, increase the cluster size value for one or more clustered nodes.
- (Optional) From the Service or Application Component tab, create an update script for all of the available dependent components with a property bound to the clustered node.
If the UPDATE life cycle stage script are defined, then the scripts appear with the associated service or application component. If the scripts are not defined, create the applicable script for the update process.
For example, if a node has the all(node_array:ip) property bound to a clustered node, then it must run an update script.
- (Optional) Select the Reboot check box if the agent must restart the virtual machine after the update script runs successfully and click Next.
The scaled out clustered node and the update tasks of the dependent components appear in the execution plan. The original execution plan does not appear during an update process.
- (Optional) Add an APPD_UPDATE_PROPS property in the update script to view a list of all the changed properties.
The update script is saved in the update profile and can be used for multiple updates. You cannot use APPD_UPDATE_PROPS as a property name or as a qualifier for a property name.
For example, the sample MySQL service update script includes the APPD_UPDATE_PROPS property to update the database port and password.
- (Optional) Add an APPD_PREV property in the update script to view the previous value of a property.
The update script is saved in the update profile and can be used for multiple updates. You cannot use APPD_PREV as a property name or as a qualifier for a property name.
For example, the sample MySQL service update script includes the APPD_PREV property to view the value of the database password.
- (Optional) Click the Expand Cluster button () to expand the clustered node, select a custom task, and drag the task to each node.
You can configure the task properties in the Add Custom Task dialog box and save your changes.
- In the execution plan, review the scaled out clustered node, and update script if applicable and click Next.
The blue dotted lines in the execution plan define a specific order in which the deployment tasks run.
Click the down arrow next to the service update script to view script details or the variable definitions used in the script.
- Review the modified properties and actions in the update.
The dependent properties with defined update scripts are highlighted.
- Click Update to deploy the updated application.
The update process deploys the scaled out update to the cloud.
What to do next
You can check the status of the deployment from the deployment summary page. See Using the Deployment Summary Page.
Learn about the various processes that take place in the background when the deployed application is updated in the cloud. See Understanding the Deployment and Update Process.