Skip to content

Commit f4640e2

Browse files
authored
chore: proxy max connections + prime testnet (#60)
1 parent 74dd8c7 commit f4640e2

File tree

7 files changed

+137
-11
lines changed

7 files changed

+137
-11
lines changed

Diff for: bootstrap/configs/prime-testnet/config.json

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"ByronGenesisFile": "/genesis/prime-testnet/byron/genesis.json",
3+
"ShelleyGenesisFile": "/genesis/prime-testnet/shelley/genesis.json",
4+
"AlonzoGenesisFile": "/genesis/prime-testnet/shelley/genesis.alonzo.json",
5+
"ConwayGenesisFile": "/genesis/prime-testnet/shelley/genesis.conway.json",
6+
"ByronGenesisHash": "acd3e7c4cc071ae176fa253e654f0dd4e759892b16e958d8bd3c393f5c6c66d2",
7+
"ShelleyGenesisHash": "0b67b0cb16e973478888efb1c7f69fca8e80489369afed94624a588e94a94f2b",
8+
"AlonzoGenesisHash": "0f715ff78fcab739c6cb2cc1073eb87d0ffe3514218bfa0337d416f6fbaf7886",
9+
"ConwayGenesisHash": "d43d3f38e01848bddf67e66fe29fbd236aca252de58c7f2c1904c67107c17842",
10+
"SocketPath": "db/node.socket",
11+
"PBftSignatureThreshold": 0.6,
12+
"MaxConcurrencyBulkSync": 1,
13+
"MaxConcurrencyDeadline": 2,
14+
"Protocol": "Cardano",
15+
"RequiresNetworkMagic": "RequiresMagic",
16+
"LastKnownBlockVersion-Major": 6,
17+
"LastKnownBlockVersion-Minor": 0,
18+
"LastKnownBlockVersion-Alt": 0,
19+
"TurnOnLogging": true,
20+
"TurnOnLogMetrics": true,
21+
"minSeverity": "Debug",
22+
"TracingVerbosity": "NormalVerbosity",
23+
"setupBackends": ["KatipBK"],
24+
"defaultBackends": ["KatipBK"],
25+
"hasEKG": 12788,
26+
"hasPrometheus": [
27+
"0.0.0.0",
28+
12798
29+
],
30+
"setupScribes": [
31+
{
32+
"scKind": "StdoutSK",
33+
"scName": "stdout",
34+
"scFormat": "ScText"
35+
}
36+
],
37+
"defaultScribes": [
38+
["StdoutSK", "stdout"]
39+
],
40+
"rotation": {
41+
"rpLogLimitBytes": 5000000,
42+
"rpKeepFilesNum": 3,
43+
"rpMaxAgeHours": 24
44+
},
45+
"TraceBlockFetchClient": false,
46+
"TraceBlockFetchDecisions": false,
47+
"TraceBlockFetchProtocol": false,
48+
"TraceBlockFetchProtocolSerialised": false,
49+
"TraceBlockFetchServer": false,
50+
"TraceBlockchainTime": false,
51+
"TraceChainDb": true,
52+
"TraceChainSyncClient": false,
53+
"TraceChainSyncBlockServer": false,
54+
"TraceChainSyncHeaderServer": false,
55+
"TraceChainSyncProtocol": false,
56+
"TraceDNSResolver": true,
57+
"TraceDNSSubscription": true,
58+
"TraceErrorPolicy": true,
59+
"TraceLocalErrorPolicy": true,
60+
"TraceForge": true,
61+
"TraceHandshake": false,
62+
"TraceIpSubscription": true,
63+
"TraceLocalRootPeers": true,
64+
"TracePublicRootPeers": true,
65+
"TracePeerSelection": true,
66+
"TraceDebugPeerSelection": false,
67+
"TracePeerSelectionActions": true,
68+
"TraceConnectionManager": true,
69+
"TraceServer": true,
70+
"TraceLocalConnectionManager": false,
71+
"TraceLocalServer": false,
72+
"TraceLocalChainSyncProtocol": false,
73+
"TraceLocalHandshake": false,
74+
"TraceLocalTxSubmissionProtocol": false,
75+
"TraceLocalTxSubmissionServer": false,
76+
"TraceMempool": true,
77+
"TraceMux": false,
78+
"TraceTxInbound": false,
79+
"TraceTxOutbound": false,
80+
"TraceTxSubmissionProtocol": false,
81+
"options": {
82+
"mapBackends": {
83+
"cardano.node.metrics": ["EKGViewBK"]
84+
},
85+
"mapScribes": {
86+
"cardano.node.metrics": ["FileSK::logs/mainnet.log"]
87+
},
88+
"mapSeverity": {
89+
"cardano.node.ChainDB": "Notice",
90+
"cardano.node.DnsSubscription": "Debug"
91+
}
92+
},
93+
"TestShelleyHardForkAtEpoch": 0,
94+
"TestAllegraHardForkAtEpoch": 0,
95+
"TestMaryHardForkAtEpoch": 0,
96+
"TestAlonzoHardForkAtEpoch": 0,
97+
"TestBabbageHardForkAtEpoch": 0,
98+
"ExperimentalProtocolsEnabled": true,
99+
"EnableP2P": true,
100+
"TargetNumberOfRootPeers": 20,
101+
"TargetNumberOfKnownPeers": 20,
102+
"TargetNumberOfEstablishedPeers": 10,
103+
"TargetNumberOfActivePeers": 10,
104+
"TraceInboundGovernorCounters": true,
105+
"TraceConnectionManagerTransitions": true,
106+
"TraceLedgerPeers": true,
107+
"TracePeerSelectionCounters": true,
108+
"TracePeerStateActions": true
109+
}

