The image update feature applies to scenarios where applications are frequently published. You can create an image update task in the Auto Scaling console. When the task is executed, Auto Scaling automatically creates a custom image from the source instance and replaces images in the scaling configurations of the scaling group with the created custom image.
- The current account has permissions to perform operations on resources of ECS and Auto Scaling.
- A RAM role is created for OOS and is granted permissions to perform operations on resources of ECS and Auto Scaling. For more information, see Configure RAM permissions for OOS.
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- In the top navigation bar, select a region.
- Find the scaling group and use one of the following methods to open the details page
of the scaling group:
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- Click Details in the Actions column.
- In the upper part of the page, click the Configuration Source tab.
- Click the Update Image Tasks tab.
- Click Update Image in Scaling Configuration.
- Configure the parameters for the image update task.The following table describes the parameters.
Parameter Description Instance Select an ECS instance. Auto Scaling creates a custom image from the instance. The custom image is used to replace the images in scaling configurations. The custom image is created only from the system disk of the instance. Scaling Configuration ID Select one or more scaling configurations for which you want to update images. Executed At Specify the time when to execute the task.
- Now: The task is executed immediately after it is created.
- Scheduled: The task is to be executed at the specified time. You must specify the execution time, in minutes.
- Periodic: Specify the recurrence period, expiration time, and start time of the image update
task. Assume that you configure the following settings for an image update task on
August 17, 2020:
- Recurrence: Monthly
- Execute from Day 21 to Day 25 of Each Month
- Start Time: 02:00
- Expired At: 00:00 on August 26, 2020
The image update task is executed once at 02:00 every day from August 21, 2020 to August 25, 2020.
Permission Source Select the permission source for OOS to perform operations on related resources.
Note If you set Executed At to Scheduled or Period, you can only specify a RAM role to grant permissions to OOS.
- Use Existing Permissions of Current Account: The permissions of the current account are used.
- Specify RAM Role and Use Permissions Granted to This Role: You must select a RAM role to be assumed by OOS and use the permissions granted to this role.
- Click OK.The image update task is automatically executed at the specified time. You can view the execution status and source instance of this task in the task list.
UpdateImage_from_<source ECS instance ID>_on_<image update task ID>format, the images in the scaling configurations are updated.