All Products
Search
Document Center

CloudOps Orchestration Service:Scheduled startup and shutdown

Last Updated:Jun 19, 2024

What is OOS?

CloudOps Orchestration Service (OOS) is a free platform that provides comprehensive and automated O&M services on Alibaba Cloud. OOS allows you to manage and run a variety of O&M tasks, such as event-driven, scheduled, and cross-region O&M tasks. OOS also allows you to run multiple O&M tasks at a time and configure the approval and notification features. OOS provides best practices of operations as code and helps you implement standardized O&M. For more information, see What is OOS?

Scenarios

During specific peak hours every day, you may need a large number of Elastic Compute Service (ECS) instances to maintain your business. If you still retain the ECS instances during off-peak hours, the maintenance cost is high. In this case, you may want to retain the ECS instances without generating extra costs.

ECS provides the No Fees for Stopped Instances feature for pay-as-you-go instances. You can use this feature to recycle some ECS resources while retaining the ECS instances. This reduces costs. You can stop some ECS instances during off-peak hours and restart them during peak hours without the need to initialize them. However, an issue of how to start and stop ECS instances on a regular basis occurs.

The issue is not complicated but involves maintenance on a large number of ECS instances. The solution of using manual operations is time-consuming and error-prone. A better solution is using an automatic system to enable scheduled startup and shutdown. You can use CloudOps Orchestration Service (OOS) to implement such a solution based on the No Fees for Stopped Instances feature of ECS.

Prerequisites

  1. The No Fees for Stopped Instances feature is enabled for the specified ECS instances. For more information, see Economical mode.

Solution

Group and tag ECS instances

Group and tag the ECS instances that need to be started and stopped on a regular basis. For example, you can group ECS instances with the machine:Stop and machine:Daily tags. This way, you can manage ECS instances with the same tag at a time.

1

Configure scheduled startup and shutdown

Use CloudOps Orchestration Service (OOS) to schedule ECS instances with a specific tag to start and stop on a regular basis. Make sure that the No Fees for Stopped Instances feature is enabled for these ECS instances. The following figure shows the process.

2

Procedure

  1. Log on to the CloudOps Orchestration Service (OOS) console.

  2. In the left-side navigation pane, choose Automated Task > Common O&M Tasks. In the left-side pane of the Common O&M Tasks page, click Scheduled Startup/Shutdown.

  3. Click Create.

    image

  4. In the Select Task Type section of the Create Task Scheduled Startup/Shutdown page, configure the required parameters such as Task Name, Execution Cycle, Task Type, Time Zone, Startup Time, and Shutdown Time.

    image

  5. In the Select Instances section, select Specify Instance Tags. Select a region from the drop-down list and then configure the Tag key and Tag value parameters to add tags.

    image

  6. In the Advanced(Optional) section, set the Rate control type parameter to Concurrency-based Control and specify the concurrency and error threshold. You can also use the default values.

    image

  7. Click Create. Then, OOS can automatically start and stop the specified ECS instances on a regular basis.

  8. On the Scheduled Startup/Shutdown tab, find the scheduled startup and shutdown task that you created and click Details in the Actions column. In the Execution Progress section of the execution details page, click the Pending Executions tab to view the future scheduling information and click the Historical Executions tab to view the execution history.7

  9. Go to the ECS console and search for ECS instances with the specified tag. You can find that these ECS instances are in the Stopped state except during the specified running period. They automatically start and stop based on the specified scheduled time.8

Summary

In the OOS console, you can configure scheduled startup and shutdown for a large number of ECS instances with the same tag at a time after you enable the No Fees for Stopped Instances feature for these ECS instances. This solution saves both time and costs.