Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Feb 26, 2025
1 parent 859af50 commit 58aa33c
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/devnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
with:
namespace: ${{ github.event.inputs.namespace }}
cluster: ${{ github.event.inputs.cluster }}
# This represents the name of the deployment as well.
values_file: release-devnet.yaml
aztec_docker_image: ${{ github.event.inputs.aztec_docker_image }}
deployment_mnemonic_secret_name: ${{ github.event.inputs.deployment_mnemonic_secret_name }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/network-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ jobs:
-var="EXTERNAL_ETHEREUM_CONSENSUS_HOST=${{ env.EXTERNAL_ETHEREUM_CONSENSUS_HOST }}" \
-var="EXTERNAL_ETHEREUM_CONSENSUS_HOST_API_KEY=${{ secrets.SEPOLIA_API_KEY }}" \
-var="EXTERNAL_ETHEREUM_CONSENSUS_HOST_API_KEY_HEADER=${{ env.GCP_API_KEY_HEADER }}" \
-var="EXPOSE_HTTPS_BOOTNODE=true" \
-out=tfplan \
-lock=${{ inputs.respect_tf_lock }}
else
Expand All @@ -237,6 +238,7 @@ jobs:
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \
-var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" \
-var="L1_DEPLOYMENT_SALT=${DEPLOYMENT_SALT:-$RANDOM}" \
-var="EXPOSE_HTTPS_BOOTNODE=true" \
-out=tfplan \
-lock=${{ inputs.respect_tf_lock }}
fi
Expand Down
33 changes: 33 additions & 0 deletions spartan/aztec-network/templates/boot-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ spec:
# If this is a public network, we want to expose the boot node as a LoadBalancer
{{- if .Values.network.public }}
type: LoadBalancer
{{- if hasKey .Values.bootNode "fixedExternalIP" }}
loadBalancerIP: {{ .Values.bootNode.fixedExternalIP }}
{{- end}}
{{- else }}
type: ClusterIP
clusterIP: None
Expand All @@ -337,3 +340,33 @@ spec:
{{- end }}
- port: {{ .Values.bootNode.service.nodePort }}
name: node
---
{{- if hasKey .Values.bootNode "fixedExternalIP" }}
apiVersion: networking.gke.io/v1beta2
kind: ManagedCertificate
metadata:
name: {{ include "aztec-network.fullname" . }}-boot-node-cert
spec:
domains:
- aztecprotocol.com
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "aztec-network.fullname" . }}-boot-node-ingress
annotations:
kubernetes.io/ingress.class: "gce"
networking.gke.io/managed-certificates: {{ include "aztec-network.fullname" . }}-boot-node-cert
spec:
rules:
- host: aztecprotocol.com
http:
paths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: {{ include "aztec-network.fullname" . }}-boot-node
port:
number: {{ .Values.bootNode.service.nodePort }}
{{- end }}
16 changes: 16 additions & 0 deletions spartan/terraform/deploy-release/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ data "terraform_remote_state" "metrics" {
}
}

resource "google_compute_address" "bootnode_ip" {
for_each = var.EXPOSE_HTTPS_BOOTNODE == true ? toset(["${var.RELEASE_NAME}-bootnode-ip"]) : toset([])
provider = google
name = each.key
address_type = "EXTERNAL"
region = var.BOOTNODE_IP_REGION
}

# Aztec Helm release for gke-cluster
resource "helm_release" "aztec-gke-cluster" {
provider = helm.gke-cluster
Expand Down Expand Up @@ -104,6 +112,14 @@ resource "helm_release" "aztec-gke-cluster" {
}
}

dynamic "set" {
for_each = var.EXPOSE_HTTPS_BOOTNODE == true ? toset(["iterate"]) : toset([])
content {
name = "bootNode.fixedExternalIP"
value = google_compute_address.bootnode_ip["${var.RELEASE_NAME}-bootnode-ip"].address
}
}

set {
name = "aztec.l1Salt"
value = var.L1_DEPLOYMENT_SALT
Expand Down
11 changes: 11 additions & 0 deletions spartan/terraform/deploy-release/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,14 @@ variable "L1_DEPLOYMENT_SALT" {
type = string
default = ""
}

variable "EXPOSE_HTTPS_BOOTNODE" {
description = "Whether to expose the bootnode with HTTPS"
type = bool
default = false
}

variable "BOOTNODE_IP_REGION" {
default = "us-west1"
type = string
}

0 comments on commit 58aa33c

Please sign in to comment.