diff --git a/spartan/aztec-network/values/testnet.yaml b/spartan/aztec-network/values/release.yaml similarity index 100% rename from spartan/aztec-network/values/testnet.yaml rename to spartan/aztec-network/values/release.yaml diff --git a/spartan/terraform/deploy-release/data.tf b/spartan/terraform/deploy-release/data.tf new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/spartan/terraform/deploy-release/data.tf @@ -0,0 +1 @@ + diff --git a/spartan/terraform/deploy-release/deploy-testnet.sh b/spartan/terraform/deploy-release/deploy-testnet.sh new file mode 100755 index 000000000000..e9574554524a --- /dev/null +++ b/spartan/terraform/deploy-release/deploy-testnet.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +RELEASE_NAME="rough-rhino" +terraform init -backend-config="key=deploy-network/${RELEASE_NAME}/terraform.tfstate" +terraform apply -var-file="release.tfvars" diff --git a/spartan/terraform/testnet/main.tf b/spartan/terraform/deploy-release/main.tf similarity index 93% rename from spartan/terraform/testnet/main.tf rename to spartan/terraform/deploy-release/main.tf index 30a3eb20bda7..3b26f2473252 100644 --- a/spartan/terraform/testnet/main.tf +++ b/spartan/terraform/deploy-release/main.tf @@ -32,10 +32,10 @@ provider "helm" { # Aztec Helm release for gke-cluster resource "helm_release" "aztec-gke-cluster" { provider = helm.gke-cluster - name = var.testnet_name + name = var.release_name repository = "../../" chart = "aztec-network" - namespace = var.testnet_name + namespace = var.release_name create_namespace = true # base values file diff --git a/spartan/terraform/deploy-release/outputs.tf b/spartan/terraform/deploy-release/outputs.tf new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/spartan/terraform/deploy-release/outputs.tf @@ -0,0 +1 @@ + diff --git a/spartan/terraform/testnet/testnet.tfvars b/spartan/terraform/deploy-release/release.tfvars similarity index 53% rename from spartan/terraform/testnet/testnet.tfvars rename to spartan/terraform/deploy-release/release.tfvars index f4f2c808c2a8..e95c0819cd17 100644 --- a/spartan/terraform/testnet/testnet.tfvars +++ b/spartan/terraform/deploy-release/release.tfvars @@ -1,3 +1,4 @@ -testnet_name = "testnet-2" -values_file = "testnet.yaml" +release_name = "rough-rhino" +values_file = "release.yaml" aztec_docker_image = "iamjustmitch/aztec:701380ba5e48bfc286adb13a875e890754c4db32" + diff --git a/spartan/terraform/testnet/variables.tf b/spartan/terraform/deploy-release/variables.tf similarity index 94% rename from spartan/terraform/testnet/variables.tf rename to spartan/terraform/deploy-release/variables.tf index 92c6d3e021f6..ebccc9d3f67f 100644 --- a/spartan/terraform/testnet/variables.tf +++ b/spartan/terraform/deploy-release/variables.tf @@ -4,7 +4,7 @@ variable "gke_cluster_context" { default = "gke_testnet-440309_us-east4-a_spartan-gke" } -variable "testnet_name" { +variable "release_name" { description = "Name of helm deployment and k8s namespace" type = string } diff --git a/spartan/terraform/testnet/data.tf b/spartan/terraform/testnet/data.tf deleted file mode 100644 index cf9a945c0bd6..000000000000 --- a/spartan/terraform/testnet/data.tf +++ /dev/null @@ -1,54 +0,0 @@ -# Get the LoadBalancer DNS names using a data source -data "kubernetes_service" "lb_ethereum_tcp" { - provider = kubernetes.eks-cluster - metadata { - name = "ethereum-lb" - namespace = var.testnet_name - } - depends_on = [helm_release.aztec-eks-cluster] -} - -data "kubernetes_service" "lb_boot_node_tcp" { - provider = kubernetes.eks-cluster - metadata { - name = "boot-node-lb-tcp" - namespace = var.testnet_name - } - depends_on = [helm_release.aztec-eks-cluster] -} - -data "kubernetes_service" "lb_boot_node_udp" { - provider = kubernetes.eks-cluster - metadata { - name = "boot-node-lb-udp" - namespace = var.testnet_name - } - depends_on = [helm_release.aztec-eks-cluster] -} - -data "kubernetes_service" "lb_validator_tcp" { - provider = kubernetes.eks-cluster - metadata { - name = "validator-0-lb-tcp" - namespace = var.testnet_name - } - depends_on = [helm_release.aztec-eks-cluster] -} - -data "kubernetes_service" "lb_validator_udp" { - provider = kubernetes.eks-cluster - metadata { - name = "validator-0-lb-udp" - namespace = var.testnet_name - } - depends_on = [helm_release.aztec-eks-cluster] -} - -data "kubernetes_service" "lb_pxe_tcp" { - provider = kubernetes.eks-cluster - metadata { - name = "pxe-lb" - namespace = var.testnet_name - } - depends_on = [helm_release.aztec-eks-cluster] -} diff --git a/spartan/terraform/testnet/deploy-testnet.sh b/spartan/terraform/testnet/deploy-testnet.sh deleted file mode 100755 index d6ff7a316250..000000000000 --- a/spartan/terraform/testnet/deploy-testnet.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -TESTNET_NAME="testnet-2" -terraform init -backend-config="key=deploy-network/${TESTNET_NAME}/terraform.tfstate" -terraform apply -var-file="testnet.tfvars" diff --git a/spartan/terraform/testnet/outputs.tf b/spartan/terraform/testnet/outputs.tf deleted file mode 100644 index fb922104e1f5..000000000000 --- a/spartan/terraform/testnet/outputs.tf +++ /dev/null @@ -1,61 +0,0 @@ -output "eks_cluster_deployment" { - description = "Details of the EKS cluster Helm deployment" - value = { - name = helm_release.aztec-eks-cluster.name - namespace = helm_release.aztec-eks-cluster.namespace - chart = helm_release.aztec-eks-cluster.chart - version = helm_release.aztec-eks-cluster.version - status = helm_release.aztec-eks-cluster.status - values_file = var.values-file - cluster = var.eks_cluster_context - } -} - -# output "gke_cluster_deployment" { -# description = "Details of the GKE cluster Helm deployment" -# value = { -# name = helm_release.aztec-gke-cluster.name -# namespace = helm_release.aztec-gke-cluster.namespace -# chart = helm_release.aztec-gke-cluster.chart -# version = helm_release.aztec-gke-cluster.version -# status = helm_release.aztec-gke-cluster.status -# values_file = var.values-file -# cluster = var.gke_cluster_context -# } -# } - -output "external_ethereum_tcp" { - description = "DNS hostname of the EKS Ethereum LoadBalancer" - value = data.kubernetes_service.lb_ethereum_tcp.status.0.load_balancer.0.ingress.0.hostname - depends_on = [helm_release.aztec-eks-cluster] -} - -output "external_boot_node_tcp" { - description = "DNS hostname of the EKS boot node LoadBalancer" - value = data.kubernetes_service.lb_boot_node_tcp.status.0.load_balancer.0.ingress.0.hostname - depends_on = [helm_release.aztec-eks-cluster] -} - -output "external_boot_node_udp" { - description = "DNS hostname of the EKS boot node LoadBalancer" - value = data.kubernetes_service.lb_boot_node_udp.status.0.load_balancer.0.ingress.0.hostname - depends_on = [helm_release.aztec-eks-cluster] -} - -output "external_validator_tcp" { - description = "DNS hostname of the EKS validator LoadBalancer" - value = data.kubernetes_service.lb_validator_tcp.status.0.load_balancer.0.ingress.0.hostname - depends_on = [helm_release.aztec-eks-cluster] -} - -output "external_validator_udp" { - description = "DNS hostname of the EKS validator LoadBalancer" - value = data.kubernetes_service.lb_validator_udp.status.0.load_balancer.0.ingress.0.hostname - depends_on = [helm_release.aztec-eks-cluster] -} - -output "external_pxe_tcp" { - description = "DNS hostname of the EKS PXE LoadBalancer" - value = data.kubernetes_service.lb_pxe_tcp.status.0.load_balancer.0.ingress.0.hostname - depends_on = [helm_release.aztec-eks-cluster] -}