Skip to content

Commit 7a09945

Browse files
authored
[IT-4225] Clarify image version (#7)
There are cases where you may want to update the ImageVersion number without needing to update the underlying template. For example, when you want to update a passed in parameter but keep the template the same. In those situation the ImageVersion still needs to be incremented. The convention of setting the ImageVersion number to the aws-infra template does not work for that use case. Update the convention to just use an arbitrary version number. Also start over with agora-data-manager-github-runner image
1 parent 276c916 commit 7a09945

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,38 @@ repo in the `templates/ImageBuilder` directory.
1919

2020
Next step is to use the definition template to provision an AMI:
2121
1. In this repo, add a new Sceptre config in `config/prod` directory referencing
22-
a versioned (or tagged) instance of the cloudformation template. Set the
23-
the `ImageVersion` to the same number as the aws-infra repo tag (i.e. 0.9.2 without the `v`).
24-
It must match a [semantic version](https://semver.org/) number.
22+
a versioned (or tagged) instance of the cloudformation template. The `ImageVersion`
23+
is arbitrary however it must follow the [semantic version](https://semver.org/)
24+
convention (i.e. X.Y.Z). We typically start with `1.0.0` and increment as needed.
2525
2. Create a PR to merge the new config into the `main` branch.
2626
3. Once the PR is merged, the cloudformation template will be deployed to the
2727
AWS org-sagebase-imagecentral account which will in turn trigger a build
2828
of the image which will generate an AMI.
29-
4. The AMI will be shared to all accounts in our AWS organization which
30-
means that it is searchable from any of our AWS accounts using either the
29+
4. The AMI will be publicly shared to __ALL__ AWS accounts which
30+
means that it is searchable from any AWS accounts using either the
3131
AWS console EC2 Instances->AMIs or Image Builder->Images pages. The AMI is
3232
also searchable using the AWS CLI
3333
[describe-images command](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html).
3434

3535

3636
### Updating Images
37-
To update an image the we must first update aws-infra then this repo.
37+
To update an image we must first update aws-infra then this repo.
3838

3939
Update the cloudformation template in aws-infra:
4040
1. Create a PR to update the ImageBuilder cloudformation template in the aws-infra repo
4141
2. Review, approve and Merge the PR
4242
3. Tag the repo with a version number
4343

4444
Update the Sceptre config in this repo:
45-
1. Create a PR to update the template `url` reference and `ImageVersion` number
46-
in the Sceptre config file.
45+
1. Create a PR to update the template `url` reference
46+
2. Increment the `ImageVersion` number in the Sceptre config file otherwise
47+
cloudformation may fail with a message similar to `The following resource XXXXX already exists..`.
4748
2. Review, approve and Merge the PR
4849
3. Once merged the cloudformation template will be deployed which will trigger
4950
an update to the AMI. AMIs are immutable therefore AWS will create a new AMI
5051
on every change. The updated AMIs will retain the same name, only the version
5152
number is updated.
5253

53-
__Note__: An update to the image definition (or cloudformation template) requires
54-
an `ImageVersion` update otherwise cloudformation may fail with a message similar to
55-
`The following resource XXXXX already exists..`.
56-
5754
### Removing Images
5855
Important info when removing image builder resources and the generated
5956
images.

config/prod/agora-data-manager-github-runner.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ stack_tags:
66
OwnerEmail: "jessica.britton@sagebase.org"
77
CostCenter: "Agora / 112300"
88
parameters:
9-
ImageVersion: "0.9.4"
10-
VolumeSize: "50"
9+
ImageVersion: "1.0.0"

0 commit comments

Comments
 (0)