Skip to content

Commit da507a1

Browse files
authored
chore: initial bootstrap (#11)
1 parent ee43773 commit da507a1

18 files changed

+1820
-0
lines changed

bootstrap/configs/main.tf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
terraform {
2+
required_providers {
3+
kubernetes = {
4+
source = "hashicorp/kubernetes"
5+
}
6+
}
7+
}
8+
9+
variable "network" {
10+
description = "cardano node network"
11+
}
12+
13+
variable "salt" {
14+
description = "random value to avoid naming conflicts between instances"
15+
}
16+
17+
variable "namespace" {
18+
description = "the namespace where the resources will be created"
19+
}
20+
21+
locals {
22+
cm_name = "configs-${var.network}-${var.salt}"
23+
}
24+
25+
resource "kubernetes_config_map" "node-config" {
26+
metadata {
27+
namespace = var.namespace
28+
name = local.cm_name
29+
}
30+
31+
data = {
32+
"config.json" = "${file("${path.module}/${var.network}/config.json")}"
33+
"db-sync-config.json" = "${file("${path.module}/${var.network}/db-sync-config.json")}"
34+
}
35+
}
36+
37+
output "cm_name" {
38+
value = local.cm_name
39+
}

bootstrap/configs/mainnet/config.json

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"AlonzoGenesisFile": "/genesis/mainnet/alonzo-genesis.json",
3+
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
4+
"ApplicationName": "cardano-sl",
5+
"ApplicationVersion": 1,
6+
"ByronGenesisFile": "/genesis/mainnet/byron-genesis.json",
7+
"ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
8+
"ConwayGenesisFile": "/genesis/mainnet/conway-genesis.json",
9+
"ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
10+
"LastKnownBlockVersion-Alt": 0,
11+
"LastKnownBlockVersion-Major": 3,
12+
"LastKnownBlockVersion-Minor": 0,
13+
"MaxKnownMajorProtocolVersion": 2,
14+
"Protocol": "Cardano",
15+
"RequiresNetworkMagic": "RequiresNoMagic",
16+
"ShelleyGenesisFile": "/genesis/mainnet/shelley-genesis.json",
17+
"ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",
18+
"TraceAcceptPolicy": true,
19+
"TraceBlockFetchClient": false,
20+
"TraceBlockFetchDecisions": false,
21+
"TraceBlockFetchProtocol": false,
22+
"TraceBlockFetchProtocolSerialised": false,
23+
"TraceBlockFetchServer": false,
24+
"TraceChainDb": true,
25+
"TraceChainSyncBlockServer": false,
26+
"TraceChainSyncClient": false,
27+
"TraceChainSyncHeaderServer": false,
28+
"TraceChainSyncProtocol": false,
29+
"TraceConnectionManager": true,
30+
"TraceDNSResolver": true,
31+
"TraceDNSSubscription": true,
32+
"TraceDiffusionInitialization": true,
33+
"TraceErrorPolicy": true,
34+
"TraceForge": true,
35+
"TraceHandshake": false,
36+
"TraceInboundGovernor": true,
37+
"TraceIpSubscription": true,
38+
"TraceLedgerPeers": true,
39+
"TraceLocalChainSyncProtocol": false,
40+
"TraceLocalErrorPolicy": true,
41+
"TraceLocalHandshake": false,
42+
"TraceLocalRootPeers": true,
43+
"TraceLocalTxSubmissionProtocol": false,
44+
"TraceLocalTxSubmissionServer": false,
45+
"TraceMempool": true,
46+
"TraceMux": false,
47+
"TracePeerSelection": true,
48+
"TracePeerSelectionActions": true,
49+
"TracePublicRootPeers": true,
50+
"TraceServer": true,
51+
"TraceTxInbound": false,
52+
"TraceTxOutbound": false,
53+
"TraceTxSubmissionProtocol": false,
54+
"TracingVerbosity": "NormalVerbosity",
55+
"TurnOnLogMetrics": true,
56+
"TurnOnLogging": true,
57+
"defaultBackends": [
58+
"KatipBK"
59+
],
60+
"defaultScribes": [
61+
[
62+
"StdoutSK",
63+
"stdout"
64+
]
65+
],
66+
"hasEKG": 12788,
67+
"hasPrometheus": [
68+
"0.0.0.0",
69+
12798
70+
],
71+
"minSeverity": "Info",
72+
"options": {
73+
"mapBackends": {
74+
"cardano.node.metrics": [
75+
"EKGViewBK"
76+
],
77+
"cardano.node.resources": [
78+
"EKGViewBK"
79+
]
80+
},
81+
"mapSubtrace": {
82+
"cardano.node.metrics": {
83+
"subtrace": "Neutral"
84+
}
85+
}
86+
},
87+
"rotation": {
88+
"rpKeepFilesNum": 10,
89+
"rpLogLimitBytes": 5000000,
90+
"rpMaxAgeHours": 24
91+
},
92+
"setupBackends": [
93+
"KatipBK"
94+
],
95+
"setupScribes": [
96+
{
97+
"scFormat": "ScText",
98+
"scKind": "StdoutSK",
99+
"scName": "stdout",
100+
"scRotation": null
101+
}
102+
]
103+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"EnableLogMetrics": false,
3+
"EnableLogging": true,
4+
"NetworkName": "mainnet",
5+
"NodeConfigFile": "config.json",
6+
"PrometheusPort": 8080,
7+
"RequiresNetworkMagic": "RequiresNoMagic",
8+
"defaultBackends": [
9+
"KatipBK"
10+
],
11+
"defaultScribes": [
12+
[
13+
"StdoutSK",
14+
"stdout"
15+
]
16+
],
17+
"minSeverity": "Info",
18+
"options": {
19+
"cfokey": {
20+
"value": "Release-1.0.0"
21+
},
22+
"mapBackends": {},
23+
"mapSeverity": {
24+
"db-sync-node": "Info",
25+
"db-sync-node.Mux": "Error",
26+
"db-sync-node.Subscription": "Error"
27+
},
28+
"mapSubtrace": {
29+
"#ekgview": {
30+
"contents": [
31+
[
32+
{
33+
"contents": "cardano.epoch-validation.benchmark",
34+
"tag": "Contains"
35+
},
36+
[
37+
{
38+
"contents": ".monoclock.basic.",
39+
"tag": "Contains"
40+
}
41+
]
42+
],
43+
[
44+
{
45+
"contents": "cardano.epoch-validation.benchmark",
46+
"tag": "Contains"
47+
},
48+
[
49+
{
50+
"contents": "diff.RTS.cpuNs.timed.",
51+
"tag": "Contains"
52+
}
53+
]
54+
],
55+
[
56+
{
57+
"contents": "#ekgview.#aggregation.cardano.epoch-validation.benchmark",
58+
"tag": "StartsWith"
59+
},
60+
[
61+
{
62+
"contents": "diff.RTS.gcNum.timed.",
63+
"tag": "Contains"
64+
}
65+
]
66+
]
67+
],
68+
"subtrace": "FilterTrace"
69+
},
70+
"#messagecounters.aggregation": {
71+
"subtrace": "NoTrace"
72+
},
73+
"#messagecounters.ekgview": {
74+
"subtrace": "NoTrace"
75+
},
76+
"#messagecounters.katip": {
77+
"subtrace": "NoTrace"
78+
},
79+
"#messagecounters.monitoring": {
80+
"subtrace": "NoTrace"
81+
},
82+
"#messagecounters.switchboard": {
83+
"subtrace": "NoTrace"
84+
},
85+
"benchmark": {
86+
"contents": [
87+
"GhcRtsStats",
88+
"MonotonicClock"
89+
],
90+
"subtrace": "ObservableTrace"
91+
},
92+
"cardano.epoch-validation.utxo-stats": {
93+
"subtrace": "NoTrace"
94+
}
95+
}
96+
},
97+
"rotation": {
98+
"rpKeepFilesNum": 10,
99+
"rpLogLimitBytes": 5000000,
100+
"rpMaxAgeHours": 24
101+
},
102+
"setupBackends": [
103+
"AggregationBK",
104+
"KatipBK"
105+
],
106+
"setupScribes": [
107+
{
108+
"scFormat": "ScText",
109+
"scKind": "StdoutSK",
110+
"scName": "stdout",
111+
"scRotation": null
112+
}
113+
]
114+
}

bootstrap/configs/preprod/config.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"AlonzoGenesisFile": "/genesis/preprod/alonzo-genesis.json",
3+
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
4+
"ApplicationName": "cardano-sl",
5+
"ApplicationVersion": 0,
6+
"ByronGenesisFile": "/genesis/preprod/byron-genesis.json",
7+
"ByronGenesisHash": "d4b8de7a11d929a323373cbab6c1a9bdc931beffff11db111cf9d57356ee1937",
8+
"ConwayGenesisFile": "/genesis/preprod/conway-genesis.json",
9+
"ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
10+
"EnableP2P": true,
11+
"LastKnownBlockVersion-Alt": 0,
12+
"LastKnownBlockVersion-Major": 2,
13+
"LastKnownBlockVersion-Minor": 0,
14+
"Protocol": "Cardano",
15+
"RequiresNetworkMagic": "RequiresMagic",
16+
"ShelleyGenesisFile": "/genesis/preprod/shelley-genesis.json",
17+
"ShelleyGenesisHash": "162d29c4e1cf6b8a84f2d692e67a3ac6bc7851bc3e6e4afe64d15778bed8bd86",
18+
"TargetNumberOfActivePeers": 20,
19+
"TargetNumberOfEstablishedPeers": 50,
20+
"TargetNumberOfKnownPeers": 100,
21+
"TargetNumberOfRootPeers": 100,
22+
"TraceAcceptPolicy": true,
23+
"TraceBlockFetchClient": false,
24+
"TraceBlockFetchDecisions": false,
25+
"TraceBlockFetchProtocol": false,
26+
"TraceBlockFetchProtocolSerialised": false,
27+
"TraceBlockFetchServer": false,
28+
"TraceChainDb": true,
29+
"TraceChainSyncBlockServer": false,
30+
"TraceChainSyncClient": false,
31+
"TraceChainSyncHeaderServer": false,
32+
"TraceChainSyncProtocol": false,
33+
"TraceConnectionManager": true,
34+
"TraceDNSResolver": true,
35+
"TraceDNSSubscription": true,
36+
"TraceDiffusionInitialization": true,
37+
"TraceErrorPolicy": true,
38+
"TraceForge": true,
39+
"TraceHandshake": false,
40+
"TraceInboundGovernor": true,
41+
"TraceIpSubscription": true,
42+
"TraceLedgerPeers": true,
43+
"TraceLocalChainSyncProtocol": false,
44+
"TraceLocalErrorPolicy": true,
45+
"TraceLocalHandshake": false,
46+
"TraceLocalRootPeers": true,
47+
"TraceLocalTxSubmissionProtocol": false,
48+
"TraceLocalTxSubmissionServer": false,
49+
"TraceMempool": true,
50+
"TraceMux": false,
51+
"TracePeerSelection": true,
52+
"TracePeerSelectionActions": true,
53+
"TracePublicRootPeers": true,
54+
"TraceServer": true,
55+
"TraceTxInbound": false,
56+
"TraceTxOutbound": false,
57+
"TraceTxSubmissionProtocol": false,
58+
"TracingVerbosity": "NormalVerbosity",
59+
"TurnOnLogMetrics": true,
60+
"TurnOnLogging": true,
61+
"defaultBackends": [
62+
"KatipBK"
63+
],
64+
"defaultScribes": [
65+
[
66+
"StdoutSK",
67+
"stdout"
68+
]
69+
],
70+
"hasEKG": 12788,
71+
"hasPrometheus": [
72+
"0.0.0.0",
73+
12798
74+
],
75+
"minSeverity": "Info",
76+
"options": {
77+
"mapBackends": {
78+
"cardano.node.metrics": [
79+
"EKGViewBK"
80+
],
81+
"cardano.node.resources": [
82+
"EKGViewBK"
83+
]
84+
},
85+
"mapSubtrace": {
86+
"cardano.node.metrics": {
87+
"subtrace": "Neutral"
88+
}
89+
}
90+
},
91+
"rotation": {
92+
"rpKeepFilesNum": 10,
93+
"rpLogLimitBytes": 5000000,
94+
"rpMaxAgeHours": 24
95+
},
96+
"setupBackends": [
97+
"KatipBK"
98+
],
99+
"setupScribes": [
100+
{
101+
"scFormat": "ScText",
102+
"scKind": "StdoutSK",
103+
"scName": "stdout",
104+
"scRotation": null
105+
}
106+
]
107+
}

0 commit comments

Comments
 (0)