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

pathogen-repo-build: support assuming AWS role for runtime permissions #81

Merged
merged 5 commits into from
May 22, 2024

Commits on May 20, 2024

  1. Add bin/write-envdir

    The script was copied from the ncov-ingest repo
    <https://github.com/nextstrain/ncov-ingest/blob/20b432624ad2c4bf24c85756bd04bae1e067bde8/bin/write-envdir>
    
    Adding in preparation for configuring separate AWS credentials for
    the build runtime in pathogen-repo-build.
    joverlee521 authored and tsibley committed May 20, 2024
    Configuration menu
    Copy the full SHA
    7430cef View commit details
    Browse the repository at this point in the history
  2. pathogen-repo-build: rename setup-aws-credentials anchor

    Renamed to `setup-aws-batch-credentials` in preparation for adding
    another step that sets up AWS credentials for the runtime.
    
    The new step for setting up runtime AWS credentials probably won't need
    an anchor as it should only run once before the build starts. I
    just wanted to be specific with the existing anchor name to prevent any
    potential confusion.
    joverlee521 authored and tsibley committed May 20, 2024
    Configuration menu
    Copy the full SHA
    515637f View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. pathogen-repo-build: support assuming AWS role for runtime permissions

    Assumes repo-specific roles, `GitHubActionsRoleNextstrainRepo@zika` for
    example, which are managed by the Terraform configuration in the
    nextstrain/infra repo.  The repo here is always the _calling_
    repository, regardless of if the "repo" input was provided to use
    workflows from another place.
    
    The runtime credentials are then saved in an envdir that is passed
    to the build command via `NEXTSTRAIN_RUNTIME_ENVDIRS`.
    
    Namespaced `NEXTSTRAIN_RUNTIME_ENVDIR` with `./git/nextstrain` as
    suggested by @tsibley in review¹
    
    ¹ <#81 (comment)>
    
    Related-to: <nextstrain/infra#4>
    Co-authored-by: Thomas Sibley <[email protected]>
    joverlee521 and tsibley committed May 21, 2024
    Configuration menu
    Copy the full SHA
    68c5c72 View commit details
    Browse the repository at this point in the history
  2. pathogen-repo-build: Run aws sts get-caller-identity after acquirin…

    …g credentials
    
    Very helpful for troubleshooting when looking at logs.
    
    Note that when using the AWS Batch runtime the credential identity will
    only be emitted for the initial job submission, not subsequent wait-N
    jobs.  This seems fine.
    tsibley committed May 21, 2024
    Configuration menu
    Copy the full SHA
    20f8226 View commit details
    Browse the repository at this point in the history
  3. pathogen-repo-build: Rename the two aws-actions/configure-aws-credent…

    …ials steps
    
    So they are more easily differentiated/recognized in the job logs.  I
    found myself easily mixing them up when trying to find the right one.
    tsibley committed May 21, 2024
    Configuration menu
    Copy the full SHA
    3a2d597 View commit details
    Browse the repository at this point in the history