This topic describes how to scale, restart, and update a deployed application instance. It also explains how to view deployment records and roll back an application instance to a previous version based on its deployment history.
Prerequisites
You have deployed an application instance. For more information, see Deploy an application instance.
View application instance resource usage
The example in this topic uses an application instance deployed with the default pipeline to an environment whose cluster is not an Alibaba Cloud BizWorks Serverless cluster
.
On the Application Deployment page, click the target instance card. In the Logs and Monitoring area of the Application Deployment Instance panel, click View Pod Usage.
In the View Instance Resource Usage dialog box, select the target instance from the Instance dropdown list. You can then view the trend charts for the CPU and Memory resource usage of the instance.
View application instance running logs
On the Application Deployment page, click the target instance card. On the Application Deployment Instance panel, in the Logs and Monitoring area, click View Real-time Logs.
In the Running Logs dialog box, select the target instance from the Instance dropdown list and the target container from the Container dropdown list, and set the Number of lines to display. You can also click Refresh in the upper-right corner of the dialog box or select Auto-refresh.
View application instance monitoring data
If you enabled application monitoring when you deployed the application instance, you can view its application monitoring details. For more information, see Configure an environment.
On the Application Deployment page, click the target instance card. In the Logs and Monitoring section of the Application Deployment Instance panel, click View Alibaba Cloud ARMS Monitoring.
In the Application Real-Time Monitoring Service (ARMS) navigation bar, on the Application List page, view the application monitoring details.
Manually scale an application instance
On the Application Deployment page, click the target instance card. In the Application Deployment Instance panel, click Manual Scaling.
In the Manual Scaling dialog box, modify the Target number of instances and then click Confirm.
Configure auto scaling
On the Application Deployment Instance panel, in the Load Information section, click Set Auto Scaling.
In the Set Auto Scaling panel, click Add Information. In the Set Metrics-based Scaling (HPA) dialog box, after you configure the settings, click OK.
Update an application instance
In the current version, you can deploy only one application instance per environment. To change the application version or configuration, follow these steps.
On the Application Deployment page, click the target instance card. In the Application Deployment Instance panel, click Update.
If you do not specify an image to store build center applications when you create a project, the Image Repository Not Configured prompt appears. You must configure an image repository first.
For information about how to configure an image repository in your project, see Configure an image repository.
In the Update Instance Deployment - Deployment Configuration pane, modify the configuration settings, and then click Next.
In the Update Instance Deployment - Environment Configuration panel, modify the configuration settings and click Start Deployment.
An Update successful message appears. The system regenerates an instance ID and starts the deployment.
Restart an application instance
On the Application Deployment page, click the target instance card. In the Application Deployment Instance panel, click Restart.
ImportantThe system restarts the application by using a rolling release. The system starts new instances before stopping old ones to ensure business continuity.
In the confirmation dialog box, click Restart.
Roll back an application instance
On the Application Deployment page, click the target instance card. In the Application Deployment Instance panel, click Rollback.
In the Roll Back Application Deployment dialog box, select the version to roll back, and click Next.
Select a rollback policy and set the release parameters, and then click Rollback.
Stop an application instance
On the Application Deployment page, click the target instance card. In the Application Deployment Instance pane, click Stop.
In the confirmation dialog box, click Stop.
NoteThe system stops the instance by scaling the number of instances down to 0.
Start an application instance
You can start an application instance only when its status is Stopped.
On the Application Deployment page, click the target instance card. In the Application Deployment Instance panel, click Start.
In the Launch Instance dialog box, after setting Number of Instances, click Launch.
Delete an application instance
On the Application Deployment page, click the target instance card. In the Application Deployment Instance panel, click Delete.
In the Delete Application Instance dialog box, click Delete.
NoteThe system deletes all environment information for this instance, including Pods, networks, and historical deployment records.
Terminate a failed application instance
On the Application Deployment page, click the component card of the target instance that has a Deployment Failed status. In the Application Deployment Instance panel, click Terminate.
In the confirmation dialog box, click Terminate Deployment.
View container cluster information
On the Application Deployment page, click the target instance card. In the Application Deployment Instance panel, click Container Cluster.
In the Container Cluster dialog box, you can click the links to the right of View BizWorks-managed cluster information and Access workloads deployed on the cluster to view related container cluster information.
Click the link next to View BizWorks-managed Cluster Information to view basic information about the managed cluster on the Cluster Management page. You can click View Managed Cluster Details to view cluster details.
Click the link next to Access Workloads Deployed on the Cluster to view the related workload details in the Container Service for Kubernetes (ACK) console.
When you are finished, click Close.
View deployment records and logs
On the Application Deployment page, click a target instance card. In the Application Deployment Instance panel, you can view the deployment records in the Deployment Record area. The deployment records are displayed in a list and include information such as ID, Type, Status, Operator, and Completion Time. Each record provides links to its Details and Logs.
Click Logs to the right of the target deployment record ID to view the detailed pipeline logs for this deployment process.
NoteYou can view logs only for Update and Create deployments.
The logs are displayed as follows:
If you selected the default pipeline for Deployment Pipeline, the deployment logs are displayed in the Instance Change Records dialog box, showing the execution progress of each pipeline stage and detailed build and deployment logs.
If you selected a third-party pipeline for Deployment Pipeline, the deployment logs appear in the Deployment Logs dialog box. This dialog box shows pipeline information, the instance ID, and the running status, followed by detailed build and deployment logs.
You can click View more run records to view more records on the pipeline instance page.
If a custom pipeline was selected for Deployment Pipeline, the deployment logs appear as follows.
This example uses a pipeline with an added Pipeline Control task to illustrate the deployment logs for a custom pipeline.
In the Instance Change Record dialog box, the pipeline displays five stages in sequence: Code Checkout, Maven, Create Image, Pipeline Control, and Deploy. A green checkmark next to each stage indicates it is complete. When the Deploy to Target Environment node is selected in the left-side pane, the right-side log area shows the Docker image push logs and application deployment status, ultimately displaying "Check deployment status [Deployment Successful]".
The deployment log details for a process in an approval workflow are as follows. In the Instance Change Record panel, the pipeline progress shows the execution status of each stage: Code Checkout, Maven, Create Image, Pipeline Control, and Deploy. The current Pipeline Control stage is shown as Pending for Approval.
Click View Progress to see the specific approval progress. The approval process details page displays the process instance ID, creation time, creator, and running status, which is currently In Progress. The business information section shows the associated central application, and you can click the View link for more details. The approval progress is presented as a timeline: the Start Node has been completed by the initiator, and the process is currently at the Manual Approval node, which requires all designated approvers to pass (countersign). It shows that two people are pending approval. The Approve and Reject buttons are available at the bottom of the page for approvers.
Alternatively, in the Deployment Records section of the instance details panel, click Details next to the target deployment record. In the Deployment Record Details panel, click Approval Progress to go to the approval progress details page. You can also find the target deployment record in the list and click Details to view its detailed information. The deployment record details include fields such as Operation Type, Status, Deployer, Completion Time, Deployment Environment, Deployment Content, Deployment Pipeline, and Deployment Policy. The Approval Progress button next to the status bar is the entry point for viewing the progress.
To terminate the deployment process of a custom pipeline, click Terminate Process in the Instance Change Record dialog box. In the confirmation dialog box, click OK. The deployment log details page shows the pipeline stage bar (including Code Checkout, Maven, Create Image, Pipeline Control, and Deploy), with status icons indicating whether each stage is completed, in progress, or not started. You can select a specific build step on the left to view its corresponding log output on the right. The Terminate Process button in the upper-right corner allows you to stop the current pipeline execution at any time.
Optional: View the detailed deployment configurations for a specific deployment record.
Click Details to the right of the target deployment record ID.
In the Deployment Record Details panel, you can view information such as Deployment Environment, Deployment Content, Resource Specifications, and Deployment Policy.
If you need to roll back to this version, click Roll back to this version. In the Roll back application deployment dialog box, set the rollback policy and Batch size, and then click Rollback.
View pipeline variables
If you selected a custom pipeline for the Pipeline when deploying the application instance, and custom variables are set in that pipeline, click View Pipeline Variables in the Deployment Overview area of the instance deployment details to view the details of the custom variables in the Pipeline Variable Details dialog box.