Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: centralized helm flag for proving and clean release tf deploys #10221

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spartan/aztec-network/templates/boot-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ spec:
- name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
value: {{ include "aztec-network.otelCollectorLogsEndpoint" . | quote }}
- name: PROVER_REAL_PROOFS
value: "{{ .Values.bootNode.realProofs }}"
value: "{{ .Values.aztec.realProofs }}"
- name: PXE_PROVER_ENABLED
value: "{{ .Values.bootNode.realProofs }}"
value: "{{ .Values.aztec.realProofs }}"
- name: ETHEREUM_SLOT_DURATION
value: "{{ .Values.ethereum.blockTime }}"
- name: AZTEC_SLOT_DURATION
Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/prover-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
- name: DEBUG
value: "{{ .Values.proverAgent.debug }}"
- name: PROVER_REAL_PROOFS
value: "{{ .Values.proverAgent.realProofs }}"
value: "{{ .Values.aztec.realProofs }}"
- name: PROVER_AGENT_COUNT
value: "1"
- name: PROVER_AGENT_POLL_INTERVAL_MS
Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/prover-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
- name: DEBUG
value: "{{ .Values.proverNode.debug }}"
- name: PROVER_REAL_PROOFS
value: "{{ .Values.proverNode.realProofs }}"
value: "{{ .Values.aztec.realProofs }}"
- name: PROVER_AGENT_COUNT
value: "{{ .Values.proverNode.proverAgent.count }}"
- name: PROVER_AGENT_POLL_INTERVAL_MS
Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/pxe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
- name: DEBUG
value: "{{ .Values.pxe.debug }}"
- name: PXE_PROVER_ENABLED
value: "{{ .Values.pxe.proverEnabled }}"
value: "{{ .Values.aztec.realProofs }}"
ports:
- name: http
containerPort: {{ .Values.pxe.service.nodePort }}
Expand Down
4 changes: 2 additions & 2 deletions spartan/aztec-network/templates/transaction-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ spec:
- name: BOT_NO_START
value: "{{ .Values.bot.botNoStart }}"
- name: PXE_PROVER_ENABLED
value: "{{ .Values.bot.pxeProverEnabled }}"
value: "{{ .Values.aztec.realProofs }}"
- name: PROVER_REAL_PROOFS
value: "{{ .Values.bot.proverRealProofs }}"
value: "{{ .Values.aztec.realProofs }}"
- name: BOT_MAX_CONSECUTIVE_ERRORS
value: "{{ .Values.bot.maxErrors }}"
- name: BOT_STOP_WHEN_UNHEALTHY
Expand Down
8 changes: 1 addition & 7 deletions spartan/aztec-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ aztec:
slotDuration: 24 # in seconds, aka L2 slot duration. Must be a multiple of {{ ethereum.blockTime }}
epochDuration: 16 # how many L2 slots in an epoch
epochProofClaimWindow: 13 # in L2 slots
realProofs: false

bootNode:
peerIdPrivateKey: ""
Expand All @@ -48,7 +49,6 @@ bootNode:
sequencer:
maxSecondsBetweenBlocks: 0
minTxsPerBlock: 1
realProofs: false
validator:
disabled: true
p2p:
Expand Down Expand Up @@ -118,7 +118,6 @@ proverNode:
nodePort: 8080
logLevel: "debug"
debug: "aztec:*,-aztec:avm_simulator*,-aztec:libp2p_service*,-aztec:circuits:artifact_hash,-json-rpc*,-aztec:world-state:database,-aztec:l2_block_stream*"
realProofs: false
proverAgent:
count: 0
pollIntervalMs: 1000
Expand All @@ -136,9 +135,7 @@ proverNode:
storage: "8Gi"

