-
Notifications
You must be signed in to change notification settings - Fork 1
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
[IBCDPE-939] Correcting some issues #6
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
00fb9ca
Correcting some issues
BryanFauble cd63eec
Shift in which module the ocean controller is deployed
BryanFauble c6b9e37
Try different values
BryanFauble ed67b86
Corrections
BryanFauble 21b6e89
Correct node_group_name
BryanFauble 275e98a
Try static node group ID
BryanFauble fe149a3
Set kube context via config path
BryanFauble File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @Sage-Bionetworks-Workflows/dpe |
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,19 @@ | ||
name: tfsec-pr-commenter | ||
on: | ||
pull_request: | ||
jobs: | ||
tfsec: | ||
name: tfsec PR commenter | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@master | ||
- name: tfsec | ||
uses: aquasecurity/tfsec-pr-commenter-action@v1.2.0 | ||
with: | ||
github_token: ${{ github.token }} |
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 |
---|---|---|
@@ -1,15 +1,27 @@ | ||
# EKS-stack | ||
|
||
Leveraging spot.io, we spin up an EKS stack behind an existing private VPC that has scale-to-zero capabilities. To deploy this stack | ||
Leveraging spot.io, we spin up an EKS stack behind an existing private VPC that has scale-to-zero capabilities. To deploy this stack: | ||
|
||
1. log into dpe-prod via jumpcloud and export the credentials (you must have admin) | ||
TODO: Instructions need to be re-writen. Deployment is occuring through spacelift.io | ||
|
||
<!-- 1. log into dpe-prod via jumpcloud and export the credentials (you must have admin) | ||
2. run `terraform apply` | ||
3. This will deploy the terraform stack. The terraform backend state is stored in an S3 bucket. The terraform state is stored in the S3 bucket `s3://dpe-terraform-bucket` | ||
4. The spot.io account token is stored in AWS secrets manager: `spotinst_token` | ||
5. Add `AmazonEBSCSIDriverPolicy` and `SecretsManagerReadWrite` to the IAM policy | ||
|
||
``` | ||
aws eks update-kubeconfig --name tyu-spot-ocean | ||
5. Add `AmazonEBSCSIDriverPolicy` and `SecretsManagerReadWrite` to the IAM policy --> | ||
|
||
To connect to the EKS stack running in AWS you'll need to make sure that you have | ||
SSO setup for the account you'll be using. Once setup run the commands below: | ||
``` | ||
# Login with the profile you're using to authenticate. For example mine is called | ||
# `dpe-prod-admin` | ||
aws sso login --profile dpe-prod-admin | ||
|
||
# Update your kubeconfig with the proper values. This is saying "Authenticate with | ||
# AWS using my SSO session for the profile `dpe-prod-admin`. After authenticated | ||
# assuming that we want to use the `role/eks_admin_role` to connect to the k8s | ||
# cluster". This will update your kubeconfig with permissions to access the cluster. | ||
aws eks update-kubeconfig --region us-east-1 --name dpe-k8 --role-arn arn:aws:iam::766808016710:role/eks_admin_role --profile dpe-prod-admin | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, these instructions worked for me!
|
||
``` | ||
|
||
## Future work | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
variable "cluster_name" { | ||
description = "Name of K8 cluster" | ||
type = string | ||
default = "dpe-k8" | ||
} | ||
|
||
variable "region" { | ||
description = "AWS region" | ||
type = string | ||
default = "us-east-1" | ||
} | ||
|
||
variable "spotinst_account" { | ||
description = "Spot.io account" | ||
type = string | ||
default = "act-ac6522b4" | ||
} | ||
|
||
variable "tags" { | ||
description = "AWS Resource Tags" | ||
type = map(string) | ||
default = { | ||
"CostCenter" = "No Program / 000000" | ||
# "kubernetes.io/cluster/tyu-spot-ocean" = "owned", | ||
# "key" = "kubernetes.io/cluster/tyu-spot-ocean", | ||
# "value" = "owned" | ||
} | ||
} | ||
variable "cluster_name" { | ||
description = "Name of K8 cluster" | ||
type = string | ||
default = "dpe-k8" | ||
} | ||
|
||
variable "kube_config_path" { | ||
description = "Kube config path" | ||
type = string | ||
default = "~/.kube/config" | ||
} | ||
|
||
variable "region" { | ||
description = "AWS region" | ||
type = string | ||
default = "us-east-1" | ||
} | ||
|
||
variable "spotinst_account" { | ||
description = "Spot.io account" | ||
type = string | ||
default = "act-ac6522b4" | ||
} | ||
|
||
variable "tags" { | ||
description = "AWS Resource Tags" | ||
type = map(string) | ||
default = { | ||
"CostCenter" = "No Program / 000000" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
terraform { | ||
required_providers { | ||
spotinst = { | ||
source = "spotinst/spotinst" | ||
version = "1.172.0" # Specify the version you wish to use | ||
} | ||
} | ||
} | ||
terraform { | ||
required_version = "<= 1.5.7" | ||
required_providers { | ||
spotinst = { | ||
source = "spotinst/spotinst" | ||
version = "1.172.0" # Specify the version you wish to use | ||
} | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very neat action!