Skip to main content

Managing Image Components

Image Components are the modular scripts and configurations used to customize your images. They allow you to define specific software installations, security hardening steps, or configuration changes that are applied during the build or test phases.

Component Views

The Image Components page is divided into two primary views:

  1. System Components: These are pre-defined components provided by Nordcloud. They cover common tasks such as OS updates, basic security hardening, and cloud agent installations. System components are read-only and shared across all customers.
  2. Custom Components: These are components created by your organization. They are customer-specific and can be fully edited and managed by your users.

The Components Table

The table provides an overview of all available components:

  • Name: The identifier for the component.
  • Type: Indicates if it is a System or Custom component.
  • Stage: Specifies if the component is designed for the BUILD or TEST stage.
  • Providers: The cloud providers supported by the component.
  • OS Types: The operating systems (Linux or Windows) the component can be applied to.

Creating a Custom Component

To create a new component, click the Create Component button and provide the following details:

  1. Metadata: Enter a name and description.
  2. Stage: Select whether this component should run during the BUILD phase (to modify the image) or the TEST phase (to verify the image).
  3. Compatibility: Select the cloud providers and operating systems this component is compatible with.
  4. Script Content: Provide the actual script that will be executed. ImageFactory supports several formats:
    • Shell: For Linux-based components.
    • PowerShell: For Windows-based components.
    • Ansible: For complex configurations using Ansible playbooks.

Version Management

ImageFactory supports comprehensive versioning for custom components, ensuring that you can safely update scripts without immediately affecting all templates.

Managing Versions

Clicking on a custom component opens its detail view, where you can manage its lifecycle:

  • Version History: View a list of all versions, including timestamps and the user who created them.
  • Upload New Version: Add a new script version to the component.
  • Download Scripts: Retrieve the script content of any version for local review.
  • Set Latest: Designate a specific version as the "Latest" version. Templates configured to use the latest version will automatically adopt this version in their next build.

Component Detail Page

The detail page provides a comprehensive view of the component:

  • Metadata: View and edit the name, description, and compatibility settings.
  • Version List: A table of all versions with their creation dates.
  • Script Preview: A syntax-highlighted preview of the script content for the selected version.
Via API

You can manage components and their versions using the GraphQL API. This is useful for synchronizing component scripts from a version control system like Git.

mutation CreateComponent($input: CreateComponentInput!) {
createComponent(input: $input) {
component {
id
name
}
}
}

mutation AddVersion($input: CreateComponentVersionInput!) {
createComponentVersion(input: $input) {
version {
id
versionNumber
}
}
}

By leveraging custom components, you can tailor your images to meet your organization's specific requirements. The versioning system provides the control needed to test changes in a single template before rolling them out across your entire image catalog.