Skip to content

Commit

Permalink
fix: Use operator in public dns example
Browse files Browse the repository at this point in the history
  • Loading branch information
levinandrew committed Jun 26, 2024
1 parent 7e154fc commit 1e3846e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
1 change: 1 addition & 0 deletions examples/public-dns-external/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace = "wandb"
subdomain = "test"
domain_name = "wandb.io"
license = "<license key>"
zone_id = "<route 53 zone ID>"
```

This will deploy an instance at `test.wandb.io`.
33 changes: 4 additions & 29 deletions examples/public-dns-external/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ module "wandb_infra" {

deletion_protection = false

enable_dummy_dns = true
enable_operator_alb = true

database_instance_class = var.database_instance_class
database_engine_version = var.database_engine_version
database_snapshot_identifier = var.database_snapshot_identifier
Expand All @@ -28,7 +31,7 @@ module "wandb_infra" {
allowed_inbound_cidr = var.allowed_inbound_cidr
allowed_inbound_ipv6_cidr = ["::/0"]

eks_cluster_version = "1.25"
eks_cluster_version = "1.26"
kubernetes_public_access = true
kubernetes_public_access_cidrs = ["0.0.0.0/0"]

Expand Down Expand Up @@ -83,34 +86,6 @@ provider "helm" {
}
}

module "wandb_app" {
source = "wandb/wandb/kubernetes"
version = "1.12.0"

license = var.wandb_license

host = module.wandb_infra.url
bucket = "s3://${module.wandb_infra.bucket_name}"
bucket_aws_region = module.wandb_infra.bucket_region
bucket_queue = "internal://"
bucket_kms_key_arn = module.wandb_infra.kms_key_arn
database_connection_string = "mysql://${module.wandb_infra.database_connection_string}"
redis_connection_string = "redis://${module.wandb_infra.elasticache_connection_string}?tls=true&ttlInSeconds=604800"

wandb_image = var.wandb_image
wandb_version = var.wandb_version

service_port = module.wandb_infra.internal_app_port

# If we dont wait, tf will start trying to deploy while the work group is
# still spinning up
depends_on = [module.wandb_infra]

other_wandb_env = merge({
"GORILLA_CUSTOMER_SECRET_STORE_SOURCE" = "aws-secretmanager://${var.namespace}?namespace=${var.namespace}"
}, var.other_wandb_env)
}

output "bucket_name" {
value = module.wandb_infra.bucket_name
}
Expand Down
2 changes: 1 addition & 1 deletion examples/public-dns-external/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ variable "wandb_license" {
variable "database_engine_version" {
description = "Version for MySQL Auora"
type = string
default = "8.0.mysql_aurora.3.02.2"
default = "8.0.mysql_aurora.3.03.2"
}

variable "database_instance_class" {
Expand Down

0 comments on commit 1e3846e

Please sign in to comment.