Skip to content

Support Multiple default Host OS Images per Product Version in Sumaform #1835

@srbarrios

Description

@srbarrios

Description:

Currently, Sumaform ties each product version (e.g. 5.0, 5.1, Head) to a single Host OS image (qcow2), with the possibility to override it via the environment's Terraform definition (see main.tf#L39). However, we need to support multiple images for each product version, specifically SLES and SLE Micro variants.

We want to:

  • Allow configuring additional supported images per product version.
  • Store this metadata in Sumaform, rather than relying only on overrides.
  • Decide on a maintainable and clean approach to implement this flexibility.

This will give us more control and visibility over which images are officially supported per product version.

Proposals:

  1. Define new product versions, so we can have a default image for each of them, example:
    variable "images" {
      default = {
        "uyuni-master"   = "leapmicro55o"
        "uyuni-released" = "leapmicro55o"
        "uyuni-pr"       = "leapmicro55o"
        "head-micro"           = "slmicro61o"
        "5.0-micro-released"   = "slemicro55o"
        "5.0-micro-nightly"    = "slemicro55o"
        "5.1-micro-released"   = "slmicro61o"
        "5.1-micro-nightly"    = "slmicro61o"
        "head-sles"           = "sles15sp7o"
        "5.0-sles-released"   = "sles15sp6o"
        "5.0-sles-nightly"    = "sles15sp6o"
        "5.1-sles-released"   = "sles15sp7o"
        "5.1-sles-nightly"    = "sles15sp7o"
      }
    }
    
    OR
    variable "images" {
      default = {
        "uyuni-master"   = "leapmicro55o"
        "uyuni-released" = "leapmicro55o"
        "uyuni-pr"       = "leapmicro55o"
        "head"           = "slmicro61o"
        "5.0-released"   = "slemicro55o"
        "5.0-nightly"    = "slemicro55o"
        "5.1-released"   = "slmicro61o"
        "5.1-nightly"    = "slmicro61o"
        "head-sles"           = "sles15sp7o"
        "5.0-sles-released"   = "sles15sp6o"
        "5.0-sles-nightly"    = "sles15sp6o"
        "5.1-sles-released"   = "sles15sp7o"
        "5.1-sles-nightly"    = "sles15sp7o"
      }
    }
    
  2. We have defined somewhere all supported images for a particular version, so we validate the image passed on the terraform environment:
    variable "supported_images" {
      default = {
        "uyuni-master"   = [ "leapmicro55o" ]
        "uyuni-released" = [ "leapmicro55o" ]
        "uyuni-pr"       = [ "leapmicro55o" ]
        "head"           = [ "slmicro61o", "sles15sp7o" ]
        "5.0-released"   = [ "slemicro55o", "sles15sp6o" ]
        "5.0-nightly"    = [ "slemicro55o", "sles15sp6o" ]
        "5.1-released"   = [ "slmicro61o", "sles15sp7o" ]
        "5.1-nightly"    = [ "slmicro61o", "sles15sp7o" ]
      }
    }
    

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions