Skip to content

Commit 18234a3

Browse files
authored
chore: Deployment for archival nodes. (#15888)
This PR creates deployments for archival nodes and deploys one to testnet
1 parent 58fff55 commit 18234a3

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed

spartan/terraform/deploy-testnet/main.tf

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,64 @@ resource "helm_release" "rpc" {
368368
wait_for_jobs = false
369369
}
370370

371+
resource "helm_release" "archive_node" {
372+
provider = helm.gke-cluster
373+
name = "${var.RELEASE_PREFIX}-archive"
374+
repository = "../../"
375+
chart = "aztec-node"
376+
namespace = var.NAMESPACE
377+
create_namespace = true
378+
upgrade_install = true
379+
380+
values = [
381+
file("./values/${var.ARCHIVE_NODE_VALUES}"),
382+
]
383+
384+
set {
385+
name = "global.aztecImage.repository"
386+
value = split(":", var.AZTEC_DOCKER_IMAGE)[0] # e.g. aztecprotocol/aztec
387+
}
388+
389+
set {
390+
name = "global.aztecImage.tag"
391+
value = split(":", var.AZTEC_DOCKER_IMAGE)[1] # e.g. latest
392+
}
393+
394+
set {
395+
name = "global.otelCollectorEndpoint"
396+
value = "http://${data.terraform_remote_state.metrics.outputs.otel_collector_ip}:4318"
397+
}
398+
399+
set {
400+
name = "global.useGcloudLogging"
401+
value = true
402+
}
403+
404+
set_list {
405+
name = "global.l1ExecutionUrls"
406+
value = local.ethereum_hosts
407+
}
408+
409+
set_list {
410+
name = "global.l1ConsensusUrls"
411+
value = local.consensus_hosts
412+
}
413+
414+
set_list {
415+
name = "global.l1ConsensusHostApiKeys"
416+
value = local.consensus_api_keys
417+
}
418+
419+
set_list {
420+
name = "global.l1ConsensusHostApiKeyHeaders"
421+
value = local.consensus_api_key_headers
422+
}
423+
424+
timeout = 300
425+
wait = false
426+
wait_for_jobs = false
427+
}
428+
371429
data "kubernetes_service" "rpc_admin_svc" {
372430
depends_on = [helm_release.rpc]
373431
provider = kubernetes.gke-cluster
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
global:
2+
aztecRollupVersion: "canonical"
3+
aztecNetwork: "alpha-testnet"
4+
5+
aztecImage:
6+
repository: aztecprotocol/aztec
7+
tag: latest
8+
pullPolicy: Always
9+
10+
hostNetwork: true
11+
replicaCount: 1
12+
13+
nodeSelector:
14+
local-ssd: "false"
15+
node-type: "network"
16+
17+
affinity:
18+
podAntiAffinity:
19+
requiredDuringSchedulingIgnoredDuringExecution:
20+
- labelSelector:
21+
matchExpressions:
22+
- key: app
23+
operator: In
24+
values:
25+
- node
26+
topologyKey: "kubernetes.io/hostname"
27+
namespaceSelector: {}
28+
29+
node:
30+
env:
31+
P2P_ARCHIVED_TX_LIMIT: 10000000 # 10 million
32+
resources:
33+
requests:
34+
cpu: "3"
35+
memory: "12Gi"
36+
37+
persistence:
38+
enabled: true
39+
statefulSet:
40+
enabled: true
41+
volumeClaimTemplates:
42+
- metadata:
43+
name: data
44+
annotations:
45+
"helm.sh/resource-policy": "Retain"
46+
spec:
47+
storageClassName: "standard"
48+
accessModes: ["ReadWriteOnce"]
49+
resources:
50+
requests:
51+
storage: "1Ti"
52+
53+
service:
54+
headless:
55+
enabled: true

spartan/terraform/deploy-testnet/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ variable "VALIDATOR_VALUES" {
4545
default = "testnet-validator.yaml"
4646
}
4747

48+
variable "ARCHIVE_NODE_VALUES" {
49+
description = "The values file to apply"
50+
type = string
51+
default = "testnet-archive-node.yaml"
52+
}
53+
4854
variable "PROVER_VALUES" {
4955
description = "The values file to apply"
5056
type = string

0 commit comments

Comments
 (0)