-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: terraforming an EKS cluster with autoscaling and EFS. (#9427)
- Loading branch information
Showing
9 changed files
with
700 additions
and
0 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
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,3 @@ | ||
.terraform | ||
terraform.tfstate* | ||
.terraform.tfstate* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,43 @@ | ||
# Terraformed EKS cluster for Determined | ||
|
||
This is an example terraform code to configure an EKS cluster to run Determined on. | ||
|
||
Supported features: | ||
- autoscaling via Karpenter, | ||
- postgresql volume on EBS, | ||
- shared fs on EFS. | ||
|
||
Based on [original Karpenter example](https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/karpenter) | ||
|
||
## Prerequisites | ||
|
||
- terraform | ||
- helm | ||
- aws CLI | ||
|
||
## Installation | ||
|
||
First, edit the `locals` section in `main.tf` to set your cluster name and AWS region. | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform apply -auto-approve | ||
$ aws eks --region us-west-2 update-kubeconfig --name <CLUSTER NAME> | ||
$ helm install determined determined-ai/determined --values values.yaml | ||
``` | ||
|
||
## Teardown | ||
|
||
Warning: shut down all the jobs in determined first. | ||
|
||
```bash | ||
$ helm uninstall determined | ||
$ terraform destroy -auto-approve | ||
``` | ||
|
||
## Future work | ||
|
||
In the future, we may want to: | ||
- Make the code configurable: currently, custom configurations will require changing the terraform code directly. | ||
- Rework this code as `det deploy eks` utility. | ||
- Switch from a postgres instance installed by helm and using an EBS volume to a terraform-provisioned RDS. |
Oops, something went wrong.