Skip to main content

Creating an Image Template

The Template Builder is a guided wizard that takes you through the process of defining a new image template. Each step ensures that all necessary configurations are captured before the template is created and the first build is initiated.

Step 1: Cloud Provider

The first step is to select the target cloud environment for your image.

  1. Select Provider: Choose from AWS, Azure, GCP, Exoscale, or VMware.
  2. Select Scope: Choose the appropriate scope for your environment, such as PUBLIC or CHINA.

Once you make your selection, the UI performs an automated check for available cloud credentials. An overlay will appear briefly while the system validates that you have the necessary permissions to build images in the selected provider and scope.

Step 2: Operating System

In this step, you define the base operating system for your template.

  1. Select OS Family: Choose between Linux and Windows.
  2. Pick Distribution: Select a specific distribution from the filtered list. The list displays the version, architecture (e.g., x86_64, arm64), and the End of Life (EOL) date for each option. This information helps you ensure you are building on a supported and secure base.

Step 3: Basic Settings

This step covers the core metadata and provider-specific configurations for your template.

General Information

  • Template Name: A unique name for your template.
  • Description: A brief explanation of the template's purpose.
  • Tags: Add key-value pairs that will be applied to the resulting images in your cloud environment.

Provider-Specific Fields

Depending on the selected provider, additional fields will appear:

  • AWS: Select the region, EBS volume type, and optional KMS key for encryption. You can also define additional EBS volumes.
  • Azure: Configure replica regions, VM image definition, trusted launch settings, and additional data disks.
  • GCP: Specify a custom image name.
  • Exoscale: Select the target zone.

Management Settings

  • Notifications: Configure SNS topics, PubSub themes, or Webhook URLs to receive build status updates.
  • Cyclical Rebuild: Toggle this to enable automatic rebuilds on a schedule.
  • Image Retention: Set the number of historical images to keep before older ones are automatically deleted.
  • Target Cloud Accounts: Select the specific accounts or subscriptions where the finished image should be distributed.

Step 4: Build Components

Components are the building blocks of your image. In this step, you select the scripts and configurations that will be applied during the build phase.

  1. Available Components: Browse the list of system and custom components.
  2. Selection: Drag and drop components from the available list to the selected list.
  3. Ordering: Reorder components by dragging them up or down. They will be executed in the order they appear.
  4. Version Pinning: Choose to use the "Latest" version or pin the component to a specific version.
  5. Properties: Some components may have configurable properties that you can set directly in the UI.

Step 5: Test Components

The interface for test components is identical to the build components step. These components run after the build phase to verify that the image meets your requirements and compliance standards. Successful testing is required for the image to be marked as ready.

Step 6: Summary and Submit

The final step provides a comprehensive review of all your selections.

  1. Review: Carefully check the provider, OS, settings, and components.
  2. Edit: You can click on any previous step in the wizard header to go back and make changes.
  3. Submit: Once satisfied, click the Submit button.

After submission, the template is created, and ImageFactory automatically triggers the initial build process. You will be redirected to the Template Details page to monitor the progress.

Via API

You can create templates programmatically using the createTemplate mutation. This is ideal for integrating ImageFactory into your CI/CD pipelines.

mutation CreateNewTemplate($input: CreateTemplateInput!) {
createTemplate(input: $input) {
template {
id
name
status
}
}
}

The Template Builder ensures a consistent and repeatable process for defining images. By following these steps, you can create complex, multi-cloud image specifications with ease.