You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Creating custom images
Creating custom images using CP
Copy page
Download PDF
Creating custom images using CP
Code Pipeline (CP) provides a developer-friendly cloud-native application delivery platform and flexible, easy-to-use one-stop pipelines. It helps enterprises connect all phases of the R&D and operations workflow, and enables high-quality, efficient continuous integration, continuous verification, and continuous release of business services. Learn more.​
This topic describes how to quickly create custom images by using the preconfigured task templates for pipelines provided by CP.​
Prerequisites​
  • To authorize an IAM user to create a custom image, make sure that you have attached either the CPMemberAccess or CPAdminAccess policy to the corresponding user. Learn more.​
Procedure​
  1. Log in to the CP workspace console.​
  1. In the top menu bar, select the region where the target workspace is located.​
  1. Select the "My" tab and click the name of the target workspace.​
  1. In the directory tree on the left, select "Pipeline".​
  1. Click the "Create Pipeline" button, search for and select the "ECS image build" template, and then click the "Create" button.​
  1. Configure the process for creating a custom image.​
  1. Configure the ECS instance creation stage.​
  • Create a new ECS instance to create an image​
  • Click the "Create ECS instance" step. In the drawer on the right, configure the ECS instance information used to create a custom image. For parameter details, see Creating ECS instances.​
  • Create an image from an existing ECS instance​
  • To create an image using an existing ECS instance, click the "Delete" button in the "Create ECS instance" stage to remove this stage and its steps.​
  1. Configure the ECS image build stage.​
  1. (Optional) Install required dependencies.​
  • To install preset software, tools, or environments in the image, click the "Install dependency" step. In the drawer on the right, configure the corresponding installation script. For parameter details, see Installing dependencies. Otherwise, you can delete this step.​
tip​
  • Configure the ECS instance based on the source of the instance used to create the image, and make sure that the selected instance has the cloud assistant Agent installed.​
  • When you create an image from a new ECS instance, select "Upstream artifact" and select the instance created in the "Create ECS instance" step. This instance has the cloud assistant Agent installed by default.​
  • When you create an image from a new ECS instance, make sure that the selected region is the same as the region of the instance.​
  1. (Optional) Test the installed dependencies.​
  • To test whether the installed dependencies can run as expected, click the "Test dependency" step. In the drawer on the right, select the target instance, and configure the script content for testing dependencies. For parameter details, see Installing dependencies. Otherwise, you can delete this step.​
tip​
When you create an image from a new ECS instance, make sure that the selected region is the same as the region of the instance.​
  1. Configure custom image information.​
  • Click the "Create ECS instance image" step. In the drawer on the right, select the instance for image creation, and configure the custom image name. For parameter details, see Creating images.​
tip​
  • When you create an image from a new ECS instance, make sure that the selected region is the same as the region of the instance.​
  • The region of the custom image is the same as the region of the instance you selected.​
  1. (Optional) Delete the ECS instance.​
  • To delete the ECS instance used to create the image after the custom image is created, click the "Delete ECS instance" step. In the drawer on the right, select the target instance. For parameter details, see Deleting ECS instances. Otherwise, you can delete this step.​
tip​
When you delete the ECS instance created in the previous step, make sure that the selected region is the same as the region of the instance.​
  1. Click the "Run now" button, and then click the "Run" button in the pop-up window to start creating the custom image by using the pipeline. Learn more.​
View the result​
  1. After the pipeline runs successfully, log in to the image console.​
  1. In the top navigation bar, select the region and project where the target custom image is located.​
  1. Select the "Custom Image" tab.​
  1. If the status of the target image is Available in the "State" column, the custom image is created.​
tip​
We recommend that you use the image detection feature to perform compliance checks on the created image. This avoids compatibility issues with drivers, kernels, tools, and other components that may lead to the failure of creating a properly functioning VolcanoEngine ECS instance. Learn more.​
  1. You can also click the image name to go to the image details page, select the "Associative snapshot" tab, and view the IDs of the snapshots associated with the volumes in the image, the volume types, and the capacity of the volumes. For more information, see Snapshot overview.​
​
Last updated: 2025.12.12 14:58:15