Skip to content

Commit c0b4f40

Browse files
Merge branch 'main' into aastha/example-tf
2 parents e36d8db + 5f83533 commit c0b4f40

22 files changed

+900
-29
lines changed

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
### [4.12.2](https://github.com/wandb/terraform-aws-wandb/compare/v4.12.1...v4.12.2) (2024-06-17)
6+
7+
8+
### Bug Fixes
9+
10+
* Revert resolve conflicts var ([#233](https://github.com/wandb/terraform-aws-wandb/issues/233)) ([778f147](https://github.com/wandb/terraform-aws-wandb/commit/778f147aa9962fde6a74b7d35501ec7dd7abf2a9))
11+
12+
### [4.12.1](https://github.com/wandb/terraform-aws-wandb/compare/v4.12.0...v4.12.1) (2024-06-17)
13+
14+
15+
### Bug Fixes
16+
17+
* Remove white space ([#231](https://github.com/wandb/terraform-aws-wandb/issues/231)) ([974b4f3](https://github.com/wandb/terraform-aws-wandb/commit/974b4f3ec0d01b34cf6d83008c9fe2a0d3d8ee7a))
18+
19+
## [4.12.0](https://github.com/wandb/terraform-aws-wandb/compare/v4.11.0...v4.12.0) (2024-06-17)
20+
21+
22+
### Features
23+
24+
* Added support yace ([#218](https://github.com/wandb/terraform-aws-wandb/issues/218)) ([12e053d](https://github.com/wandb/terraform-aws-wandb/commit/12e053d520f6998689d3bec0352b320a9105ba9e))
25+
26+
## [4.11.0](https://github.com/wandb/terraform-aws-wandb/compare/v4.10.2...v4.11.0) (2024-05-18)
27+
28+
29+
### Features
30+
31+
* Changes to Connect to AWS S3 and KMS using IAM role for EKS service account ([#186](https://github.com/wandb/terraform-aws-wandb/issues/186)) ([a07a45e](https://github.com/wandb/terraform-aws-wandb/commit/a07a45e6d5b979ec2ef8fbb79b63a5d15867da08))
32+
533
### [4.10.2](https://github.com/wandb/terraform-aws-wandb/compare/v4.10.1...v4.10.2) (2024-05-13)
634

735

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,14 @@ resources that lack official modules.
102102
Users can update the EKS cluster version to the latest version offered by AWS. This can be done using the environment variable `eks_cluster_version`. Note that, cluster and nodegroup version updates can only be done in increments of one version at a time. For example, if your current cluster version is `1.21` and the latest version available is `1.25` - you'd need to:
103103

104104
1. update the cluster version in the app_eks module from `1.21` to `1.22`
105-
2. run `terraform apply`
105+
2. run `terraform apply`
106106
3. update the cluster version to `1.23`
107107
4. run `terraform apply`
108108
5. update the cluster version to `1.24`
109-
...and so on and so forth.
109+
...and so on and so forth.
110110

111111
Upgrades must be executed in step-wise fashion from one version to the next. You cannot skip versions when upgrading EKS.
112+
112113
<!-- BEGIN_TF_DOCS -->
113114

114115
### Notes on EKS Add-ons
@@ -252,7 +253,11 @@ CLI and re-run the apply. Running pods will not be impacted.
252253

253254
## Migrations
254255

255-
#### Upgrading from 3.x -> 4.x
256+
### Upgrading to Operator
257+
258+
See our upgrade guide [here](./docs/operator-migration/readme.md)
259+
260+
### Upgrading from 3.x -> 4.x
256261

257262
- If egress access for retrieving the wandb/controller image is not available, Terraform apply may experience failures.
258263
- It's necessary to supply a license variable within the module, as shown:
Loading

docs/operator-migration/images/post-operator-k8s.svg

+1
Loading

docs/operator-migration/images/pre-operator-infra.svg

+1
Loading

docs/operator-migration/images/pre-operator-k8s.svg

+1
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
provider "aws" {
2+
region = "us-west-2"
3+
4+
default_tags {
5+
tags = {
6+
GithubRepo = "terraform-aws-wandb"
7+
GithubOrg = "wandb"
8+
Enviroment = "Example"
9+
Example = "PublicDnsExternal"
10+
}
11+
}
12+
}
13+
14+
terraform {
15+
required_version = "~> 1.0"
16+
required_providers {
17+
aws = {
18+
source = "hashicorp/aws"
19+
version = "~> 4.0" # Post-Operator
20+
}
21+
kubernetes = {
22+
source = "hashicorp/kubernetes"
23+
version = "~> 2.23"
24+
}
25+
}
26+
}
27+
28+
module "wandb_infra" {
29+
source = "wandb/wandb/aws"
30+
version = "4.7.2"
31+
32+
namespace = var.namespace
33+
public_access = true
34+
external_dns = true
35+
36+
enable_dummy_dns = var.enable_dummy_dns # Post-Operator
37+
enable_operator_alb = var.enable_operator_alb # Post-Operator
38+
deletion_protection = false
39+
40+
database_instance_class = var.database_instance_class
41+
database_engine_version = var.database_engine_version
42+
database_snapshot_identifier = var.database_snapshot_identifier
43+
database_sort_buffer_size = var.database_sort_buffer_size
44+
45+
database_performance_insights_kms_key_arn = null
46+
47+
allowed_inbound_cidr = var.allowed_inbound_cidr
48+
allowed_inbound_ipv6_cidr = ["::/0"]
49+
50+
eks_cluster_version = "1.25"
51+
kubernetes_public_access = true
52+
kubernetes_public_access_cidrs = ["0.0.0.0/0"]
53+
54+
domain_name = var.domain_name
55+
zone_id = var.zone_id
56+
subdomain = var.subdomain
57+
58+
# Add License Post-Operator
59+
license = var.wandb_license
60+
61+
# Use standard sizing Post-Operator
62+
size = var.size
63+
64+
# Set the External DNS Custom Domain Filter Post-Operator
65+
custom_domain_filter = var.custom_domain_filter
66+
67+
bucket_name = var.bucket_name
68+
bucket_kms_key_arn = var.bucket_kms_key_arn
69+
use_internal_queue = true
70+
71+
aws_loadbalancer_controller_tags = var.aws_loadbalancer_controller_tags
72+
}
73+
74+
data "aws_eks_cluster" "app_cluster" {
75+
name = module.wandb_infra.cluster_id
76+
}
77+
78+
data "aws_eks_cluster_auth" "app_cluster" {
79+
name = module.wandb_infra.cluster_id
80+
}
81+
82+
provider "kubernetes" {
83+
host = data.aws_eks_cluster.app_cluster.endpoint
84+
cluster_ca_certificate = base64decode(data.aws_eks_cluster.app_cluster.certificate_authority[0].data)
85+
token = data.aws_eks_cluster_auth.app_cluster.token
86+
exec {
87+
api_version = "client.authentication.k8s.io/v1beta1"
88+
args = ["eks", "get-token", "--cluster-name", data.aws_eks_cluster.app_cluster.name]
89+
command = "aws"
90+
}
91+
}
92+
93+
# Enable the Helm provider
94+
provider "helm" {
95+
kubernetes {
96+
host = data.aws_eks_cluster.app_cluster.endpoint
97+
cluster_ca_certificate = base64decode(data.aws_eks_cluster.app_cluster.certificate_authority[0].data)
98+
token = data.aws_eks_cluster_auth.app_cluster.token
99+
exec {
100+
api_version = "client.authentication.k8s.io/v1beta1"
101+
args = ["eks", "get-token", "--cluster-name", data.aws_eks_cluster.app_cluster.name]
102+
command = "aws"
103+
}
104+
}
105+
}
106+
107+
output "bucket_name" {
108+
value = module.wandb_infra.bucket_name
109+
}
110+
111+
output "bucket_queue_name" {
112+
value = module.wandb_infra.bucket_queue_name
113+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace = "operator-upgrade"
2+
domain_name = "sandbox-aws.wandb.ml"
3+
zone_id = "Z032246913CW32RVRY0WU"
4+
subdomain = "operator-upgrade"
5+
wandb_license = "eyJh"
6+
# wandb_version = "0.51.2" Is now coming from the Release Channel or set in the User Spec.
7+
8+
# Needed Operator Variables for Upgrade
9+
size = "small"
10+
enable_dummy_dns = true
11+
enable_operator_alb = true
12+
custom_domain_filter = "sandbox-aws.wandb.ml"
+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
provider "aws" {
2+
region = "us-west-2"
3+
4+
default_tags {
5+
tags = {
6+
GithubRepo = "terraform-aws-wandb"
7+
GithubOrg = "wandb"
8+
Enviroment = "Example"
9+
Example = "PublicDnsExternal"
10+
}
11+
}
12+
}
13+
14+
terraform {
15+
required_version = "~> 1.0"
16+
required_providers {
17+
aws = {
18+
source = "hashicorp/aws"
19+
version = "~> 3.6" # Pre-Operator
20+
}
21+
kubernetes = {
22+
source = "hashicorp/kubernetes"
23+
version = "~> 2.23"
24+
}
25+
}
26+
}
27+
28+
module "wandb_infra" {
29+
source = "wandb/wandb/aws"
30+
version = "1.16.10"
31+
32+
namespace = var.namespace
33+
public_access = true
34+
external_dns = true
35+
36+
deletion_protection = false
37+
38+
database_instance_class = var.database_instance_class
39+
database_engine_version = var.database_engine_version
40+
database_snapshot_identifier = var.database_snapshot_identifier
41+
database_sort_buffer_size = var.database_sort_buffer_size
42+
43+
database_performance_insights_kms_key_arn = null
44+
45+
allowed_inbound_cidr = var.allowed_inbound_cidr
46+
allowed_inbound_ipv6_cidr = ["::/0"]
47+
48+
eks_cluster_version = "1.25"
49+
kubernetes_public_access = true
50+
kubernetes_public_access_cidrs = ["0.0.0.0/0"]
51+
52+
domain_name = var.domain_name
53+
zone_id = var.zone_id
54+
subdomain = var.subdomain
55+
56+
bucket_name = var.bucket_name
57+
bucket_kms_key_arn = var.bucket_kms_key_arn
58+
use_internal_queue = true
59+
}
60+
61+
data "aws_eks_cluster" "app_cluster" {
62+
name = module.wandb_infra.cluster_id
63+
}
64+
65+
data "aws_eks_cluster_auth" "app_cluster" {
66+
name = module.wandb_infra.cluster_id
67+
}
68+
69+
provider "kubernetes" {
70+
host = data.aws_eks_cluster.app_cluster.endpoint
71+
cluster_ca_certificate = base64decode(data.aws_eks_cluster.app_cluster.certificate_authority[0].data)
72+
token = data.aws_eks_cluster_auth.app_cluster.token
73+
exec {
74+
api_version = "client.authentication.k8s.io/v1beta1"
75+
args = ["eks", "get-token", "--cluster-name", data.aws_eks_cluster.app_cluster.name]
76+
command = "aws"
77+
}
78+
}
79+
80+
module "wandb_app" {
81+
source = "wandb/wandb/kubernetes"
82+
version = "1.12.0"
83+
84+
license = var.wandb_license
85+
86+
host = module.wandb_infra.url
87+
bucket = "s3://${module.wandb_infra.bucket_name}"
88+
bucket_aws_region = module.wandb_infra.bucket_region
89+
bucket_queue = "internal://"
90+
bucket_kms_key_arn = module.wandb_infra.kms_key_arn
91+
database_connection_string = "mysql://${module.wandb_infra.database_connection_string}"
92+
redis_connection_string = "redis://${module.wandb_infra.elasticache_connection_string}?tls=true&ttlInSeconds=604800"
93+
94+
wandb_image = var.wandb_image
95+
wandb_version = var.wandb_version
96+
97+
service_port = module.wandb_infra.internal_app_port
98+
99+
depends_on = [module.wandb_infra]
100+
101+
other_wandb_env = merge({
102+
"GORILLA_CUSTOMER_SECRET_STORE_SOURCE" = "aws-secretmanager://${var.namespace}?namespace=${var.namespace}"
103+
}, var.other_wandb_env)
104+
}
105+
106+
output "bucket_name" {
107+
value = module.wandb_infra.bucket_name
108+
}
109+
110+
output "bucket_queue_name" {
111+
value = module.wandb_infra.bucket_queue_name
112+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace = "operator-upgrade"
2+
domain_name = "sandbox-aws.wandb.ml"
3+
zone_id = "Z032246913CW32RVRY0WU"
4+
subdomain = "operator-upgrade"
5+
wandb_license = "eyJh"
6+
wandb_version = "0.51.2"
7+
# size = "small"

0 commit comments

Comments
 (0)