Skip to content

Commit

Permalink
Add deprecation warning for old HCL code (zenml-io#146)
Browse files Browse the repository at this point in the history
* add deprecation notice

* more deprecation notes
  • Loading branch information
strickvl authored Feb 20, 2024
1 parent 6589a31 commit c9f4ab9
Show file tree
Hide file tree
Showing 308 changed files with 1,437 additions and 205 deletions.
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/aws_account.tf
Original file line number Diff line number Diff line change
@@ -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" {}
data "aws_caller_identity" "current" {}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/configure_docker.tf
Original file line number Diff line number Diff line change
@@ -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"
}

}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/configure_kubectl.tf
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/ecr.tf
Original file line number Diff line number Diff line change
@@ -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
}
}
4 changes: 4 additions & 0 deletions aws-kubeflow-kserve/eks.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand Down
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/get_URIs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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 {
Expand All @@ -18,4 +22,4 @@ data "kubernetes_service" "kserve_ingress" {
depends_on = [
module.kserve
]
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/helm.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# 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 {
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
}
}
}
4 changes: 4 additions & 0 deletions aws-kubeflow-kserve/kserve-module/cert_manager.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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"
Expand Down
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/kserve-module/istio.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand Down Expand Up @@ -32,4 +36,4 @@ resource "null_resource" "create-istio-kserve" {
depends_on = [
null_resource.create-knative-serving,
]
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/kserve-module/knative_serving.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand All @@ -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"
}

}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/kserve-module/kserve.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand Down Expand Up @@ -26,4 +30,4 @@ resource "kubernetes_namespace" "workloads" {
metadata {
name = var.workloads_namespace
}
}
}
4 changes: 4 additions & 0 deletions aws-kubeflow-kserve/kserve-module/providers.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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 {
Expand Down
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/kserve-module/variables.tf
Original file line number Diff line number Diff line change
@@ -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"
}
}
4 changes: 4 additions & 0 deletions aws-kubeflow-kserve/kserve.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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"
Expand Down
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/kubeflow.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand Down Expand Up @@ -30,4 +34,4 @@ resource "null_resource" "kubeflow" {
null_resource.configure-local-kubectl,
module.eks,
]
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/kubernetes.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand All @@ -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
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/locals.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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"
Expand Down Expand Up @@ -39,4 +43,4 @@ locals {
"managedBy" = "terraform"
"application" = local.prefix
}
}
}
3 changes: 3 additions & 0 deletions aws-kubeflow-kserve/mlflow-module/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/mlflow-module/ingress.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand Down Expand Up @@ -43,4 +47,4 @@ resource "kubernetes_ingress_v1" "mlflow-ingress" {
}
}
}
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/mlflow-module/mlflow.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {

Expand Down Expand Up @@ -63,4 +67,4 @@ resource "helm_release" "mlflow-tracking" {
name = "artifactRoot.gcs.bucket"
value = var.artifact_GCS_Bucket
}
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/mlflow-module/output.tf
Original file line number Diff line number Diff line change
@@ -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
}
}
4 changes: 4 additions & 0 deletions aws-kubeflow-kserve/mlflow-module/providers.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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 {
Expand Down
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/mlflow-module/secret.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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 {
Expand All @@ -10,4 +14,4 @@ resource "kubernetes_secret" "name" {
data = {
"auth" = var.htpasswd
}
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/mlflow-module/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand Down Expand Up @@ -52,4 +56,4 @@ variable "artifact_GCS" {
variable "artifact_GCS_Bucket" {
type = string
default = ""
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/mlflow.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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"
Expand All @@ -17,4 +21,4 @@ module "mlflow" {

resource "htpasswd_password" "hash" {
password = var.mlflow-password
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/output_file.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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" {
Expand Down Expand Up @@ -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"
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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
Expand Down Expand Up @@ -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
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/s3.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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}"
Expand All @@ -22,4 +26,4 @@ resource "aws_s3_bucket_public_access_block" "example" {

block_public_acls = true
block_public_policy = true
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/terraform.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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 {
Expand Down Expand Up @@ -41,4 +45,4 @@ terraform {

provider "aws" {
region = local.region
}
}
6 changes: 5 additions & 1 deletion aws-kubeflow-kserve/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,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"
Expand Down Expand Up @@ -25,4 +29,4 @@ variable "zenml-version" {
description = "The version of ZenML being used"
default = "0.12.0"
type = string
}
}
Loading

0 comments on commit c9f4ab9

Please sign in to comment.