Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AMI IDs for 6.2.0 #7037

Merged
merged 8 commits into from
May 26, 2021
Merged

Update AMI IDs for 6.2.0 #7037

merged 8 commits into from
May 26, 2021

Conversation

webvictim
Copy link
Contributor

@webvictim webvictim commented May 25, 2021

  • Use env bash in shebang for MacOS
  • Set destination regions using list in Makefile rather than as an independent variable
  • Set internal field separator to comma
  • Add note about needing coreutils on MacOS
  • Add AMI IDs for new regions and reorder to match Makefile list
  • Add note about MacOS compatibility
  • [auto] Update AMI IDs for 6.2.0

Although #6282 and its backports added support for AMIs in other AWS regions, the script which handles making the AMIs public as part of the Drone promotion step (https://github.com/gravitational/teleport/blob/master/assets/aws/files/make-amis-public.sh) still had a hardcoded region list which was not updated at the same time.

This PR removes that region list and passes it through from the single source of truth in the Makefile instead so this doesn't happen again. I've manually made the affected AMIs public myself now.

This PR also:

  • changes the shebang line in AWS-related scripts to use #!/usr/bin/env bash instead of just #/bin/bash so they also work on systems which alter the default path to bash (such as when you brew install bash on MacOS, which goes to /usr/local/bin/bash)
  • adds a note about needing to install coreutils, findutils and gnu-sed to run directly on MacOS
    • trying to make scripts compensate for the differences between BSD utils and GNU utils always ends up being a huge pain and leads to one side getting out of sync, so the easiest option is for MacOS users to install GNU tooling (it's better anyway)
    • another option is to run all these scripts inside a VM or Docker, but that seems a bit too heavyweight.

Backports required to:

  • branch/v6
  • branch/v6.2

Updates #7030

webvictim added 7 commits May 25, 2021 16:22
Somehow MacOS default bash is version 3 (even on 11.3). You can install v5 using Brew, but it gets linked to /usr/local/bin/bash. Changing the shebang to use `env` will use whichever `bash` appears in the PATH first, which is more cross-platform friendly.
@webvictim webvictim added automated PRs raised by automation terraform-deployment-examples Issues relating to Terraform deployment examples under examples/aws/terraform labels May 25, 2021
@webvictim webvictim changed the title ami auto branch 1621975559 Update AMI IDs for 6.2.0 May 25, 2021
@webvictim webvictim requested review from awly, wadells and quinqu May 25, 2021 20:50
@webvictim webvictim enabled auto-merge (squash) May 26, 2021 14:17
Copy link
Contributor

@russjones russjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot.

@webvictim
Copy link
Contributor Author

Backports required:

  • branch/v6
  • branch/v6.2

@webvictim webvictim merged commit 1b14d47 into master May 26, 2021
@webvictim webvictim deleted the ami-auto-branch-1621975559 branch May 26, 2021 18:17
webvictim added a commit that referenced this pull request May 27, 2021
webvictim added a commit that referenced this pull request Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated PRs raised by automation backport-required terraform-deployment-examples Issues relating to Terraform deployment examples under examples/aws/terraform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants