-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
331 changed files
with
2,344 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/[email protected] | ||
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/[email protected] | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/[email protected] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
Oops, something went wrong.