Image Builder is a comprehensive service provided by Alibaba Cloud that streamlines the customization, repair, testing, distribution across regions, and sharing of image content across accounts. It uses an image template to define a sequence of tasks for building a new image, such as selecting a source image, adding image components, deciding whether to repair the image, and managing cross-region distribution and cross-account sharing.
Advantages
Image Builder is recommended for those seeking a streamlined process for image content customization, repair, testing, cross-region distribution, and cross-account sharing, along with systematic management of image creation and quality testing.
Compared to manual image creation, Image Builder offers numerous benefits, including improved efficiency, simplified processes, and enhanced quality control. Its advantages are detailed below:
Efficient automated building
Template customization allows you to customize and reuse the image building process by defining the content of the image, including the operating system, pre-installed software, and configurations, through the image template. This enables quick iterations and deployments without the need to repeat foundational configuration tasks.
The simplified operation and maintenance process automatically manages the creation and destruction of intermediate Elastic Compute Service (ECS) instances, eliminating the need for manual intervention and allowing you to focus on the image content.
Component support
Image Builder supports two types of components: build and test components. These include software and services from the operating system, while also allowing for the addition of user-defined software packages and applications to meet the requirements of various business scenarios.
Automatic repair and testing
The system can automatically detect and repair issues with the image during the build task, and test the generated image to ensure it is active.
Flexible distribution and sharing mechanism
The built image can be automatically distributed to specified regions or shared with other Alibaba Cloud accounts, significantly enhancing team collaboration and resource management flexibility.
Cost and resource management optimization
While Image Builder is a free service, the intermediate ECS instances used during the build process are billed on a pay-as-you-go basis. The default settings of the system are designed to balance performance and cost, but you can customize the instance configuration for cost optimization.
Billing
Image Builder is a free service. However, when using an image template to build an image, multiple intermediate ECS instances are created to assist in the process. If image testing is enabled, additional intermediate instances will be created for testing. These intermediate instances are pay-as-you-go ECS instances and will incur fees. For more information, see Pay-as-you-go.
The configurations of intermediate ECS instances are set to default system-defined values, such as selecting the smallest vCPU and memory for the instance type. You can also manually adjust the configuration of intermediate ECS instances to suit your business needs. For configuration details, see Create an image template and run an image building task.
Use Image Builder
The following figure illustrates the Image Builder process:
(Optional) Create image components.
Image components store commands commonly used in image building, such as applications, configurations, and tests. You can add these components to the image template for quick customization.
ECS supports both system and custom components:
(Recommended) System components include pre-installed software or features provided by the operating system, such as system libraries, command line tools, and system services, which can be used directly.
Custom components cater to specific scenarios and requirements, such as custom software packages and applications. Instead of being part of the operating system, they are tailored to user needs. For stability and reliability, we recommend that you use system components to create image templates. ECS allows the creation of both build and test components, with build components used for customizing image content and test components for verifying the built image.
For more information, see (Optional) Create an image component.
Create an image template.
Customize the image content in the image template by specifying the source image, configuring template content, and setting up image distribution. For step-by-step instructions, see Step 1: Create an image template.
Specify the source image: The source image includes the operating system, pre-installed software, and essential system configurations. Image customization and extension are based on this image.
(Optional) Configure template content: Add image components, decide on image repair, and determine if image testing is necessary.
Enable image detection and repair to automatically address common image issues and install necessary components for cloud images, such as Cloud Assistant, before executing a building task.
Enable image testing to have the system automatically use the specified test components to ensure the new image is active after the building task is complete.
(Optional) Configure intermediate instances: To assist in building the image with an image template, you may need to create multiple intermediate instances. You can manually configure these ECS instances based on your business requirements.
(Optional) Configure image distribution: Distribute the customized image to specific regions or share it with designated Alibaba Cloud accounts.
Execute an image building task.
When creating an image template, you can choose to execute the task immediately, triggering the task execution right after the template creation. If you prefer to manually execute a task to build a custom image at a later time, refer to Step 2: Execute an image building task.
NoteThe new image created by the building task can be used to create ECS instances or replace the operating system of an instance as needed. For detailed instructions, see Use a custom image to create one or more instances or Replace the operating system (system disk) of an instance.