Diff for: bootstrap/instance/main.tf

-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ variable "node_private_dns" {
2525

2626
variable "network" {
2727
type = string
28-
29-
validation {
30-
condition = contains(["mainnet", "preprod", "preview", "vector-testnet"], var.network)
31-
error_message = "Invalid network. Allowed values are mainnet, preprod, preview and vector-testnet."
32-
}
3328
}
3429

3530
variable "replicas" {

Diff for: bootstrap/instance/ogmios.tf

+21
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ resource "kubernetes_deployment_v1" "ogmios" {
2525
}
2626
spec {
2727
replicas = var.replicas
28+
29+
strategy {
30+
rolling_update {
31+
max_surge = 2
32+
max_unavailable = 0
33+
}
34+
}
35+
2836
selector {
2937
match_labels = {
3038
"role" = "instance"
@@ -82,6 +90,19 @@ resource "kubernetes_deployment_v1" "ogmios" {
8290
name = "node-config"
8391
mount_path = "/config"
8492
}
93+
94+
liveness_probe {
95+
http_get {
96+
path = "/health"
97+
port = "api"
98+
scheme = "HTTP"
99+
}
100+
initial_delay_seconds = 60
101+
period_seconds = 30
102+
timeout_seconds = 5
103+
success_threshold = 1
104+
failure_threshold = 2
105+
}
85106
}
86107

87108
container {

Diff for: bootstrap/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module "ogmios_v1_proxy" {
3131
replicas = var.proxy_blue_replicas
3232
proxy_image_tag = var.proxy_blue_image_tag
3333
extension_name = var.extension_name
34-
networks = ["mainnet", "preprod", "preview"]
34+
networks = var.networks
3535
name = "proxy"
3636
}
3737

Diff for: bootstrap/proxy/deployment.tf

+5
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ resource "kubernetes_deployment_v1" "ogmios_proxy" {
7171
value = var.ogmios_port
7272
}
7373

74+
env {
75+
name = "OGMIOS_DNS"
76+
value = "ext-ogmios-m1.svc.cluster.local"
77+
}
78+
7479
env {
7580
name = "SSL_CRT_PATH"
7681
value = "/certs/tls.crt"

Diff for: bootstrap/proxy/proxy-config.toml.tftpl

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
%{ for tier in tiers ~}
22
[[tiers]]
33
name = "${tier.name}"
4+
max_connections = ${tier.max_connections}
45
%{ for rate in tier.rates ~}
56
[[tiers.rates]]
67
interval = "${rate.interval}"

Diff for: bootstrap/service/main.tf

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ variable "namespace" {
44

55
variable "network" {
66
description = "cardano node network"
7-
8-
validation {
9-
condition = contains(["mainnet", "preprod", "preview", "vector-testnet"], var.network)
10-
error_message = "Invalid network. Allowed values are mainnet, preprod, preview and vector-testnet."
11-
}
127
}
138

149
variable "ogmios_version" {

0 commit comments

Comments
 (0)