Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/deploy-staging-networks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ jobs:
RPC_INGRESS_STATIC_IP_NAME=testnet-rpc-ip
RPC_INGRESS_SSL_CERT_NAME=testnet-rpc-cert

DEPLOY_ARCHIVAL_NODE=true

EOF
echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV

Expand Down
3 changes: 3 additions & 0 deletions spartan/scripts/deploy_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ PROVER_FAILED_PROOF_STORE=${PROVER_FAILED_PROOF_STORE:-}

OTEL_COLLECTOR_ENDPOINT=${OTEL_COLLECTOR_ENDPOINT:-}
DEPLOY_INTERNAL_BOOTNODE=${DEPLOY_INTERNAL_BOOTNODE:-}
DEPLOY_ARCHIVAL_NODE=${DEPLOY_ARCHIVAL_NODE:-false}

BOT_RESOURCE_PROFILE=${BOT_RESOURCE_PROFILE:-${RESOURCE_PROFILE}}
BOT_TRANSFERS_MNEMONIC_START_INDEX=${BOT_TRANSFERS_MNEMONIC_START_INDEX:-5001}
Expand Down Expand Up @@ -313,6 +314,8 @@ RPC_INGRESS_ENABLED = ${RPC_INGRESS_ENABLED}
RPC_INGRESS_HOST = "${RPC_INGRESS_HOST}"
RPC_INGRESS_STATIC_IP_NAME = "${RPC_INGRESS_STATIC_IP_NAME}"
RPC_INGRESS_SSL_CERT_NAME = "${RPC_INGRESS_SSL_CERT_NAME}"

DEPLOY_ARCHIVAL_NODE = ${DEPLOY_ARCHIVAL_NODE}
EOF

tf_run "${DEPLOY_AZTEC_INFRA_DIR}" "${DESTROY_AZTEC_INFRA}" "${CREATE_AZTEC_INFRA}"
Expand Down
18 changes: 18 additions & 0 deletions spartan/terraform/deploy-aztec-infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,24 @@ locals {
wait = true
}

archive = var.DEPLOY_ARCHIVAL_NODE ? {
name = "${var.RELEASE_PREFIX}-archive"
chart = "aztec-node"
values = [
"common.yaml",
"archive.yaml",
"archive-resources-dev.yaml"
]
custom_settings = {
"nodeType" = "archive"
"node.env.NETWORK" = var.NETWORK
"node.env.P2P_ARCHIVED_TX_LIMIT" = "10000000"
}
boot_node_host_path = "node.env.BOOT_NODE_HOST"
bootstrap_nodes_path = "node.env.BOOTSTRAP_NODES"
wait = true
} : null

# Optional: transfer bots
bot_transfers = var.BOT_TRANSFERS_REPLICAS > 0 ? {
name = "${var.RELEASE_PREFIX}-bot-transfers"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
replicaCount: 1

hostNetwork: true

node:
resources:
requests:
cpu: "3"
memory: "12Gi"

persistence:
enabled: true

statefulSet:
enabled: true
volumeClaimTemplates:
- metadata:
name: data
annotations:
"helm.sh/resource-policy": "Retain"
spec:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: "1Ti"

service:
headless:
enabled: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
nodeSelector:
local-ssd: "false"
node-type: "network"
cores: "2"

affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- node
topologyKey: "kubernetes.io/hostname"
namespaceSelector: {}

replicaCount: 1
hostNetwork: true

node:
resources:
requests:
cpu: "1.5"
memory: "5Gi"

persistence:
enabled: true

statefulSet:
enabled: true
volumeClaimTemplates:
- metadata:
name: data
annotations:
"helm.sh/resource-policy": "Retain"
spec:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: "1Ti"

service:
headless:
enabled: true
6 changes: 6 additions & 0 deletions spartan/terraform/deploy-aztec-infra/values/archive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node:
env:
OTEL_SERVICE_NAME: "archival-node"
startCmd:
- --node
- --archiver
6 changes: 6 additions & 0 deletions spartan/terraform/deploy-aztec-infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ variable "EXTERNAL_BOOTNODES" {
default = []
}

variable "DEPLOY_ARCHIVAL_NODE" {
description = "Whether to deploy the archival node"
type = bool
default = false
}

variable "NETWORK" {
description = "One of the existing network names to use default config for"
type = string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ affinity:

node:
env:
P2P_ARCHIVED_TX_LIMIT: 10000000 # 10 million
P2P_ARCHIVED_TX_LIMIT: "10000000" # 10 million
resources:
requests:
cpu: "3"
Expand Down
Loading