pxe:
proverEnabled: false
logLevel: "debug"
proverEnable: false
debug: "aztec:*,-aztec:avm_simulator*,-aztec:libp2p_service*,-aztec:circuits:artifact_hash,-json-rpc*,-aztec:world-state:database,-aztec:l2_block_stream*"
replicas: 1
service:
Expand Down Expand Up @@ -167,8 +164,6 @@ bot:
# Do not wait for transactions
followChain: "NONE"
botNoStart: false
pxeProverEnabled: false
proverRealProofs: false
maxErrors: 3
stopIfUnhealthy: true
service:
Expand Down Expand Up @@ -222,7 +217,6 @@ proverAgent:
spotEnabled: false
logLevel: "debug"
debug: "aztec:*,-aztec:avm_simulator*,-aztec:libp2p_service*,-aztec:circuits:artifact_hash,-json-rpc*,-aztec:world-state:database,-aztec:l2_block_stream*"
realProofs: false
bb:
hardwareConcurrency: ""
nodeSelector: {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
aztec:
realProofs: true
slotDuration: 36
epochDuration: 32

validator:
replicas: 1
validatorKeys:
Expand All @@ -11,12 +16,8 @@ bootNode:
validator:
disabled: true

proverNode:
realProofs: true

proverAgent:
replicas: 6
realProofs: true
bb:
hardwareConcurrency: 16
resources:
Expand All @@ -27,22 +28,14 @@ proverAgent:
memory: "96Gi"
cpu: "16"

pxe:
proverEnabled: true

bot:
enabled: true
pxeProverEnabled: true
txIntervalSeconds: 200

jobs:
deployL1Verifier:
enable: true

aztec:
slotDuration: 36
epochDuration: 32

telemetry:
enabled: true
otelCollectorEndpoint: http://metrics-opentelemetry-collector.metrics:4318
17 changes: 5 additions & 12 deletions spartan/aztec-network/values/1-validator-with-proving.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
aztec:
realProofs: true
slotDuration: 36
epochDuration: 32

validator:
replicas: 1
validatorKeys:
Expand All @@ -11,12 +16,8 @@ bootNode:
validator:
disabled: true

proverNode:
realProofs: true

proverAgent:
replicas: 6
realProofs: true
bb:
hardwareConcurrency: 16
resources:
Expand All @@ -27,18 +28,10 @@ proverAgent:
memory: "96Gi"
cpu: "16"

pxe:
proverEnabled: true

bot:
enabled: true
pxeProverEnabled: true
txIntervalSeconds: 200

jobs:
deployL1Verifier:
enable: true

aztec:
slotDuration: 36
epochDuration: 32
9 changes: 1 addition & 8 deletions spartan/aztec-network/values/gcp-proving-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ validator:
storage: "128Gi"

bootNode:
realProofs: true
validator:
disabled: true
resources:
Expand All @@ -33,7 +32,6 @@ bootNode:
storage: "128Gi"

proverNode:
realProofs: true
resources:
requests:
memory: "8Gi"
Expand All @@ -42,23 +40,17 @@ proverNode:

proverAgent:
replicas: 120
realProofs: true
bb:
hardwareConcurrency: 31
resources:
requests:
memory: "116Gi"
cpu: "31"

pxe:
proverEnabled: true

bot:
replicas: 16
enabled: true
pxeProverEnabled: true
txIntervalSeconds: 1
proverRealProofs: true
botPrivateKey: ""
privateTransfersPerTx: 1
publicTransfersPerTx: 1
Expand All @@ -80,3 +72,4 @@ fullnameOverride: sp
aztec:
slotDuration: 36
epochDuration: 32
realProofs: true
4 changes: 0 additions & 4 deletions spartan/aztec-network/values/multicloud-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ bootNode:
validator:
disabled: true

proverNode:
realProofs: false

proverAgent:
replicas: 1
realProofs: false
bb:
hardwareConcurrency: 16

Expand Down
6 changes: 0 additions & 6 deletions spartan/aztec-network/values/prover-node-with-agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@ bootNode:
validator:
disabled: true

proverNode:
realProofs: false

proverAgent:
replicas: 1
realProofs: false
bb:
hardwareConcurrency: 16

pxe:
external: false
proverEnabled: true

bot:
enabled: false
pxeProverEnabled: false
txIntervalSeconds: 200

jobs:
Expand Down
19 changes: 5 additions & 14 deletions spartan/aztec-network/values/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
network:
public: true

aztec:
slotDuration: 36
epochDuration: 32
realProofs: true

images:
aztec:
pullPolicy: Always
Expand All @@ -10,7 +15,6 @@ telemetry:
otelCollectorEndpoint: http://34.150.160.154:4318

validator:
realProofs: true
replicas: 48
validatorKeys:
- 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Expand Down Expand Up @@ -118,17 +122,12 @@ validator:
disabled: false

bootNode:
realProofs: true
peerIdPrivateKey: 080212200ba8451c6d62b03c4441f0a466c0bce7a3a595f2cf50a055ded3305c77aa3af0
validator:
disabled: true

proverNode:
realProofs: true

proverAgent:
replicas: 4
realProofs: true
bb:
hardwareConcurrency: 16
gke:
Expand All @@ -141,19 +140,11 @@ proverAgent:
memory: "96Gi"
cpu: "16"

pxe:
proverEnabled: true

bot:
followChain: "PENDING"
enabled: true
pxeProverEnabled: true
txIntervalSeconds: 200

jobs:
deployL1Verifier:
enable: true

aztec:
slotDuration: 36
epochDuration: 32
11 changes: 9 additions & 2 deletions spartan/terraform/deploy-release/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

RELEASE_NAME="rough-rhino"
# Usage: ./deploy.sh <release_name> <aztec_docker_image>
# Example: ./deploy.sh rough-rhino aztecprotocol/aztec:698cd3d62680629a3f1bfc0f82604534cedbccf3-x86_64

set -eu

RELEASE_NAME=$1
AZTEC_DOCKER_IMAGE=$2

terraform init -backend-config="key=deploy-network/${RELEASE_NAME}/terraform.tfstate"
terraform apply -var-file="release.tfvars"
terraform apply -var-file="release.tfvars" -var="RELEASE_NAME=${RELEASE_NAME}" -var="AZTEC_DOCKER_IMAGE=${AZTEC_DOCKER_IMAGE}"
12 changes: 6 additions & 6 deletions spartan/terraform/deploy-release/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ terraform {
provider "kubernetes" {
alias = "gke-cluster"
config_path = "~/.kube/config"
config_context = var.gke_cluster_context
config_context = var.GKE_CLUSTER_CONTEXT
}

provider "helm" {
alias = "gke-cluster"
kubernetes {
config_path = "~/.kube/config"
config_context = var.gke_cluster_context
config_context = var.GKE_CLUSTER_CONTEXT
}
}

# Aztec Helm release for gke-cluster
resource "helm_release" "aztec-gke-cluster" {
provider = helm.gke-cluster
name = var.release_name
name = var.RELEASE_NAME
repository = "../../"
chart = "aztec-network"
namespace = var.release_name
namespace = var.RELEASE_NAME
create_namespace = true

# base values file
values = [file("../../aztec-network/values/${var.values_file}")]
values = [file("../../aztec-network/values/${var.VALUES_FILE}")]

set {
name = "images.aztec.image"
value = var.aztec_docker_image
value = var.AZTEC_DOCKER_IMAGE
}

# Setting timeout and wait conditions
Expand Down
5 changes: 1 addition & 4 deletions spartan/terraform/deploy-release/release.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
release_name = "rough-rhino"
values_file = "release.yaml"
aztec_docker_image = "aztecprotocol/aztec:698cd3d62680629a3f1bfc0f82604534cedbccf3-x86_64"

VALUES_FILE = "release.yaml"
Loading
Loading