This topic describes how to update custom images by using Operation Orchestration Service (OOS). OOS provides public templates to update images automatically. To create an immediate or scheduled O&M task, you only need to select a source image and specify required parameters such as the Cloud Assistant command in a public template. The O&M task is then automatically executed based on the definitions in the template.
- Check whether the name of the new custom image already exists and make sure that the name complies with the naming conventions.
- Create and launch a temporary ECS instance based on parameters such as the instance type, source image ID, and security group ID that you have configured.
- Check whether the Cloud Assistant client is installed on the temporary ECS instance. If not, install the Cloud Assistant client.
- Run scripts by using Cloud Assistant to update the system environment of the instance.
Note OOS calls Cloud Assistant API operations to run shell, bat, or PowerShell scripts to update the system environments of ECS instances. For more information, see Overview.
- Stop the temporary ECS instance.
- Create a custom image from the temporary ECS instance.
- Release the temporary ECS instance.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- On the Images page, click the Custom Image tab.
- Find the image that you want to update, click the icon in the Actions column, and then click Update Image.
- In the Operation Orchestration Service console, perform the following operations:
- Complete the configurations in the General Settings section, including New Image Name, Description, and Permissions.
- Optional:Complete the Image Distribution settings. You can set whether to copy or share the image.
- Select an image. If you have selected an image in Step 6, the image is automatically selected in this step. Check whether the selected image is the one you want to update.
- Configure an intermediate instance. Set VPC, vSwitch, Security Group, and Instance Type to create the intermediate instance.
- Optional:Send remote commands. You can select a command type and enter the command content. The command is executed on the intermediate instance.
- Optional:Complete the advanced settings. You can configure scaling groups, add tags, or save the current configurations as a template.
- Click Execute Now, and confirm the prompt information in the Confirm Balance message.
- On the Create or Update Images page, you can view the task status.