eks-anywhere icon indicating copy to clipboard operation
eks-anywhere copied to clipboard

Build snow Admin AMI as part of the release process

Open jiayiwang7 opened this issue 2 years ago • 0 comments

When the EKS-A release pipeline finishes running and release manifest file is generated, we should trigger a separate snow admin AMI pipeline that automatically builds the admin AMI and publishes a message containing the raw admin AMI s3 URL to a SNS topic that Snow team can subscribe to.

Example message body (JSON):

{
    "releaseVersion": "v0.10.1",
    "snowAdminAMI": {
        "ubuntu": {
            "uri": "https://eksa-snow-amis.s3.us-west-2.amazonaws.com/projects/aws/eks-a-admin-image/latest/snow-admin.raw",
            "os": "linux",
            "osName": "ubuntu",
            "sha256": "a53760413d5836eeb1fb0d7ae6f1623e6a8712d7f82ada7ab78a3e6b9c4b0cb8",
            "sha512": "93569c27eba92e03405b3304b9c068fa5fbd59f59dd0ed8223e082206659ce244e60399136403b0d1fd3c7d742bae87186d5cff12bf8a4a3be9907f617977e34",
        }
    },
    "snowNodeAMIs": [
        {
            "kubeChannel": "1.20",
            "kubeVersion": "v1.20.15-eks-1-20-14"
            "eksdReleaseName": "kubernetes-1-20-eks-14",
            "ubuntu": {
                "uri": "https://eksa-snow-amis.s3.us-west-2.amazonaws.com/projects/aws/eks-a-node-image/latest/snow-node-1.20.raw",
                "os": "linux",
                "osName": "ubuntu",
                "sha256": "a53760413d5836eeb1fb0d7ae6f1623e6a8712d7f82ada7ab78a3e6b9c4b0cb8",
                "sha512": "93569c27eba92e03405b3304b9c068fa5fbd59f59dd0ed8223e082206659ce244e60399136403b0d1fd3c7d742bae87186d5cff12bf8a4a3be9907f617977e34",
            }
        },
        {
            "kubeChannel": "1.21",
            "kubeVersion": "v1.21.9-eks-1-21-12"
            "eksdReleaseName": "kubernetes-1-21-eks-12",
            "ubuntu": {
                "uri": "https://eksa-snow-amis.s3.us-west-2.amazonaws.com/projects/aws/eks-a-node-image/latest/snow-node-1.21.raw",
                "os": "linux",
                "osName": "ubuntu",
                "sha256": "a53760413d5836eeb1fb0d7ae6f1623e6a8712d7f82ada7ab78a3e6b9c4b0cb8",
                "sha512": "93569c27eba92e03405b3304b9c068fa5fbd59f59dd0ed8223e082206659ce244e60399136403b0d1fd3c7d742bae87186d5cff12bf8a4a3be9907f617977e34",
            }
        },
        {
            "kubeChannel": "1.22",
            "kubeVersion": "v1.22.6-eks-1-22-10"
            "eksdReleaseName": "kubernetes-1-22-eks-10",
            "ubuntu": {
                "uri": "https://eksa-snow-amis.s3.us-west-2.amazonaws.com/projects/aws/eks-a-node-image/latest/snow-node-1.22.raw",
                "os": "linux",
                "osName": "ubuntu",
                "sha256": "a53760413d5836eeb1fb0d7ae6f1623e6a8712d7f82ada7ab78a3e6b9c4b0cb8",
                "sha512": "93569c27eba92e03405b3304b9c068fa5fbd59f59dd0ed8223e082206659ce244e60399136403b0d1fd3c7d742bae87186d5cff12bf8a4a3be9907f617977e34",
            }
        },
        {
            "kubeChannel": "1.23",
            "kubeVersion": "v1.23.7-eks-1-23-5"
            "eksdReleaseName": "kubernetes-1-23-eks-5",
            "ubuntu": {
                "uri": "https://eksa-snow-amis.s3.us-west-2.amazonaws.com/projects/aws/eks-a-node-image/latest/snow-node-1.23.raw",
                "os": "linux",
                "osName": "ubuntu",
                "sha256": "a53760413d5836eeb1fb0d7ae6f1623e6a8712d7f82ada7ab78a3e6b9c4b0cb8",
                "sha512": "93569c27eba92e03405b3304b9c068fa5fbd59f59dd0ed8223e082206659ce244e60399136403b0d1fd3c7d742bae87186d5cff12bf8a4a3be9907f617977e34",
            }
        }
    ]
}
  • releaseVersion: the EKS-A prod release version (we publish a message for any EKS-A major, minor or patch release)
  • snowNodeAMIs: contains a list of node AMI meta data for each supported K8s version in the release

Build admin image:

  • Install eks-a deps (docker)
  • Copy eks-a and eksctl to bin directory
  • Use the CLI to import all images and store them locally
  • Use the CLI to import/download all necessary artifacts for the CLI operation

Release steps: S3 bucket notifications -> event trigger -> S3 replication, snow admin AMI build

Make sure we update the release runbook so that the release manager can validate the snow build as part of the release process.

jiayiwang7 avatar Sep 06 '22 17:09 jiayiwang7