Create an AMI catalog definition

Create the definition for the custom AMI catalog. This catalog can contain multiple AMI references (in the “images” key).

Save the definition in a json file with the following format:

{
  "images": {
    "kubernetes-images": [
      {
        "created": 123467890,
        "uuid": "abcd-1234-5678",
        "kubernetes_version": "1.18",
        "full_version": "1.18-eks.5",
        "description": "Kubernetes 1.18 Base Version",
        "os": "centos7",
        "os_type": "redhat7",
        "cloud": "aws",
        "platform": {
          "release": "eks.1",
          "architecture": "x86_64",
          "gpu": "true"
        },
        "images": {
          "us-west-2": "ami-03e8943497e1c6643", ...
        }
      }, ...
    ]
  }
}

Each image is distinguished by having unique values in the following fields. CDP relies on these fields to select the image to use when provisioning a cluster:

  • kubernetes_version - the version of kubernetes that the images are designed for.
  • cloud - the Provider.
  • platform/gpu - whether the underlying image is specialized for gpu-accelerated tasks.

The catalog file can contain several versions at once. However, no version should be duplicated more than once per provider. Examples:

  • For AWS, 1.18 is the version of "1.18" that is known - they do not use 3 digit semantic versions. A catalog should not have more than one 1.18 for AWS.
  • However, for AWS, the catalog can (and should contain) versions that are upgradable. So you can have a 1.19, 1.20 etc for AWS.
  • For Azure, when image specifications are allowed, this can contain, for example: 1.18.1, 1.18.2, 1.19.6, 1.19.7 etc.

The AWS region is an important identifier when creating the AMI. For a list of regions in AWS, execute the following command:

aws ssm get-parameters-by-path --path 
/aws/service/global-infrastructure/regions --region us-west-2 --output 
json | jq .Parameters[].Value | sort