From f3100d5081aaf2af8f88d0a4c501ebf80d013439 Mon Sep 17 00:00:00 2001 From: Chris Van Pelt Date: Mon, 21 Aug 2023 16:18:37 -0400 Subject: [PATCH 1/2] Weave plumbing stuff --- examples/public-dns-external/main.tf | 31 +++++++++++++++++++++-- examples/public-dns-external/variables.tf | 30 +++++++++++++++++++++- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/examples/public-dns-external/main.tf b/examples/public-dns-external/main.tf index 505f299b..ec19eebd 100644 --- a/examples/public-dns-external/main.tf +++ b/examples/public-dns-external/main.tf @@ -1,3 +1,13 @@ +# this assumes your shell is authenticated with gcloud and using playground-111: +# gcloud config set project playground-111 +# gcloud auth application-default login +terraform { + backend "gcs" { + bucket = "install.wandb.ai" + prefix = "cvp.wandb.ml" + } +} + provider "aws" { region = "us-west-2" @@ -26,11 +36,12 @@ module "wandb_infra" { database_sort_buffer_size = var.database_sort_buffer_size allowed_inbound_cidr = var.allowed_inbound_cidr - allowed_inbound_ipv6_cidr = ["::/0"] + allowed_inbound_ipv6_cidr = var.allowed_inbound_ipv6_cidr eks_cluster_version = "1.25" kubernetes_public_access = true kubernetes_public_access_cidrs = ["0.0.0.0/0"] + kubernetes_instance_types = ["m6a.2xlarge"] # 8 vCPU, 32 GiB RAM domain_name = var.domain_name zone_id = var.zone_id @@ -56,10 +67,26 @@ provider "kubernetes" { } module "wandb_app" { - source = "github.com/wandb/terraform-kubernetes-wandb" + # source = "github.com/wandb/terraform-kubernetes-wandb" + source = "../../../terraform-kubernetes-wandb" license = var.wandb_license + oidc_client_id = var.oidc_client_id + oidc_issuer = var.oidc_issuer + + other_wandb_secrets = var.other_wandb_secrets + + dd_env = var.datadog_env + weave_enabled = true + weave_enable_datadog = true + weave_dd_profiling_enabled = true + weave_storage_class = "ebs-sc" + weave_storage_provisioner = "ebs.csi.aws.com" + weave_storage_type = "gp3" + weave_storage_size = "250Gi" + parquet_enabled = true + host = module.wandb_infra.url bucket = "s3://${module.wandb_infra.bucket_name}" bucket_aws_region = module.wandb_infra.bucket_region diff --git a/examples/public-dns-external/variables.tf b/examples/public-dns-external/variables.tf index c88dc631..eb28ee5f 100644 --- a/examples/public-dns-external/variables.tf +++ b/examples/public-dns-external/variables.tf @@ -70,6 +70,35 @@ variable "bucket_kms_key_arn" { default = "" } +variable "oidc_issuer" { + type = string + description = "The OIDC issuer URL" + default = "" +} + +variable "oidc_client_id" { + type = string + description = "The OIDC client ID" + default = "" +} + +variable "other_wandb_secrets" { + type = map(string) + description = "Other secrets env vars to pass to wandb" + default = {} +} + +variable "other_wandb_env" { + type = map(string) + description = "Other env vars to pass to wandb" + default = {} +} + +variable "datadog_env" { + type = string + description = "The Datadog environment to use" + default = "" +} variable "allowed_inbound_cidr" { default = ["0.0.0.0/0"] @@ -77,7 +106,6 @@ variable "allowed_inbound_cidr" { type = list(string) } - variable "allowed_inbound_ipv6_cidr" { default = ["::/0"] nullable = false From 8af1d66b294e1cbc4cef0377a84311f8e0fce73d Mon Sep 17 00:00:00 2001 From: Chris Van Pelt Date: Tue, 22 Aug 2023 14:36:19 -0400 Subject: [PATCH 2/2] Wire up wandb_env --- examples/public-dns-external/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/public-dns-external/main.tf b/examples/public-dns-external/main.tf index ec19eebd..95863860 100644 --- a/examples/public-dns-external/main.tf +++ b/examples/public-dns-external/main.tf @@ -76,6 +76,7 @@ module "wandb_app" { oidc_issuer = var.oidc_issuer other_wandb_secrets = var.other_wandb_secrets + other_wandb_env = var.other_wandb_env dd_env = var.datadog_env weave_enabled = true