The Update Image in Scaling Configuration feature applies to scenarios where applications are frequently published. You can create an update image 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 with ease.
- 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 Grant RAM permission 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 target 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 Manage in the Actions column.
- In the left-side navigation pane, click Instance Configuration Source.
- In the upper-right corner of the page, click the Update Image Tasks tab.
- In the upper-right corner of the tab, click Update Image in Scaling Configuration.
- Configure the parameters for the update image task.
The following table lists 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 from only the system disk. Scaling Configuration ID Select scaling configurations for which you want to update images. You can select multiple scaling configurations. Executed At Specify the time when the task is executed.
- Now: immediately
- Scheduled: at the specified time. You must specify the execution time, in minutes.
Permission Source Select the permission source for OOS to perform operations on related resources.
- 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.
If you set Executed At to Now, the update image task is immediately executed. If you set Executed At to Scheduled, the update image task will be executed at the specified time. You can view the execution status and source instance in the task list.
UpdateImage_from_<source ECS instance ID>_on_<update image task ID>format, the images in the scaling configurations are updated.