Skip to content
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

Release v1.6.1 aws b1.0.2 #666

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ resource "kubernetes_namespace" "kubeflow" {
}

module "kubeflow_secrets_manager_irsa" {
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/irsa?ref=v4.12.1"
kubernetes_namespace = kubernetes_namespace.kubeflow.metadata[0].name
create_kubernetes_namespace = false
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/irsa?ref=v4.28.0"
kubernetes_namespace = kubernetes_namespace.kubeflow.metadata[0].name
create_kubernetes_namespace = false
create_kubernetes_service_account = true
kubernetes_service_account = "kubeflow-secrets-manager-sa"
irsa_iam_role_name = format("%s-%s-%s-%s", "kf-secrets-manager", "irsa", var.addon_context.eks_cluster_id, var.addon_context.aws_region_name)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
output "kubelow_platform_domain" {
value = module.ingress_cognito[0].kubelow_platform_domain
value = module.ingress_cognito[0].kubelow_platform_domain
}

output "rds_endpoint" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ variable "addon_context" {

variable "enable_aws_telemetry" {
description = "Enable AWS telemetry component"
type = bool
default = true
type = bool
default = true
}

variable "use_rds" {
type = bool
type = bool
default = true
}

variable "use_s3" {
type = bool
type = bool
default = true
}

variable "use_cognito" {
type = bool
type = bool
default = true
}

Expand All @@ -61,67 +61,67 @@ variable "security_group_id" {
variable "db_name" {
type = string
description = "Database name"
default = "kubeflow"
default = "kubeflow"
}

variable "db_username" {
type = string
description = "Database admin account username"
default = "admin"
default = "admin"
}

variable "db_password" {
type = string
description = "Database admin account password"
default = null
default = null
}

variable "db_class" {
type = string
description = "Database instance type"
default = "db.m5.large"
default = "db.m5.large"
}

variable "db_allocated_storage" {
type = string
description = "The size of the database (Gb)"
default = "20"
default = "20"
}

variable "mysql_engine_version" {
type = string
description = "The engine version of MySQL"
default = "8.0.32"
default = "8.0.32"
}

variable "backup_retention_period" {
type = number
description = "Number of days to retain backups for"
default = 7
default = 7
}

variable "storage_type" {
type = string
description = "Instance storage type: standard, gp2, or io1"
default = "gp2"
default = "gp2"
}

variable "deletion_protection" {
type = bool
description = "Prevents the deletion of the instance when set to true"
default = true
default = true
}

variable "max_allocated_storage" {
type = number
description = "The upper limit of scalable storage (Gb)"
default = 1000
default = 1000
}

variable "publicly_accessible" {
type = bool
description = "Makes the instance publicly accessible when true"
default = false
default = false
}

variable "multi_az" {
Expand All @@ -132,39 +132,39 @@ variable "multi_az" {

variable "mlmdb_name" {
type = string
default = "metadb"
default = "metadb"
description = "Name of the mlm DB to create"
}

variable "generate_db_password" {
description = "Generates a random admin password for the RDS database. Is overriden by db_password"
type = bool
default = false
type = bool
default = false
}

# S3

variable "minio_service_region" {
type = string
default = null
default = null
description = "S3 service region. Change this field if the S3 bucket will be in a different region than the EKS cluster"
}

variable "minio_service_host" {
type = string
default = "s3.amazonaws.com"
default = "s3.amazonaws.com"
description = "S3 service host DNS. This field will need to be changed when making requests from other partitions e.g. China Regions"
}

variable "secret_recovery_window_in_days" {
type = number
type = number
default = 7
}

variable "force_destroy_s3_bucket" {
type = bool
type = bool
description = "Destroys s3 bucket even when the bucket is not empty"
default = false
default = false
}

variable "minio_aws_access_key_id" {
Expand Down Expand Up @@ -196,30 +196,30 @@ variable "aws_route53_subdomain_zone_name" {

variable "create_subdomain" {
description = "Creates a subdomain with the name provided in var.aws_route53_subdomain_zone_name"
type = bool
default = true
type = bool
default = true
}

variable "load_balancer_scheme" {
description = "Load Balancer Scheme"
type = string
default = "internet-facing"
default = "internet-facing"
}

variable "notebook_enable_culling" {
description = "Enable Notebook culling feature. If set to true then the Notebook Controller will scale all Notebooks with Last activity older than the notebook_cull_idle_time to zero"
type = string
default = false
type = string
default = false
}

variable "notebook_cull_idle_time" {
description = "If a Notebook's LAST_ACTIVITY_ANNOTATION from the current timestamp exceeds this value then the Notebook will be scaled to zero (culled). ENABLE_CULLING must be set to 'true' for this setting to take effect.(minutes)"
type = string
default = 30
type = string
default = 30
}

variable "notebook_idleness_check_period" {
description = "How frequently the controller should poll each Notebook to update its LAST_ACTIVITY_ANNOTATION (minutes)"
type = string
default = 5
type = string
default = 5
}
93 changes: 47 additions & 46 deletions deployments/cognito-rds-s3/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
cluster_name = var.cluster_name
region = var.cluster_region
eks_version = var.eks_version
eks_version = var.eks_version

vpc_cidr = "10.0.0.0/16"

Expand All @@ -17,9 +17,9 @@ locals {
azs = slice(local.available_azs, 0, local.az_count)

tags = {
Blueprint = local.cluster_name
GithubRepo = "github.com/awslabs/kubeflow-manifests"
Platform = "kubeflow-on-aws"
Blueprint = local.cluster_name
GithubRepo = "github.com/awslabs/kubeflow-manifests"
Platform = "kubeflow-on-aws"
KubeflowVersion = "1.6"
}

Expand Down Expand Up @@ -50,7 +50,7 @@ locals {
mg_gpu = local.managed_node_group_gpu
}

managed_node_groups = { for k, v in local.potential_managed_node_groups : k => v if v != null}
managed_node_groups = { for k, v in local.potential_managed_node_groups : k => v if v != null }
}

provider "aws" {
Expand All @@ -61,7 +61,7 @@ provider "aws" {
# https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html
provider "aws" {
region = "us-east-1"
alias = "virginia"
alias = "virginia"
}

provider "kubernetes" {
Expand Down Expand Up @@ -114,7 +114,7 @@ data "aws_ec2_instance_type_offerings" "availability_zones_gpu" {
# EKS Blueprints
#---------------------------------------------------------------
module "eks_blueprints" {
source = "github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.12.1"
source = "github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.28.0"

cluster_name = local.cluster_name
cluster_version = local.eks_version
Expand All @@ -129,32 +129,33 @@ module "eks_blueprints" {
}

module "eks_blueprints_kubernetes_addons" {
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons?ref=v4.12.1"
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons?ref=v4.28.0"

eks_cluster_id = module.eks_blueprints.eks_cluster_id
eks_cluster_endpoint = module.eks_blueprints.eks_cluster_endpoint
eks_oidc_provider = module.eks_blueprints.oidc_provider
eks_cluster_version = module.eks_blueprints.eks_cluster_version

# EKS Managed Add-ons
enable_amazon_eks_vpc_cni = true
enable_amazon_eks_coredns = true
enable_amazon_eks_kube_proxy = true
enable_amazon_eks_vpc_cni = true
enable_amazon_eks_coredns = true
enable_amazon_eks_kube_proxy = true
enable_amazon_eks_aws_ebs_csi_driver = true

# EKS Blueprints Add-ons
enable_cert_manager = true
enable_cert_manager = true
enable_aws_load_balancer_controller = true
enable_aws_efs_csi_driver = true
enable_aws_fsx_csi_driver = true
enable_aws_efs_csi_driver = true
enable_aws_fsx_csi_driver = true

enable_nvidia_device_plugin = local.using_gpu

secrets_store_csi_driver_helm_config = {
namespace = "kube-system"
namespace = "kube-system"
version = "1.3.2"
set = [
{
name = "syncSecret.enabled",
name = "syncSecret.enabled",
value = "true"
}
]
Expand All @@ -166,7 +167,7 @@ module "eks_blueprints_kubernetes_addons" {
namespace = "kube-system"
set = [
{
name = "secrets-store-csi-driver.install",
name = "secrets-store-csi-driver.install",
value = "false"
}
]
Expand All @@ -192,33 +193,33 @@ module "eks_blueprints_outputs" {
module "kubeflow_components" {
source = "./cognito-rds-s3-components"

kf_helm_repo_path = local.kf_helm_repo_path
addon_context = module.eks_blueprints_outputs.addon_context
enable_aws_telemetry = var.enable_aws_telemetry
notebook_enable_culling = var.notebook_enable_culling
notebook_cull_idle_time = var.notebook_cull_idle_time
kf_helm_repo_path = local.kf_helm_repo_path
addon_context = module.eks_blueprints_outputs.addon_context
enable_aws_telemetry = var.enable_aws_telemetry
notebook_enable_culling = var.notebook_enable_culling
notebook_cull_idle_time = var.notebook_cull_idle_time
notebook_idleness_check_period = var.notebook_idleness_check_period

# rds
use_rds = var.use_rds
vpc_id = module.vpc.vpc_id
subnet_ids = var.publicly_accessible ? module.vpc.public_subnets : module.vpc.private_subnets
security_group_id = module.eks_blueprints.cluster_primary_security_group_id
db_name = var.db_name
db_username = var.db_username
db_password = var.db_password
db_class = var.db_class
mlmdb_name = var.mlmdb_name
db_allocated_storage = var.db_allocated_storage
mysql_engine_version = var.mysql_engine_version
backup_retention_period = var.backup_retention_period
storage_type = var.storage_type
deletion_protection = var.deletion_protection
max_allocated_storage = var.max_allocated_storage
publicly_accessible = var.publicly_accessible
multi_az = var.multi_az
use_rds = var.use_rds
vpc_id = module.vpc.vpc_id
subnet_ids = var.publicly_accessible ? module.vpc.public_subnets : module.vpc.private_subnets
security_group_id = module.eks_blueprints.cluster_primary_security_group_id
db_name = var.db_name
db_username = var.db_username
db_password = var.db_password
db_class = var.db_class
mlmdb_name = var.mlmdb_name
db_allocated_storage = var.db_allocated_storage
mysql_engine_version = var.mysql_engine_version
backup_retention_period = var.backup_retention_period
storage_type = var.storage_type
deletion_protection = var.deletion_protection
max_allocated_storage = var.max_allocated_storage
publicly_accessible = var.publicly_accessible
multi_az = var.multi_az
secret_recovery_window_in_days = var.secret_recovery_window_in_days
generate_db_password = var.generate_db_password
generate_db_password = var.generate_db_password

# s3
use_s3 = var.use_s3
Expand All @@ -228,15 +229,15 @@ module "kubeflow_components" {
minio_aws_secret_access_key = var.minio_aws_secret_access_key

# cognito
use_cognito = var.use_cognito
aws_route53_root_zone_name = var.aws_route53_root_zone_name
use_cognito = var.use_cognito
aws_route53_root_zone_name = var.aws_route53_root_zone_name
aws_route53_subdomain_zone_name = var.aws_route53_subdomain_zone_name
create_subdomain = var.create_subdomain
cognito_user_pool_name = var.cognito_user_pool_name
load_balancer_scheme = var.load_balancer_scheme
create_subdomain = var.create_subdomain
cognito_user_pool_name = var.cognito_user_pool_name
load_balancer_scheme = var.load_balancer_scheme

providers = {
aws = aws
aws = aws
aws.virginia = aws.virginia
}

Expand Down
Loading