From 74756d83b6db1422daa5775fa98aa84a34be659d Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Tue, 16 Jul 2024 22:45:15 +0200 Subject: [PATCH 01/29] Added gp3 storage class for etcd fast storage volume Signed-off-by: Ali Abbas Jaffri --- .../milvus/tf_module/gp3_storage_class.tpl | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl new file mode 100644 index 00000000..f36d15be --- /dev/null +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl @@ -0,0 +1,22 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: ebs-gp3-sc + annotations: + storageclass.kubernetes.io/is-default-class: "true" +provisioner: ebs.csi.aws.com +volumeBindingMode: WaitForFirstConsumer +allowVolumeExpansion: true +allowedTopologies: + - matchLabelExpressions: + # check which one is used + - key: topology.ebs.csi.aws.com/zone + values: + %{~ for az in availability_zones ~} + - ${az} + %{~ endfor ~} + - key: failure-domain.beta.kubernetes.io/zone + values: + - us-east-1a +parameters: + type: gp3 From 13535b7ee1a96092fe1ce9d4cd8d43bef2eb1b11 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Tue, 16 Jul 2024 23:19:55 +0200 Subject: [PATCH 02/29] Added milvus module Signed-off-by: Ali Abbas Jaffri --- .../vector_database/milvus/tf_module/main.tf | 259 ++++++++++++++++++ .../milvus/tf_module/outputs.tf | 0 .../milvus/tf_module/variables.tf | 48 ++++ 3 files changed, 307 insertions(+) create mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf create mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/outputs.tf create mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf new file mode 100644 index 00000000..746f5808 --- /dev/null +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf @@ -0,0 +1,259 @@ +resource "null_resource" "unset_default_storage_class" { + provisioner "local-exec" { + command = <<-EOT + kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' + EOT + } +} +resource "kubernetes_manifest" "gp3_storage_class" { + manifest = yamldecode(templatefile("${path.module}/gp3_storage_class.tpl", { + availability_zones = var.availability_zones + })) +} + +# TODO: possibility to bring your own bucket +module "milvus_data_artifacts_bucket" { + source = "../../../../../cloud/aws/s3" + count = var.remote_tracking ? 1 : 0 + + bucket_name = var.milvus_storage_bucket + tags = var.tags +} + +resource "aws_iam_policy" "milvus_s3_iam_policy" { + count = var.remote_tracking ? 1 : 0 + name_prefix = "MilvusS3AccessPolicy" + description = "Allows milvus server access to the S3 bucket" + + policy = < Date: Wed, 17 Jul 2024 22:44:01 +0200 Subject: [PATCH 03/29] Added examples for deploying milvus Signed-off-by: Ali Abbas Jaffri --- .../milvus/aws-milvus-advanced.yaml | 36 +++++++++++++++++++ examples/kubernetes/milvus/aws-milvus.yaml | 10 ++++++ 2 files changed, 46 insertions(+) create mode 100644 examples/kubernetes/milvus/aws-milvus-advanced.yaml create mode 100644 examples/kubernetes/milvus/aws-milvus.yaml diff --git a/examples/kubernetes/milvus/aws-milvus-advanced.yaml b/examples/kubernetes/milvus/aws-milvus-advanced.yaml new file mode 100644 index 00000000..f9eb79a2 --- /dev/null +++ b/examples/kubernetes/milvus/aws-milvus-advanced.yaml @@ -0,0 +1,36 @@ +name: aws-milvus-k8s +provider: + name: aws + account_id: "793009824629" + region: "eu-central-1" +deployment: + type: kubernetes + config: + vpc: + create_database_subnets: true + enable_nat_gateway: true + one_nat_gateway_per_az: false + kubernetes: + k8s_version: "1.28" + cluster_endpoint_public_access: true + spot_instance: false + tags: + vector_database: "milvus" + node_groups: + - name: milvus-node-group + instance_types: + - t3.medium + desired_size: 1 + min_size: 1 + max_size: 3 + disk_size: 20 +stack: + - vector_database:: + name: milvus + params: + remote_tracking: true + # mlflow_data_bucket_name: "mlflow-bucket" + tags: + # database_type: "postgres" + experiment_tracking: "milvus" + remote_tracking: true diff --git a/examples/kubernetes/milvus/aws-milvus.yaml b/examples/kubernetes/milvus/aws-milvus.yaml new file mode 100644 index 00000000..fb95ec3e --- /dev/null +++ b/examples/kubernetes/milvus/aws-milvus.yaml @@ -0,0 +1,10 @@ +name: aws-milvus-k8s +provider: + name: aws + account_id: "793009824629" + region: "eu-central-1" +deployment: + type: kubernetes +stack: + - vector_database: + name: milvus From bd4ba53a0088e8db6a564c60f1951d52f5664e20 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Tue, 27 Aug 2024 23:30:12 +0200 Subject: [PATCH 04/29] Updated mlflow IAM permission Signed-off-by: Ali Abbas Jaffri --- .../mlflow/tf_module/main.tf | 60 +++++++++++-------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/mlinfra/modules/applications/kubernetes/experiment_tracking/mlflow/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/experiment_tracking/mlflow/tf_module/main.tf index 3ca58859..172c7779 100644 --- a/src/mlinfra/modules/applications/kubernetes/experiment_tracking/mlflow/tf_module/main.tf +++ b/src/mlinfra/modules/applications/kubernetes/experiment_tracking/mlflow/tf_module/main.tf @@ -11,32 +11,42 @@ module "mlflow_data_artifacts_bucket" { resource "aws_iam_policy" "mlflow_s3_iam_policy" { count = var.remote_tracking ? 1 : 0 - name_prefix = "mlflowS3AccessPolicy" - description = "Allows mlflow server access to the S3 bucket" + name_prefix = "MLFlowS3Access-" + description = "Allows MLflow server access to the S3 bucket for artifact storage" - policy = < Date: Tue, 3 Sep 2024 22:57:02 +0200 Subject: [PATCH 05/29] Updated milvus server Signed-off-by: Ali Abbas Jaffri --- .../vector_database/milvus/tf_module/main.tf | 69 +++++++----- .../milvus/tf_module/values.yaml | 4 + .../milvus/tf_module/variables.tf | 104 ++++++++++++++++++ 3 files changed, 150 insertions(+), 27 deletions(-) create mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf index 746f5808..e48a68a0 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf @@ -22,32 +22,42 @@ module "milvus_data_artifacts_bucket" { resource "aws_iam_policy" "milvus_s3_iam_policy" { count = var.remote_tracking ? 1 : 0 - name_prefix = "MilvusS3AccessPolicy" - description = "Allows milvus server access to the S3 bucket" + name_prefix = "MilvusS3AccessPolicy-" + description = "Allows Milvus server access to the S3 bucket for data storage" - policy = < Date: Tue, 3 Sep 2024 23:53:40 +0200 Subject: [PATCH 06/29] Milvus deployment on kind cluster Signed-off-by: Ali Abbas Jaffri --- .../vector_database/milvus/milvus_kind.yaml | 9 +++ .../vector_database/milvus/tf_module/main.tf | 61 +++++++++++++++++++ .../milvus/tf_module/outputs.tf | 4 ++ .../milvus/tf_module/values.yaml | 1 + .../milvus/tf_module/variables.tf | 34 +++++++++++ 5 files changed, 109 insertions(+) create mode 100644 src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml create mode 100644 src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/main.tf create mode 100644 src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/outputs.tf create mode 100644 src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/values.yaml create mode 100644 src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml b/src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml new file mode 100644 index 00000000..72c4edc8 --- /dev/null +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml @@ -0,0 +1,9 @@ +inputs: + - name: milvus_chart_version + user_facing: true + description: Version of the Milvus Helm chart to use- + default: "4.2.9" +outputs: + - name: milvus_endpoint + description: Milvus access endpoint. + export: true diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/main.tf new file mode 100644 index 00000000..45b2ef6d --- /dev/null +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/main.tf @@ -0,0 +1,61 @@ +locals { + milvus_helmchart_set = [{ + name = "cluster.enabled" + value = "false" + type = "auto" + }, { + name = "pulsar.enabled" + value = "false" + type = "auto" + }, { + name = "etcd.replicaCount" + value = "1" + type = "auto" + }, { + name = "minio.mode" + value = "standalone" + type = "auto" + }, { + name = "ingress.enabled" + value = "true" + type = "auto" + }, { + name = "ingress.rules[0].host" + value = var.milvus_endpoint + type = "auto" + }, { + name = "ingress.rules[0].path" + value = "/" + type = "auto" + }, { + name = "ingress.rules[0].pathType" + value = "Prefix" + type = "auto" + }, { + name = "attu.enabled" + value = "true" + type = "auto" + }, { + name = "attu.ingress.enabled" + value = "true" + type = "auto" + }, { + name = "attu.ingress.hosts[0]" + value = "milvus-attu.localhost" + type = "auto" + }] +} + +module "milvus_helmchart" { + source = "../../../../../cloud/aws/helm_chart" + name = "milvus" + namespace = "milvus" + create_namespace = true + repository = "https://zilliztech.github.io/milvus-helm/" + chart = "milvus" + chart_version = var.milvus_chart_version + values = templatefile("${path.module}/values.yaml", { + resources = jsonencode(var.resources) + }) + set = local.milvus_helmchart_set +} diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/outputs.tf b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/outputs.tf new file mode 100644 index 00000000..204f7387 --- /dev/null +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/outputs.tf @@ -0,0 +1,4 @@ +output "milvus_endpoint" { + value = var.milvus_endpoint + description = "" +} diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/values.yaml b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/values.yaml new file mode 100644 index 00000000..9e141404 --- /dev/null +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/values.yaml @@ -0,0 +1 @@ +resources: ${resources} diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf new file mode 100644 index 00000000..00692b62 --- /dev/null +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf @@ -0,0 +1,34 @@ +variable "milvus_chart_version" { + type = string + description = "Version of the Milvus Helm chart to use" + default = "4.2.9" +} + +variable "resources" { + type = object({ + requests = object({ + cpu = string + memory = string + }) + limits = object({ + cpu = string + memory = string + }) + }) + description = "Resource requests and limits for Milvus pods" + default = { + requests = { + cpu = "100m" + memory = "128Mi" + } + limits = { + cpu = "500m" + memory = "512Mi" + } + } +} + +variable "milvus_endpoint" { + type = string + default = "milvus.localhost" +} From fccc3ed0a0691aac3b2ac24b77090d1e477e68d1 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Tue, 3 Sep 2024 23:54:26 +0200 Subject: [PATCH 07/29] Added milvus vector database to the examples Signed-off-by: Ali Abbas Jaffri --- examples/local/kind.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/local/kind.yaml b/examples/local/kind.yaml index b5d375d1..bf613a76 100644 --- a/examples/local/kind.yaml +++ b/examples/local/kind.yaml @@ -10,3 +10,5 @@ stack: name: mlflow - orchestrator: name: prefect + - vector_database: + name: milvus From c7cce01b7f33216f4c777d5956dca394f77bea54 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Thu, 5 Sep 2024 00:50:13 +0200 Subject: [PATCH 08/29] Updated example Signed-off-by: Ali Abbas Jaffri --- examples/kubernetes/milvus/aws-milvus-advanced.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/kubernetes/milvus/aws-milvus-advanced.yaml b/examples/kubernetes/milvus/aws-milvus-advanced.yaml index f9eb79a2..2f703f62 100644 --- a/examples/kubernetes/milvus/aws-milvus-advanced.yaml +++ b/examples/kubernetes/milvus/aws-milvus-advanced.yaml @@ -25,7 +25,7 @@ deployment: max_size: 3 disk_size: 20 stack: - - vector_database:: + - vector_database: name: milvus params: remote_tracking: true From d8667389bb509081e93a08bd7b8ed996b785f331 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Thu, 5 Sep 2024 00:50:34 +0200 Subject: [PATCH 09/29] Updated milvus Signed-off-by: Ali Abbas Jaffri --- .../milvus/milvus_kubernetes.yaml | 38 +++++++++ .../milvus/tf_module/gp3_storage_class.tpl | 5 +- .../vector_database/milvus/tf_module/main.tf | 78 +++++++++++++------ .../milvus/tf_module/values.yaml | 36 ++++++++- .../milvus/tf_module/variables.tf | 25 +++--- 5 files changed, 136 insertions(+), 46 deletions(-) create mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml new file mode 100644 index 00000000..b89f853f --- /dev/null +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml @@ -0,0 +1,38 @@ +inputs: + - name: oidc_provider_arn + user_facing: false + description: The ARN of the OIDC provider to use for authentication + value: module.eks.oidc_provider_arn + default: None + - name: oidc_provider + user_facing: false + description: The OIDC provider to use for authentication + value: module.eks.oidc_provider + default: None + - name: milvus_storage_bucket + user_facing: true + type: string + description: The name of the S3 bucket for Milvus storage + default: "milvus-storage-" + - name: tags + user_facing: true + type: map(string) + description: Tags to apply to the Milvus resources + default: + vector_database:: "milvus" + - name: service_account_namespace + user_facing: true + type: string + description: The namespace where the service account would be installed + default: milvus + - name: service_account_name + user_facing: true + type: string + description: The name of the service account to use + default: milvus + - name: milvus_chart_version + user_facing: true + type: string + description: The version of the Milvus Helm chart to use + default: "4.0.31" +outputs: diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl index f36d15be..72a6a673 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl @@ -9,14 +9,11 @@ volumeBindingMode: WaitForFirstConsumer allowVolumeExpansion: true allowedTopologies: - matchLabelExpressions: - # check which one is used + # check which key is used - key: topology.ebs.csi.aws.com/zone values: %{~ for az in availability_zones ~} - ${az} %{~ endfor ~} - - key: failure-domain.beta.kubernetes.io/zone - values: - - us-east-1a parameters: type: gp3 diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf index e48a68a0..14d12e91 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf @@ -1,14 +1,12 @@ -resource "null_resource" "unset_default_storage_class" { - provisioner "local-exec" { - command = <<-EOT - kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' - EOT - } +data "aws_region" "current" {} + +data "aws_availability_zones" "available" { + state = "available" } -resource "kubernetes_manifest" "gp3_storage_class" { - manifest = yamldecode(templatefile("${path.module}/gp3_storage_class.tpl", { - availability_zones = var.availability_zones - })) + +locals { + aws_region = data.aws_region.current.name + availability_zones = data.aws_availability_zones.available.names } # TODO: possibility to bring your own bucket @@ -44,12 +42,6 @@ resource "aws_iam_policy" "milvus_s3_iam_policy" { module.milvus_data_artifacts_bucket[0].bucket_arn, "${module.milvus_data_artifacts_bucket[0].bucket_arn}/*" ] - }, - { - Sid = "MilvusBucketList" - Effect = "Allow" - Action = ["s3:ListAllMyBuckets"] - Resource = ["*"] } ] }) @@ -86,6 +78,33 @@ resource "aws_iam_role" "milvus_iam_role" { tags = var.tags } +resource "null_resource" "unset_default_storage_class" { + provisioner "local-exec" { + command = <<-EOT + kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' + EOT + on_failure = continue + } + + triggers = { + always_run = "${timestamp()}" + } + + lifecycle { + create_before_destroy = true + } + depends_on = [aws_iam_role.milvus_iam_role] +} + +resource "kubernetes_manifest" "gp3_storage_class" { + manifest = yamldecode(templatefile("${path.module}/gp3_storage_class.tpl", { + availability_zones = local.availability_zones + })) + depends_on = [aws_iam_role.milvus_iam_role] + + # provider = kubernetes.eks +} + locals { milvus_helmchart_set = var.remote_tracking ? [{ name = "cluster.enabled" @@ -113,7 +132,7 @@ locals { type = "auto" }, { name = "externalS3.host" - value = "s3.${var.region}.amazonaws.com" + value = "s3.${local.aws_region}.amazonaws.com" type = "auto" }, { name = "externalS3.port" @@ -239,11 +258,19 @@ locals { name = "service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-nlb-target-type" value = "ip" type = "auto" + }, { + name = "standalone.persistence.enabled" + value = "false" + type = "auto" }] : [{ name = "cluster.enabled" value = "false" type = "auto" }, { + name = "pulsar.enabled" + value = "false" + type = "auto" + }, { name = "etcd.replicaCount" value = "1" type = "auto" @@ -251,6 +278,10 @@ locals { name = "minio.mode" value = "standalone" type = "auto" + }, { + name = "attu.enabled" + value = "true" + type = "auto" }] } @@ -259,16 +290,17 @@ module "milvus_helmchart" { name = "milvus" namespace = var.service_account_namespace create_namespace = true - repository = "https://milvus-io.github.io/milvus-helm" + repository = "https://zilliztech.github.io/milvus-helm/" chart = "milvus" chart_version = var.milvus_chart_version values = templatefile("${path.module}/values.yaml", { - nodeSelector = jsonencode(var.nodeSelector) - tolerations = jsonencode(var.tolerations) - affinity = jsonencode(var.affinity) - resources = jsonencode(var.resources) + remote_tracking = jsonencode(var.remote_tracking) + nodeSelector = jsonencode(var.nodeSelector) + tolerations = jsonencode(var.tolerations) + affinity = jsonencode(var.affinity) + resources = jsonencode(var.resources) }) set = local.milvus_helmchart_set - depends_on = [kubernetes_manifest.gp3_storage_class] + depends_on = [aws_iam_role.milvus_iam_role] } diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml index 778f1259..814f73f9 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml @@ -1,4 +1,32 @@ -nodeSelector: ${nodeSelector} -tolerations: ${tolerations} -affinity: ${affinity} -resources: ${resources} +configuration: &configuration + nodeSelector: ${nodeSelector} + tolerations: ${tolerations} + affinity: ${affinity} + +<<: *configuration + +etcd: + <<: *configuration + +mixCoordinator: + <<: *configuration +# rootCoordinator: +# <<: *configuration + +# indexCoordinator: +# <<: *configuration + +# queryCoordinator: +# <<: *configuration + +# dataCoordinator: +# <<: *configuration + +# proxy: +# <<: *configuration + +minio: + <<: *configuration + +standalone: + <<: *configuration diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf index 00d41dfb..fe7699bb 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf @@ -1,45 +1,40 @@ variable "oidc_provider_arn" { type = string description = "The ARN of the OIDC provider to use for authentication" - default = null } variable "oidc_provider" { type = string description = "The OIDC provider to use for authentication" - default = null -} - -variable "availability_zones" { - type = list(string) } variable "remote_tracking" { - type = bool + type = bool + default = false } variable "milvus_storage_bucket" { - type = string + type = string + default = "milvus-storage-" } variable "tags" { type = map(string) + default = { + "vector_database" = "milvus" + } } variable "service_account_namespace" { type = string description = "The namespace where the service account would be installed" - default = "" + default = "milvus" } variable "service_account_name" { type = string - description = "The name of the service account to use for " - default = "-sa" -} - -variable "region" { - type = string + description = "The name of the service account to use for Milvus" + default = "milvus-sa" } variable "milvus_chart_version" { From cdcd8b07e45fabacd3f15d98f207ce99256f4008 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Thu, 5 Sep 2024 00:54:46 +0200 Subject: [PATCH 10/29] Bumped k8s version to 1.29 Signed-off-by: Ali Abbas Jaffri --- src/mlinfra/modules/cloud/aws/eks/eks.yaml | 4 ++-- src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mlinfra/modules/cloud/aws/eks/eks.yaml b/src/mlinfra/modules/cloud/aws/eks/eks.yaml index da2abff3..f2c52e74 100644 --- a/src/mlinfra/modules/cloud/aws/eks/eks.yaml +++ b/src/mlinfra/modules/cloud/aws/eks/eks.yaml @@ -16,7 +16,7 @@ inputs: - name: k8s_version user_facing: true description: "EKS Cluster version" - default: "1.28" + default: "1.29" - name: cluster_endpoint_private_access user_facing: true description: "Indicates whether the Amazon EKS private API server endpoint is enabled. Default is true. Read more here: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html" @@ -83,7 +83,7 @@ inputs: user_facing: true description: "Tags for EKS Cluster" default: - cluster_version: "1.28" + cluster_version: "1.29" outputs: clouds: - aws diff --git a/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf b/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf index 3ac32a18..b153a963 100644 --- a/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf +++ b/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf @@ -27,7 +27,7 @@ variable "cluster_name" { variable "k8s_version" { type = string description = "EKS Cluster version" - default = "1.28" + default = "1.29" } variable "vpc_id" { From 52fb394b0576ee22551b1bb246b71d286d4e23a6 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Wed, 11 Sep 2024 00:00:08 +0200 Subject: [PATCH 11/29] Bumped k8s version Signed-off-by: Ali Abbas Jaffri --- src/mlinfra/modules/cloud/aws/eks/eks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mlinfra/modules/cloud/aws/eks/eks.yaml b/src/mlinfra/modules/cloud/aws/eks/eks.yaml index f2c52e74..370edd3b 100644 --- a/src/mlinfra/modules/cloud/aws/eks/eks.yaml +++ b/src/mlinfra/modules/cloud/aws/eks/eks.yaml @@ -16,7 +16,7 @@ inputs: - name: k8s_version user_facing: true description: "EKS Cluster version" - default: "1.29" + default: "1.30" - name: cluster_endpoint_private_access user_facing: true description: "Indicates whether the Amazon EKS private API server endpoint is enabled. Default is true. Read more here: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html" From 8ec1024d1b9e489d7102625a194673daaeb3983d Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 15 Sep 2024 21:43:09 +0200 Subject: [PATCH 12/29] Updated examples for Milvus on k8s Signed-off-by: Ali Abbas Jaffri --- examples/kubernetes/milvus/aws-milvus-advanced.yaml | 2 +- examples/kubernetes/milvus/aws-milvus.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/kubernetes/milvus/aws-milvus-advanced.yaml b/examples/kubernetes/milvus/aws-milvus-advanced.yaml index 2f703f62..edc3d791 100644 --- a/examples/kubernetes/milvus/aws-milvus-advanced.yaml +++ b/examples/kubernetes/milvus/aws-milvus-advanced.yaml @@ -11,7 +11,7 @@ deployment: enable_nat_gateway: true one_nat_gateway_per_az: false kubernetes: - k8s_version: "1.28" + k8s_version: "1.30" cluster_endpoint_public_access: true spot_instance: false tags: diff --git a/examples/kubernetes/milvus/aws-milvus.yaml b/examples/kubernetes/milvus/aws-milvus.yaml index fb95ec3e..ec2f1943 100644 --- a/examples/kubernetes/milvus/aws-milvus.yaml +++ b/examples/kubernetes/milvus/aws-milvus.yaml @@ -5,6 +5,13 @@ provider: region: "eu-central-1" deployment: type: kubernetes + config: + kubernetes: + k8s_version: "1.30" + instance_types: + - "m7i.2xlarge" stack: - vector_database: name: milvus + params: + remote_tracking: true From 1a8892a145a14bc7021a0b13d686842e73f92f8b Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 15 Sep 2024 21:44:30 +0200 Subject: [PATCH 13/29] Parametrized helm chart timeout Signed-off-by: Ali Abbas Jaffri --- src/mlinfra/modules/cloud/aws/helm_chart/main.tf | 1 + src/mlinfra/modules/cloud/aws/helm_chart/variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/mlinfra/modules/cloud/aws/helm_chart/main.tf b/src/mlinfra/modules/cloud/aws/helm_chart/main.tf index bc54b56e..1360f420 100644 --- a/src/mlinfra/modules/cloud/aws/helm_chart/main.tf +++ b/src/mlinfra/modules/cloud/aws/helm_chart/main.tf @@ -7,6 +7,7 @@ resource "helm_release" "helm_chart" { version = var.chart_version cleanup_on_fail = var.cleanup_on_fail atomic = true + timeout = var.timeout values = [var.values] dynamic "set" { diff --git a/src/mlinfra/modules/cloud/aws/helm_chart/variables.tf b/src/mlinfra/modules/cloud/aws/helm_chart/variables.tf index a441708e..a0df2f27 100644 --- a/src/mlinfra/modules/cloud/aws/helm_chart/variables.tf +++ b/src/mlinfra/modules/cloud/aws/helm_chart/variables.tf @@ -42,6 +42,12 @@ variable "atomic" { default = true } +variable "timeout" { + type = number + description = "Time in seconds to wait for any individual kubernetes operation. Defaults to 300 seconds." + default = 300 +} + variable "values" { type = any description = "Chart values" From 6046c55a7d59ff6d44ce09dda42413d157833e99 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 15 Sep 2024 21:44:35 +0200 Subject: [PATCH 14/29] Added module to deploy milvus to k8s with and without remote configuration Signed-off-by: Ali Abbas Jaffri --- .../milvus/milvus_kubernetes.yaml | 4 ++ .../vector_database/milvus/tf_module/main.tf | 40 ++++++++++++++----- .../milvus/tf_module/values.yaml | 37 ++++++++++++----- .../milvus/tf_module/variables.tf | 2 +- 4 files changed, 61 insertions(+), 22 deletions(-) diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml index b89f853f..237ae51d 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml @@ -35,4 +35,8 @@ inputs: type: string description: The version of the Milvus Helm chart to use default: "4.0.31" + - name: remote_tracking + user_facing: true + description: + default: false outputs: diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf index 14d12e91..291c14fe 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf @@ -73,7 +73,7 @@ resource "aws_iam_role" "milvus_iam_role" { } ] }) - managed_policy_arns = aws_iam_policy.milvus_s3_iam_policy[0].arn + managed_policy_arns = [aws_iam_policy.milvus_s3_iam_policy[0].arn] tags = var.tags } @@ -96,15 +96,28 @@ resource "null_resource" "unset_default_storage_class" { depends_on = [aws_iam_role.milvus_iam_role] } -resource "kubernetes_manifest" "gp3_storage_class" { - manifest = yamldecode(templatefile("${path.module}/gp3_storage_class.tpl", { - availability_zones = local.availability_zones - })) - depends_on = [aws_iam_role.milvus_iam_role] - - # provider = kubernetes.eks +resource "kubernetes_storage_class" "ebs_gp3_sc" { + metadata { + name = "ebs-gp3-sc" + annotations = { + "storageclass.kubernetes.io/is-default-class" = "true" + } + } + storage_provisioner = "ebs.csi.aws.com" + volume_binding_mode = "WaitForFirstConsumer" + allow_volume_expansion = true + allowed_topologies { + match_label_expressions { + key = "topology.ebs.csi.aws.com/zone" + values = [for az in local.availability_zones : az] + } + } + parameters = { + type = "gp3" + } } + locals { milvus_helmchart_set = var.remote_tracking ? [{ name = "cluster.enabled" @@ -144,7 +157,7 @@ locals { type = "auto" }, { name = "externalS3.bucketName" - value = "${module.milvus_data_artifacts_bucket.bucket_id}" + value = "${module.milvus_data_artifacts_bucket[0].bucket_id}" type = "auto" }, { name = "externalS3.useIAM" @@ -300,7 +313,12 @@ module "milvus_helmchart" { affinity = jsonencode(var.affinity) resources = jsonencode(var.resources) }) - set = local.milvus_helmchart_set + timeout = 600 + set = local.milvus_helmchart_set - depends_on = [aws_iam_role.milvus_iam_role] + depends_on = [aws_iam_role.milvus_iam_role, kubernetes_storage_class.ebs_gp3_sc] } +# - effect: NoSchedule +# key: nodegroup_type +# operator: Equal +# value: operations diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml index 814f73f9..70f5ed58 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml @@ -5,25 +5,42 @@ configuration: &configuration <<: *configuration +pulsar: + zookeeper: + <<: *configuration + bookkeeper: + <<: *configuration + autorecovery: + <<: *configuration + broker: + <<: *configuration + proxy: + <<: *configuration + pulsar_metadata: + <<: *configuration + pulsar_manager: + <<: *configuration + etcd: <<: *configuration mixCoordinator: <<: *configuration -# rootCoordinator: -# <<: *configuration -# indexCoordinator: -# <<: *configuration +rootCoordinator: + <<: *configuration -# queryCoordinator: -# <<: *configuration +indexCoordinator: + <<: *configuration -# dataCoordinator: -# <<: *configuration +queryCoordinator: + <<: *configuration -# proxy: -# <<: *configuration +dataCoordinator: + <<: *configuration + +proxy: + <<: *configuration minio: <<: *configuration diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf index fe7699bb..b49980af 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf @@ -39,7 +39,7 @@ variable "service_account_name" { variable "milvus_chart_version" { type = string - default = "4.0.31" + default = "4.2.11" } variable "resources" { From 9e01bd5ec04cdb0d677faf09e6e20d70463a9b53 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 15 Sep 2024 23:25:09 +0200 Subject: [PATCH 15/29] Updated helm chart values file Signed-off-by: Ali Abbas Jaffri --- .../milvus/tf_module/values.yaml | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml index 70f5ed58..1bec7bb2 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml @@ -16,34 +16,52 @@ pulsar: <<: *configuration proxy: <<: *configuration + toolset: + <<: *configuration pulsar_metadata: <<: *configuration pulsar_manager: <<: *configuration + pulsar-init: + <<: *configuration + bookkeeper-init: + <<: *configuration -etcd: +standalone: <<: *configuration -mixCoordinator: +proxy: <<: *configuration rootCoordinator: <<: *configuration +queryCoordinator: + <<: *configuration + +queryNode: + <<: *configuration + indexCoordinator: <<: *configuration -queryCoordinator: +indexNode: <<: *configuration dataCoordinator: <<: *configuration -proxy: +dataNode: <<: *configuration -minio: +mixCoordinator: <<: *configuration -standalone: +streamingNode: + <<: *configuration + +etcd: + <<: *configuration + +minio: <<: *configuration From 1c7e0cb0798668306c024eb7ec1543559828d0f8 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 15 Sep 2024 23:26:05 +0200 Subject: [PATCH 16/29] Updated milvus main terraform Signed-off-by: Ali Abbas Jaffri --- .../kubernetes/vector_database/milvus/tf_module/main.tf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf index 291c14fe..0631a6ac 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf @@ -318,7 +318,3 @@ module "milvus_helmchart" { depends_on = [aws_iam_role.milvus_iam_role, kubernetes_storage_class.ebs_gp3_sc] } -# - effect: NoSchedule -# key: nodegroup_type -# operator: Equal -# value: operations From 70b267de96f6b208e788c6965c15cf14dc31dea7 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 00:09:16 +0200 Subject: [PATCH 17/29] Deleted gp3 storage template Signed-off-by: Ali Abbas Jaffri --- .../milvus/tf_module/gp3_storage_class.tpl | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl deleted file mode 100644 index 72a6a673..00000000 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/gp3_storage_class.tpl +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: ebs-gp3-sc - annotations: - storageclass.kubernetes.io/is-default-class: "true" -provisioner: ebs.csi.aws.com -volumeBindingMode: WaitForFirstConsumer -allowVolumeExpansion: true -allowedTopologies: - - matchLabelExpressions: - # check which key is used - - key: topology.ebs.csi.aws.com/zone - values: - %{~ for az in availability_zones ~} - - ${az} - %{~ endfor ~} -parameters: - type: gp3 From 289fd176106198582b0d0ded39719d20d470fb67 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 00:09:38 +0200 Subject: [PATCH 18/29] Updated storageclass for milvus helm chart Signed-off-by: Ali Abbas Jaffri --- .../vector_database/milvus/tf_module/main.tf | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf index 0631a6ac..3d2f59cd 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf @@ -96,9 +96,9 @@ resource "null_resource" "unset_default_storage_class" { depends_on = [aws_iam_role.milvus_iam_role] } -resource "kubernetes_storage_class" "ebs_gp3_sc" { +resource "kubernetes_storage_class" "gp3_storageclass" { metadata { - name = "ebs-gp3-sc" + name = "gp3" annotations = { "storageclass.kubernetes.io/is-default-class" = "true" } @@ -275,6 +275,14 @@ locals { name = "standalone.persistence.enabled" value = "false" type = "auto" + }, { + name = "log.format" + value = "json" + type = "auto" + }, { + name = "etcd.persistence.storageClass" + value = "gp3" + type = "auto" }] : [{ name = "cluster.enabled" value = "false" @@ -288,13 +296,25 @@ locals { value = "1" type = "auto" }, { + name = "etcd.persistence.storageClass" + value = "gp3" + type = "auto" + }, { name = "minio.mode" value = "standalone" type = "auto" }, { + name = "minio.persistence.storageClass" + value = "gp3" + type = "auto" + }, { name = "attu.enabled" value = "true" type = "auto" + }, { + name = "standalone.persistence.persistentVolumeClaim.storageClass" + value = "gp3" + type = "auto" }] } @@ -316,5 +336,5 @@ module "milvus_helmchart" { timeout = 600 set = local.milvus_helmchart_set - depends_on = [aws_iam_role.milvus_iam_role, kubernetes_storage_class.ebs_gp3_sc] + depends_on = [aws_iam_role.milvus_iam_role, kubernetes_storage_class.gp3_storageclass] } From a158a6dfc835ea35fe5e9cfebf9a6983c23ff139 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 00:13:02 +0200 Subject: [PATCH 19/29] Bumped vector_database helm chart version Signed-off-by: Ali Abbas Jaffri --- .../applications/kind/vector_database/milvus/milvus_kind.yaml | 2 +- .../kind/vector_database/milvus/tf_module/variables.tf | 2 +- .../kubernetes/vector_database/milvus/milvus_kubernetes.yaml | 2 +- .../kubernetes/vector_database/milvus/tf_module/variables.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml b/src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml index 72c4edc8..7cd616be 100644 --- a/src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/milvus_kind.yaml @@ -2,7 +2,7 @@ inputs: - name: milvus_chart_version user_facing: true description: Version of the Milvus Helm chart to use- - default: "4.2.9" + default: "4.2.12" outputs: - name: milvus_endpoint description: Milvus access endpoint. diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf index 00692b62..b61866ac 100644 --- a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf @@ -1,7 +1,7 @@ variable "milvus_chart_version" { type = string description = "Version of the Milvus Helm chart to use" - default = "4.2.9" + default = "4.2.12" } variable "resources" { diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml index 237ae51d..8f0d2efa 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml @@ -34,7 +34,7 @@ inputs: user_facing: true type: string description: The version of the Milvus Helm chart to use - default: "4.0.31" + default: "4.2.12" - name: remote_tracking user_facing: true description: diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf index b49980af..6cad9d91 100644 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf +++ b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf @@ -39,7 +39,7 @@ variable "service_account_name" { variable "milvus_chart_version" { type = string - default = "4.2.11" + default = "4.2.12" } variable "resources" { From a2bda60939886748c972b19c58c11478caa2a855 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 00:15:55 +0200 Subject: [PATCH 20/29] Updated documentation label Signed-off-by: Ali Abbas Jaffri --- .github/release-changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-changelog.yaml b/.github/release-changelog.yaml index c6fbc785..57218899 100644 --- a/.github/release-changelog.yaml +++ b/.github/release-changelog.yaml @@ -18,4 +18,4 @@ changelog: - dependencies - title: Documentation Updates labels: - - docs + - documentation From 568523cacf68df3a39ec17c6d7f29f5b5e766932 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 00:44:27 +0200 Subject: [PATCH 21/29] Updated ingress path for milvus db Signed-off-by: Ali Abbas Jaffri --- .../kind/vector_database/milvus/tf_module/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf index b61866ac..1f05f1b8 100644 --- a/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf +++ b/src/mlinfra/modules/applications/kind/vector_database/milvus/tf_module/variables.tf @@ -30,5 +30,5 @@ variable "resources" { variable "milvus_endpoint" { type = string - default = "milvus.localhost" + default = "milvus-attu.localhost" } From eca39151c991469b811f80f03e40b2dca6aa638b Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 00:45:03 +0200 Subject: [PATCH 22/29] Updated kind node versions Signed-off-by: Ali Abbas Jaffri --- .../kind/k8s/tf_module/kind_cluster/variables.tf | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mlinfra/modules/local/kind/k8s/tf_module/kind_cluster/variables.tf b/src/mlinfra/modules/local/kind/k8s/tf_module/kind_cluster/variables.tf index b42b4467..aeca7489 100644 --- a/src/mlinfra/modules/local/kind/k8s/tf_module/kind_cluster/variables.tf +++ b/src/mlinfra/modules/local/kind/k8s/tf_module/kind_cluster/variables.tf @@ -6,19 +6,20 @@ variable "cluster_name" { variable "node_image" { type = map(any) - description = "Sets Kubernetes image version for the KinD cluster" + description = "Sets Kubernetes image version for the KinD cluster. See versions on https://hub.docker.com/r/kindest/node/tags" default = { - "1.27" = "kindest/node:v1.27.11" - "1.28" = "kindest/node:v1.28.7" - "1.29" = "kindest/node:v1.29.2" - "1.30" = "kindest/node:v1.30.0" + "1.27" = "kindest/node:v1.27.16" + "1.28" = "kindest/node:v1.28.13" + "1.29" = "kindest/node:v1.29.8" + "1.30" = "kindest/node:v1.30.4" + "1.31" = "kindest/node:v1.31.0" } } variable "k8s_version" { type = string description = "Defines kubernetes version for the KinD cluster" - default = "1.29" + default = "1.30" } variable "wait_for_control_plane" { From e1ced76a041c94770bcb65b5dd68fb3963a40128 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 23:22:22 +0200 Subject: [PATCH 23/29] Removed milvus vdb from k8s Signed-off-by: Ali Abbas Jaffri --- .../milvus/milvus_kubernetes.yaml | 42 --- .../vector_database/milvus/tf_module/main.tf | 340 ------------------ .../milvus/tf_module/outputs.tf | 0 .../milvus/tf_module/values.yaml | 67 ---- .../milvus/tf_module/variables.tf | 147 -------- 5 files changed, 596 deletions(-) delete mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml delete mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf delete mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/outputs.tf delete mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml delete mode 100644 src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml deleted file mode 100644 index 8f0d2efa..00000000 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/milvus_kubernetes.yaml +++ /dev/null @@ -1,42 +0,0 @@ -inputs: - - name: oidc_provider_arn - user_facing: false - description: The ARN of the OIDC provider to use for authentication - value: module.eks.oidc_provider_arn - default: None - - name: oidc_provider - user_facing: false - description: The OIDC provider to use for authentication - value: module.eks.oidc_provider - default: None - - name: milvus_storage_bucket - user_facing: true - type: string - description: The name of the S3 bucket for Milvus storage - default: "milvus-storage-" - - name: tags - user_facing: true - type: map(string) - description: Tags to apply to the Milvus resources - default: - vector_database:: "milvus" - - name: service_account_namespace - user_facing: true - type: string - description: The namespace where the service account would be installed - default: milvus - - name: service_account_name - user_facing: true - type: string - description: The name of the service account to use - default: milvus - - name: milvus_chart_version - user_facing: true - type: string - description: The version of the Milvus Helm chart to use - default: "4.2.12" - - name: remote_tracking - user_facing: true - description: - default: false -outputs: diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf deleted file mode 100644 index 3d2f59cd..00000000 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/main.tf +++ /dev/null @@ -1,340 +0,0 @@ -data "aws_region" "current" {} - -data "aws_availability_zones" "available" { - state = "available" -} - -locals { - aws_region = data.aws_region.current.name - availability_zones = data.aws_availability_zones.available.names -} - -# TODO: possibility to bring your own bucket -module "milvus_data_artifacts_bucket" { - source = "../../../../../cloud/aws/s3" - count = var.remote_tracking ? 1 : 0 - - bucket_name = var.milvus_storage_bucket - tags = var.tags -} - -resource "aws_iam_policy" "milvus_s3_iam_policy" { - count = var.remote_tracking ? 1 : 0 - name_prefix = "MilvusS3AccessPolicy-" - description = "Allows Milvus server access to the S3 bucket for data storage" - - policy = jsonencode({ - Version = "2012-10-17" - Statement = [ - { - Sid = "MilvusBucketAccess" - Effect = "Allow" - Action = [ - "s3:GetObject", - "s3:PutObject", - "s3:DeleteObject", - "s3:ListBucket", - "s3:GetBucketLocation", - "s3:AbortMultipartUpload", - "s3:ListMultipartUploadParts" - ] - Resource = [ - module.milvus_data_artifacts_bucket[0].bucket_arn, - "${module.milvus_data_artifacts_bucket[0].bucket_arn}/*" - ] - } - ] - }) - - tags = merge(var.tags, { - Name = "MilvusS3AccessPolicy" - Purpose = "Milvus data storage" - }) -} - -resource "aws_iam_role" "milvus_iam_role" { - count = var.remote_tracking ? 1 : 0 - name_prefix = "RoleForMilvusWithS3Access" - assume_role_policy = jsonencode({ - Version = "2012-10-17" - Statement : [ - { - "Effect" : "Allow", - "Principal" : { - "Federated" : var.oidc_provider_arn - }, - "Action" : "sts:AssumeRoleWithWebIdentity", - "Condition" : { - "StringEquals" : { - "${var.oidc_provider}:aud" : "sts.amazonaws.com", - "${var.oidc_provider}:sub" : "system:serviceaccount:${var.service_account_namespace}:${var.service_account_name}" - } - } - } - ] - }) - managed_policy_arns = [aws_iam_policy.milvus_s3_iam_policy[0].arn] - - tags = var.tags -} - -resource "null_resource" "unset_default_storage_class" { - provisioner "local-exec" { - command = <<-EOT - kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' - EOT - on_failure = continue - } - - triggers = { - always_run = "${timestamp()}" - } - - lifecycle { - create_before_destroy = true - } - depends_on = [aws_iam_role.milvus_iam_role] -} - -resource "kubernetes_storage_class" "gp3_storageclass" { - metadata { - name = "gp3" - annotations = { - "storageclass.kubernetes.io/is-default-class" = "true" - } - } - storage_provisioner = "ebs.csi.aws.com" - volume_binding_mode = "WaitForFirstConsumer" - allow_volume_expansion = true - allowed_topologies { - match_label_expressions { - key = "topology.ebs.csi.aws.com/zone" - values = [for az in local.availability_zones : az] - } - } - parameters = { - type = "gp3" - } -} - - -locals { - milvus_helmchart_set = var.remote_tracking ? [{ - name = "cluster.enabled" - value = "true" - type = "auto" - }, { - name = "serviceAccount.create" - value = "true" - type = "auto" - }, { - name = "serviceAccount.name" - value = "${var.service_account_name}" - type = "auto" - }, { - name = "serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn" - value = "${aws_iam_role.milvus_iam_role[0].arn}" - type = "auto" - }, { - name = "minio.enabled" - value = "false" - type = "auto" - }, { - name = "externalS3.enabled" - value = "true" - type = "auto" - }, { - name = "externalS3.host" - value = "s3.${local.aws_region}.amazonaws.com" - type = "auto" - }, { - name = "externalS3.port" - value = "443" - type = "auto" - }, { - name = "externalS3.useSSL" - value = "true" - type = "auto" - }, { - name = "externalS3.bucketName" - value = "${module.milvus_data_artifacts_bucket[0].bucket_id}" - type = "auto" - }, { - name = "externalS3.useIAM" - value = "true" - type = "auto" - }, { - name = "externalS3.cloudProvider" - value = "aws" - type = "auto" - }, { - name = "rootCoordinator.replicas" - value = "2" - type = "auto" - }, { - name = "rootCoordinator.activeStandby.enabled" - value = "true" - type = "auto" - }, { - name = "rootCoordinator.resources.limits.cpu" - value = "1" - type = "auto" - }, { - name = "rootCoordinator.resources.limits.memory" - value = "2Gi" - type = "auto" - }, { - name = "indexCoordinator.replicas" - value = "2" - type = "auto" - }, { - name = "indexCoordinator.activeStandby.enabled" - value = "true" - type = "auto" - }, { - name = "indexCoordinator.resources.limits.cpu" - value = "0.5" - type = "auto" - }, { - name = "indexCoordinator.resources.limits.memory" - value = "0.5Gi" - type = "auto" - }, { - name = "queryCoordinator.replicas" - value = "2" - type = "auto" - }, { - name = "queryCoordinator.activeStandby.enabled" - value = "true" - type = "auto" - }, { - name = "queryCoordinator.resources.limits.cpu" - value = "0.5" - type = "auto" - }, { - name = "queryCoordinator.resources.limits.memory" - value = "0.5Gi" - type = "auto" - }, { - name = "dataCoordinator.replicas" - value = "2" - type = "auto" - }, { - name = "dataCoordinator.activeStandby.enabled" - value = "true" - type = "auto" - }, { - name = "dataCoordinator.resources.limits.cpu" - value = "0.5" - type = "auto" - }, { - name = "dataCoordinator.resources.limits.memory" - value = "0.5Gi" - type = "auto" - }, { - name = "proxy.replicas" - value = "2" - type = "auto" - }, { - name = "proxy.resources.limits.cpu" - value = "1" - type = "auto" - }, { - name = "proxy.resources.limits.memory" - value = "2Gi" - type = "auto" - }, { - name = "attu.enabled" - value = "true" - type = "auto" - }, { - name = "service.type" - value = "LoadBalancer" - type = "auto" - }, { - name = "service.port" - value = "19530" - type = "auto" - }, { - name = "service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-type" - value = "external" - type = "auto" - }, { - name = "service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-name" - value = "milvus-service" - type = "auto" - }, { - name = "service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-scheme" - value = "internal" - type = "auto" - }, { - name = "service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-nlb-target-type" - value = "ip" - type = "auto" - }, { - name = "standalone.persistence.enabled" - value = "false" - type = "auto" - }, { - name = "log.format" - value = "json" - type = "auto" - }, { - name = "etcd.persistence.storageClass" - value = "gp3" - type = "auto" - }] : [{ - name = "cluster.enabled" - value = "false" - type = "auto" - }, { - name = "pulsar.enabled" - value = "false" - type = "auto" - }, { - name = "etcd.replicaCount" - value = "1" - type = "auto" - }, { - name = "etcd.persistence.storageClass" - value = "gp3" - type = "auto" - }, { - name = "minio.mode" - value = "standalone" - type = "auto" - }, { - name = "minio.persistence.storageClass" - value = "gp3" - type = "auto" - }, { - name = "attu.enabled" - value = "true" - type = "auto" - }, { - name = "standalone.persistence.persistentVolumeClaim.storageClass" - value = "gp3" - type = "auto" - }] -} - -module "milvus_helmchart" { - source = "../../../../../cloud/aws/helm_chart" - name = "milvus" - namespace = var.service_account_namespace - create_namespace = true - repository = "https://zilliztech.github.io/milvus-helm/" - chart = "milvus" - chart_version = var.milvus_chart_version - values = templatefile("${path.module}/values.yaml", { - remote_tracking = jsonencode(var.remote_tracking) - nodeSelector = jsonencode(var.nodeSelector) - tolerations = jsonencode(var.tolerations) - affinity = jsonencode(var.affinity) - resources = jsonencode(var.resources) - }) - timeout = 600 - set = local.milvus_helmchart_set - - depends_on = [aws_iam_role.milvus_iam_role, kubernetes_storage_class.gp3_storageclass] -} diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/outputs.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/outputs.tf deleted file mode 100644 index e69de29b..00000000 diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml deleted file mode 100644 index 1bec7bb2..00000000 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/values.yaml +++ /dev/null @@ -1,67 +0,0 @@ -configuration: &configuration - nodeSelector: ${nodeSelector} - tolerations: ${tolerations} - affinity: ${affinity} - -<<: *configuration - -pulsar: - zookeeper: - <<: *configuration - bookkeeper: - <<: *configuration - autorecovery: - <<: *configuration - broker: - <<: *configuration - proxy: - <<: *configuration - toolset: - <<: *configuration - pulsar_metadata: - <<: *configuration - pulsar_manager: - <<: *configuration - pulsar-init: - <<: *configuration - bookkeeper-init: - <<: *configuration - -standalone: - <<: *configuration - -proxy: - <<: *configuration - -rootCoordinator: - <<: *configuration - -queryCoordinator: - <<: *configuration - -queryNode: - <<: *configuration - -indexCoordinator: - <<: *configuration - -indexNode: - <<: *configuration - -dataCoordinator: - <<: *configuration - -dataNode: - <<: *configuration - -mixCoordinator: - <<: *configuration - -streamingNode: - <<: *configuration - -etcd: - <<: *configuration - -minio: - <<: *configuration diff --git a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf b/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf deleted file mode 100644 index 6cad9d91..00000000 --- a/src/mlinfra/modules/applications/kubernetes/vector_database/milvus/tf_module/variables.tf +++ /dev/null @@ -1,147 +0,0 @@ -variable "oidc_provider_arn" { - type = string - description = "The ARN of the OIDC provider to use for authentication" -} - -variable "oidc_provider" { - type = string - description = "The OIDC provider to use for authentication" -} - -variable "remote_tracking" { - type = bool - default = false -} - -variable "milvus_storage_bucket" { - type = string - default = "milvus-storage-" -} - -variable "tags" { - type = map(string) - default = { - "vector_database" = "milvus" - } -} - -variable "service_account_namespace" { - type = string - description = "The namespace where the service account would be installed" - default = "milvus" -} - -variable "service_account_name" { - type = string - description = "The name of the service account to use for Milvus" - default = "milvus-sa" -} - -variable "milvus_chart_version" { - type = string - default = "4.2.12" -} - -variable "resources" { - type = map(any) - description = "The resources to allocate to each mlflow pod" - default = { - requests = { - cpu = "100m" - memory = "1024Mi" - } - limits = { - cpu = "500m" - memory = "4096Mi" - } - } - validation { - condition = ( - alltrue([ - for resource in keys(var.resources) : - can(resource) && can(var.resources[resource]) && var.resources[resource] != "" && - contains(["requests", "limits"], resource) && - alltrue([ - for subresource in keys(var.resources[resource]) : - can(subresource) && can(var.resources[resource][subresource]) && var.resources[resource][subresource] != "" && - contains(["cpu", "memory"], subresource) && - (subresource == "cpu" ? can(regex("^[0-9]+m?$", var.resources[resource][subresource])) : true) && - (subresource == "memory" ? can(regex("^[0-9]+(Mi|Mb|Gi|Gb)?$", var.resources[resource][subresource])) : true) - ]) - ]) - ) - error_message = "Each resource must have 'requests' or 'limits' with 'cpu' and 'memory' along with their values. CPU should be in the format '100m' or '1' and memory should be in the format '128Mi' or '1Gi'" - } -} - -variable "nodeSelector" { - type = map(any) - description = "The nodeSelector to schedule mlflow pods on specific nodes" - validation { - condition = ( - alltrue([ - for selector in keys(var.nodeSelector) : - can(selector) && can(var.nodeSelector[selector]) && var.nodeSelector[selector] != "" - ]) - ) - error_message = "Each nodeSelector must have a key and a non-empty value" - } - default = { - "nodegroup_type" = "operations" - } -} - -variable "tolerations" { - type = list(any) - description = "The tolerations to schedule mlflow pods on specific nodes" - validation { - condition = ( - alltrue([ - for toleration in var.tolerations : - can(toleration.key) && - contains(["Equal", "Exists"], toleration.operator) && - can(toleration.value) && - contains(["NoSchedule", "PreferNoSchedule", "NoExecute"], toleration.effect) - ]) - ) - error_message = "Each toleration must have operator set to 'Equal' or 'Exists' and effect set to 'NoSchedule', 'PreferNoSchedule' or 'NoExecute' along with key and value" - } - default = [{ - key = "nodegroup_type" - operator = "Equal" - value = "operations" - effect = "NoSchedule" - }] -} - -variable "affinity" { - type = map(any) - description = "The affinity to schedule mlflow pods on specific nodes" - validation { - condition = ( - alltrue([ - for affinity in var.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms : - alltrue([ - for expression in affinity.matchExpressions : - can(expression.key) && - contains(["In", "NotIn", "Exists", "DoesNotExist", "Gt", "Lt"], expression.operator) && - can(expression.values) - ]) - ]) - ) - error_message = "Each matchExpression must have operator set to 'In', 'NotIn', 'Exists', 'DoesNotExist', 'Gt', 'Lt' along with key and values" - } - default = { - "nodeAffinity" = { - "requiredDuringSchedulingIgnoredDuringExecution" = { - "nodeSelectorTerms" = [{ - "matchExpressions" = [{ - key = "nodegroup_type" - operator = "In" - values = ["operations"] - }] - }] - } - } - } -} From 8b6451ab9dcf83a79223337373c67d14254c5894 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 23:31:08 +0200 Subject: [PATCH 24/29] Updated release_notes file name Signed-off-by: Ali Abbas Jaffri --- docs/RELEASE_NOTES.md | 2 +- mkdocs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index aa3b82da..10a24569 120000 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1 +1 @@ -../RELEASE_NOTES.md \ No newline at end of file +../release_notes.md \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index a3ae62c2..b2b17f67 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,7 +34,7 @@ nav: - kubernetes: code/aws/kubernetes.md - Contributing: CONTRIBUTING.md - Reporting Security Vulnerabilities: SECURITY.md - - Release Notes: RELEASE_NOTES.md + - Release Notes: release_notes.md - Acknowledgements: acknowledgements.md - About Me: about_me.md not_in_nav: | From b7188f33ff6157a6da1455163cacfc80ef86e6d3 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 23:31:28 +0200 Subject: [PATCH 25/29] Removed kubernetes milvus examples Signed-off-by: Ali Abbas Jaffri --- .../milvus/aws-milvus-advanced.yaml | 36 ------------------- examples/kubernetes/milvus/aws-milvus.yaml | 17 --------- 2 files changed, 53 deletions(-) delete mode 100644 examples/kubernetes/milvus/aws-milvus-advanced.yaml delete mode 100644 examples/kubernetes/milvus/aws-milvus.yaml diff --git a/examples/kubernetes/milvus/aws-milvus-advanced.yaml b/examples/kubernetes/milvus/aws-milvus-advanced.yaml deleted file mode 100644 index edc3d791..00000000 --- a/examples/kubernetes/milvus/aws-milvus-advanced.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: aws-milvus-k8s -provider: - name: aws - account_id: "793009824629" - region: "eu-central-1" -deployment: - type: kubernetes - config: - vpc: - create_database_subnets: true - enable_nat_gateway: true - one_nat_gateway_per_az: false - kubernetes: - k8s_version: "1.30" - cluster_endpoint_public_access: true - spot_instance: false - tags: - vector_database: "milvus" - node_groups: - - name: milvus-node-group - instance_types: - - t3.medium - desired_size: 1 - min_size: 1 - max_size: 3 - disk_size: 20 -stack: - - vector_database: - name: milvus - params: - remote_tracking: true - # mlflow_data_bucket_name: "mlflow-bucket" - tags: - # database_type: "postgres" - experiment_tracking: "milvus" - remote_tracking: true diff --git a/examples/kubernetes/milvus/aws-milvus.yaml b/examples/kubernetes/milvus/aws-milvus.yaml deleted file mode 100644 index ec2f1943..00000000 --- a/examples/kubernetes/milvus/aws-milvus.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: aws-milvus-k8s -provider: - name: aws - account_id: "793009824629" - region: "eu-central-1" -deployment: - type: kubernetes - config: - kubernetes: - k8s_version: "1.30" - instance_types: - - "m7i.2xlarge" -stack: - - vector_database: - name: milvus - params: - remote_tracking: true From e4334acc001ed85a68bba462643714881c3686c0 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 23:37:41 +0200 Subject: [PATCH 26/29] Updated kind examples Signed-off-by: Ali Abbas Jaffri --- examples/local/kind-advanced.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/local/kind-advanced.yaml b/examples/local/kind-advanced.yaml index 349bbded..1994898a 100644 --- a/examples/local/kind-advanced.yaml +++ b/examples/local/kind-advanced.yaml @@ -5,7 +5,7 @@ deployment: type: kind config: kubernetes: - k8s_version: 1.29 + k8s_version: "1.30" stack: - data_versioning: name: lakefs @@ -13,3 +13,5 @@ stack: name: mlflow - orchestrator: name: prefect + - vector_database: + name: milvus From a3373cd65753ebb995170461b69753577f09e472 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 23:42:11 +0200 Subject: [PATCH 27/29] Updated eks k8s version to 1.30 Signed-off-by: Ali Abbas Jaffri --- src/mlinfra/modules/cloud/aws/eks/eks.yaml | 2 +- .../modules/cloud/aws/eks_nodegroup/tf_module/variables.tf | 2 +- .../test_deployment_processor/test_kubernetes_deployment.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mlinfra/modules/cloud/aws/eks/eks.yaml b/src/mlinfra/modules/cloud/aws/eks/eks.yaml index 370edd3b..440ef49a 100644 --- a/src/mlinfra/modules/cloud/aws/eks/eks.yaml +++ b/src/mlinfra/modules/cloud/aws/eks/eks.yaml @@ -83,7 +83,7 @@ inputs: user_facing: true description: "Tags for EKS Cluster" default: - cluster_version: "1.29" + cluster_version: "1.30" outputs: clouds: - aws diff --git a/src/mlinfra/modules/cloud/aws/eks_nodegroup/tf_module/variables.tf b/src/mlinfra/modules/cloud/aws/eks_nodegroup/tf_module/variables.tf index 0820afca..3a1e6a2c 100644 --- a/src/mlinfra/modules/cloud/aws/eks_nodegroup/tf_module/variables.tf +++ b/src/mlinfra/modules/cloud/aws/eks_nodegroup/tf_module/variables.tf @@ -28,7 +28,7 @@ variable "cluster_name" { variable "cluster_version" { type = string description = "EKS Cluster version" - default = "1.28" + default = "1.30" } variable "nodegroup_name" { diff --git a/tests/test_stack_processor/test_deployment_processor/test_kubernetes_deployment.py b/tests/test_stack_processor/test_deployment_processor/test_kubernetes_deployment.py index 1b0de287..f227c73d 100644 --- a/tests/test_stack_processor/test_deployment_processor/test_kubernetes_deployment.py +++ b/tests/test_stack_processor/test_deployment_processor/test_kubernetes_deployment.py @@ -41,7 +41,7 @@ def test_specified_provider_not_supported(self): "subnet_cidr_blocks": ["10.0.1.0/24", "10.0.2.0/24"], }, "kubernetes": { - "cluster_version": "1.28", + "cluster_version": "1.30", "node_groups": [ { "name": "worker-group", From 617d69f276a4a469ac7d43b77481d798f66b1b6e Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 23:46:12 +0200 Subject: [PATCH 28/29] Updated k8s version Signed-off-by: Ali Abbas Jaffri --- examples/kubernetes/complete/aws-complete-advanced.yaml | 2 +- examples/kubernetes/lakefs/aws-lakefs-advanced.yaml | 2 +- examples/kubernetes/mlflow/aws-mlflow-advanced.yaml | 2 +- examples/kubernetes/prefect/aws-prefect-advanced.yaml | 2 +- src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf | 2 +- src/mlinfra/modules/local/kind/k8s/k8s.yaml | 2 +- src/mlinfra/modules/local/kind/k8s/tf_module/variables.tf | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/kubernetes/complete/aws-complete-advanced.yaml b/examples/kubernetes/complete/aws-complete-advanced.yaml index 2a1f6bb6..be0fd605 100644 --- a/examples/kubernetes/complete/aws-complete-advanced.yaml +++ b/examples/kubernetes/complete/aws-complete-advanced.yaml @@ -11,7 +11,7 @@ deployment: enable_nat_gateway: true one_nat_gateway_per_az: false kubernetes: - k8s_version: "1.28" + k8s_version: "1.30" cluster_endpoint_public_access: true spot_instance: false tags: diff --git a/examples/kubernetes/lakefs/aws-lakefs-advanced.yaml b/examples/kubernetes/lakefs/aws-lakefs-advanced.yaml index b81adece..1b393e82 100644 --- a/examples/kubernetes/lakefs/aws-lakefs-advanced.yaml +++ b/examples/kubernetes/lakefs/aws-lakefs-advanced.yaml @@ -11,7 +11,7 @@ deployment: enable_nat_gateway: true one_nat_gateway_per_az: false kubernetes: - k8s_version: "1.28" + k8s_version: "1.30" cluster_endpoint_public_access: true spot_instance: false tags: diff --git a/examples/kubernetes/mlflow/aws-mlflow-advanced.yaml b/examples/kubernetes/mlflow/aws-mlflow-advanced.yaml index 46843c1c..890e4dc6 100644 --- a/examples/kubernetes/mlflow/aws-mlflow-advanced.yaml +++ b/examples/kubernetes/mlflow/aws-mlflow-advanced.yaml @@ -11,7 +11,7 @@ deployment: enable_nat_gateway: true one_nat_gateway_per_az: false kubernetes: - k8s_version: "1.28" + k8s_version: "1.30" cluster_endpoint_public_access: true spot_instance: false tags: diff --git a/examples/kubernetes/prefect/aws-prefect-advanced.yaml b/examples/kubernetes/prefect/aws-prefect-advanced.yaml index 71bcd580..f5461089 100644 --- a/examples/kubernetes/prefect/aws-prefect-advanced.yaml +++ b/examples/kubernetes/prefect/aws-prefect-advanced.yaml @@ -11,7 +11,7 @@ deployment: enable_nat_gateway: true one_nat_gateway_per_az: false kubernetes: - k8s_version: "1.29" + k8s_version: "1.30" cluster_endpoint_public_access: true spot_instance: false tags: diff --git a/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf b/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf index b153a963..f2be4706 100644 --- a/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf +++ b/src/mlinfra/modules/cloud/aws/eks/tf_module/variables.tf @@ -27,7 +27,7 @@ variable "cluster_name" { variable "k8s_version" { type = string description = "EKS Cluster version" - default = "1.29" + default = "1.30" } variable "vpc_id" { diff --git a/src/mlinfra/modules/local/kind/k8s/k8s.yaml b/src/mlinfra/modules/local/kind/k8s/k8s.yaml index d84e2d20..efcdfdb9 100644 --- a/src/mlinfra/modules/local/kind/k8s/k8s.yaml +++ b/src/mlinfra/modules/local/kind/k8s/k8s.yaml @@ -6,7 +6,7 @@ inputs: - name: k8s_version user_facing: true description: "KinD Cluster version" - default: "1.28" + default: "1.30" - name: wait_for_control_plane user_facing: true description: "Defines wether or not the provider will wait for the control plane to be ready. Defaults to false." diff --git a/src/mlinfra/modules/local/kind/k8s/tf_module/variables.tf b/src/mlinfra/modules/local/kind/k8s/tf_module/variables.tf index 2df22b56..dcf0726a 100644 --- a/src/mlinfra/modules/local/kind/k8s/tf_module/variables.tf +++ b/src/mlinfra/modules/local/kind/k8s/tf_module/variables.tf @@ -7,7 +7,7 @@ variable "cluster_name" { variable "k8s_version" { type = string description = "Defines kubernetes version for the KinD cluster" - default = "1.29" + default = "1.30" } variable "wait_for_control_plane" { From 75c4582584ce014d8a226ceee1453b426bdeffc4 Mon Sep 17 00:00:00 2001 From: Ali Abbas Jaffri Date: Sun, 6 Oct 2024 23:56:45 +0200 Subject: [PATCH 29/29] Renamed release notes Signed-off-by: Ali Abbas Jaffri --- docs/RELEASE_NOTES.md | 2 +- mkdocs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 10a24569..aa3b82da 120000 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1 +1 @@ -../release_notes.md \ No newline at end of file +../RELEASE_NOTES.md \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index b2b17f67..a3ae62c2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,7 +34,7 @@ nav: - kubernetes: code/aws/kubernetes.md - Contributing: CONTRIBUTING.md - Reporting Security Vulnerabilities: SECURITY.md - - Release Notes: release_notes.md + - Release Notes: RELEASE_NOTES.md - Acknowledgements: acknowledgements.md - About Me: about_me.md not_in_nav: |