diff --git a/.github/workflows/aws-integration-test.yml b/.github/workflows/aws-integration-test.yml new file mode 100644 index 00000000..39fa910e --- /dev/null +++ b/.github/workflows/aws-integration-test.yml @@ -0,0 +1,103 @@ +permissions: + contents: read +name: LocalStack AWS Integration Test +on: + workflow_call: + workflow_dispatch: +jobs: + aws_modular_integration_test: + name: aws_modular_integration_test + runs-on: ubuntu-latest + services: + setup-localstack-service: + image: localstack/localstack + ports: + - '4566:4566' + env: + SERVICES: 's3,iam,sts' + DEFAULT_REGION: eu-north-1 + FORCE_NONINTERACTIVE: 1 + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test + steps: + - name: Checkout Repository + uses: actions/checkout@v4.1.1 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3.0.0 + with: + terraform_version: 1.6.0 + + - name: Copy Override File + run: | + cp tests/integration/_override.tf src/mlstacks/terraform/aws-modular/_override.tf + + - name: Apply Terraform Configuration + run: | + export TF_CLI_ARGS_apply="-compact-warnings" + terraform init -backend-config="path=./terraform.tfstate" + terraform validate + terraform apply -auto-approve -var-file="../../../../tests/integration/aws-modular/local.tfvars" + working-directory: src/mlstacks/terraform/aws-modular + + - name: Refresh Terraform State + run: terraform refresh + working-directory: src/mlstacks/terraform/aws-modular + + - name: Output Stack YAML Path + id: set_output + run: | + OUTPUT=$(terraform-bin output -raw stack-yaml-path) + echo "stack_yaml_path=$OUTPUT" >> $GITHUB_OUTPUT + working-directory: src/mlstacks/terraform/aws-modular + env: + terraform_wrapper: false + + - name: Run Tests to Verify Resource Provisioning + run: | + STACK_YAML_PATH="${{ steps.set_output.outputs.stack_yaml_path }}" + ABSOLUTE_PATH="${GITHUB_WORKSPACE}/src/mlstacks/terraform/aws-modular/${STACK_YAML_PATH}" + ../../../../tests/integration/aws-modular/verify_stack.sh "$ABSOLUTE_PATH" + working-directory: src/mlstacks/terraform/aws-modular + + aws_remote_state_integration_test: + name: aws_remote_state_integration_test + runs-on: ubuntu-latest + services: + setup-localstack-service: + image: localstack/localstack + ports: + - '4566:4566' + env: + SERVICES: 's3,dynamodb,iam,sts' + DEFAULT_REGION: eu-north-1 + FORCE_NONINTERACTIVE: 1 + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test + steps: + - name: Checkout Repository + uses: actions/checkout@v4.1.1 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3.0.0 + with: + terraform_version: 1.6.0 + + - name: Copy Override File + run: | + cp tests/integration/_override.tf src/mlstacks/terraform/aws-remote-state/_override.tf + + - name: Apply Terraform Configuration for aws-remote-state + run: | + export TF_CLI_ARGS_apply="-compact-warnings" + cd src/mlstacks/terraform/aws-remote-state + terraform init -backend-config="path=./terraform.tfstate" + terraform validate + terraform apply -auto-approve -var-file="../../../../tests/integration/aws-remote-state/local.tfvars" + + - name: Run Tests to Verify Resource Provisioning + run: ./tests/integration/aws-remote-state/verify_stack.sh + env: + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test + AWS_DEFAULT_REGION: eu-north-1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7590d4e7..4b9e05dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,6 +111,10 @@ jobs: files: "." config: ./.typos.toml + localstack-aws-integration-test: + uses: ./.github/workflows/aws-integration-test.yml + secrets: inherit + aws_test: name: aws_test runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17c69b52..ec0c4e93 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,6 +101,13 @@ if any existing recipes cover their creation. ``` git checkout -b develop ``` + or, if that doesn't work: + ``` + git checkout -b origin/develop + ``` + +This alternative can be useful in cases where your local develop branch is out of sync with the remote repository, or if you want to ensure that your new branch is based on the most recent changes from the remote repository. + 2. Fetch the latest changes from the remote `develop` branch: ``` git fetch origin develop diff --git a/aws-kubeflow-kserve/aws_account.tf b/aws-kubeflow-kserve/aws_account.tf index fe500848..79012195 100644 --- a/aws-kubeflow-kserve/aws_account.tf +++ b/aws-kubeflow-kserve/aws_account.tf @@ -1,2 +1,6 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # fetch the current account ID for use in container registry URL -data "aws_caller_identity" "current" {} \ No newline at end of file +data "aws_caller_identity" "current" {} diff --git a/aws-kubeflow-kserve/configure_docker.tf b/aws-kubeflow-kserve/configure_docker.tf index 3c6be2e6..292140cd 100644 --- a/aws-kubeflow-kserve/configure_docker.tf +++ b/aws-kubeflow-kserve/configure_docker.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { provisioner "local-exec" { command = "aws ecr get-login-password --region ${local.region} | docker login --username AWS --password-stdin ${data.aws_caller_identity.current.account_id}.dkr.ecr.${local.region}.amazonaws.com" } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/configure_kubectl.tf b/aws-kubeflow-kserve/configure_kubectl.tf index 540a1f2c..2322a21f 100644 --- a/aws-kubeflow-kserve/configure_kubectl.tf +++ b/aws-kubeflow-kserve/configure_kubectl.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { provisioner "local-exec" { command = "aws eks --region ${local.region} update-kubeconfig --name ${data.aws_eks_cluster.cluster.name} --alias terraform" } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/ecr.tf b/aws-kubeflow-kserve/ecr.tf index 44f2b4c3..1b1892cc 100644 --- a/aws-kubeflow-kserve/ecr.tf +++ b/aws-kubeflow-kserve/ecr.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # add an optional container registry resource "aws_ecr_repository" "zenml-ecr-repository" { name = local.ecr.name image_tag_mutability = "MUTABLE" count = local.ecr.enable_container_registry ? 1 : 0 tags = local.tags -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/eks.tf b/aws-kubeflow-kserve/eks.tf index 5019d16f..ef717fe5 100644 --- a/aws-kubeflow-kserve/eks.tf +++ b/aws-kubeflow-kserve/eks.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # eks module to create a cluster # newer versions of it had some error so going with v17.23.0 for now module "eks" { diff --git a/aws-kubeflow-kserve/get_URIs.tf b/aws-kubeflow-kserve/get_URIs.tf index bdd06596..3062ae6e 100644 --- a/aws-kubeflow-kserve/get_URIs.tf +++ b/aws-kubeflow-kserve/get_URIs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # get URI for MLflow tracking server data "kubernetes_service" "mlflow_tracking" { metadata { @@ -18,4 +22,4 @@ data "kubernetes_service" "kserve_ingress" { depends_on = [ module.kserve ] -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/helm.tf b/aws-kubeflow-kserve/helm.tf index fa871487..55498628 100644 --- a/aws-kubeflow-kserve/helm.tf +++ b/aws-kubeflow-kserve/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -5,4 +9,4 @@ provider "helm" { cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data) token = data.aws_eks_cluster_auth.cluster.token } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/kserve-module/cert_manager.tf b/aws-kubeflow-kserve/kserve-module/cert_manager.tf index 08aaf290..eb5e78da 100644 --- a/aws-kubeflow-kserve/kserve-module/cert_manager.tf +++ b/aws-kubeflow-kserve/kserve-module/cert_manager.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a cert-manager release resource "helm_release" "cert-manager" { name = "cert-manager" diff --git a/aws-kubeflow-kserve/kserve-module/istio.tf b/aws-kubeflow-kserve/kserve-module/istio.tf index 182db859..893a53b7 100644 --- a/aws-kubeflow-kserve/kserve-module/istio.tf +++ b/aws-kubeflow-kserve/kserve-module/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up istio for kserve resource "null_resource" "create-istio-kserve" { provisioner "local-exec" { @@ -32,4 +36,4 @@ resource "null_resource" "create-istio-kserve" { depends_on = [ null_resource.create-knative-serving, ] -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/kserve-module/knative_serving.tf b/aws-kubeflow-kserve/kserve-module/knative_serving.tf index d031133b..5b3bc198 100644 --- a/aws-kubeflow-kserve/kserve-module/knative_serving.tf +++ b/aws-kubeflow-kserve/kserve-module/knative_serving.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up istio for kserve resource "null_resource" "create-knative-serving" { provisioner "local-exec" { @@ -17,4 +21,4 @@ resource "null_resource" "create-knative-serving" { command = "kubectl delete -f https://github.com/knative/serving/releases/download/knative-v1.6.0/serving-core.yaml" } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/kserve-module/kserve.tf b/aws-kubeflow-kserve/kserve-module/kserve.tf index 3621fb73..80e68e10 100644 --- a/aws-kubeflow-kserve/kserve-module/kserve.tf +++ b/aws-kubeflow-kserve/kserve-module/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up istio for kserve resource "null_resource" "kserve" { provisioner "local-exec" { @@ -26,4 +30,4 @@ resource "kubernetes_namespace" "workloads" { metadata { name = var.workloads_namespace } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/kserve-module/providers.tf b/aws-kubeflow-kserve/kserve-module/providers.tf index 174c38ce..15aede9e 100644 --- a/aws-kubeflow-kserve/kserve-module/providers.tf +++ b/aws-kubeflow-kserve/kserve-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/aws-kubeflow-kserve/kserve-module/variables.tf b/aws-kubeflow-kserve/kserve-module/variables.tf index 6b3a0a82..24388e04 100644 --- a/aws-kubeflow-kserve/kserve-module/variables.tf +++ b/aws-kubeflow-kserve/kserve-module/variables.tf @@ -1,5 +1,9 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # namespace to create inference services in variable "workloads_namespace" { type = string default = "zenml-workloads" -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/kserve.tf b/aws-kubeflow-kserve/kserve.tf index 9dce38f5..2e35b780 100644 --- a/aws-kubeflow-kserve/kserve.tf +++ b/aws-kubeflow-kserve/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "kserve" { source = "./kserve-module" diff --git a/aws-kubeflow-kserve/kubeflow.tf b/aws-kubeflow-kserve/kubeflow.tf index 890c994c..25156e83 100644 --- a/aws-kubeflow-kserve/kubeflow.tf +++ b/aws-kubeflow-kserve/kubeflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up kubeflow resource "null_resource" "kubeflow" { provisioner "local-exec" { @@ -30,4 +34,4 @@ resource "null_resource" "kubeflow" { null_resource.configure-local-kubectl, module.eks, ] -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/kubernetes.tf b/aws-kubeflow-kserve/kubernetes.tf index 3ebf79e8..df91ce71 100644 --- a/aws-kubeflow-kserve/kubernetes.tf +++ b/aws-kubeflow-kserve/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" # not defining the kubernetes provider throws an error while running the eks module provider "kubernetes" { @@ -10,4 +14,4 @@ provider "kubectl" { host = data.aws_eks_cluster.cluster.endpoint cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data) token = data.aws_eks_cluster_auth.cluster.token -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/locals.tf b/aws-kubeflow-kserve/locals.tf index 79cb1660..7b5c1e68 100644 --- a/aws-kubeflow-kserve/locals.tf +++ b/aws-kubeflow-kserve/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "kflow" @@ -39,4 +43,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/mlflow-module/README.md b/aws-kubeflow-kserve/mlflow-module/README.md index 3b0ff546..711588bf 100644 --- a/aws-kubeflow-kserve/mlflow-module/README.md +++ b/aws-kubeflow-kserve/mlflow-module/README.md @@ -1,5 +1,8 @@ # MLflow Terraform Module +**Deprecation warning:** this code and documentation has been deprecated. Please +visit the corresponding location from `src/mlstacks/terraform` for the latest code and documentation. + ## Input Variables Input | Description diff --git a/aws-kubeflow-kserve/mlflow-module/ingress.tf b/aws-kubeflow-kserve/mlflow-module/ingress.tf index 4b1f4f1d..b1cb2472 100644 --- a/aws-kubeflow-kserve/mlflow-module/ingress.tf +++ b/aws-kubeflow-kserve/mlflow-module/ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up the nginx ingress controller and the ingress with basic auth resource "kubernetes_namespace" "nginx-ns" { @@ -43,4 +47,4 @@ resource "kubernetes_ingress_v1" "mlflow-ingress" { } } } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/mlflow-module/mlflow.tf b/aws-kubeflow-kserve/mlflow-module/mlflow.tf index 1bca43de..6189593c 100644 --- a/aws-kubeflow-kserve/mlflow-module/mlflow.tf +++ b/aws-kubeflow-kserve/mlflow-module/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the mlflow tracking server deployment resource "helm_release" "mlflow-tracking" { @@ -63,4 +67,4 @@ resource "helm_release" "mlflow-tracking" { name = "artifactRoot.gcs.bucket" value = var.artifact_GCS_Bucket } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/mlflow-module/output.tf b/aws-kubeflow-kserve/mlflow-module/output.tf index 2d83335a..634cbf72 100644 --- a/aws-kubeflow-kserve/mlflow-module/output.tf +++ b/aws-kubeflow-kserve/mlflow-module/output.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-controller-name" { value = helm_release.nginx-controller.name } output "ingress-controller-namespace" { value = kubernetes_namespace.nginx-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/mlflow-module/providers.tf b/aws-kubeflow-kserve/mlflow-module/providers.tf index 174c38ce..15aede9e 100644 --- a/aws-kubeflow-kserve/mlflow-module/providers.tf +++ b/aws-kubeflow-kserve/mlflow-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/aws-kubeflow-kserve/mlflow-module/secret.tf b/aws-kubeflow-kserve/mlflow-module/secret.tf index 60b2fb7d..126754b9 100644 --- a/aws-kubeflow-kserve/mlflow-module/secret.tf +++ b/aws-kubeflow-kserve/mlflow-module/secret.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a secret with user credentials resource "kubernetes_secret" "name" { metadata { @@ -10,4 +14,4 @@ resource "kubernetes_secret" "name" { data = { "auth" = var.htpasswd } -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/mlflow-module/variables.tf b/aws-kubeflow-kserve/mlflow-module/variables.tf index 45de778b..1a5be9b4 100644 --- a/aws-kubeflow-kserve/mlflow-module/variables.tf +++ b/aws-kubeflow-kserve/mlflow-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "htpasswd" {} variable "kubernetes_sa" { @@ -52,4 +56,4 @@ variable "artifact_GCS" { variable "artifact_GCS_Bucket" { type = string default = "" -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/mlflow.tf b/aws-kubeflow-kserve/mlflow.tf index ba4ac73f..731a0db6 100644 --- a/aws-kubeflow-kserve/mlflow.tf +++ b/aws-kubeflow-kserve/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "./mlflow-module" @@ -17,4 +21,4 @@ module "mlflow" { resource "htpasswd_password" "hash" { password = var.mlflow-password -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/output_file.tf b/aws-kubeflow-kserve/output_file.tf index 844e3fd7..4f6490e6 100644 --- a/aws-kubeflow-kserve/output_file.tf +++ b/aws-kubeflow-kserve/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -39,4 +43,4 @@ resource "local_file" "stack_file" { configuration: {"kubernetes_context": "terraform", "kubernetes_namespace": "${local.kserve.workloads_namespace}", "base_url": "http://${data.kubernetes_service.kserve_ingress.status.0.load_balancer.0.ingress.0.hostname}:${data.kubernetes_service.kserve_ingress.spec.0.port.1.port}", "secret": "aws_kserve_secret"} ADD filename = "./aws_kflow_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/outputs.tf b/aws-kubeflow-kserve/outputs.tf index 94e985a7..21ebcdcc 100644 --- a/aws-kubeflow-kserve/outputs.tf +++ b/aws-kubeflow-kserve/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # output for eks cluster output "eks-cluster-name" { value = data.aws_eks_cluster.cluster.name @@ -47,4 +51,4 @@ output "kserve-base-url" { # output the name of the stack YAML file created output "stack-yaml-path" { value = local_file.stack_file.filename -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/s3.tf b/aws-kubeflow-kserve/s3.tf index 9f71c5be..6d459a63 100644 --- a/aws-kubeflow-kserve/s3.tf +++ b/aws-kubeflow-kserve/s3.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # creste s3 bucket for storing artifacts resource "aws_s3_bucket" "zenml-artifact-store" { bucket = "${local.prefix}-${local.s3.name}" @@ -22,4 +26,4 @@ resource "aws_s3_bucket_public_access_block" "example" { block_public_acls = true block_public_policy = true -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/terraform.tf b/aws-kubeflow-kserve/terraform.tf index aca2b0c2..ed79a893 100644 --- a/aws-kubeflow-kserve/terraform.tf +++ b/aws-kubeflow-kserve/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -41,4 +45,4 @@ terraform { provider "aws" { region = local.region -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/variables.tf b/aws-kubeflow-kserve/variables.tf index 60175c8d..31defd58 100644 --- a/aws-kubeflow-kserve/variables.tf +++ b/aws-kubeflow-kserve/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for the MLflow tracking server variable "mlflow-artifact-S3-access-key" { description = "Your AWS access key for using S3 as MLflow artifact store" @@ -25,4 +29,4 @@ variable "zenml-version" { description = "The version of ZenML being used" default = "0.12.0" type = string -} \ No newline at end of file +} diff --git a/aws-kubeflow-kserve/vpc.tf b/aws-kubeflow-kserve/vpc.tf index b0e7a409..f91f8bf0 100644 --- a/aws-kubeflow-kserve/vpc.tf +++ b/aws-kubeflow-kserve/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # VPC infra using https://github.com/terraform-aws-modules/terraform-aws-vpc module "vpc" { source = "terraform-aws-modules/vpc/aws" @@ -15,4 +19,4 @@ module "vpc" { enable_dns_hostnames = true tags = local.tags -} \ No newline at end of file +} diff --git a/aws-minimal/.terraformignore b/aws-minimal/.terraformignore index e69de29b..fb4846f6 100644 --- a/aws-minimal/.terraformignore +++ b/aws-minimal/.terraformignore @@ -0,0 +1,4 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + diff --git a/aws-minimal/aws_account.tf b/aws-minimal/aws_account.tf index fe500848..79012195 100644 --- a/aws-minimal/aws_account.tf +++ b/aws-minimal/aws_account.tf @@ -1,2 +1,6 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # fetch the current account ID for use in container registry URL -data "aws_caller_identity" "current" {} \ No newline at end of file +data "aws_caller_identity" "current" {} diff --git a/aws-minimal/configure_docker.tf b/aws-minimal/configure_docker.tf index 3c6be2e6..292140cd 100644 --- a/aws-minimal/configure_docker.tf +++ b/aws-minimal/configure_docker.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { provisioner "local-exec" { command = "aws ecr get-login-password --region ${local.region} | docker login --username AWS --password-stdin ${data.aws_caller_identity.current.account_id}.dkr.ecr.${local.region}.amazonaws.com" } -} \ No newline at end of file +} diff --git a/aws-minimal/configure_kubectl.tf b/aws-minimal/configure_kubectl.tf index 540a1f2c..2322a21f 100644 --- a/aws-minimal/configure_kubectl.tf +++ b/aws-minimal/configure_kubectl.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { provisioner "local-exec" { command = "aws eks --region ${local.region} update-kubeconfig --name ${data.aws_eks_cluster.cluster.name} --alias terraform" } -} \ No newline at end of file +} diff --git a/aws-minimal/ecr.tf b/aws-minimal/ecr.tf index 44f2b4c3..1b1892cc 100644 --- a/aws-minimal/ecr.tf +++ b/aws-minimal/ecr.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # add an optional container registry resource "aws_ecr_repository" "zenml-ecr-repository" { name = local.ecr.name image_tag_mutability = "MUTABLE" count = local.ecr.enable_container_registry ? 1 : 0 tags = local.tags -} \ No newline at end of file +} diff --git a/aws-minimal/eks.tf b/aws-minimal/eks.tf index 5a18a1fd..fcb4c2be 100644 --- a/aws-minimal/eks.tf +++ b/aws-minimal/eks.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # eks module to create a cluster # newer versions of it had some error so going with v17.23.0 for now module "eks" { diff --git a/aws-minimal/get_URIs.tf b/aws-minimal/get_URIs.tf index 07c42af2..38998a45 100644 --- a/aws-minimal/get_URIs.tf +++ b/aws-minimal/get_URIs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # get URI for MLflow tracking server data "kubernetes_service" "mlflow_tracking" { metadata { @@ -18,4 +22,4 @@ data "kubernetes_service" "seldon_ingress" { depends_on = [ module.seldon ] -} \ No newline at end of file +} diff --git a/aws-minimal/helm.tf b/aws-minimal/helm.tf index fa871487..55498628 100644 --- a/aws-minimal/helm.tf +++ b/aws-minimal/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -5,4 +9,4 @@ provider "helm" { cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data) token = data.aws_eks_cluster_auth.cluster.token } -} \ No newline at end of file +} diff --git a/aws-minimal/kubernetes.tf b/aws-minimal/kubernetes.tf index 3ebf79e8..df91ce71 100644 --- a/aws-minimal/kubernetes.tf +++ b/aws-minimal/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" # not defining the kubernetes provider throws an error while running the eks module provider "kubernetes" { @@ -10,4 +14,4 @@ provider "kubectl" { host = data.aws_eks_cluster.cluster.endpoint cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data) token = data.aws_eks_cluster_auth.cluster.token -} \ No newline at end of file +} diff --git a/aws-minimal/locals.tf b/aws-minimal/locals.tf index f13815f8..e133085a 100644 --- a/aws-minimal/locals.tf +++ b/aws-minimal/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" @@ -35,4 +39,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/aws-minimal/mlflow-module/ingress.tf b/aws-minimal/mlflow-module/ingress.tf index 4b1f4f1d..b1cb2472 100644 --- a/aws-minimal/mlflow-module/ingress.tf +++ b/aws-minimal/mlflow-module/ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up the nginx ingress controller and the ingress with basic auth resource "kubernetes_namespace" "nginx-ns" { @@ -43,4 +47,4 @@ resource "kubernetes_ingress_v1" "mlflow-ingress" { } } } -} \ No newline at end of file +} diff --git a/aws-minimal/mlflow-module/mlflow.tf b/aws-minimal/mlflow-module/mlflow.tf index 1bca43de..6189593c 100644 --- a/aws-minimal/mlflow-module/mlflow.tf +++ b/aws-minimal/mlflow-module/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the mlflow tracking server deployment resource "helm_release" "mlflow-tracking" { @@ -63,4 +67,4 @@ resource "helm_release" "mlflow-tracking" { name = "artifactRoot.gcs.bucket" value = var.artifact_GCS_Bucket } -} \ No newline at end of file +} diff --git a/aws-minimal/mlflow-module/output.tf b/aws-minimal/mlflow-module/output.tf index 2d83335a..634cbf72 100644 --- a/aws-minimal/mlflow-module/output.tf +++ b/aws-minimal/mlflow-module/output.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-controller-name" { value = helm_release.nginx-controller.name } output "ingress-controller-namespace" { value = kubernetes_namespace.nginx-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/aws-minimal/mlflow-module/providers.tf b/aws-minimal/mlflow-module/providers.tf index 174c38ce..15aede9e 100644 --- a/aws-minimal/mlflow-module/providers.tf +++ b/aws-minimal/mlflow-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/aws-minimal/mlflow-module/secret.tf b/aws-minimal/mlflow-module/secret.tf index 60b2fb7d..126754b9 100644 --- a/aws-minimal/mlflow-module/secret.tf +++ b/aws-minimal/mlflow-module/secret.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a secret with user credentials resource "kubernetes_secret" "name" { metadata { @@ -10,4 +14,4 @@ resource "kubernetes_secret" "name" { data = { "auth" = var.htpasswd } -} \ No newline at end of file +} diff --git a/aws-minimal/mlflow-module/variables.tf b/aws-minimal/mlflow-module/variables.tf index 45de778b..1a5be9b4 100644 --- a/aws-minimal/mlflow-module/variables.tf +++ b/aws-minimal/mlflow-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "htpasswd" {} variable "kubernetes_sa" { @@ -52,4 +56,4 @@ variable "artifact_GCS" { variable "artifact_GCS_Bucket" { type = string default = "" -} \ No newline at end of file +} diff --git a/aws-minimal/mlflow.tf b/aws-minimal/mlflow.tf index ba4ac73f..731a0db6 100644 --- a/aws-minimal/mlflow.tf +++ b/aws-minimal/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "./mlflow-module" @@ -17,4 +21,4 @@ module "mlflow" { resource "htpasswd_password" "hash" { password = var.mlflow-password -} \ No newline at end of file +} diff --git a/aws-minimal/output_file.tf b/aws-minimal/output_file.tf index c801be76..0dd916fc 100644 --- a/aws-minimal/output_file.tf +++ b/aws-minimal/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -39,4 +43,4 @@ resource "local_file" "stack_file" { configuration: {"kubernetes_context": "terraform", "kubernetes_namespace": "${kubernetes_namespace.seldon-workloads.metadata[0].name}", "base_url": "${data.kubernetes_service.seldon_ingress.status.0.load_balancer.0.ingress.0.hostname}", "secret": "aws_seldon_secret"} ADD filename = "./aws_minimal_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/aws-minimal/outputs.tf b/aws-minimal/outputs.tf index eddd4088..54deaa02 100644 --- a/aws-minimal/outputs.tf +++ b/aws-minimal/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # output for eks cluster output "eks-cluster-name" { value = data.aws_eks_cluster.cluster.name @@ -50,4 +54,4 @@ output "seldon-base-url" { # output the name of the stack YAML file created output "stack-yaml-path" { value = local_file.stack_file.filename -} \ No newline at end of file +} diff --git a/aws-minimal/s3.tf b/aws-minimal/s3.tf index 9f71c5be..6d459a63 100644 --- a/aws-minimal/s3.tf +++ b/aws-minimal/s3.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # creste s3 bucket for storing artifacts resource "aws_s3_bucket" "zenml-artifact-store" { bucket = "${local.prefix}-${local.s3.name}" @@ -22,4 +26,4 @@ resource "aws_s3_bucket_public_access_block" "example" { block_public_acls = true block_public_policy = true -} \ No newline at end of file +} diff --git a/aws-minimal/seldon.tf b/aws-minimal/seldon.tf index ffdcb0a1..aa3a87cc 100644 --- a/aws-minimal/seldon.tf +++ b/aws-minimal/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the seldon module for creating a # seldon + istio deployment module "seldon" { diff --git a/aws-minimal/seldon/istio.tf b/aws-minimal/seldon/istio.tf index c260c351..351217d2 100644 --- a/aws-minimal/seldon/istio.tf +++ b/aws-minimal/seldon/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a namespace for istio resources resource "kubernetes_namespace" "istio-ns" { metadata { @@ -60,4 +64,4 @@ resource "helm_release" "istio-ingress" { # dependency on istio-ingress-ns namespace = kubernetes_namespace.istio-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/aws-minimal/seldon/outputs.tf b/aws-minimal/seldon/outputs.tf index 57c7e36d..32f98182 100644 --- a/aws-minimal/seldon/outputs.tf +++ b/aws-minimal/seldon/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-gateway-spec" { value = kubectl_manifest.gateway.live_manifest_incluster -} \ No newline at end of file +} diff --git a/aws-minimal/seldon/providers.tf b/aws-minimal/seldon/providers.tf index 0013f3ff..a7349a05 100644 --- a/aws-minimal/seldon/providers.tf +++ b/aws-minimal/seldon/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the seldon module terraform { required_providers { diff --git a/aws-minimal/seldon/seldon.tf b/aws-minimal/seldon/seldon.tf index 37691c57..b435d5c9 100644 --- a/aws-minimal/seldon/seldon.tf +++ b/aws-minimal/seldon/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # creating the namespace for the seldon deployment resource "kubernetes_namespace" "seldon-ns" { metadata { @@ -25,4 +29,4 @@ resource "helm_release" "seldon" { name = "istio.enabled" value = "true" } -} \ No newline at end of file +} diff --git a/aws-minimal/seldon/variables.tf b/aws-minimal/seldon/variables.tf index 61c0e9d4..29344603 100644 --- a/aws-minimal/seldon/variables.tf +++ b/aws-minimal/seldon/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables are values that should be supplied # by the calling module @@ -9,4 +13,4 @@ variable "seldon_namespace" {} # the kubernetes and kubectl providers variable "cluster_endpoint" {} variable "cluster_ca_certificate" {} -variable "cluster_token" {} \ No newline at end of file +variable "cluster_token" {} diff --git a/aws-minimal/terraform.tf b/aws-minimal/terraform.tf index aca2b0c2..ed79a893 100644 --- a/aws-minimal/terraform.tf +++ b/aws-minimal/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -41,4 +45,4 @@ terraform { provider "aws" { region = local.region -} \ No newline at end of file +} diff --git a/aws-minimal/variables.tf b/aws-minimal/variables.tf index 60175c8d..31defd58 100644 --- a/aws-minimal/variables.tf +++ b/aws-minimal/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for the MLflow tracking server variable "mlflow-artifact-S3-access-key" { description = "Your AWS access key for using S3 as MLflow artifact store" @@ -25,4 +29,4 @@ variable "zenml-version" { description = "The version of ZenML being used" default = "0.12.0" type = string -} \ No newline at end of file +} diff --git a/aws-minimal/vpc.tf b/aws-minimal/vpc.tf index b0e7a409..f91f8bf0 100644 --- a/aws-minimal/vpc.tf +++ b/aws-minimal/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # VPC infra using https://github.com/terraform-aws-modules/terraform-aws-vpc module "vpc" { source = "terraform-aws-modules/vpc/aws" @@ -15,4 +19,4 @@ module "vpc" { enable_dns_hostnames = true tags = local.tags -} \ No newline at end of file +} diff --git a/aws-modular/aws_account.tf b/aws-modular/aws_account.tf index fe500848..79012195 100644 --- a/aws-modular/aws_account.tf +++ b/aws-modular/aws_account.tf @@ -1,2 +1,6 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # fetch the current account ID for use in container registry URL -data "aws_caller_identity" "current" {} \ No newline at end of file +data "aws_caller_identity" "current" {} diff --git a/aws-modular/cert_manager.tf b/aws-modular/cert_manager.tf index 2c821129..88f8f1fd 100644 --- a/aws-modular/cert_manager.tf +++ b/aws-modular/cert_manager.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the cert-manager module to create a cert-manager deployment module "cert-manager" { source = "../modules/cert-manager-module" @@ -10,4 +14,4 @@ module "cert-manager" { ] chart_version = local.cert_manager.version -} \ No newline at end of file +} diff --git a/aws-modular/configure_docker.tf b/aws-modular/configure_docker.tf index c985b5de..340218e7 100644 --- a/aws-modular/configure_docker.tf +++ b/aws-modular/configure_docker.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { count = var.enable_container_registry ? 1 : 0 @@ -5,4 +9,4 @@ resource "null_resource" "configure-local-docker" { command = "aws ecr get-login-password --region ${var.region} | docker login --username AWS --password-stdin ${data.aws_caller_identity.current.account_id}.dkr.ecr.${var.region}.amazonaws.com" } -} \ No newline at end of file +} diff --git a/aws-modular/configure_kubectl.tf b/aws-modular/configure_kubectl.tf index 9d5bf567..359acf58 100644 --- a/aws-modular/configure_kubectl.tf +++ b/aws-modular/configure_kubectl.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { count = length(aws_eks_cluster.cluster) > 0 ? 1 : 0 provisioner "local-exec" { command = "aws eks --region ${var.region} update-kubeconfig --name ${local.prefix}-${local.eks.cluster_name}" } -} \ No newline at end of file +} diff --git a/aws-modular/ecr.tf b/aws-modular/ecr.tf index d551d896..af7f6d0d 100644 --- a/aws-modular/ecr.tf +++ b/aws-modular/ecr.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # add an optional container registry resource "aws_ecr_repository" "zenml-ecr-repository" { count = var.enable_container_registry ? 1 : 0 name = local.ecr.name image_tag_mutability = "MUTABLE" tags = local.tags -} \ No newline at end of file +} diff --git a/aws-modular/eks.tf b/aws-modular/eks.tf index 0d6c895b..2afb0afd 100644 --- a/aws-modular/eks.tf +++ b/aws-modular/eks.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # eks module to create a cluster # newer versions of it had some error so going with v17.23.0 for now locals { diff --git a/aws-modular/helm.tf b/aws-modular/helm.tf index a0ded8c5..2827f5bf 100644 --- a/aws-modular/helm.tf +++ b/aws-modular/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { diff --git a/aws-modular/istio.tf b/aws-modular/istio.tf index 2d6c2477..3235361b 100644 --- a/aws-modular/istio.tf +++ b/aws-modular/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "istio" { source = "../modules/istio-module" diff --git a/aws-modular/kserve.tf b/aws-modular/kserve.tf index 4b095fe8..e2b6ceb4 100644 --- a/aws-modular/kserve.tf +++ b/aws-modular/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "kserve" { source = "../modules/kserve-module" diff --git a/aws-modular/kubeflow.tf b/aws-modular/kubeflow.tf index 933673b3..c5e92a75 100644 --- a/aws-modular/kubeflow.tf +++ b/aws-modular/kubeflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the kubeflow pipelines module to create a kubeflow pipelines deployment module "kubeflow-pipelines" { source = "../modules/kubeflow-pipelines-module" @@ -15,4 +19,4 @@ module "kubeflow-pipelines" { pipeline_version = local.kubeflow.version ingress_host = "${local.kubeflow.ingress_host_prefix}.${module.nginx-ingress[0].ingress-ip-address-aws}.nip.io" -} \ No newline at end of file +} diff --git a/aws-modular/kubernetes.tf b/aws-modular/kubernetes.tf index ce0e8460..64324c8f 100644 --- a/aws-modular/kubernetes.tf +++ b/aws-modular/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" # not defining the kubernetes provider throws an error while running the eks module provider "kubernetes" { diff --git a/aws-modular/locals.tf b/aws-modular/locals.tf index 4983fa34..0ddfa28d 100644 --- a/aws-modular/locals.tf +++ b/aws-modular/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "random_string" "unique" { length = 4 special = false @@ -89,4 +93,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/aws-modular/mlflow.tf b/aws-modular/mlflow.tf index e55b544d..f2822940 100644 --- a/aws-modular/mlflow.tf +++ b/aws-modular/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "../modules/mlflow-module" @@ -86,4 +90,4 @@ resource "null_resource" "mlflow-iam-access" { depends_on = [ module.mlflow, ] -} \ No newline at end of file +} diff --git a/aws-modular/nginx_ingress.tf b/aws-modular/nginx_ingress.tf index c339b61b..34defbc1 100644 --- a/aws-modular/nginx_ingress.tf +++ b/aws-modular/nginx_ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the nginx-ingress module to create an nginx-ingress deployment module "nginx-ingress" { source = "../modules/nginx-ingress-module" diff --git a/aws-modular/output_file.tf b/aws-modular/output_file.tf index a3280964..25d97f6e 100644 --- a/aws-modular/output_file.tf +++ b/aws-modular/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -87,4 +91,4 @@ resource "local_file" "stack_file" { %{endif} ADD filename = "./aws_modular_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/aws-modular/outputs.tf b/aws-modular/outputs.tf index 7f04e874..fbd93f7e 100644 --- a/aws-modular/outputs.tf +++ b/aws-modular/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # output for eks cluster output "eks-cluster-name" { value = local.enable_eks ? "${local.prefix}-${local.eks.cluster_name}" : "" @@ -206,4 +210,4 @@ output "zenml-url" { } output "zenml-username" { value = var.enable_zenml ? module.zenml[0].username : null -} \ No newline at end of file +} diff --git a/aws-modular/s3.tf b/aws-modular/s3.tf index e4f61f03..6d0fd01e 100644 --- a/aws-modular/s3.tf +++ b/aws-modular/s3.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create s3 bucket for storing artifacts resource "aws_s3_bucket" "zenml-artifact-store" { count = var.enable_artifact_store ? 1 : 0 diff --git a/aws-modular/sagemaker.tf b/aws-modular/sagemaker.tf index b9a0ddf2..c7dca537 100644 --- a/aws-modular/sagemaker.tf +++ b/aws-modular/sagemaker.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Create an IAM role for SageMaker resource "aws_iam_role" "sagemaker_role" { count = var.enable_orchestrator_sagemaker || var.enable_step_operator_sagemaker ? 1 : 0 @@ -37,4 +41,4 @@ resource "aws_iam_role_policy_attachment" "sagemaker_role_policy3" { count = var.enable_orchestrator_sagemaker || var.enable_step_operator_sagemaker ? 1 : 0 role = aws_iam_role.sagemaker_role[0].name policy_arn = "arn:aws:iam::aws:policy/SecretsManagerReadWrite" -} \ No newline at end of file +} diff --git a/aws-modular/seldon.tf b/aws-modular/seldon.tf index 6c789425..2face25f 100644 --- a/aws-modular/seldon.tf +++ b/aws-modular/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the seldon module for creating a # seldon + istio deployment module "seldon" { diff --git a/aws-modular/tekton.tf b/aws-modular/tekton.tf index 5a352e8e..02c4e2f1 100644 --- a/aws-modular/tekton.tf +++ b/aws-modular/tekton.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the tekton pipelines module to create a tekton pipelines deployment module "tekton-pipelines" { source = "../modules/tekton-pipelines-module" diff --git a/aws-modular/terraform.tf b/aws-modular/terraform.tf index 5afab53a..883af868 100644 --- a/aws-modular/terraform.tf +++ b/aws-modular/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -41,4 +45,4 @@ terraform { provider "aws" { region = var.region -} \ No newline at end of file +} diff --git a/aws-modular/variables.tf b/aws-modular/variables.tf index 4c444b4b..76f29134 100644 --- a/aws-modular/variables.tf +++ b/aws-modular/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # enable services variable "enable_artifact_store" { description = "Enable S3 deployment" @@ -108,4 +112,4 @@ variable "zenml-database-url" { description = "The ZenML Server database URL" type = string default = "" -} \ No newline at end of file +} diff --git a/aws-modular/vpc.tf b/aws-modular/vpc.tf index a42ac358..6ebf0f84 100644 --- a/aws-modular/vpc.tf +++ b/aws-modular/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # VPC infra using https://github.com/terraform-aws-modules/terraform-aws-vpc module "vpc" { count = local.enable_eks ? 1 : 0 @@ -16,4 +20,4 @@ module "vpc" { enable_dns_hostnames = true tags = local.tags -} \ No newline at end of file +} diff --git a/aws-modular/zenml.tf b/aws-modular/zenml.tf index 7452e49a..c39f7efe 100644 --- a/aws-modular/zenml.tf +++ b/aws-modular/zenml.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the zenml module to create a zenml deployment module "zenml" { source = "../modules/zenml-module" diff --git a/aws-stores-minimal/aws_account.tf b/aws-stores-minimal/aws_account.tf index fe500848..79012195 100644 --- a/aws-stores-minimal/aws_account.tf +++ b/aws-stores-minimal/aws_account.tf @@ -1,2 +1,6 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # fetch the current account ID for use in container registry URL -data "aws_caller_identity" "current" {} \ No newline at end of file +data "aws_caller_identity" "current" {} diff --git a/aws-stores-minimal/ecr.tf b/aws-stores-minimal/ecr.tf index 44f2b4c3..1b1892cc 100644 --- a/aws-stores-minimal/ecr.tf +++ b/aws-stores-minimal/ecr.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # add an optional container registry resource "aws_ecr_repository" "zenml-ecr-repository" { name = local.ecr.name image_tag_mutability = "MUTABLE" count = local.ecr.enable_container_registry ? 1 : 0 tags = local.tags -} \ No newline at end of file +} diff --git a/aws-stores-minimal/locals.tf b/aws-stores-minimal/locals.tf index 3d6f7d78..f40d0c91 100644 --- a/aws-stores-minimal/locals.tf +++ b/aws-stores-minimal/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" @@ -20,4 +24,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/aws-stores-minimal/output_file.tf b/aws-stores-minimal/output_file.tf index 5587521e..7fd3c20e 100644 --- a/aws-stores-minimal/output_file.tf +++ b/aws-stores-minimal/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -29,4 +33,4 @@ resource "local_file" "stack_file" { configuration: {"region_name": "${local.region}"} ADD filename = "./aws_minimal_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/aws-stores-minimal/outputs.tf b/aws-stores-minimal/outputs.tf index 9c6e68b5..a70ebf6b 100644 --- a/aws-stores-minimal/outputs.tf +++ b/aws-stores-minimal/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # output for s3 bucket output "s3-bucket-path" { value = "s3://${aws_s3_bucket.zenml-artifact-store.bucket}" @@ -16,4 +20,4 @@ output "ecr-registry-name" { # output the name of the stack YAML file created output "stack-yaml-path" { value = local_file.stack_file.filename -} \ No newline at end of file +} diff --git a/aws-stores-minimal/s3.tf b/aws-stores-minimal/s3.tf index 9f71c5be..6d459a63 100644 --- a/aws-stores-minimal/s3.tf +++ b/aws-stores-minimal/s3.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # creste s3 bucket for storing artifacts resource "aws_s3_bucket" "zenml-artifact-store" { bucket = "${local.prefix}-${local.s3.name}" @@ -22,4 +26,4 @@ resource "aws_s3_bucket_public_access_block" "example" { block_public_acls = true block_public_policy = true -} \ No newline at end of file +} diff --git a/aws-stores-minimal/terraform.tf b/aws-stores-minimal/terraform.tf index 0ecf06d6..319b34d1 100644 --- a/aws-stores-minimal/terraform.tf +++ b/aws-stores-minimal/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -26,4 +30,4 @@ terraform { provider "aws" { region = local.region -} \ No newline at end of file +} diff --git a/aws-stores-minimal/variables.tf b/aws-stores-minimal/variables.tf index 2acbf859..c4b0ea2f 100644 --- a/aws-stores-minimal/variables.tf +++ b/aws-stores-minimal/variables.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for creating a ZenML stack configuration file variable "zenml-version" { description = "The version of ZenML being used" default = "0.12.0" type = string -} \ No newline at end of file +} diff --git a/azure-minimal/aks.tf b/azure-minimal/aks.tf index 0a5bc1f5..1bf29189 100644 --- a/azure-minimal/aks.tf +++ b/azure-minimal/aks.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "azurerm_kubernetes_cluster" "cluster" { name = azurerm_kubernetes_cluster.aks.name resource_group_name = azurerm_resource_group.rg.name @@ -33,4 +37,4 @@ resource "kubernetes_namespace" "k8s-ns" { metadata { name = "zenml" } -} \ No newline at end of file +} diff --git a/azure-minimal/blob_storage.tf b/azure-minimal/blob_storage.tf index d3ac3aa1..b0864f77 100644 --- a/azure-minimal/blob_storage.tf +++ b/azure-minimal/blob_storage.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "azurerm_storage_account" "zenml-account" { name = "${local.prefix}${local.blob_storage.account_name}" resource_group_name = azurerm_resource_group.rg.name @@ -27,4 +31,4 @@ resource "azurerm_role_assignment" "storage" { depends_on = [ azurerm_kubernetes_cluster.aks ] -} \ No newline at end of file +} diff --git a/azure-minimal/configure_docker.tf b/azure-minimal/configure_docker.tf index 2d013b9e..77dbed6c 100644 --- a/azure-minimal/configure_docker.tf +++ b/azure-minimal/configure_docker.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { provisioner "local-exec" { @@ -6,4 +10,4 @@ resource "null_resource" "configure-local-docker" { depends_on = [ azurerm_container_registry.container_registry ] -} \ No newline at end of file +} diff --git a/azure-minimal/configure_kubectl.tf b/azure-minimal/configure_kubectl.tf index 303a6433..30beb060 100644 --- a/azure-minimal/configure_kubectl.tf +++ b/azure-minimal/configure_kubectl.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { provisioner "local-exec" { @@ -10,4 +14,4 @@ resource "null_resource" "configure-local-kubectl" { locals { kubectl_context = "terraform-${local.prefix}-${local.aks.cluster_name}-${replace(substr(timestamp(), 0, 16), ":", "_")}" -} \ No newline at end of file +} diff --git a/azure-minimal/container_registry.tf b/azure-minimal/container_registry.tf index ea8d0beb..64c0d3c8 100644 --- a/azure-minimal/container_registry.tf +++ b/azure-minimal/container_registry.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "azurerm_container_registry" "container_registry" { name = "${local.prefix}${local.acr.name}" resource_group_name = azurerm_resource_group.rg.name @@ -10,4 +14,4 @@ resource "azurerm_role_assignment" "aks_acr_access" { role_definition_name = "AcrPull" scope = azurerm_container_registry.container_registry.id skip_service_principal_aad_check = true -} \ No newline at end of file +} diff --git a/azure-minimal/get_URIs.tf b/azure-minimal/get_URIs.tf index 9c36aa34..b7d5c2ca 100644 --- a/azure-minimal/get_URIs.tf +++ b/azure-minimal/get_URIs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # get URI for MLflow tracking server data "kubernetes_service" "mlflow_tracking" { metadata { @@ -20,4 +24,4 @@ data "kubernetes_service" "seldon_ingress" { depends_on = [ module.seldon ] -} \ No newline at end of file +} diff --git a/azure-minimal/helm.tf b/azure-minimal/helm.tf index 7929c7d7..23224712 100644 --- a/azure-minimal/helm.tf +++ b/azure-minimal/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -7,4 +11,4 @@ provider "helm" { client_key = base64decode(data.azurerm_kubernetes_cluster.cluster.kube_config.0.client_key) cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.cluster.kube_config.0.cluster_ca_certificate) } -} \ No newline at end of file +} diff --git a/azure-minimal/key_vault.tf b/azure-minimal/key_vault.tf index 0e0e272a..7ca7a3aa 100644 --- a/azure-minimal/key_vault.tf +++ b/azure-minimal/key_vault.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "azurerm_client_config" "current" {} # create a key vault instance that can be used for storing secrets @@ -65,4 +69,4 @@ resource "azurerm_key_vault_access_policy" "kv-access-user" { storage_permissions = [ "Get", "List", "Set", "Delete", "Update" ] -} \ No newline at end of file +} diff --git a/azure-minimal/kubernetes.tf b/azure-minimal/kubernetes.tf index 3d4ab9cb..707caa8b 100644 --- a/azure-minimal/kubernetes.tf +++ b/azure-minimal/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" provider "kubernetes" { host = data.azurerm_kubernetes_cluster.cluster.kube_config.0.host @@ -13,4 +17,4 @@ provider "kubectl" { client_certificate = base64decode(data.azurerm_kubernetes_cluster.cluster.kube_config.0.client_certificate) client_key = base64decode(data.azurerm_kubernetes_cluster.cluster.kube_config.0.client_key) cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.cluster.kube_config.0.cluster_ca_certificate) -} \ No newline at end of file +} diff --git a/azure-minimal/locals.tf b/azure-minimal/locals.tf index 6cb4052a..b27ff610 100644 --- a/azure-minimal/locals.tf +++ b/azure-minimal/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" @@ -47,4 +51,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/azure-minimal/mlflow-module/ingress.tf b/azure-minimal/mlflow-module/ingress.tf index ab5a84ff..c40da12b 100644 --- a/azure-minimal/mlflow-module/ingress.tf +++ b/azure-minimal/mlflow-module/ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up the nginx ingress controller and the ingress with basic auth resource "kubernetes_namespace" "nginx-ns" { @@ -43,4 +47,4 @@ resource "kubernetes_ingress_v1" "mlflow-ingress" { } } } -} \ No newline at end of file +} diff --git a/azure-minimal/mlflow-module/mlflow.tf b/azure-minimal/mlflow-module/mlflow.tf index 0415cc75..439cd2de 100644 --- a/azure-minimal/mlflow-module/mlflow.tf +++ b/azure-minimal/mlflow-module/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the mlflow tracking server deployment resource "helm_release" "mlflow-tracking" { @@ -63,4 +67,4 @@ resource "helm_release" "mlflow-tracking" { name = "artifactRoot.gcs.bucket" value = var.artifact_GCS_Bucket } -} \ No newline at end of file +} diff --git a/azure-minimal/mlflow-module/output.tf b/azure-minimal/mlflow-module/output.tf index eeddf3db..81fe9e9a 100644 --- a/azure-minimal/mlflow-module/output.tf +++ b/azure-minimal/mlflow-module/output.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-controller-name" { value = helm_release.nginx-controller.name } output "ingress-controller-namespace" { value = kubernetes_namespace.nginx-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/azure-minimal/mlflow-module/providers.tf b/azure-minimal/mlflow-module/providers.tf index ecfc07ba..57c123d1 100644 --- a/azure-minimal/mlflow-module/providers.tf +++ b/azure-minimal/mlflow-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/azure-minimal/mlflow-module/secret.tf b/azure-minimal/mlflow-module/secret.tf index 18ec87cf..4a078375 100644 --- a/azure-minimal/mlflow-module/secret.tf +++ b/azure-minimal/mlflow-module/secret.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a secret with user credentials resource "kubernetes_secret" "name" { metadata { @@ -10,4 +14,4 @@ resource "kubernetes_secret" "name" { data = { "auth" = var.htpasswd } -} \ No newline at end of file +} diff --git a/azure-minimal/mlflow-module/variables.tf b/azure-minimal/mlflow-module/variables.tf index 35fb2d6f..e82649e5 100644 --- a/azure-minimal/mlflow-module/variables.tf +++ b/azure-minimal/mlflow-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "htpasswd" {} variable "kubernetes_sa" { @@ -52,4 +56,4 @@ variable "artifact_GCS" { variable "artifact_GCS_Bucket" { type = string default = "" -} \ No newline at end of file +} diff --git a/azure-minimal/mlflow.tf b/azure-minimal/mlflow.tf index a4a353e2..5b1bd8e1 100644 --- a/azure-minimal/mlflow.tf +++ b/azure-minimal/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "./mlflow-module" @@ -16,4 +20,4 @@ module "mlflow" { resource "htpasswd_password" "hash" { password = var.mlflow-password -} \ No newline at end of file +} diff --git a/azure-minimal/output_file.tf b/azure-minimal/output_file.tf index 719a1863..e2b7d7e8 100644 --- a/azure-minimal/output_file.tf +++ b/azure-minimal/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -39,4 +43,4 @@ resource "local_file" "stack_file" { configuration: {"kubernetes_context": "${local.kubectl_context}", "kubernetes_namespace": "${kubernetes_namespace.seldon-workloads.metadata[0].name}", "base_url": "${data.kubernetes_service.seldon_ingress.status.0.load_balancer.0.ingress.0.ip}", "secret": "azure-seldon-secret"} ADD filename = "./azure_minimal_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/azure-minimal/outputs.tf b/azure-minimal/outputs.tf index 21ffb031..6339c369 100644 --- a/azure-minimal/outputs.tf +++ b/azure-minimal/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Resource Group output "resource-group-name" { value = azurerm_resource_group.rg.name @@ -65,4 +69,4 @@ output "seldon-base-url" { # output the name of the stack YAML file created output "stack-yaml-path" { value = local_file.stack_file.filename -} \ No newline at end of file +} diff --git a/azure-minimal/rg.tf b/azure-minimal/rg.tf index 50aa8c21..2f386c58 100644 --- a/azure-minimal/rg.tf +++ b/azure-minimal/rg.tf @@ -1,4 +1,8 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "azurerm_resource_group" "rg" { name = "${local.prefix}-${local.resource_group.name}" location = local.resource_group.location -} \ No newline at end of file +} diff --git a/azure-minimal/seldon.tf b/azure-minimal/seldon.tf index 42525a6a..c47ed065 100644 --- a/azure-minimal/seldon.tf +++ b/azure-minimal/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the seldon module for creating a # seldon + istio deployment module "seldon" { diff --git a/azure-minimal/seldon/istio.tf b/azure-minimal/seldon/istio.tf index 6191e6fc..58bcadcb 100644 --- a/azure-minimal/seldon/istio.tf +++ b/azure-minimal/seldon/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a namespace for istio resources resource "kubernetes_namespace" "istio-ns" { metadata { @@ -60,4 +64,4 @@ resource "helm_release" "istio-ingress" { # dependency on istio-ingress-ns namespace = kubernetes_namespace.istio-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/azure-minimal/seldon/outputs.tf b/azure-minimal/seldon/outputs.tf index bb2c0270..f6cc1704 100644 --- a/azure-minimal/seldon/outputs.tf +++ b/azure-minimal/seldon/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-gateway-spec" { value = kubectl_manifest.gateway.live_manifest_incluster -} \ No newline at end of file +} diff --git a/azure-minimal/seldon/providers.tf b/azure-minimal/seldon/providers.tf index a0733668..3f906034 100644 --- a/azure-minimal/seldon/providers.tf +++ b/azure-minimal/seldon/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the seldon module terraform { required_providers { diff --git a/azure-minimal/seldon/seldon.tf b/azure-minimal/seldon/seldon.tf index 605f454e..b0341461 100644 --- a/azure-minimal/seldon/seldon.tf +++ b/azure-minimal/seldon/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # creating the namespace for the seldon deployment resource "kubernetes_namespace" "seldon-ns" { metadata { @@ -25,4 +29,4 @@ resource "helm_release" "seldon" { name = "istio.enabled" value = "true" } -} \ No newline at end of file +} diff --git a/azure-minimal/seldon/variables.tf b/azure-minimal/seldon/variables.tf index 87e2abe6..101a60bb 100644 --- a/azure-minimal/seldon/variables.tf +++ b/azure-minimal/seldon/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables are values that should be supplied # by the calling module @@ -9,4 +13,4 @@ variable "seldon_namespace" {} # the kubernetes and kubectl providers variable "cluster_endpoint" {} variable "cluster_ca_certificate" {} -variable "cluster_token" {} \ No newline at end of file +variable "cluster_token" {} diff --git a/azure-minimal/terraform.tf b/azure-minimal/terraform.tf index 8e43e334..bb945114 100644 --- a/azure-minimal/terraform.tf +++ b/azure-minimal/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -44,4 +48,4 @@ provider "azurerm" { purge_soft_delete_on_destroy = true } } -} \ No newline at end of file +} diff --git a/azure-minimal/variables.tf b/azure-minimal/variables.tf index 6868aaca..fd6f7c13 100644 --- a/azure-minimal/variables.tf +++ b/azure-minimal/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for the MLflow tracking server variable "mlflow-username" { description = "The username for the MLflow Tracking Server" @@ -24,4 +28,4 @@ variable "zenml-version" { description = "The version of ZenML being used" default = "0.11.0" type = string -} \ No newline at end of file +} diff --git a/azure-minimal/vpc.tf b/azure-minimal/vpc.tf index 1de3cab8..10b70c47 100644 --- a/azure-minimal/vpc.tf +++ b/azure-minimal/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + module "network" { source = "Azure/network/azurerm" version = "3.5.0" @@ -24,4 +28,4 @@ resource "azurerm_subnet" "mysql_vnet" { ] } } -} \ No newline at end of file +} diff --git a/azureml-minimal/access_policy.tf b/azureml-minimal/access_policy.tf index 901789a7..18805acd 100644 --- a/azureml-minimal/access_policy.tf +++ b/azureml-minimal/access_policy.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a access role based on service principal created in compute cluster data "azurerm_client_config" "config" { depends_on = [ diff --git a/azureml-minimal/blob_storage.tf b/azureml-minimal/blob_storage.tf index e8ba6f6d..6fccb464 100644 --- a/azureml-minimal/blob_storage.tf +++ b/azureml-minimal/blob_storage.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # workspace storage account resource "azurerm_storage_account" "zenml-account" { diff --git a/azureml-minimal/cluster.tf b/azureml-minimal/cluster.tf index bfa07c5d..efbf827e 100644 --- a/azureml-minimal/cluster.tf +++ b/azureml-minimal/cluster.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "azurerm_client_config" "current" { depends_on = [azurerm_resource_group.rg] diff --git a/azureml-minimal/key_vault.tf b/azureml-minimal/key_vault.tf index bd27f4c0..8d679973 100644 --- a/azureml-minimal/key_vault.tf +++ b/azureml-minimal/key_vault.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # workspace keyvault resource "azurerm_key_vault" "secret_manager" { name = local.key_vault.name diff --git a/azureml-minimal/locals.tf b/azureml-minimal/locals.tf index e05ec7d2..54f52631 100644 --- a/azureml-minimal/locals.tf +++ b/azureml-minimal/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" diff --git a/azureml-minimal/output_file.tf b/azureml-minimal/output_file.tf index 55b37be5..58f12af3 100644 --- a/azureml-minimal/output_file.tf +++ b/azureml-minimal/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { diff --git a/azureml-minimal/outputs.tf b/azureml-minimal/outputs.tf index 045b43ce..61b3c320 100644 --- a/azureml-minimal/outputs.tf +++ b/azureml-minimal/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # subscription id output "subscription-id" { value = data.azurerm_client_config.current.subscription_id diff --git a/azureml-minimal/rg.tf b/azureml-minimal/rg.tf index 50aa8c21..2f386c58 100644 --- a/azureml-minimal/rg.tf +++ b/azureml-minimal/rg.tf @@ -1,4 +1,8 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "azurerm_resource_group" "rg" { name = "${local.prefix}-${local.resource_group.name}" location = local.resource_group.location -} \ No newline at end of file +} diff --git a/azureml-minimal/service_principal.tf b/azureml-minimal/service_principal.tf index 94802e95..26ec4862 100644 --- a/azureml-minimal/service_principal.tf +++ b/azureml-minimal/service_principal.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "azuread_application" "app" { display_name = "azure-zenml-app" } diff --git a/azureml-minimal/terraform.tf b/azureml-minimal/terraform.tf index d1e380fb..51e4c689 100644 --- a/azureml-minimal/terraform.tf +++ b/azureml-minimal/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { diff --git a/azureml-minimal/variables.tf b/azureml-minimal/variables.tf index c764d6b5..3187fa4b 100644 --- a/azureml-minimal/variables.tf +++ b/azureml-minimal/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for creating a ZenML stack configuration file variable "zenml-version" { description = "The version of ZenML being used" diff --git a/gcp-airflow/composer.tf b/gcp-airflow/composer.tf index deaf4514..c655d4c3 100644 --- a/gcp-airflow/composer.tf +++ b/gcp-airflow/composer.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "google_project" "project" { project_id = local.project_id } @@ -61,4 +65,4 @@ resource "google_service_account_iam_member" "cc-sa-extension" { depends_on = [ google_project_service.enable_services ] -} \ No newline at end of file +} diff --git a/gcp-airflow/configure_docker.tf b/gcp-airflow/configure_docker.tf index 4ba666e2..806d187c 100644 --- a/gcp-airflow/configure_docker.tf +++ b/gcp-airflow/configure_docker.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { provisioner "local-exec" { command = "gcloud auth configure-docker --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-airflow/configure_kubectl.tf b/gcp-airflow/configure_kubectl.tf index 144604b6..d37a8318 100644 --- a/gcp-airflow/configure_kubectl.tf +++ b/gcp-airflow/configure_kubectl.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { provisioner "local-exec" { command = "gcloud container clusters get-credentials ${google_composer_environment.zenml-airflow.config[0].gke_cluster} --region ${local.airflow.region} --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-airflow/enable_services.tf b/gcp-airflow/enable_services.tf index 11f22b87..0e658af9 100644 --- a/gcp-airflow/enable_services.tf +++ b/gcp-airflow/enable_services.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # You must have owner, editor, or service config editor roles # to be able to enable services. diff --git a/gcp-airflow/gcs.tf b/gcp-airflow/gcs.tf index ca09d5fa..a79a8a8a 100644 --- a/gcp-airflow/gcs.tf +++ b/gcp-airflow/gcs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "google_storage_bucket" "artifact-store" { name = "${local.prefix}-${local.gcs.name}" project = local.project_id @@ -6,4 +10,4 @@ resource "google_storage_bucket" "artifact-store" { force_destroy = true uniform_bucket_level_access = true -} \ No newline at end of file +} diff --git a/gcp-airflow/locals.tf b/gcp-airflow/locals.tf index d0883cdd..e392bb22 100644 --- a/gcp-airflow/locals.tf +++ b/gcp-airflow/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" @@ -31,4 +35,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/gcp-airflow/output_file.tf b/gcp-airflow/output_file.tf index 3878113d..a2f74842 100644 --- a/gcp-airflow/output_file.tf +++ b/gcp-airflow/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -29,4 +33,4 @@ resource "local_file" "stack_file" { configuration: {"project_id": "${local.project_id}"} ADD filename = "./gcp_airflow_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/gcp-airflow/outputs.tf b/gcp-airflow/outputs.tf index b70671ec..118de92e 100644 --- a/gcp-airflow/outputs.tf +++ b/gcp-airflow/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # project id output "project-id" { value = local.project_id diff --git a/gcp-airflow/terraform.tf b/gcp-airflow/terraform.tf index 059ace33..c0389f17 100644 --- a/gcp-airflow/terraform.tf +++ b/gcp-airflow/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -31,4 +35,4 @@ terraform { provider "google" { project = local.project_id -} \ No newline at end of file +} diff --git a/gcp-airflow/variables.tf b/gcp-airflow/variables.tf index 627f4a77..1e171d58 100644 --- a/gcp-airflow/variables.tf +++ b/gcp-airflow/variables.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for creating a ZenML stack configuration file variable "zenml-version" { description = "The version of ZenML being used" default = "0.21.0" type = string -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/configure_docker.tf b/gcp-kubeflow-kserve/configure_docker.tf index 4ba666e2..806d187c 100644 --- a/gcp-kubeflow-kserve/configure_docker.tf +++ b/gcp-kubeflow-kserve/configure_docker.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { provisioner "local-exec" { command = "gcloud auth configure-docker --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/configure_kubectl.tf b/gcp-kubeflow-kserve/configure_kubectl.tf index 0fe9c463..e54c1880 100644 --- a/gcp-kubeflow-kserve/configure_kubectl.tf +++ b/gcp-kubeflow-kserve/configure_kubectl.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { provisioner "local-exec" { command = "gcloud container clusters get-credentials ${module.gke.name} --region ${local.region} --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/enable_services.tf b/gcp-kubeflow-kserve/enable_services.tf index af7c60ba..47b531ba 100644 --- a/gcp-kubeflow-kserve/enable_services.tf +++ b/gcp-kubeflow-kserve/enable_services.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # You must have owner, editor, or service config editor roles # to be able to enable services. @@ -47,4 +51,4 @@ resource "google_project_service" "vertex_ai" { service = "aiplatform.googleapis.com" disable_on_destroy = false -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/gcs.tf b/gcp-kubeflow-kserve/gcs.tf index ca09d5fa..a79a8a8a 100644 --- a/gcp-kubeflow-kserve/gcs.tf +++ b/gcp-kubeflow-kserve/gcs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "google_storage_bucket" "artifact-store" { name = "${local.prefix}-${local.gcs.name}" project = local.project_id @@ -6,4 +10,4 @@ resource "google_storage_bucket" "artifact-store" { force_destroy = true uniform_bucket_level_access = true -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/get_URIs.tf b/gcp-kubeflow-kserve/get_URIs.tf index b2fbb888..956bc40e 100644 --- a/gcp-kubeflow-kserve/get_URIs.tf +++ b/gcp-kubeflow-kserve/get_URIs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # get URI for MLflow tracking server data "kubernetes_service" "mlflow_tracking" { metadata { @@ -19,4 +23,4 @@ data "kubernetes_service" "kserve_ingress" { depends_on = [ module.kserve ] -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/gke.tf b/gcp-kubeflow-kserve/gke.tf index e1b22604..dcc92b2b 100644 --- a/gcp-kubeflow-kserve/gke.tf +++ b/gcp-kubeflow-kserve/gke.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "google_client_config" "default" {} module "gke" { depends_on = [ @@ -98,4 +102,4 @@ resource "google_project_iam_binding" "storageadmin" { members = [ "serviceAccount:${google_service_account.gke-service-account.email}", ] -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/helm.tf b/gcp-kubeflow-kserve/helm.tf index 3b0498cd..81324529 100644 --- a/gcp-kubeflow-kserve/helm.tf +++ b/gcp-kubeflow-kserve/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -5,4 +9,4 @@ provider "helm" { token = data.google_client_config.default.access_token cluster_ca_certificate = base64decode(module.gke.ca_certificate) } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/kserve-module/cert_manager.tf b/gcp-kubeflow-kserve/kserve-module/cert_manager.tf index 08aaf290..eb5e78da 100644 --- a/gcp-kubeflow-kserve/kserve-module/cert_manager.tf +++ b/gcp-kubeflow-kserve/kserve-module/cert_manager.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a cert-manager release resource "helm_release" "cert-manager" { name = "cert-manager" diff --git a/gcp-kubeflow-kserve/kserve-module/istio.tf b/gcp-kubeflow-kserve/kserve-module/istio.tf index 182db859..893a53b7 100644 --- a/gcp-kubeflow-kserve/kserve-module/istio.tf +++ b/gcp-kubeflow-kserve/kserve-module/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up istio for kserve resource "null_resource" "create-istio-kserve" { provisioner "local-exec" { @@ -32,4 +36,4 @@ resource "null_resource" "create-istio-kserve" { depends_on = [ null_resource.create-knative-serving, ] -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/kserve-module/knative_serving.tf b/gcp-kubeflow-kserve/kserve-module/knative_serving.tf index d031133b..5b3bc198 100644 --- a/gcp-kubeflow-kserve/kserve-module/knative_serving.tf +++ b/gcp-kubeflow-kserve/kserve-module/knative_serving.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up istio for kserve resource "null_resource" "create-knative-serving" { provisioner "local-exec" { @@ -17,4 +21,4 @@ resource "null_resource" "create-knative-serving" { command = "kubectl delete -f https://github.com/knative/serving/releases/download/knative-v1.6.0/serving-core.yaml" } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/kserve-module/kserve.tf b/gcp-kubeflow-kserve/kserve-module/kserve.tf index 3621fb73..80e68e10 100644 --- a/gcp-kubeflow-kserve/kserve-module/kserve.tf +++ b/gcp-kubeflow-kserve/kserve-module/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up istio for kserve resource "null_resource" "kserve" { provisioner "local-exec" { @@ -26,4 +30,4 @@ resource "kubernetes_namespace" "workloads" { metadata { name = var.workloads_namespace } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/kserve-module/providers.tf b/gcp-kubeflow-kserve/kserve-module/providers.tf index 174c38ce..15aede9e 100644 --- a/gcp-kubeflow-kserve/kserve-module/providers.tf +++ b/gcp-kubeflow-kserve/kserve-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/gcp-kubeflow-kserve/kserve-module/variables.tf b/gcp-kubeflow-kserve/kserve-module/variables.tf index 6b3a0a82..24388e04 100644 --- a/gcp-kubeflow-kserve/kserve-module/variables.tf +++ b/gcp-kubeflow-kserve/kserve-module/variables.tf @@ -1,5 +1,9 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # namespace to create inference services in variable "workloads_namespace" { type = string default = "zenml-workloads" -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/kserve.tf b/gcp-kubeflow-kserve/kserve.tf index ca29793e..f6f0bbe5 100644 --- a/gcp-kubeflow-kserve/kserve.tf +++ b/gcp-kubeflow-kserve/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "kserve" { source = "./kserve-module" @@ -81,4 +85,4 @@ resource "google_service_account_key" "kserve_sa_key" { resource "local_file" "sa_key_file" { content = base64decode(google_service_account_key.kserve_sa_key.private_key) filename = "./kserve_sa_key.json" -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/kubeflow.tf b/gcp-kubeflow-kserve/kubeflow.tf index 4eb640b8..64d26baf 100644 --- a/gcp-kubeflow-kserve/kubeflow.tf +++ b/gcp-kubeflow-kserve/kubeflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up kubeflow resource "null_resource" "kubeflow" { provisioner "local-exec" { @@ -30,4 +34,4 @@ resource "null_resource" "kubeflow" { null_resource.configure-local-kubectl, module.gke, ] -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/kubernetes.tf b/gcp-kubeflow-kserve/kubernetes.tf index c195908b..55e89d50 100644 --- a/gcp-kubeflow-kserve/kubernetes.tf +++ b/gcp-kubeflow-kserve/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" # not defining the kubernetes provider throws an error while running the eks module provider "kubernetes" { @@ -10,4 +14,4 @@ provider "kubectl" { host = "https://${module.gke.endpoint}" token = data.google_client_config.default.access_token cluster_ca_certificate = base64decode(module.gke.ca_certificate) -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/locals.tf b/gcp-kubeflow-kserve/locals.tf index 3e858f1e..11b3755a 100644 --- a/gcp-kubeflow-kserve/locals.tf +++ b/gcp-kubeflow-kserve/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" @@ -47,4 +51,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/mlflow-module/ingress.tf b/gcp-kubeflow-kserve/mlflow-module/ingress.tf index 4b1f4f1d..b1cb2472 100644 --- a/gcp-kubeflow-kserve/mlflow-module/ingress.tf +++ b/gcp-kubeflow-kserve/mlflow-module/ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up the nginx ingress controller and the ingress with basic auth resource "kubernetes_namespace" "nginx-ns" { @@ -43,4 +47,4 @@ resource "kubernetes_ingress_v1" "mlflow-ingress" { } } } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/mlflow-module/mlflow.tf b/gcp-kubeflow-kserve/mlflow-module/mlflow.tf index 1bca43de..6189593c 100644 --- a/gcp-kubeflow-kserve/mlflow-module/mlflow.tf +++ b/gcp-kubeflow-kserve/mlflow-module/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the mlflow tracking server deployment resource "helm_release" "mlflow-tracking" { @@ -63,4 +67,4 @@ resource "helm_release" "mlflow-tracking" { name = "artifactRoot.gcs.bucket" value = var.artifact_GCS_Bucket } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/mlflow-module/output.tf b/gcp-kubeflow-kserve/mlflow-module/output.tf index 2d83335a..634cbf72 100644 --- a/gcp-kubeflow-kserve/mlflow-module/output.tf +++ b/gcp-kubeflow-kserve/mlflow-module/output.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-controller-name" { value = helm_release.nginx-controller.name } output "ingress-controller-namespace" { value = kubernetes_namespace.nginx-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/mlflow-module/providers.tf b/gcp-kubeflow-kserve/mlflow-module/providers.tf index 174c38ce..15aede9e 100644 --- a/gcp-kubeflow-kserve/mlflow-module/providers.tf +++ b/gcp-kubeflow-kserve/mlflow-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/gcp-kubeflow-kserve/mlflow-module/secret.tf b/gcp-kubeflow-kserve/mlflow-module/secret.tf index 60b2fb7d..126754b9 100644 --- a/gcp-kubeflow-kserve/mlflow-module/secret.tf +++ b/gcp-kubeflow-kserve/mlflow-module/secret.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a secret with user credentials resource "kubernetes_secret" "name" { metadata { @@ -10,4 +14,4 @@ resource "kubernetes_secret" "name" { data = { "auth" = var.htpasswd } -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/mlflow-module/variables.tf b/gcp-kubeflow-kserve/mlflow-module/variables.tf index 45de778b..1a5be9b4 100644 --- a/gcp-kubeflow-kserve/mlflow-module/variables.tf +++ b/gcp-kubeflow-kserve/mlflow-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "htpasswd" {} variable "kubernetes_sa" { @@ -52,4 +56,4 @@ variable "artifact_GCS" { variable "artifact_GCS_Bucket" { type = string default = "" -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/mlflow.tf b/gcp-kubeflow-kserve/mlflow.tf index 6aaad910..cce53a54 100644 --- a/gcp-kubeflow-kserve/mlflow.tf +++ b/gcp-kubeflow-kserve/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "./mlflow-module" @@ -28,4 +32,4 @@ resource "google_service_account_iam_member" "mlflow-storage-access" { depends_on = [ module.mlflow ] -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/output_file.tf b/gcp-kubeflow-kserve/output_file.tf index 56f21312..c7775d9e 100644 --- a/gcp-kubeflow-kserve/output_file.tf +++ b/gcp-kubeflow-kserve/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -39,4 +43,4 @@ resource "local_file" "stack_file" { configuration: {"kubernetes_context": "gke_${local.project_id}_${local.region}_${module.gke.name}", "kubernetes_namespace": "${local.kserve.workloads_namespace}", "base_url": "http://${data.kubernetes_service.kserve_ingress.status.0.load_balancer.0.ingress.0.ip}:${data.kubernetes_service.kserve_ingress.spec.0.port.1.port}", "secret": "gcp_kserve_secret"} ADD filename = "./gcp_kubeflow_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/outputs.tf b/gcp-kubeflow-kserve/outputs.tf index 2757ee30..55690a90 100644 --- a/gcp-kubeflow-kserve/outputs.tf +++ b/gcp-kubeflow-kserve/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # project id output "project-id" { value = local.project_id diff --git a/gcp-kubeflow-kserve/terraform.tf b/gcp-kubeflow-kserve/terraform.tf index a390ac3a..84a731a2 100644 --- a/gcp-kubeflow-kserve/terraform.tf +++ b/gcp-kubeflow-kserve/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -36,4 +40,4 @@ terraform { provider "google" { project = local.project_id -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/variables.tf b/gcp-kubeflow-kserve/variables.tf index 886bf25b..fa53e9b0 100644 --- a/gcp-kubeflow-kserve/variables.tf +++ b/gcp-kubeflow-kserve/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for the MLflow tracking server variable "mlflow-username" { description = "The username for the MLflow Tracking Server" @@ -16,4 +20,4 @@ variable "zenml-version" { description = "The version of ZenML being used" default = "0.12.0" type = string -} \ No newline at end of file +} diff --git a/gcp-kubeflow-kserve/vpc.tf b/gcp-kubeflow-kserve/vpc.tf index b8b54a83..af1006d7 100644 --- a/gcp-kubeflow-kserve/vpc.tf +++ b/gcp-kubeflow-kserve/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + module "vpc" { source = "terraform-google-modules/network/google" version = "~> 4.0" @@ -51,4 +55,4 @@ module "vpc" { next_hop_internet = "true" }, ] -} \ No newline at end of file +} diff --git a/gcp-minimal/artifact_repository.tf b/gcp-minimal/artifact_repository.tf index aeb39fdb..b6f64be7 100644 --- a/gcp-minimal/artifact_repository.tf +++ b/gcp-minimal/artifact_repository.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # # add an optional artifact repository # resource "google_artifact_registry_repository" "artifact-repository" { # provider = google-beta @@ -7,4 +11,4 @@ # repository_id = local.artifact_repository.name # description = "A repository to host docker container images" # format = "DOCKER" -# } \ No newline at end of file +# } diff --git a/gcp-minimal/configure_docker.tf b/gcp-minimal/configure_docker.tf index 4ba666e2..806d187c 100644 --- a/gcp-minimal/configure_docker.tf +++ b/gcp-minimal/configure_docker.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { provisioner "local-exec" { command = "gcloud auth configure-docker --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-minimal/configure_kubectl.tf b/gcp-minimal/configure_kubectl.tf index 0fe9c463..e54c1880 100644 --- a/gcp-minimal/configure_kubectl.tf +++ b/gcp-minimal/configure_kubectl.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { provisioner "local-exec" { command = "gcloud container clusters get-credentials ${module.gke.name} --region ${local.region} --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-minimal/enable_services.tf b/gcp-minimal/enable_services.tf index 3f969cae..fc406d3c 100644 --- a/gcp-minimal/enable_services.tf +++ b/gcp-minimal/enable_services.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # You must have owner, editor, or service config editor roles # to be able to enable services. diff --git a/gcp-minimal/gcs.tf b/gcp-minimal/gcs.tf index ca09d5fa..a79a8a8a 100644 --- a/gcp-minimal/gcs.tf +++ b/gcp-minimal/gcs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "google_storage_bucket" "artifact-store" { name = "${local.prefix}-${local.gcs.name}" project = local.project_id @@ -6,4 +10,4 @@ resource "google_storage_bucket" "artifact-store" { force_destroy = true uniform_bucket_level_access = true -} \ No newline at end of file +} diff --git a/gcp-minimal/get_URIs.tf b/gcp-minimal/get_URIs.tf index fb72e960..1dcab5bb 100644 --- a/gcp-minimal/get_URIs.tf +++ b/gcp-minimal/get_URIs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # get URI for MLflow tracking server data "kubernetes_service" "mlflow_tracking" { metadata { @@ -20,4 +24,4 @@ data "kubernetes_service" "seldon_ingress" { depends_on = [ module.seldon ] -} \ No newline at end of file +} diff --git a/gcp-minimal/gke.tf b/gcp-minimal/gke.tf index a1c832a5..b1532419 100644 --- a/gcp-minimal/gke.tf +++ b/gcp-minimal/gke.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "google_client_config" "default" {} module "gke" { depends_on = [ @@ -98,4 +102,4 @@ resource "google_project_iam_binding" "storageadmin" { members = [ "serviceAccount:${google_service_account.gke-service-account.email}", ] -} \ No newline at end of file +} diff --git a/gcp-minimal/helm.tf b/gcp-minimal/helm.tf index 3b0498cd..81324529 100644 --- a/gcp-minimal/helm.tf +++ b/gcp-minimal/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -5,4 +9,4 @@ provider "helm" { token = data.google_client_config.default.access_token cluster_ca_certificate = base64decode(module.gke.ca_certificate) } -} \ No newline at end of file +} diff --git a/gcp-minimal/kubernetes.tf b/gcp-minimal/kubernetes.tf index c195908b..55e89d50 100644 --- a/gcp-minimal/kubernetes.tf +++ b/gcp-minimal/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" # not defining the kubernetes provider throws an error while running the eks module provider "kubernetes" { @@ -10,4 +14,4 @@ provider "kubectl" { host = "https://${module.gke.endpoint}" token = data.google_client_config.default.access_token cluster_ca_certificate = base64decode(module.gke.ca_certificate) -} \ No newline at end of file +} diff --git a/gcp-minimal/locals.tf b/gcp-minimal/locals.tf index c4ea43f7..1da0fbef 100644 --- a/gcp-minimal/locals.tf +++ b/gcp-minimal/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" @@ -48,4 +52,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/gcp-minimal/mlflow-module/ingress.tf b/gcp-minimal/mlflow-module/ingress.tf index 4b1f4f1d..b1cb2472 100644 --- a/gcp-minimal/mlflow-module/ingress.tf +++ b/gcp-minimal/mlflow-module/ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up the nginx ingress controller and the ingress with basic auth resource "kubernetes_namespace" "nginx-ns" { @@ -43,4 +47,4 @@ resource "kubernetes_ingress_v1" "mlflow-ingress" { } } } -} \ No newline at end of file +} diff --git a/gcp-minimal/mlflow-module/mlflow.tf b/gcp-minimal/mlflow-module/mlflow.tf index 1bca43de..6189593c 100644 --- a/gcp-minimal/mlflow-module/mlflow.tf +++ b/gcp-minimal/mlflow-module/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the mlflow tracking server deployment resource "helm_release" "mlflow-tracking" { @@ -63,4 +67,4 @@ resource "helm_release" "mlflow-tracking" { name = "artifactRoot.gcs.bucket" value = var.artifact_GCS_Bucket } -} \ No newline at end of file +} diff --git a/gcp-minimal/mlflow-module/output.tf b/gcp-minimal/mlflow-module/output.tf index 2d83335a..634cbf72 100644 --- a/gcp-minimal/mlflow-module/output.tf +++ b/gcp-minimal/mlflow-module/output.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-controller-name" { value = helm_release.nginx-controller.name } output "ingress-controller-namespace" { value = kubernetes_namespace.nginx-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/gcp-minimal/mlflow-module/providers.tf b/gcp-minimal/mlflow-module/providers.tf index 174c38ce..15aede9e 100644 --- a/gcp-minimal/mlflow-module/providers.tf +++ b/gcp-minimal/mlflow-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/gcp-minimal/mlflow-module/secret.tf b/gcp-minimal/mlflow-module/secret.tf index 60b2fb7d..126754b9 100644 --- a/gcp-minimal/mlflow-module/secret.tf +++ b/gcp-minimal/mlflow-module/secret.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a secret with user credentials resource "kubernetes_secret" "name" { metadata { @@ -10,4 +14,4 @@ resource "kubernetes_secret" "name" { data = { "auth" = var.htpasswd } -} \ No newline at end of file +} diff --git a/gcp-minimal/mlflow-module/variables.tf b/gcp-minimal/mlflow-module/variables.tf index 45de778b..1a5be9b4 100644 --- a/gcp-minimal/mlflow-module/variables.tf +++ b/gcp-minimal/mlflow-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "htpasswd" {} variable "kubernetes_sa" { @@ -52,4 +56,4 @@ variable "artifact_GCS" { variable "artifact_GCS_Bucket" { type = string default = "" -} \ No newline at end of file +} diff --git a/gcp-minimal/mlflow.tf b/gcp-minimal/mlflow.tf index 6aaad910..cce53a54 100644 --- a/gcp-minimal/mlflow.tf +++ b/gcp-minimal/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "./mlflow-module" @@ -28,4 +32,4 @@ resource "google_service_account_iam_member" "mlflow-storage-access" { depends_on = [ module.mlflow ] -} \ No newline at end of file +} diff --git a/gcp-minimal/output_file.tf b/gcp-minimal/output_file.tf index b609ea8b..00cd4d9f 100644 --- a/gcp-minimal/output_file.tf +++ b/gcp-minimal/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -39,4 +43,4 @@ resource "local_file" "stack_file" { configuration: {"kubernetes_context": "gke_${local.project_id}_${local.region}_${module.gke.name}", "kubernetes_namespace": "${kubernetes_namespace.seldon-workloads.metadata[0].name}", "base_url": "${data.kubernetes_service.seldon_ingress.status.0.load_balancer.0.ingress.0.ip}", "secret": "gcp_seldon_secret"} ADD filename = "./gcp_minimal_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/gcp-minimal/outputs.tf b/gcp-minimal/outputs.tf index ce5aa530..ba3ad6a6 100644 --- a/gcp-minimal/outputs.tf +++ b/gcp-minimal/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # project id output "project-id" { value = local.project_id diff --git a/gcp-minimal/seldon.tf b/gcp-minimal/seldon.tf index d27f3255..1f8730f2 100644 --- a/gcp-minimal/seldon.tf +++ b/gcp-minimal/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the seldon module for creating a # seldon + istio deployment module "seldon" { diff --git a/gcp-minimal/seldon/istio.tf b/gcp-minimal/seldon/istio.tf index c260c351..351217d2 100644 --- a/gcp-minimal/seldon/istio.tf +++ b/gcp-minimal/seldon/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a namespace for istio resources resource "kubernetes_namespace" "istio-ns" { metadata { @@ -60,4 +64,4 @@ resource "helm_release" "istio-ingress" { # dependency on istio-ingress-ns namespace = kubernetes_namespace.istio-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/gcp-minimal/seldon/outputs.tf b/gcp-minimal/seldon/outputs.tf index 57c7e36d..32f98182 100644 --- a/gcp-minimal/seldon/outputs.tf +++ b/gcp-minimal/seldon/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-gateway-spec" { value = kubectl_manifest.gateway.live_manifest_incluster -} \ No newline at end of file +} diff --git a/gcp-minimal/seldon/providers.tf b/gcp-minimal/seldon/providers.tf index 0013f3ff..a7349a05 100644 --- a/gcp-minimal/seldon/providers.tf +++ b/gcp-minimal/seldon/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the seldon module terraform { required_providers { diff --git a/gcp-minimal/seldon/seldon.tf b/gcp-minimal/seldon/seldon.tf index 37691c57..b435d5c9 100644 --- a/gcp-minimal/seldon/seldon.tf +++ b/gcp-minimal/seldon/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # creating the namespace for the seldon deployment resource "kubernetes_namespace" "seldon-ns" { metadata { @@ -25,4 +29,4 @@ resource "helm_release" "seldon" { name = "istio.enabled" value = "true" } -} \ No newline at end of file +} diff --git a/gcp-minimal/seldon/variables.tf b/gcp-minimal/seldon/variables.tf index 61c0e9d4..29344603 100644 --- a/gcp-minimal/seldon/variables.tf +++ b/gcp-minimal/seldon/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables are values that should be supplied # by the calling module @@ -9,4 +13,4 @@ variable "seldon_namespace" {} # the kubernetes and kubectl providers variable "cluster_endpoint" {} variable "cluster_ca_certificate" {} -variable "cluster_token" {} \ No newline at end of file +variable "cluster_token" {} diff --git a/gcp-minimal/terraform.tf b/gcp-minimal/terraform.tf index a390ac3a..84a731a2 100644 --- a/gcp-minimal/terraform.tf +++ b/gcp-minimal/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -36,4 +40,4 @@ terraform { provider "google" { project = local.project_id -} \ No newline at end of file +} diff --git a/gcp-minimal/variables.tf b/gcp-minimal/variables.tf index 9e0a3849..fa53e9b0 100644 --- a/gcp-minimal/variables.tf +++ b/gcp-minimal/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for the MLflow tracking server variable "mlflow-username" { description = "The username for the MLflow Tracking Server" diff --git a/gcp-minimal/vpc.tf b/gcp-minimal/vpc.tf index 135ade4c..4d0f0c93 100644 --- a/gcp-minimal/vpc.tf +++ b/gcp-minimal/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + module "vpc" { source = "terraform-google-modules/network/google" version = "~> 4.0" @@ -51,4 +55,4 @@ module "vpc" { next_hop_internet = "true" }, ] -} \ No newline at end of file +} diff --git a/gcp-modular/cert_manager.tf b/gcp-modular/cert_manager.tf index 2421c5ca..5c115467 100644 --- a/gcp-modular/cert_manager.tf +++ b/gcp-modular/cert_manager.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the cert-manager module to create a cert-manager deployment module "cert-manager" { source = "../modules/cert-manager-module" diff --git a/gcp-modular/configure_docker.tf b/gcp-modular/configure_docker.tf index f7900d05..a100cae3 100644 --- a/gcp-modular/configure_docker.tf +++ b/gcp-modular/configure_docker.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { count = var.enable_container_registry ? 1 : 0 @@ -5,4 +9,4 @@ resource "null_resource" "configure-local-docker" { command = "gcloud auth configure-docker --project ${var.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-modular/configure_kubectl.tf b/gcp-modular/configure_kubectl.tf index 084cf045..db63104b 100644 --- a/gcp-modular/configure_kubectl.tf +++ b/gcp-modular/configure_kubectl.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { count = length(google_container_cluster.gke) > 0 ? 1 : 0 @@ -8,4 +12,4 @@ resource "null_resource" "configure-local-kubectl" { depends_on = [ google_container_cluster.gke ] -} \ No newline at end of file +} diff --git a/gcp-modular/enable_services.tf b/gcp-modular/enable_services.tf index ca2812fb..d7eeaf75 100644 --- a/gcp-modular/enable_services.tf +++ b/gcp-modular/enable_services.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "google_project" "project" { count = local.enable_vertex ? 1 : 0 project_id = var.project_id diff --git a/gcp-modular/gcs.tf b/gcp-modular/gcs.tf index f642c1a8..1e18e277 100644 --- a/gcp-modular/gcs.tf +++ b/gcp-modular/gcs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "google_storage_bucket" "artifact-store" { count = var.enable_artifact_store ? 1 : 0 name = "${local.prefix}-${local.gcs.name}" @@ -7,4 +11,4 @@ resource "google_storage_bucket" "artifact-store" { force_destroy = true uniform_bucket_level_access = true -} \ No newline at end of file +} diff --git a/gcp-modular/gke.tf b/gcp-modular/gke.tf index 9b6ce66a..969e0f13 100644 --- a/gcp-modular/gke.tf +++ b/gcp-modular/gke.tf @@ -1,3 +1,8 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + + data "google_client_config" "default" {} # module "gke" { # count = (var.enable_orchestrator_kubeflow || var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || diff --git a/gcp-modular/helm.tf b/gcp-modular/helm.tf index fa80299e..36611113 100644 --- a/gcp-modular/helm.tf +++ b/gcp-modular/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -5,4 +9,4 @@ provider "helm" { token = data.google_client_config.default.access_token cluster_ca_certificate = (data.external.get_cluster.result != null) ? base64decode(lookup(data.external.get_cluster.result, "ca_certificate", "")) : "" } -} \ No newline at end of file +} diff --git a/gcp-modular/istio.tf b/gcp-modular/istio.tf index 99fdc8c9..a0a0dd97 100644 --- a/gcp-modular/istio.tf +++ b/gcp-modular/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "istio" { source = "../modules/istio-module" diff --git a/gcp-modular/kserve.tf b/gcp-modular/kserve.tf index 3acb30a4..9aa939ec 100644 --- a/gcp-modular/kserve.tf +++ b/gcp-modular/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "kserve" { source = "../modules/kserve-module" @@ -153,4 +157,4 @@ resource "local_file" "kserve_sa_key_file" { content = base64decode(google_service_account_key.kserve_sa_key[0].private_key) filename = "./kserve_sa_key.json" -} \ No newline at end of file +} diff --git a/gcp-modular/kubeflow.tf b/gcp-modular/kubeflow.tf index b3b94131..24d1c233 100644 --- a/gcp-modular/kubeflow.tf +++ b/gcp-modular/kubeflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the kubeflow pipelines module to create a kubeflow pipelines deployment module "kubeflow-pipelines" { source = "../modules/kubeflow-pipelines-module" diff --git a/gcp-modular/kubernetes.tf b/gcp-modular/kubernetes.tf index 03c1d509..e4dd4840 100644 --- a/gcp-modular/kubernetes.tf +++ b/gcp-modular/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" # not defining the kubernetes provider throws an error while running the eks module provider "kubernetes" { diff --git a/gcp-modular/locals.tf b/gcp-modular/locals.tf index d9a7a225..3043c263 100644 --- a/gcp-modular/locals.tf +++ b/gcp-modular/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "random_string" "unique" { length = 4 special = false diff --git a/gcp-modular/mlflow.tf b/gcp-modular/mlflow.tf index aa4328a9..cb2b54ea 100644 --- a/gcp-modular/mlflow.tf +++ b/gcp-modular/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "../modules/mlflow-module" @@ -68,4 +72,4 @@ resource "google_service_account_iam_member" "mlflow-storage-access" { depends_on = [ module.mlflow ] -} \ No newline at end of file +} diff --git a/gcp-modular/nginx_ingress.tf b/gcp-modular/nginx_ingress.tf index ea7e1678..bdb380d0 100644 --- a/gcp-modular/nginx_ingress.tf +++ b/gcp-modular/nginx_ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the nginx-ingress module to create an nginx-ingress deployment module "nginx-ingress" { source = "../modules/nginx-ingress-module" diff --git a/gcp-modular/output_file.tf b/gcp-modular/output_file.tf index 6d118a35..096b874f 100644 --- a/gcp-modular/output_file.tf +++ b/gcp-modular/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { diff --git a/gcp-modular/outputs.tf b/gcp-modular/outputs.tf index 9fe18441..f8f5e77b 100644 --- a/gcp-modular/outputs.tf +++ b/gcp-modular/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # if gcs is enabled, set the artifact store outputs to the gcs values # otherwise, set the artifact store outputs to empty strings output "artifact_store_id" { diff --git a/gcp-modular/seldon.tf b/gcp-modular/seldon.tf index f725e03d..bce386f6 100644 --- a/gcp-modular/seldon.tf +++ b/gcp-modular/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the seldon module for creating a # seldon + istio deployment module "seldon" { @@ -145,4 +149,4 @@ resource "local_file" "seldon_sa_key_file" { content = base64decode(google_service_account_key.seldon_sa_key[0].private_key) filename = "./seldon_sa_key.json" -} \ No newline at end of file +} diff --git a/gcp-modular/tekton.tf b/gcp-modular/tekton.tf index c2cd56e0..a2e89dc6 100644 --- a/gcp-modular/tekton.tf +++ b/gcp-modular/tekton.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the tekton pipelines module to create a tekton pipelines deployment module "tekton-pipelines" { source = "../modules/tekton-pipelines-module" diff --git a/gcp-modular/terraform.tf b/gcp-modular/terraform.tf index c071d419..e11a60e9 100644 --- a/gcp-modular/terraform.tf +++ b/gcp-modular/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -36,4 +40,4 @@ terraform { provider "google" { project = var.project_id -} \ No newline at end of file +} diff --git a/gcp-modular/variables.tf b/gcp-modular/variables.tf index ad02f4ce..641ea4d7 100644 --- a/gcp-modular/variables.tf +++ b/gcp-modular/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # enable services variable "enable_artifact_store" { description = "Enable GCS deployment" diff --git a/gcp-modular/vertex.tf b/gcp-modular/vertex.tf index f68b7df3..bba7e87e 100644 --- a/gcp-modular/vertex.tf +++ b/gcp-modular/vertex.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + locals { enable_vertex = (var.enable_step_operator_vertex || var.enable_orchestrator_vertex) } diff --git a/gcp-modular/vpc.tf b/gcp-modular/vpc.tf index d4590f4c..d28f5978 100644 --- a/gcp-modular/vpc.tf +++ b/gcp-modular/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + module "vpc" { count = (var.enable_orchestrator_kubeflow || var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || var.enable_model_deployer_kserve || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || @@ -54,4 +58,4 @@ module "vpc" { next_hop_internet = "true" }, ] -} \ No newline at end of file +} diff --git a/gcp-modular/zenml.tf b/gcp-modular/zenml.tf index 0cc3cc6a..ac1f3b45 100644 --- a/gcp-modular/zenml.tf +++ b/gcp-modular/zenml.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the zenml module to create a zenml deployment module "zenml" { source = "../modules/zenml-module" diff --git a/gcp-vertexai/configure_docker.tf b/gcp-vertexai/configure_docker.tf index 4ba666e2..806d187c 100644 --- a/gcp-vertexai/configure_docker.tf +++ b/gcp-vertexai/configure_docker.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local docker client to access the newly created registry resource "null_resource" "configure-local-docker" { provisioner "local-exec" { command = "gcloud auth configure-docker --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-vertexai/configure_kubectl.tf b/gcp-vertexai/configure_kubectl.tf index e9f34a42..08fd4353 100644 --- a/gcp-vertexai/configure_kubectl.tf +++ b/gcp-vertexai/configure_kubectl.tf @@ -1,7 +1,11 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up local kubectl client to access the newly created cluster resource "null_resource" "configure-local-kubectl" { count = var.enable_mlflow ? 1 : 0 provisioner "local-exec" { command = "gcloud container clusters get-credentials ${module.gke[0].name} --region ${local.region} --project ${local.project_id}" } -} \ No newline at end of file +} diff --git a/gcp-vertexai/container_repository.tf b/gcp-vertexai/container_repository.tf index 860a471b..64b87b4d 100644 --- a/gcp-vertexai/container_repository.tf +++ b/gcp-vertexai/container_repository.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # add an optional artifact repository # resource "google_artifact_registry_repository" "artifact-repository" { # provider = google-beta @@ -7,4 +11,4 @@ # repository_id = local.artifact_repository.name # description = "A repository to host docker container images" # format = "DOCKER" -# } \ No newline at end of file +# } diff --git a/gcp-vertexai/enable_services.tf b/gcp-vertexai/enable_services.tf index e138c5b4..0fe778b8 100644 --- a/gcp-vertexai/enable_services.tf +++ b/gcp-vertexai/enable_services.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "google_project" "project" { project_id = local.project_id } diff --git a/gcp-vertexai/gcs.tf b/gcp-vertexai/gcs.tf index ca09d5fa..a79a8a8a 100644 --- a/gcp-vertexai/gcs.tf +++ b/gcp-vertexai/gcs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "google_storage_bucket" "artifact-store" { name = "${local.prefix}-${local.gcs.name}" project = local.project_id @@ -6,4 +10,4 @@ resource "google_storage_bucket" "artifact-store" { force_destroy = true uniform_bucket_level_access = true -} \ No newline at end of file +} diff --git a/gcp-vertexai/get_URIs.tf b/gcp-vertexai/get_URIs.tf index ad0f63cd..903b8726 100644 --- a/gcp-vertexai/get_URIs.tf +++ b/gcp-vertexai/get_URIs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # get URI for MLflow tracking server data "kubernetes_service" "mlflow_tracking" { count = var.enable_mlflow ? 1 : 0 @@ -9,4 +13,4 @@ data "kubernetes_service" "mlflow_tracking" { depends_on = [ module.mlflow ] -} \ No newline at end of file +} diff --git a/gcp-vertexai/gke.tf b/gcp-vertexai/gke.tf index 0fe4f70b..c2e4d153 100644 --- a/gcp-vertexai/gke.tf +++ b/gcp-vertexai/gke.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + data "google_client_config" "default" {} module "gke" { diff --git a/gcp-vertexai/helm.tf b/gcp-vertexai/helm.tf index 4e79647d..ddcf8010 100644 --- a/gcp-vertexai/helm.tf +++ b/gcp-vertexai/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -5,4 +9,4 @@ provider "helm" { token = var.enable_mlflow ? data.google_client_config.default.access_token : "" cluster_ca_certificate = var.enable_mlflow ? base64decode(module.gke[0].ca_certificate) : "" } -} \ No newline at end of file +} diff --git a/gcp-vertexai/kubernetes.tf b/gcp-vertexai/kubernetes.tf index 4c652b40..3863f37c 100644 --- a/gcp-vertexai/kubernetes.tf +++ b/gcp-vertexai/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" # not defining the kubernetes provider throws an error while running the eks module provider "kubernetes" { @@ -10,4 +14,4 @@ provider "kubectl" { host = var.enable_mlflow ? "https://${module.gke[0].endpoint}" : "" token = var.enable_mlflow ? data.google_client_config.default.access_token : "" cluster_ca_certificate = var.enable_mlflow ? base64decode(module.gke[0].ca_certificate) : "" -} \ No newline at end of file +} diff --git a/gcp-vertexai/locals.tf b/gcp-vertexai/locals.tf index f83563a5..37684ba1 100644 --- a/gcp-vertexai/locals.tf +++ b/gcp-vertexai/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { prefix = "demo" @@ -52,4 +56,4 @@ locals { "managedBy" = "terraform" "application" = local.prefix } -} \ No newline at end of file +} diff --git a/gcp-vertexai/mlflow-module/ingress.tf b/gcp-vertexai/mlflow-module/ingress.tf index 4b1f4f1d..b1cb2472 100644 --- a/gcp-vertexai/mlflow-module/ingress.tf +++ b/gcp-vertexai/mlflow-module/ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up the nginx ingress controller and the ingress with basic auth resource "kubernetes_namespace" "nginx-ns" { @@ -43,4 +47,4 @@ resource "kubernetes_ingress_v1" "mlflow-ingress" { } } } -} \ No newline at end of file +} diff --git a/gcp-vertexai/mlflow-module/mlflow.tf b/gcp-vertexai/mlflow-module/mlflow.tf index 1bca43de..6189593c 100644 --- a/gcp-vertexai/mlflow-module/mlflow.tf +++ b/gcp-vertexai/mlflow-module/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the mlflow tracking server deployment resource "helm_release" "mlflow-tracking" { @@ -63,4 +67,4 @@ resource "helm_release" "mlflow-tracking" { name = "artifactRoot.gcs.bucket" value = var.artifact_GCS_Bucket } -} \ No newline at end of file +} diff --git a/gcp-vertexai/mlflow-module/output.tf b/gcp-vertexai/mlflow-module/output.tf index 2d83335a..634cbf72 100644 --- a/gcp-vertexai/mlflow-module/output.tf +++ b/gcp-vertexai/mlflow-module/output.tf @@ -1,6 +1,10 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-controller-name" { value = helm_release.nginx-controller.name } output "ingress-controller-namespace" { value = kubernetes_namespace.nginx-ns.metadata[0].name -} \ No newline at end of file +} diff --git a/gcp-vertexai/mlflow-module/providers.tf b/gcp-vertexai/mlflow-module/providers.tf index 174c38ce..15aede9e 100644 --- a/gcp-vertexai/mlflow-module/providers.tf +++ b/gcp-vertexai/mlflow-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/gcp-vertexai/mlflow-module/secret.tf b/gcp-vertexai/mlflow-module/secret.tf index 60b2fb7d..126754b9 100644 --- a/gcp-vertexai/mlflow-module/secret.tf +++ b/gcp-vertexai/mlflow-module/secret.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a secret with user credentials resource "kubernetes_secret" "name" { metadata { @@ -10,4 +14,4 @@ resource "kubernetes_secret" "name" { data = { "auth" = var.htpasswd } -} \ No newline at end of file +} diff --git a/gcp-vertexai/mlflow-module/variables.tf b/gcp-vertexai/mlflow-module/variables.tf index 45de778b..1a5be9b4 100644 --- a/gcp-vertexai/mlflow-module/variables.tf +++ b/gcp-vertexai/mlflow-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "htpasswd" {} variable "kubernetes_sa" { @@ -52,4 +56,4 @@ variable "artifact_GCS" { variable "artifact_GCS_Bucket" { type = string default = "" -} \ No newline at end of file +} diff --git a/gcp-vertexai/mlflow.tf b/gcp-vertexai/mlflow.tf index 5f006625..ba2451fe 100644 --- a/gcp-vertexai/mlflow.tf +++ b/gcp-vertexai/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "./mlflow-module" @@ -29,4 +33,4 @@ resource "google_service_account_iam_member" "mlflow-storage-access" { depends_on = [ module.mlflow ] -} \ No newline at end of file +} diff --git a/gcp-vertexai/output_file.tf b/gcp-vertexai/output_file.tf index 57d62ec6..26135705 100644 --- a/gcp-vertexai/output_file.tf +++ b/gcp-vertexai/output_file.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file_mlflow" { @@ -69,4 +73,4 @@ resource "local_file" "stack_file" { configuration: {"project_id": "${local.project_id}"} ADD filename = "./vertex_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/gcp-vertexai/outputs.tf b/gcp-vertexai/outputs.tf index 957aeec8..8bfcea41 100644 --- a/gcp-vertexai/outputs.tf +++ b/gcp-vertexai/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # project number output "project-number" { value = data.google_project.project.number diff --git a/gcp-vertexai/terraform.tf b/gcp-vertexai/terraform.tf index a390ac3a..84a731a2 100644 --- a/gcp-vertexai/terraform.tf +++ b/gcp-vertexai/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -36,4 +40,4 @@ terraform { provider "google" { project = local.project_id -} \ No newline at end of file +} diff --git a/gcp-vertexai/variables.tf b/gcp-vertexai/variables.tf index e0833db4..b920cc26 100644 --- a/gcp-vertexai/variables.tf +++ b/gcp-vertexai/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # variables for the MLflow tracking server variable "enable_mlflow" { description = "Whether to deploy MLflow" @@ -21,4 +25,4 @@ variable "zenml-version" { description = "The version of ZenML being used" default = "0.12.0" type = string -} \ No newline at end of file +} diff --git a/gcp-vertexai/vertex.tf b/gcp-vertexai/vertex.tf index 03022930..2e1e4a09 100644 --- a/gcp-vertexai/vertex.tf +++ b/gcp-vertexai/vertex.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # workload service account for Vertex pipelines resource "google_service_account" "sa" { account_id = "${local.prefix}-${local.service_account.account_id}" diff --git a/gcp-vertexai/vpc.tf b/gcp-vertexai/vpc.tf index 792ca616..0640d909 100644 --- a/gcp-vertexai/vpc.tf +++ b/gcp-vertexai/vpc.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + module "vpc" { depends_on = [ google_project_service.compute_engine_api @@ -55,4 +59,4 @@ module "vpc" { next_hop_internet = "true" }, ] -} \ No newline at end of file +} diff --git a/k3d-modular/helm.tf b/k3d-modular/helm.tf index 398b448c..70f74f9a 100644 --- a/k3d-modular/helm.tf +++ b/k3d-modular/helm.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # A default (non-aliased) provider configuration for "helm" provider "helm" { kubernetes { @@ -14,4 +18,4 @@ provider "helm" { var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || var.enable_model_deployer_kserve || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? k3d_cluster.zenml-cluster[0].credentials.0.cluster_ca_certificate : "" } -} \ No newline at end of file +} diff --git a/k3d-modular/istio.tf b/k3d-modular/istio.tf index 30e67d84..0f28c15c 100644 --- a/k3d-modular/istio.tf +++ b/k3d-modular/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "istio" { source = "../modules/istio-module" diff --git a/k3d-modular/k3d.tf b/k3d-modular/k3d.tf index bf030cb5..f12c93be 100644 --- a/k3d-modular/k3d.tf +++ b/k3d-modular/k3d.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "random_string" "cluster_id" { length = 6 special = false diff --git a/k3d-modular/kserve.tf b/k3d-modular/kserve.tf index 88e92bf0..0d7f5724 100644 --- a/k3d-modular/kserve.tf +++ b/k3d-modular/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create kserve module module "kserve" { source = "../modules/kserve-module" diff --git a/k3d-modular/kubeflow.tf b/k3d-modular/kubeflow.tf index b81a84ad..f7b943bc 100644 --- a/k3d-modular/kubeflow.tf +++ b/k3d-modular/kubeflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the kubeflow pipelines module to create a kubeflow pipelines deployment module "kubeflow-pipelines" { source = "../modules/kubeflow-pipelines-module" @@ -16,4 +20,4 @@ module "kubeflow-pipelines" { ingress_host = (var.enable_model_deployer_kserve || var.enable_model_deployer_seldon) ? "${local.kubeflow.ingress_host_prefix}.${module.istio[0].ingress-ip-address}.nip.io" : "${local.kubeflow.ingress_host_prefix}.${module.nginx-ingress[0].ingress-ip-address}.nip.io" tls_enabled = false istio_enabled = (var.enable_model_deployer_kserve || var.enable_model_deployer_seldon) ? true : false -} \ No newline at end of file +} diff --git a/k3d-modular/kubernetes.tf b/k3d-modular/kubernetes.tf index e1dfc15d..0c8c952d 100644 --- a/k3d-modular/kubernetes.tf +++ b/k3d-modular/kubernetes.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # a default (non-aliased) provider configuration for "kubernetes" provider "kubernetes" { host = (var.enable_container_registry || var.enable_orchestrator_kubeflow || @@ -37,4 +41,4 @@ resource "kubernetes_namespace" "k8s-workloads" { depends_on = [ k3d_cluster.zenml-cluster, ] -} \ No newline at end of file +} diff --git a/k3d-modular/locals.tf b/k3d-modular/locals.tf index 5375b73a..aa6f91c4 100644 --- a/k3d-modular/locals.tf +++ b/k3d-modular/locals.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # config values to use across the module locals { k3d = { @@ -74,4 +78,4 @@ locals { "managedBy" = "terraform" "environment" = "dev" } -} \ No newline at end of file +} diff --git a/k3d-modular/minio.tf b/k3d-modular/minio.tf index 79abc8db..4d1d7bb1 100644 --- a/k3d-modular/minio.tf +++ b/k3d-modular/minio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + locals { enable_minio = (var.enable_artifact_store || var.enable_experiment_tracker_mlflow) } @@ -47,4 +51,4 @@ resource "minio_s3_bucket" "zenml_bucket" { module.nginx-ingress, module.istio, ] -} \ No newline at end of file +} diff --git a/k3d-modular/mlflow.tf b/k3d-modular/mlflow.tf index bec16464..a837c750 100644 --- a/k3d-modular/mlflow.tf +++ b/k3d-modular/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the mlflow module to create an mlflow deployment module "mlflow" { source = "../modules/mlflow-module" @@ -48,4 +52,4 @@ resource "minio_s3_bucket" "mlflow_bucket" { module.nginx-ingress, module.istio, ] -} \ No newline at end of file +} diff --git a/k3d-modular/nginx_ingress.tf b/k3d-modular/nginx_ingress.tf index 8273c6b4..8f9aed96 100644 --- a/k3d-modular/nginx_ingress.tf +++ b/k3d-modular/nginx_ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the nginx-ingress module to create an nginx-ingress deployment module "nginx-ingress" { source = "../modules/nginx-ingress-module" diff --git a/k3d-modular/output_stack.tf b/k3d-modular/output_stack.tf index 5e3a80bb..ed351e08 100644 --- a/k3d-modular/output_stack.tf +++ b/k3d-modular/output_stack.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a stack yaml file # that can be consumed by zenml stack import resource "local_file" "stack_file" { @@ -95,4 +99,4 @@ resource "local_file" "stack_file" { %{endif} ADD filename = "./k3d_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} \ No newline at end of file +} diff --git a/k3d-modular/output_test_harness_cfg.tf b/k3d-modular/output_test_harness_cfg.tf index 5e90ce4f..e95796ce 100644 --- a/k3d-modular/output_test_harness_cfg.tf +++ b/k3d-modular/output_test_harness_cfg.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Export Terraform output variable values to a ZenML test framework # configuration file that can be used to run ZenML integration tests # against the deployed MLOps stack. @@ -393,4 +397,4 @@ environments: %{endif} ADD filename = "./k3d_test_framework_cfg.yaml" -} \ No newline at end of file +} diff --git a/k3d-modular/outputs.tf b/k3d-modular/outputs.tf index 24ca4731..517858d3 100644 --- a/k3d-modular/outputs.tf +++ b/k3d-modular/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # if minio is enabled, set the artifact store outputs to the minio values # otherwise, set the artifact store outputs to empty strings output "artifact_store_id" { diff --git a/k3d-modular/seldon.tf b/k3d-modular/seldon.tf index b8e9b590..8473d559 100644 --- a/k3d-modular/seldon.tf +++ b/k3d-modular/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the seldon module for creating a # seldon + istio deployment module "seldon" { @@ -123,4 +127,4 @@ resource "kubernetes_secret" "seldon-secret" { kubernetes_namespace.seldon-workloads, module.minio_server, ] -} \ No newline at end of file +} diff --git a/k3d-modular/tekton.tf b/k3d-modular/tekton.tf index 50ec685a..93eed716 100644 --- a/k3d-modular/tekton.tf +++ b/k3d-modular/tekton.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # using the tekton pipelines module to create a tekton pipelines deployment module "tekton-pipelines" { source = "../modules/tekton-pipelines-module" diff --git a/k3d-modular/terraform.tf b/k3d-modular/terraform.tf index cedb554a..b0b79053 100644 --- a/k3d-modular/terraform.tf +++ b/k3d-modular/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -45,4 +49,4 @@ terraform { } required_version = ">= 0.14.8" -} \ No newline at end of file +} diff --git a/k3d-modular/variables.tf b/k3d-modular/variables.tf index 6723a250..4b311dd9 100644 --- a/k3d-modular/variables.tf +++ b/k3d-modular/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # enable services variable "enable_container_registry" { description = "Enable K3D registry deployment" diff --git a/modules/cert-manager-module/cert_manager.tf b/modules/cert-manager-module/cert_manager.tf index cf0eac53..5834008c 100644 --- a/modules/cert-manager-module/cert_manager.tf +++ b/modules/cert-manager-module/cert_manager.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a namespace for cert-manager resources resource "kubernetes_namespace" "cert-manager-ns" { metadata { diff --git a/modules/cert-manager-module/providers.tf b/modules/cert-manager-module/providers.tf index 915f7c66..a0a1f60f 100644 --- a/modules/cert-manager-module/providers.tf +++ b/modules/cert-manager-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the cert-manager module terraform { required_providers { diff --git a/modules/cert-manager-module/variables.tf b/modules/cert-manager-module/variables.tf index da1b581e..62d3c740 100644 --- a/modules/cert-manager-module/variables.tf +++ b/modules/cert-manager-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Helm chart version. If this is not specified, the latest version is installed. variable "chart_version" { type = string @@ -7,4 +11,4 @@ variable "chart_version" { variable "namespace" { type = string default = "cert-manager" -} \ No newline at end of file +} diff --git a/modules/gcp-cloudsql-module/outputs.tf b/modules/gcp-cloudsql-module/outputs.tf index c2da4aec..165d86b2 100644 --- a/modules/gcp-cloudsql-module/outputs.tf +++ b/modules/gcp-cloudsql-module/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "zenml_server_url" { value = var.create_ingress_controller ? "https://${data.kubernetes_service.ingress-controller[0].status.0.load_balancer.0.ingress.0.ip}.nip.io/${var.ingress_path}" : "https://${var.ingress_controller_hostname}.nip.io/${var.ingress_path}" } diff --git a/modules/gcp-cloudsql-module/sql.tf b/modules/gcp-cloudsql-module/sql.tf index d95c8724..0cad1b1a 100644 --- a/modules/gcp-cloudsql-module/sql.tf +++ b/modules/gcp-cloudsql-module/sql.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + module "cloudsql" { source = "GoogleCloudPlatform/sql-db/google//modules/mysql" version = "11.0.0" @@ -48,4 +52,4 @@ resource "local_file" "client-cert" { resource "local_file" "client-key" { content = google_sql_ssl_cert.client_cert.private_key filename = "./client-key.pem" -} \ No newline at end of file +} diff --git a/modules/gcp-cloudsql-module/terraform.tf b/modules/gcp-cloudsql-module/terraform.tf index e6c1eb41..68db43aa 100644 --- a/modules/gcp-cloudsql-module/terraform.tf +++ b/modules/gcp-cloudsql-module/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -26,4 +30,4 @@ terraform { provider "google" { project = var.project_id -} \ No newline at end of file +} diff --git a/modules/gcp-cloudsql-module/variables.tf b/modules/gcp-cloudsql-module/variables.tf index 93bda229..161b9c62 100644 --- a/modules/gcp-cloudsql-module/variables.tf +++ b/modules/gcp-cloudsql-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "project_id" { description = "The GCP project for your resources" type = string diff --git a/modules/istio-module/istio.tf b/modules/istio-module/istio.tf index 13b29e1f..253c030d 100644 --- a/modules/istio-module/istio.tf +++ b/modules/istio-module/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a namespace for istio resources resource "kubernetes_namespace" "istio-ns" { metadata { diff --git a/modules/istio-module/outputs.tf b/modules/istio-module/outputs.tf index 45d25c15..b0a20a6a 100644 --- a/modules/istio-module/outputs.tf +++ b/modules/istio-module/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-ip-address" { value = data.kubernetes_service.istio_ingress.status.0.load_balancer.0.ingress.0.ip } diff --git a/modules/istio-module/providers.tf b/modules/istio-module/providers.tf index 0013f3ff..a7349a05 100644 --- a/modules/istio-module/providers.tf +++ b/modules/istio-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the seldon module terraform { required_providers { diff --git a/modules/istio-module/variables.tf b/modules/istio-module/variables.tf index 9de121ce..8946d5e0 100644 --- a/modules/istio-module/variables.tf +++ b/modules/istio-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "namespace" { type = string default = "istio-system" diff --git a/modules/kserve-module/knative_serving.tf b/modules/kserve-module/knative_serving.tf index 578d9325..d972a4d0 100644 --- a/modules/kserve-module/knative_serving.tf +++ b/modules/kserve-module/knative_serving.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "null_resource" "knative-serving" { triggers = { knative_version = var.knative_version diff --git a/modules/kserve-module/kserve.tf b/modules/kserve-module/kserve.tf index d03ce5ca..ed5fe5d6 100644 --- a/modules/kserve-module/kserve.tf +++ b/modules/kserve-module/kserve.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + resource "null_resource" "kserve" { triggers = { kserve_version = var.kserve_version @@ -37,4 +41,4 @@ resource "null_resource" "kserve" { # depends_on = [ # null_resource.kserve, # ] -# } \ No newline at end of file +# } diff --git a/modules/kserve-module/output.tf b/modules/kserve-module/output.tf index 1ff1f129..1650506b 100644 --- a/modules/kserve-module/output.tf +++ b/modules/kserve-module/output.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "kserve-base-URL" { value = "https://${var.kserve_domain}" } diff --git a/modules/kserve-module/providers.tf b/modules/kserve-module/providers.tf index 8ba8fc31..545c1f40 100644 --- a/modules/kserve-module/providers.tf +++ b/modules/kserve-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/modules/kserve-module/variables.tf b/modules/kserve-module/variables.tf index c76894bb..b13458cc 100644 --- a/modules/kserve-module/variables.tf +++ b/modules/kserve-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "knative_version" { type = string default = "1.8.1" diff --git a/modules/kubeflow-pipelines-module/kubeflow.tf b/modules/kubeflow-pipelines-module/kubeflow.tf index 96fe6352..ecb97c8c 100644 --- a/modules/kubeflow-pipelines-module/kubeflow.tf +++ b/modules/kubeflow-pipelines-module/kubeflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up kubeflow pipelines resource "null_resource" "kubeflow" { triggers = { diff --git a/modules/kubeflow-pipelines-module/output.tf b/modules/kubeflow-pipelines-module/output.tf index 818fe3b2..78c7c903 100644 --- a/modules/kubeflow-pipelines-module/output.tf +++ b/modules/kubeflow-pipelines-module/output.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "pipelines-ui-URL" { value = "${var.tls_enabled ? "https" : "http"}://${var.ingress_host}" } diff --git a/modules/kubeflow-pipelines-module/providers.tf b/modules/kubeflow-pipelines-module/providers.tf index 8ba8fc31..545c1f40 100644 --- a/modules/kubeflow-pipelines-module/providers.tf +++ b/modules/kubeflow-pipelines-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/modules/kubeflow-pipelines-module/variables.tf b/modules/kubeflow-pipelines-module/variables.tf index e007a69e..16edfc03 100644 --- a/modules/kubeflow-pipelines-module/variables.tf +++ b/modules/kubeflow-pipelines-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "pipeline_version" { type = string default = "1.8.3" @@ -16,4 +20,4 @@ variable "tls_enabled" { variable "istio_enabled" { type = bool default = false -} \ No newline at end of file +} diff --git a/modules/minio-module/minio.tf b/modules/minio-module/minio.tf index 833f5567..fb02bc66 100644 --- a/modules/minio-module/minio.tf +++ b/modules/minio-module/minio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # Create namespace for minio resource "kubernetes_namespace" "minio-namespace" { metadata { diff --git a/modules/minio-module/output.tf b/modules/minio-module/output.tf index 65949cd3..eac0095b 100644 --- a/modules/minio-module/output.tf +++ b/modules/minio-module/output.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "minio-server-endpoint" { value = var.ingress_host } diff --git a/modules/minio-module/providers.tf b/modules/minio-module/providers.tf index b87e1643..c90fe5db 100644 --- a/modules/minio-module/providers.tf +++ b/modules/minio-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/modules/minio-module/variables.tf b/modules/minio-module/variables.tf index 552a8fc7..8b1f02e9 100644 --- a/modules/minio-module/variables.tf +++ b/modules/minio-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "minio_storage_size" { description = "The size of the Minio storage volume" default = "20Gi" @@ -26,4 +30,4 @@ variable "tls_enabled" { variable "istio_enabled" { type = bool default = false -} \ No newline at end of file +} diff --git a/modules/mlflow-module/mlflow.tf b/modules/mlflow-module/mlflow.tf index f18cc151..9373e24a 100644 --- a/modules/mlflow-module/mlflow.tf +++ b/modules/mlflow-module/mlflow.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the mlflow tracking server namespace resource "kubernetes_namespace" "mlflow" { metadata { @@ -159,4 +163,4 @@ resource "helm_release" "mlflow-tracking" { depends_on = [ resource.kubernetes_namespace.mlflow ] -} \ No newline at end of file +} diff --git a/modules/mlflow-module/output.tf b/modules/mlflow-module/output.tf index cddd359e..3feaf966 100644 --- a/modules/mlflow-module/output.tf +++ b/modules/mlflow-module/output.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "mlflow-tracking-URL" { value = "${var.tls_enabled ? "https" : "http"}://${var.ingress_host}" } diff --git a/modules/mlflow-module/providers.tf b/modules/mlflow-module/providers.tf index 174c38ce..15aede9e 100644 --- a/modules/mlflow-module/providers.tf +++ b/modules/mlflow-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/modules/mlflow-module/secret.tf b/modules/mlflow-module/secret.tf index e2b40648..57c6fefe 100644 --- a/modules/mlflow-module/secret.tf +++ b/modules/mlflow-module/secret.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create a secret with user credentials resource "kubernetes_secret" "name" { metadata { @@ -13,4 +17,4 @@ resource "kubernetes_secret" "name" { } depends_on = [resource.kubernetes_namespace.mlflow] -} \ No newline at end of file +} diff --git a/modules/mlflow-module/variables.tf b/modules/mlflow-module/variables.tf index 6496efe6..4e54aa5f 100644 --- a/modules/mlflow-module/variables.tf +++ b/modules/mlflow-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "namespace" { type = string default = "mlflow" @@ -74,4 +78,4 @@ variable "artifact_GCS_Bucket" { variable "istio_enabled" { type = bool default = false -} \ No newline at end of file +} diff --git a/modules/nginx-ingress-module/ingress.tf b/modules/nginx-ingress-module/ingress.tf index 527a85fb..845a4259 100644 --- a/modules/nginx-ingress-module/ingress.tf +++ b/modules/nginx-ingress-module/ingress.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up the nginx ingress controller resource "kubernetes_namespace" "nginx-ns" { metadata { diff --git a/modules/nginx-ingress-module/output.tf b/modules/nginx-ingress-module/output.tf index d8fcbf8a..05750fdb 100644 --- a/modules/nginx-ingress-module/output.tf +++ b/modules/nginx-ingress-module/output.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "ingress-controller-name" { value = helm_release.nginx-controller.name } @@ -21,4 +25,4 @@ data "external" "getIP" { output "ingress-ip-address-aws" { value = data.external.getIP.result.ip -} \ No newline at end of file +} diff --git a/modules/nginx-ingress-module/providers.tf b/modules/nginx-ingress-module/providers.tf index 016baee5..f0cfc10b 100644 --- a/modules/nginx-ingress-module/providers.tf +++ b/modules/nginx-ingress-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the nginx-ingress module terraform { required_providers { diff --git a/modules/nginx-ingress-module/variables.tf b/modules/nginx-ingress-module/variables.tf index 86e1b7fd..75c98de0 100644 --- a/modules/nginx-ingress-module/variables.tf +++ b/modules/nginx-ingress-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "namespace" { type = string default = "ingress-nginx" diff --git a/modules/seldon-module/istio.tf b/modules/seldon-module/istio.tf index a9428523..4daeb84a 100644 --- a/modules/seldon-module/istio.tf +++ b/modules/seldon-module/istio.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # the seldon istio ingress gateway # cannot use kubernetes_manifest resource since it practically # doesn't support CRDs. Going with kubectl instead. diff --git a/modules/seldon-module/output.tf b/modules/seldon-module/output.tf index e69de29b..fb4846f6 100644 --- a/modules/seldon-module/output.tf +++ b/modules/seldon-module/output.tf @@ -0,0 +1,4 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + diff --git a/modules/seldon-module/providers.tf b/modules/seldon-module/providers.tf index 0013f3ff..a7349a05 100644 --- a/modules/seldon-module/providers.tf +++ b/modules/seldon-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the seldon module terraform { required_providers { diff --git a/modules/seldon-module/seldon.tf b/modules/seldon-module/seldon.tf index 5195859b..d4fc5612 100644 --- a/modules/seldon-module/seldon.tf +++ b/modules/seldon-module/seldon.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # creating the namespace for the seldon deployment resource "kubernetes_namespace" "seldon-ns" { metadata { @@ -36,4 +40,4 @@ resource "helm_release" "seldon" { depends_on = [ resource.kubernetes_namespace.seldon-ns ] -} \ No newline at end of file +} diff --git a/modules/seldon-module/variables.tf b/modules/seldon-module/variables.tf index 1b24bbe8..363efb7e 100644 --- a/modules/seldon-module/variables.tf +++ b/modules/seldon-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "namespace" { type = string @@ -15,4 +19,4 @@ variable "istio_ns" { variable "chart_version" { type = string default = "1.15.0" -} \ No newline at end of file +} diff --git a/modules/tekton-pipelines-module/output.tf b/modules/tekton-pipelines-module/output.tf index 818fe3b2..78c7c903 100644 --- a/modules/tekton-pipelines-module/output.tf +++ b/modules/tekton-pipelines-module/output.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "pipelines-ui-URL" { value = "${var.tls_enabled ? "https" : "http"}://${var.ingress_host}" } diff --git a/modules/tekton-pipelines-module/providers.tf b/modules/tekton-pipelines-module/providers.tf index 8ba8fc31..545c1f40 100644 --- a/modules/tekton-pipelines-module/providers.tf +++ b/modules/tekton-pipelines-module/providers.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers required by the mlflow module terraform { required_providers { diff --git a/modules/tekton-pipelines-module/tekton.tf b/modules/tekton-pipelines-module/tekton.tf index 956c635d..c49ea472 100644 --- a/modules/tekton-pipelines-module/tekton.tf +++ b/modules/tekton-pipelines-module/tekton.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # set up tekton pipelines resource "null_resource" "tekton" { triggers = { diff --git a/modules/tekton-pipelines-module/variables.tf b/modules/tekton-pipelines-module/variables.tf index 4263abf1..036c7684 100644 --- a/modules/tekton-pipelines-module/variables.tf +++ b/modules/tekton-pipelines-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "pipeline_version" { type = string default = "0.42.0" @@ -20,4 +24,4 @@ variable "tls_enabled" { variable "istio_enabled" { type = bool default = false -} \ No newline at end of file +} diff --git a/modules/zenml-module/outputs.tf b/modules/zenml-module/outputs.tf index d5a918ec..b54bf044 100644 --- a/modules/zenml-module/outputs.tf +++ b/modules/zenml-module/outputs.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + output "zenml_server_url" { value = "https://${var.ingress_host}" } diff --git a/modules/zenml-module/terraform.tf b/modules/zenml-module/terraform.tf index 0196e4bb..86d31ea0 100644 --- a/modules/zenml-module/terraform.tf +++ b/modules/zenml-module/terraform.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # defining the providers for the recipe module terraform { required_providers { @@ -33,4 +37,4 @@ terraform { } required_version = ">= 0.14.8" -} \ No newline at end of file +} diff --git a/modules/zenml-module/variables.tf b/modules/zenml-module/variables.tf index 2032d1d3..376de99c 100644 --- a/modules/zenml-module/variables.tf +++ b/modules/zenml-module/variables.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + variable "chart_version" { description = "The ZenML chart version to use. Leave empty to use the latest." diff --git a/modules/zenml-module/zen_server.tf b/modules/zenml-module/zen_server.tf index 105f4dd6..444388a3 100644 --- a/modules/zenml-module/zen_server.tf +++ b/modules/zenml-module/zen_server.tf @@ -1,3 +1,7 @@ +# DEPRECATION WARNING: This code has been deprecated +# The maintained & current code can be found at src/mlstacks/terraform/ +# under the same relative location. + # create the ZenML Server deployment resource "kubernetes_namespace" "zen-server" { metadata { @@ -166,4 +170,4 @@ data "kubernetes_secret" "certificates" { depends_on = [ helm_release.zen-server ] -} \ No newline at end of file +} diff --git a/src/mlstacks/cli/cli.py b/src/mlstacks/cli/cli.py index b90a14c1..d2afc883 100644 --- a/src/mlstacks/cli/cli.py +++ b/src/mlstacks/cli/cli.py @@ -11,6 +11,7 @@ # or implied. See the License for the specific language governing # permissions and limitations under the License. """CLI for mlstacks.""" + import random import shutil import string diff --git a/src/mlstacks/constants.py b/src/mlstacks/constants.py index 1216c784..3b88745b 100644 --- a/src/mlstacks/constants.py +++ b/src/mlstacks/constants.py @@ -12,6 +12,8 @@ # permissions and limitations under the License. """MLStacks constants.""" +from typing import Dict, List + MLSTACKS_PACKAGE_NAME = "mlstacks" MLSTACKS_INITIALIZATION_FILE_FLAG = "IGNORE_ME" MLSTACKS_STACK_COMPONENT_FLAGS = [ @@ -39,6 +41,52 @@ "model_deployer": ["seldon"], "step_operator": ["sagemaker", "vertex"], } +ALLOWED_COMPONENT_TYPES: Dict[str, Dict[str, List[str]]] = { + "aws": { + "artifact_store": ["s3"], + "container_registry": ["aws"], + "experiment_tracker": ["mlflow"], + "orchestrator": [ + "kubeflow", + "kubernetes", + "sagemaker", + "skypilot", + "tekton", + ], + "mlops_platform": ["zenml"], + "model_deployer": ["seldon"], + "step_operator": ["sagemaker"], + }, + "azure": {}, + "gcp": { + "artifact_store": ["gcp"], + "container_registry": ["gcp"], + "experiment_tracker": ["mlflow"], + "orchestrator": [ + "kubeflow", + "kubernetes", + "skypilot", + "tekton", + "vertex", + ], + "mlops_platform": ["zenml"], + "model_deployer": ["seldon"], + "step_operator": ["vertex"], + }, + "k3d": { + "artifact_store": ["minio"], + "container_registry": ["default"], + "experiment_tracker": ["mlflow"], + "orchestrator": [ + "kubeflow", + "kubernetes", + "sagemaker", + "tekton", + ], + "mlops_platform": ["zenml"], + "model_deployer": ["seldon"], + }, +} PERMITTED_NAME_REGEX = r"^[a-zA-Z0-9][a-zA-Z0-9_-]*$" ANALYTICS_OPT_IN_ENV_VARIABLE = "MLSTACKS_ANALYTICS_OPT_IN" @@ -49,5 +97,19 @@ "contain alphanumeric characters, underscores, and hyphens " "thereafter." ) +INVALID_COMPONENT_TYPE_ERROR_MESSAGE = ( + "Artifact Store, Container Registry, Experiment Tracker, Orchestrator, " + "MLOps Platform, and Model Deployer may be used with aws, gcp, and k3d " + "providers. Step Operator may only be used with aws and gcp." +) +INVALID_COMPONENT_FLAVOR_ERROR_MESSAGE = ( + "Only certain flavors are allowed for a given provider-component type " + "combination. For more information, consult the tables for your specified " + "provider at the MLStacks documentation: " + "https://mlstacks.zenml.io/stacks/stack-specification." +) +STACK_COMPONENT_PROVIDER_MISMATCH_ERROR_MESSAGE = ( + "Stack provider and component provider mismatch." +) DEFAULT_REMOTE_STATE_BUCKET_NAME = "zenml-mlstacks-remote-state" TERRAFORM_CONFIG_BUCKET_REPLACEMENT_STRING = "BUCKETNAMEREPLACEME" diff --git a/src/mlstacks/enums.py b/src/mlstacks/enums.py index 45bbada8..122e2806 100644 --- a/src/mlstacks/enums.py +++ b/src/mlstacks/enums.py @@ -49,6 +49,7 @@ class ComponentFlavorEnum(str, Enum): TEKTON = "tekton" VERTEX = "vertex" ZENML = "zenml" + DEFAULT = "default" class DeploymentMethodEnum(str, Enum): @@ -77,3 +78,22 @@ class AnalyticsEventsEnum(str, Enum): MLSTACKS_SOURCE = "MLStacks Source" MLSTACKS_EXCEPTION = "MLStacks Exception" MLSTACKS_VERSION = "MLStacks Version" + + +class SpecTypeEnum(str, Enum): + """Spec type enum.""" + + STACK = "stack" + COMPONENT = "component" + + +class StackSpecVersionEnum(int, Enum): + """Spec version enum.""" + + ONE = 1 + + +class ComponentSpecVersionEnum(int, Enum): + """Spec version enum.""" + + ONE = 1 diff --git a/src/mlstacks/models/component.py b/src/mlstacks/models/component.py index df64c100..dfc1e544 100644 --- a/src/mlstacks/models/component.py +++ b/src/mlstacks/models/component.py @@ -14,15 +14,25 @@ from typing import Dict, Optional -from pydantic import field_validator, BaseModel +from pydantic import BaseModel, field_validator -from mlstacks.constants import INVALID_NAME_ERROR_MESSAGE +from mlstacks.constants import ( + INVALID_COMPONENT_FLAVOR_ERROR_MESSAGE, + INVALID_COMPONENT_TYPE_ERROR_MESSAGE, + INVALID_NAME_ERROR_MESSAGE, +) from mlstacks.enums import ( ComponentFlavorEnum, + ComponentSpecVersionEnum, ComponentTypeEnum, ProviderEnum, + SpecTypeEnum, +) +from mlstacks.utils.model_utils import ( + is_valid_component_flavor, + is_valid_component_type, + is_valid_name, ) -from mlstacks.utils.model_utils import is_valid_name class ComponentMetadata(BaseModel): @@ -49,12 +59,12 @@ class Component(BaseModel): metadata: The metadata of the component. """ - spec_version: int = 1 - spec_type: str = "component" + spec_version: ComponentSpecVersionEnum = ComponentSpecVersionEnum.ONE + spec_type: SpecTypeEnum = SpecTypeEnum.COMPONENT name: str + provider: ProviderEnum component_type: ComponentTypeEnum component_flavor: ComponentFlavorEnum - provider: ProviderEnum metadata: Optional[ComponentMetadata] = None @field_validator("name") @@ -79,3 +89,46 @@ def validate_name(cls, name: str) -> str: # noqa: N805 if not is_valid_name(name): raise ValueError(INVALID_NAME_ERROR_MESSAGE) return name + + @field_validator("component_type", mode="after") + def validate_component_type(self, component_type: str) -> str: + """Validate the component type. + + Artifact Store, Container Registry, Experiment Tracker, Orchestrator, + MLOps Platform, and Model Deployer may be used with aws, gcp, and k3d + providers. Step Operator may only be used with aws and gcp. + + Args: + component_type: The component type. + + Returns: + The validated component type. + + Raises: + ValueError: If the component type is invalid. + """ + if not is_valid_component_type(component_type, self.provider): + raise ValueError(INVALID_COMPONENT_TYPE_ERROR_MESSAGE) + return component_type + + @field_validator("component_flavor", mode="after") + def validate_component_flavor(self, component_flavor: str) -> str: + """Validate the component flavor. + + Only certain flavors are allowed for a given provider-component + type combination. For more information, consult the tables for + your specified provider at the MLStacks documentation: + https://mlstacks.zenml.io/stacks/stack-specification. + + Args: + component_flavor: The component flavor. + + Returns: + The validated component flavor. + + Raises: + ValueError: If the component flavor is invalid. + """ + if not is_valid_component_flavor(component_flavor, dict(self)): + raise ValueError(INVALID_COMPONENT_FLAVOR_ERROR_MESSAGE) + return component_flavor diff --git a/src/mlstacks/models/stack.py b/src/mlstacks/models/stack.py index 8334b671..2fc33a13 100644 --- a/src/mlstacks/models/stack.py +++ b/src/mlstacks/models/stack.py @@ -11,14 +11,17 @@ # or implied. See the License for the specific language governing # permissions and limitations under the License. """Stack model.""" + from typing import Dict, List, Optional -from pydantic import field_validator, BaseModel +from pydantic import BaseModel, field_validator from mlstacks.constants import INVALID_NAME_ERROR_MESSAGE from mlstacks.enums import ( DeploymentMethodEnum, ProviderEnum, + SpecTypeEnum, + StackSpecVersionEnum, ) from mlstacks.models.component import Component from mlstacks.utils.model_utils import is_valid_name @@ -38,15 +41,15 @@ class Stack(BaseModel): components: The components of the stack. """ - spec_version: int = 1 - spec_type: str = "stack" + spec_version: StackSpecVersionEnum = StackSpecVersionEnum.ONE + spec_type: SpecTypeEnum = SpecTypeEnum.STACK name: str provider: ProviderEnum default_region: Optional[str] = None default_tags: Optional[Dict[str, str]] = None - deployment_method: Optional[ - DeploymentMethodEnum - ] = DeploymentMethodEnum.KUBERNETES + deployment_method: Optional[DeploymentMethodEnum] = ( + DeploymentMethodEnum.KUBERNETES + ) components: List[Component] = [] @field_validator("name") diff --git a/src/mlstacks/terraform/remote-state-terraform-config/terraform-aws.tf b/src/mlstacks/terraform/remote-state-terraform-config/terraform-aws.tf index 61e0b73a..f662ccbe 100644 --- a/src/mlstacks/terraform/remote-state-terraform-config/terraform-aws.tf +++ b/src/mlstacks/terraform/remote-state-terraform-config/terraform-aws.tf @@ -1,8 +1,13 @@ # defining the providers for the recipe module terraform { required_providers { - google = { - source = "hashicorp/google" + aws = { + source = "hashicorp/aws" + } + + random = { + source = "hashicorp/random" + version = "3.1.0" } local = { @@ -40,6 +45,6 @@ terraform { required_version = ">= 0.14.8" } -provider "google" { - project = var.project_id +provider "aws" { + region = var.region } diff --git a/src/mlstacks/utils/environment_utils.py b/src/mlstacks/utils/environment_utils.py index d43c1a4b..cbb3bb4d 100644 --- a/src/mlstacks/utils/environment_utils.py +++ b/src/mlstacks/utils/environment_utils.py @@ -11,6 +11,7 @@ # or implied. See the License for the specific language governing # permissions and limitations under the License. """Environment utilities for mlstacks.""" + import os diff --git a/src/mlstacks/utils/model_utils.py b/src/mlstacks/utils/model_utils.py index 286382e3..e42c23d5 100644 --- a/src/mlstacks/utils/model_utils.py +++ b/src/mlstacks/utils/model_utils.py @@ -13,8 +13,9 @@ """Util functions for Pydantic models and validation.""" import re +from typing import Any, Dict -from mlstacks.constants import PERMITTED_NAME_REGEX +from mlstacks.constants import ALLOWED_COMPONENT_TYPES, PERMITTED_NAME_REGEX def is_valid_name(name: str) -> bool: @@ -29,3 +30,46 @@ def is_valid_name(name: str) -> bool: True if the name is valid, False otherwise. """ return re.match(PERMITTED_NAME_REGEX, name) is not None + + +def is_valid_component_type(component_type: str, provider: str) -> bool: + """Check if the component type is valid. + + Used for components. + + Args: + component_type: The component type. + provider: The provider. + + Returns: + True if the component type is valid, False otherwise. + """ + allowed_types = list(ALLOWED_COMPONENT_TYPES[provider].keys()) + return component_type in allowed_types + + +def is_valid_component_flavor( + component_flavor: str, specs: Dict[str, Any] +) -> bool: + """Check if the component flavor is valid. + + Used for components. + + Args: + component_flavor: The component flavor. + specs: The previously validated component specs. + + Returns: + True if the component flavor is valid, False otherwise. + """ + try: + is_valid = ( + component_flavor + in ALLOWED_COMPONENT_TYPES[specs["provider"]][ + specs["component_type"] + ] + ) + except KeyError: + return False + + return is_valid diff --git a/src/mlstacks/utils/yaml_utils.py b/src/mlstacks/utils/yaml_utils.py index 422e5cdf..d29c8d9c 100644 --- a/src/mlstacks/utils/yaml_utils.py +++ b/src/mlstacks/utils/yaml_utils.py @@ -11,11 +11,13 @@ # or implied. See the License for the specific language governing # permissions and limitations under the License. """Utility functions for loading YAML files into Python objects.""" + from pathlib import Path from typing import Any, Dict, Union import yaml +from mlstacks.constants import STACK_COMPONENT_PROVIDER_MISMATCH_ERROR_MESSAGE from mlstacks.models.component import ( Component, ComponentMetadata, @@ -57,9 +59,17 @@ def load_component_yaml(path: str) -> Component: Returns: The component model. + + Raises: + FileNotFoundError: If the file is not found. """ - with open(path) as file: - component_data = yaml.safe_load(file) + try: + with open(path) as file: + component_data = yaml.safe_load(file) + except FileNotFoundError as exc: + error_message = f"""Component file at "{path}" specified in + the stack spec file could not be found.""" + raise FileNotFoundError(error_message) from exc if component_data.get("metadata") is None: component_data["metadata"] = {} @@ -88,6 +98,9 @@ def load_stack_yaml(path: str) -> Stack: Returns: The stack model. + + Raises: + ValueError: If the stack and component have different providers """ with open(path) as yaml_file: stack_data = yaml.safe_load(yaml_file) @@ -95,7 +108,8 @@ def load_stack_yaml(path: str) -> Stack: if component_data is None: component_data = [] - return Stack( + + stack = Stack( spec_version=stack_data.get("spec_version"), spec_type=stack_data.get("spec_type"), name=stack_data.get("name"), @@ -107,3 +121,9 @@ def load_stack_yaml(path: str) -> Stack: load_component_yaml(component) for component in component_data ], ) + + for component in stack.components: + if component.provider != stack.provider: + raise ValueError(STACK_COMPONENT_PROVIDER_MISMATCH_ERROR_MESSAGE) + + return stack diff --git a/tests/integration/README.md b/tests/integration/README.md new file mode 100644 index 00000000..500c56ea --- /dev/null +++ b/tests/integration/README.md @@ -0,0 +1,335 @@ +# Integrating Local Testing of AWS Deployments in MLStacks Using LocalStack + +## Prerequisites + +- Docker +- AWS CLI +- Terraform + +## LocalStack + +[LocalStack](https://www.localstack.cloud/) is a powerful tool that simulates AWS cloud services on your local machine, providing a development environment that closely mirrors the live AWS environment without incurring the costs associated with real AWS services. It supports a wide range of AWS services, allowing you to test various deployment configurations before pushing them to AWS. For more information and a complete guide on how to use LocalStack, visit the [LocalStack Documentation](https://docs.localstack.cloud/getting-started/). + +### Installation + +Installation can be done via Homebrew, PIP, Docker CLI, or Docker Compose. For detailed instructions, refer to the [LocalStack Installation Guide](https://docs.localstack.cloud/getting-started/installation/). + +**Homebrew** + +```bash +brew install localstack/tap/localstack-cli +``` + +**PIP** + +```bash +python -m venv .venv +source .venv/bin/activate +pip install localstack +``` + +### Starting LocalStack + +First, ensure Docker is running. Then, you can start LocalStack using the LocalStack CLI, Docker or Docker Compose. + +**LocalStack CLI** + +```bash +localstack start -d +``` + +**Docker CLI** + +```bash +docker run --rm -it -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack +``` + +**Docker Compose** + +Use the `docker-compose.localstack.yml` file in `test/integration` for an easy setup. From that directory, run: + +```bash +docker-compose -f docker-compose.localstack.yml up -d +``` + +> You may customize this file as needed. If you don't specify any services, LocalStack defaults to running all supported AWS services. Refer to the [LocalStack Docker Compose guide](https://docs.localstack.cloud/getting-started/installation/#starting-localstack-with-docker-compose) for more details. + +### Interacting with LocalStack + +Once LocalStack is running, interact with it using `aws` commands by specifying the `endpoint-url`. +For instance, to create an S3 bucket: + +```bash +aws --endpoint-url=http://localhost:4566 s3 mb mybucket +``` + +To avoid having to specify the `endpoint-url` with each command, you can install the [awscli-local](https://github.com/localstack/awscli-local) package. It provides the `awslocal` command, which automatically targets the LocalStack endpoint. + +So you can simply do this... + +```bash +awslocal s3 mb s3://test-bucket +``` + +Instead of this... + +```bash +aws --endpoint-url=http://localhost:4566 s3 mb mybucket +``` + +#### Installation + +```bash +pip install awscli-local +``` + +#### Usage examples + +List all buckets: + +```bash +awslocal s3 ls +``` + +Create a DynamoDB table: + +```bash +awslocal dynamodb create-table \ + --table-name test-table \ + --key-schema AttributeName=id,KeyType=HASH \ + --attribute-definitions AttributeName=id,AttributeType=S \ + --billing-mode PAY_PER_REQUEST \ + --region eu-north-1 +``` + +List DynamoDB tables: + +```bash +awslocal dynamodb list-tables --region eu-north-1 +``` + +> **Note:** > **Most AWS services require specifying the region when using LocalStack, except for S3, which is globally accessible.** + +## Provisioning AWS resources with Terraform + LocalStack + +To simulate the deployment of AWS resources locally, we utilize Terraform in conjunction with LocalStack. + +### Terraform Configuration + +Instead of relying solely on traditional Terraform files, we incorporate `.tfvars` files to specify resource configurations. These files are used in conjunction with generic Terraform configuration files located in the project's Terraform directories (`aws-modular` and `aws-remote-state`). + +`.tfvars` files enable external variable definitions for Terraform, allowing for dynamic adjustments to resource specifications and testing parameters without modifying the primary Terraform configuration. Refer to the [`.tfvars` documentation](https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files) for more details. + +**Example .`tfvars` file for `aws-modular`:** + +```hcl +region = "eu-north-1" +bucket_name = "local-artifact-store-1" +enable_orchestrator_skypilot = true +``` + +**Example `.tfvars` for `aws-remote-state`**: + +```hcl +region = "eu-north-1" +bucket_name = "local-artifact-store-2" +dynamo_table_name = "remote-terraform-state-locks" +force_destroy = true +``` + +## GitHub Actions Workflow for AWS Integration Testing + +This documentation describes the GitHub Actions workflow for LocalStack-based AWS integration testing within MLStacks. It features two primary jobs: `aws_remote_state_integration_test` and `aws_modular_integration_test`, aimed at provisioning and validating AWS resources in a local setup. + +### Implementing Terraform Overrides + +For simulating AWS resources in our integration tests, we have two approaches: + +1. Manual configuration using override files. +2. Utilizing `tflocal` for a more automated setup. + +#### [Manual Configuration](https://docs.localstack.cloud/user-guide/integrations/terraform/#manual-configuration) + +We have adopted the manual configuration method using an `_override.tf` file to specify provider settings tailored for LocalStack. +This approach allows us to directly manipulate how Terraform interacts with AWS services. + +> Terraform inherently recognizes any file ending in `override.tf` as an override file, allowing you to alter configurations without modifying the primary Terraform files. +> Detailed guidance on employing override files is available in the [Terraform Override Files Documentation](https://developer.hashicorp.com/terraform/language/files/override). + +#### Alternative: [Using `terraform-local`](https://docs.localstack.cloud/user-guide/integrations/terraform/) + +For an automated setup, you can install the [`terraform-local`](https://github.com/localstack/terraform-local) package, which provides the `tflocal` command. It acts as a wrapper around Terraform commands, automatically adjusting them for compatibility with LocalStack. This eliminates the need for manual endpoint configuration, but requires additional setup for `tflocal`. + +## Workflow Setup + +### Trigger Events + +The workflow is designed to be triggered on two events: + +- `workflow_call`: Allows this workflow to be called from other workflows within the repository. +- `workflow_dispatch`: Enables manual triggering of the workflow from the GitHub Actions UI. + +```yml +on: + workflow_call: + workflow_dispatch: +``` + +## Jobs Overview + +### AWS Modular Integration Test + +This job tests the provisioning of AWS resources, including the optional SkyPilot orchestrator, within the `aws-modular` configuration. + +#### Setup LocalStack Service + +- Uses a service container to spin up LocalStack, mapping port 4566 for AWS service emulation. +- Configures AWS services (`s3`, `iam`, `sts`) and sets the default region to `eu-north-1`. + +```yml +services: + setup-localstack-service: + image: localstack/localstack + ports: + - '4566:4566' + env: + SERVICES: 's3,iam,sts' + DEFAULT_REGION: eu-north-1 + FORCE_NONINTERACTIVE: 1 + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test +``` + +#### Steps + +```yml +steps: + - name: Checkout Repository + uses: actions/checkout@v4.1.1 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3.0.0 + with: + terraform_version: 1.6.0 + + - name: Copy Override File + run: | + cp tests/integration/_override.tf src/mlstacks/terraform/aws-modular/_override.tf + + - name: Apply Terraform Configuration + run: | + export TF_CLI_ARGS_apply="-compact-warnings" + terraform init -backend-config="path=./terraform.tfstate" + terraform validate + terraform apply -auto-approve -var-file="../../../../tests/integration/aws-modular/local.tfvars" + working-directory: src/mlstacks/terraform/aws-modular + + - name: Refresh Terraform State + run: terraform refresh + working-directory: src/mlstacks/terraform/aws-modular + + - name: Output Stack YAML Path + id: set_output + run: | + OUTPUT=$(terraform-bin output -raw stack-yaml-path) + echo "stack_yaml_path=$OUTPUT" >> $GITHUB_OUTPUT + working-directory: src/mlstacks/terraform/aws-modular + env: + terraform_wrapper: false + + - name: Run Tests to Verify Resource Provisioning + run: | + STACK_YAML_PATH="${{ steps.set_output.outputs.stack_yaml_path }}" + ABSOLUTE_PATH="${GITHUB_WORKSPACE}/src/mlstacks/terraform/aws-modular/${STACK_YAML_PATH}" + ../../../../tests/integration/aws-modular/verify_stack.sh "$ABSOLUTE_PATH" + working-directory: src/mlstacks/terraform/aws-modular +``` + +- **Copy Override File**: Copies the `_override.tf` file into the `aws-modular` directory to ensure Terraform operations target the LocalStack environment. +- **Apply Terraform Configuration**: Navigates to the `aws-modular` directory, initializes Terraform with LocalStack as the backend, validates the configuration, and applies it using a `.tfvars` file. +- **Refresh Terraform State**: Refreshes the state file to ensure the latest state is accurately reflected, including the generation of the YAML file. +- **Output Stack YAML Path**: Utilizes `terraform-bin` instead of the standard `terraform` command to accurately capture and output the `stack-yaml-path`. This change was required to bypass `terraform_wrapper`, and ensures Terraform commands execute directly without any abstractions. +- **Run Tests to Verify Resource Provisioning**:This step captures the YAML file's path, generated by the Terraform apply process, into a variable. It then utilizes this path to run a bash script to verify the provisioning and configuration of resources. + > **Note: Using an absolute path is essential here due to the test script's location in `tests/integration`.** + +### AWS Remote State Integration Test + +This job focuses on testing the provisioning of AWS resources related to remote state management, such as S3 buckets for artifact storage and DynamoDB tables for state locking. + +#### Setup LocalStack Service + +- Uses a service container to spin up LocalStack, mapping port 4566 for AWS service emulation. +- Configures essential AWS services (`s3`, `dynamodb`, `iam`, `sts`) and sets the default region to `eu-north-1`. + +```yml +services: + setup-localstack-service: + image: localstack/localstack + ports: + - '4566:4566' + env: + SERVICES: 's3,dynamodb,iam,sts' + DEFAULT_REGION: eu-north-1 + FORCE_NONINTERACTIVE: 1 + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test +``` + +#### Steps + +```yml +steps: + - name: Checkout Repository + uses: actions/checkout@v4.1.1 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3.0.0 + with: + terraform_version: 1.6.0 + + - name: Copy Override File + run: | + cp tests/integration/_override.tf src/mlstacks/terraform/aws-remote-state/_override.tf + + - name: Apply Terraform Configuration for aws-remote-state + run: | + export TF_CLI_ARGS_apply="-compact-warnings" + cd src/mlstacks/terraform/aws-remote-state + terraform init -backend-config="path=./terraform.tfstate" + terraform validate + terraform apply -auto-approve -var-file="../../../../tests/integration/aws-remote-state/local.tfvars" + + - name: Run Tests to Verify Resource Provisioning + run: ./tests/integration/aws-remote-state/verify_stack.sh + env: + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test + AWS_DEFAULT_REGION: eu-north-1 +``` + +- **Setup Terraform**: Prepares the Terraform environment. +- **Copy Override File**: Copies the `_override.tf` file into the `aws-remote-state` directory to ensure Terraform operations target the LocalStack environment. +- **Apply Terraform Configuration**: Navigates to the `aws-remote-state` directory, initializes Terraform with LocalStack as the backend, validates the configuration, and applies it using a `.tfvars` file. +- **Run Tests**: Executes a bash script to verify resource provisioning. + +## Conclusion + +In this documentation, we covered: + +- Setting up LocalStack for local emulation of AWS services. +- Installing and starting LocalStack using various methods. +- Using `awslocal` for simplified AWS service interaction. +- Integrating Terraform with LocalStack using override files and `.tfvars` files for resource provisioning. +- Integrating Terraform with LocalStack using `tflocal` and `.tfvars` files as an alternative. +- Configuring GitHub Actions for AWS integration testing with LocalStack. + +## Links + +- [LocalStack Documentation](https://docs.localstack.cloud/getting-started/) +- [LocalStack Installation Guide](https://docs.localstack.cloud/getting-started/installation/) +- [LocalStack GitHub Actions Integration Guide](https://docs.localstack.cloud/user-guide/ci/github-actions/) +- [LocalStack terraform-local (`tflocal`) integration](https://docs.localstack.cloud/user-guide/integrations/terraform/) +- [terraform-local package](https://github.com/localstack/terraform-local) +- [Override Files Terraform Documentation](https://developer.hashicorp.com/terraform/language/files/override) +- [`.tfvars` documentation](https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files) +- [awscli-local package](https://github.com/localstack/awscli-local) diff --git a/tests/integration/_override.tf b/tests/integration/_override.tf new file mode 100644 index 00000000..ca2105fd --- /dev/null +++ b/tests/integration/_override.tf @@ -0,0 +1,35 @@ +provider "aws" { + access_key = "test" + secret_key = "test" + region = "eu-north-1" + s3_use_path_style = true + skip_credentials_validation = true + skip_metadata_api_check = true + skip_requesting_account_id = true + + endpoints { + apigateway = "http://localhost:4566" + apigatewayv2 = "http://localhost:4566" + cloudformation = "http://localhost:4566" + cloudwatch = "http://localhost:4566" + dynamodb = "http://localhost:4566" + ec2 = "http://localhost:4566" + es = "http://localhost:4566" + elasticache = "http://localhost:4566" + firehose = "http://localhost:4566" + iam = "http://localhost:4566" + kinesis = "http://localhost:4566" + lambda = "http://localhost:4566" + rds = "http://localhost:4566" + redshift = "http://localhost:4566" + route53 = "http://localhost:4566" + s3 = "http://localhost:4566" + secretsmanager = "http://localhost:4566" + ses = "http://localhost:4566" + sns = "http://localhost:4566" + sqs = "http://localhost:4566" + ssm = "http://localhost:4566" + stepfunctions = "http://localhost:4566" + sts = "http://localhost:4566" + } +} diff --git a/tests/integration/aws-modular/local.tfvars b/tests/integration/aws-modular/local.tfvars new file mode 100644 index 00000000..3a5688eb --- /dev/null +++ b/tests/integration/aws-modular/local.tfvars @@ -0,0 +1,15 @@ +# Copyright (c) ZenML GmbH 2024. All Rights Reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing +# permissions and limitations under the License. +region = "eu-north-1" +bucket_name = "local-aws-modular-artifact-store" +enable_orchestrator_skypilot = true \ No newline at end of file diff --git a/tests/integration/aws-modular/verify_stack.sh b/tests/integration/aws-modular/verify_stack.sh new file mode 100755 index 00000000..b6e94716 --- /dev/null +++ b/tests/integration/aws-modular/verify_stack.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +STACK_YAML_PATH=$1 + +# Debugging +echo "Verifying YAML at: $STACK_YAML_PATH" +echo "Contents of the YAML file:" +cat "$STACK_YAML_PATH" + +# Verifying artifact_store and orchestrator configurations in the YAML file +if grep -q "artifact_store:" "$STACK_YAML_PATH" && grep -q "flavor: local" "$STACK_YAML_PATH"; then + echo "Artifact store configuration verification in YAML file succeeded." +else + echo "Artifact store configuration verification in YAML file failed." + exit 1 +fi + +if grep -q "orchestrator:" "$STACK_YAML_PATH" && grep -q "flavor: vm_aws" "$STACK_YAML_PATH" && grep -q "name: aws_skypilot_orchestrator" "$STACK_YAML_PATH"; then + echo "Skypilot orchestrator configuration verification succeeded." +else + echo "Skypilot orchestrator configuration verification failed." + exit 1 +fi diff --git a/tests/integration/aws-remote-state/local.tfvars b/tests/integration/aws-remote-state/local.tfvars new file mode 100644 index 00000000..f41a18e2 --- /dev/null +++ b/tests/integration/aws-remote-state/local.tfvars @@ -0,0 +1,16 @@ +# Copyright (c) ZenML GmbH 2024. All Rights Reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing +# permissions and limitations under the License. +region = "eu-north-1" +bucket_name = "local-aws-remote-artifact-store" +dynamo_table_name = "local-aws-remote-terraform-state-locks" +force_destroy = true diff --git a/tests/integration/aws-remote-state/verify_stack.sh b/tests/integration/aws-remote-state/verify_stack.sh new file mode 100755 index 00000000..915a6dc6 --- /dev/null +++ b/tests/integration/aws-remote-state/verify_stack.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +ENDPOINT_URL="http://localhost:4566" +AWS_REGION="eu-north-1" + +# Debugging +echo "Listing S3 buckets:" +aws s3 ls --endpoint-url="$ENDPOINT_URL" +echo "Listing DynamoDB tables:" +aws dynamodb list-tables --endpoint-url="$ENDPOINT_URL" --region "$AWS_REGION" + +# Verifying S3 bucket creation +BUCKET_NAME="local-aws-remote-artifact-store" +BUCKET_LIST=$(aws s3 ls --endpoint-url="$ENDPOINT_URL") +if echo "$BUCKET_LIST" | grep -q "$BUCKET_NAME"; then + echo "S3 bucket '$BUCKET_NAME' creation verification succeeded." +else + echo "S3 bucket '$BUCKET_NAME' creation verification failed." + exit 1 +fi + +# Verifying DynamoDB table creation +TABLE_NAME="local-aws-remote-terraform-state-locks" +TABLE_LIST=$(aws dynamodb list-tables --endpoint-url="$ENDPOINT_URL" --region "$AWS_REGION") +if echo "$TABLE_LIST" | grep -q "$TABLE_NAME"; then + echo "DynamoDB table '$TABLE_NAME' creation verification succeeded." +else + echo "DynamoDB table '$TABLE_NAME' creation verification failed." + exit 1 +fi diff --git a/tests/integration/docker-compose.localstack.yml b/tests/integration/docker-compose.localstack.yml new file mode 100644 index 00000000..6e97d7f2 --- /dev/null +++ b/tests/integration/docker-compose.localstack.yml @@ -0,0 +1,16 @@ +version: "3.8" + +services: + localstack: + container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}" + image: localstack/localstack + ports: + - "127.0.0.1:4566:4566" # LocalStack Gateway + - "127.0.0.1:4510-4559:4510-4559" # external services port range + environment: + - DEBUG=${DEBUG:-0} + - SERVICES=s3,dynamodb,iam,sts + + volumes: + - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack" + - "/var/run/docker.sock:/var/run/docker.sock" diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 00000000..6d675268 --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,34 @@ +# Copyright (c) ZenML GmbH 2024. All Rights Reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing +# permissions and limitations under the License. +"""Util functions for tests.""" + +from typing import List + +from mlstacks.enums import ProviderEnum + + +def get_allowed_providers() -> List[str]: + """Filter out unimplemented providers. + + Used for component and stack testing. + + Returns: + A list of implemented providers + """ + # Filter out AZURE + excluded_providers = ["azure"] + return [ + provider.value + for provider in ProviderEnum + if provider.value not in excluded_providers + ] diff --git a/tests/unit/models/test_component.py b/tests/unit/models/test_component.py index 3dec23fd..ce8f0b1d 100644 --- a/tests/unit/models/test_component.py +++ b/tests/unit/models/test_component.py @@ -11,14 +11,50 @@ # or implied. See the License for the specific language governing # permissions and limitations under the License. -from hypothesis import given +from hypothesis import assume, given from hypothesis import strategies as st +from hypothesis.strategies import composite -from mlstacks.constants import PERMITTED_NAME_REGEX -from mlstacks.enums import ComponentFlavorEnum, ComponentTypeEnum +from mlstacks.constants import ALLOWED_COMPONENT_TYPES, PERMITTED_NAME_REGEX +from mlstacks.enums import ( + ComponentFlavorEnum, + ComponentTypeEnum, + ProviderEnum, +) from mlstacks.models.component import Component, ComponentMetadata +@composite +def valid_components(draw): + # Drawing a valid provider enum member directly + provider = draw(st.sampled_from([provider for provider in ProviderEnum])) + + # component_types and component_flavors are mappings to strings, + # and model or validation layer handles string to enum conversion: + component_types = list(ALLOWED_COMPONENT_TYPES[provider.value].keys()) + assume(component_types) + component_type = draw(st.sampled_from(component_types)) + + component_flavors = ALLOWED_COMPONENT_TYPES[provider.value][component_type] + assume(component_flavors) + + component_flavor_str = draw(st.sampled_from(component_flavors)) + component_flavor_enum = ComponentFlavorEnum( + component_flavor_str + ) # Convert string to enum + + # Constructing the Component instance with valid fields + return Component( + name=draw(st.from_regex(PERMITTED_NAME_REGEX)), + provider=provider.value, + component_type=component_type, + component_flavor=component_flavor_enum, + spec_version=1, + spec_type="component", + metadata=None, + ) + + @given(st.builds(ComponentMetadata)) def test_component_metadata(instance): assert instance.config is None or isinstance(instance.config, dict) @@ -27,8 +63,9 @@ def test_component_metadata(instance): ) -@given(st.builds(Component, name=st.from_regex(PERMITTED_NAME_REGEX))) +@given(valid_components()) def test_component(instance): + print(f"instance: {instance}") assert isinstance(instance.spec_version, int) assert isinstance(instance.spec_type, str) assert isinstance(instance.name, str) diff --git a/tests/unit/utils/test_terraform_utils.py b/tests/unit/utils/test_terraform_utils.py index 5448d2b9..69abd74d 100644 --- a/tests/unit/utils/test_terraform_utils.py +++ b/tests/unit/utils/test_terraform_utils.py @@ -36,6 +36,7 @@ remote_state_bucket_exists, tf_definitions_present, ) +from tests.test_utils import get_allowed_providers EXISTING_S3_BUCKET_URL = "s3://public-flavor-logos" EXISTING_S3_BUCKET_REGION = "eu-central-1" @@ -111,11 +112,12 @@ def test_enable_key_function_handles_components_without_flavors( """ comp_flavor = "s3" comp_type = "artifact_store" + comp_provider = "aws" c = Component( name=dummy_name, component_flavor=comp_flavor, component_type=comp_type, - provider=random.choice(list(ProviderEnum)).value, + provider=comp_provider, ) key = _compose_enable_key(c) assert key == "enable_artifact_store" @@ -125,12 +127,16 @@ def test_component_variable_parsing_works(): """Tests that the component variable parsing works.""" metadata = ComponentMetadata() component_flavor = "zenml" + + allowed_providers = get_allowed_providers() + random_test = random.choice(allowed_providers) + components = [ Component( name="test", component_flavor=component_flavor, component_type="mlops_platform", - provider=random.choice(list(ProviderEnum)).value, + provider=random_test, spec_type="component", spec_version=1, metadata=metadata, @@ -146,12 +152,17 @@ def test_component_var_parsing_works_for_env_vars(): """Tests that the component variable parsing works.""" env_vars = {"ARIA_KEY": "blupus"} metadata = ComponentMetadata(environment_variables=env_vars) + + # EXCLUDE AZURE + allowed_providers = get_allowed_providers() + random_test = random.choice(allowed_providers) + components = [ Component( name="test", component_flavor="zenml", component_type="mlops_platform", - provider=random.choice(list(ProviderEnum)).value, + provider=random_test, metadata=metadata, ) ] @@ -165,7 +176,9 @@ def test_component_var_parsing_works_for_env_vars(): def test_tf_variable_parsing_from_stack_works(): """Tests that the Terraform variables extraction (from a stack) works.""" - provider = random.choice(list(ProviderEnum)).value + allowed_providers = get_allowed_providers() + provider = random.choice(allowed_providers) + component_flavor = "zenml" metadata = ComponentMetadata() components = [ diff --git a/tests/unit/utils/test_zenml_utils.py b/tests/unit/utils/test_zenml_utils.py index 7958914f..26f4ea51 100644 --- a/tests/unit/utils/test_zenml_utils.py +++ b/tests/unit/utils/test_zenml_utils.py @@ -53,7 +53,7 @@ def test_flavor_combination_validator_fails_aws_gcp(): name="blupus-component", component_type="artifact_store", component_flavor="gcp", - provider=valid_stack.provider, + provider="gcp", ) assert not has_valid_flavor_combinations( stack=valid_stack, @@ -75,7 +75,7 @@ def test_flavor_combination_validator_fails_k3d_s3(): name="blupus-component", component_type="artifact_store", component_flavor="s3", - provider=valid_stack.provider, + provider="aws", ) assert not has_valid_flavor_combinations( stack=valid_stack,