-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 874: Automate creation of the infrastructure for the first ci environment * Fix login with session token * Add aws_iam_path variable to scope resources created * Add support for permissions boundary * Add AWS_SESSION_TOKEN to docker container * Only plan * Remove path from iam resources * Expose node group arn as output * Grant administrator access to kubernetes * Add README with debugging instructions * Trigger on PR * Update workflow * Update workflow * Update workflow * Update workflow * Update workflow * Update test script * exit code from container * Add kubernetes provider configuration * Grant explicitely GithubCI role to K8s * Keep only generated files output * Add title * Remove unnecessary version * Clean up * Manage operations/ci/aws-1/variables.tf with utility * new line end of file * Update documentation * Improve README
- Loading branch information
Showing
27 changed files
with
717 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Deploy DSS | ||
on: | ||
workflow_dispatch: {} | ||
pull_request: {} | ||
jobs: | ||
deploy: | ||
name: Deploy DSS to AWS | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'interuss/dss' || github.repository == 'Orbitalize/dss' | ||
concurrency: | ||
group: dss-deploy-aws | ||
cancel-in-progress: false | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Job information | ||
run: | | ||
echo "Job information" | ||
echo "Trigger: ${{ github.event_name }}" | ||
echo "Host: ${{ runner.os }}" | ||
echo "Repository: ${{ github.repository }}" | ||
echo "Branch: ${{ github.ref }}" | ||
docker images | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::301042233698:role/InterUSSGithubCI | ||
aws-region: us-east-1 | ||
mask-aws-account-id: true | ||
role-duration-seconds: 1800 | ||
|
||
- name: Caller Id | ||
run: | | ||
aws sts get-caller-identity | ||
- name: Test Deployment Scenario AWS-1 | ||
shell: bash | ||
working-directory: ./deploy/operations/ | ||
env: | ||
COMPOSE_PROFILES: aws-1 | ||
run: | | ||
docker compose up --exit-code-from ci-aws-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,4 +128,7 @@ test/e2e_test_result | |
go | ||
|
||
# vscode files | ||
.vscode | ||
.vscode | ||
|
||
# terraform | ||
.terraform* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
deploy/infrastructure/dependencies/terraform-aws-kubernetes/ebs.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
deploy/infrastructure/dependencies/terraform-aws-kubernetes/oidc.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
data "tls_certificate" "cluster_oidc_provider" { | ||
url = aws_eks_cluster.kubernetes_cluster.identity[0].oidc[0].issuer | ||
} | ||
|
||
resource "aws_iam_openid_connect_provider" "cluster_provider" { | ||
client_id_list = ["sts.amazonaws.com"] | ||
thumbprint_list = data.tls_certificate.cluster_oidc_provider.certificates[*].sha1_fingerprint | ||
url = data.tls_certificate.cluster_oidc_provider.url | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
deploy/infrastructure/utils/definitions/aws_iam_permissions_boundary.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
variable "aws_iam_permissions_boundary" { | ||
type = string | ||
description = <<-EOT | ||
AWS IAM Policy ARN to be used for permissions boundaries on created roles. | ||
Example: `arn:aws:iam::123456789012:policy/GithubCIPermissionBoundaries` | ||
EOT | ||
} |
Oops, something went wrong.