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: proxy max connections + prime testnet #60

Merged
merged 1 commit into from
Jul 8, 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
109 changes: 109 additions & 0 deletions bootstrap/configs/prime-testnet/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"ByronGenesisFile": "/genesis/prime-testnet/byron/genesis.json",
"ShelleyGenesisFile": "/genesis/prime-testnet/shelley/genesis.json",
"AlonzoGenesisFile": "/genesis/prime-testnet/shelley/genesis.alonzo.json",
"ConwayGenesisFile": "/genesis/prime-testnet/shelley/genesis.conway.json",
"ByronGenesisHash": "acd3e7c4cc071ae176fa253e654f0dd4e759892b16e958d8bd3c393f5c6c66d2",
"ShelleyGenesisHash": "0b67b0cb16e973478888efb1c7f69fca8e80489369afed94624a588e94a94f2b",
"AlonzoGenesisHash": "0f715ff78fcab739c6cb2cc1073eb87d0ffe3514218bfa0337d416f6fbaf7886",
"ConwayGenesisHash": "d43d3f38e01848bddf67e66fe29fbd236aca252de58c7f2c1904c67107c17842",
"SocketPath": "db/node.socket",
"PBftSignatureThreshold": 0.6,
"MaxConcurrencyBulkSync": 1,
"MaxConcurrencyDeadline": 2,
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresMagic",
"LastKnownBlockVersion-Major": 6,
"LastKnownBlockVersion-Minor": 0,
"LastKnownBlockVersion-Alt": 0,
"TurnOnLogging": true,
"TurnOnLogMetrics": true,
"minSeverity": "Debug",
"TracingVerbosity": "NormalVerbosity",
"setupBackends": ["KatipBK"],
"defaultBackends": ["KatipBK"],
"hasEKG": 12788,
"hasPrometheus": [
"0.0.0.0",
12798
],
"setupScribes": [
{
"scKind": "StdoutSK",
"scName": "stdout",
"scFormat": "ScText"
}
],
"defaultScribes": [
["StdoutSK", "stdout"]
],
"rotation": {
"rpLogLimitBytes": 5000000,
"rpKeepFilesNum": 3,
"rpMaxAgeHours": 24
},
"TraceBlockFetchClient": false,
"TraceBlockFetchDecisions": false,
"TraceBlockFetchProtocol": false,
"TraceBlockFetchProtocolSerialised": false,
"TraceBlockFetchServer": false,
"TraceBlockchainTime": false,
"TraceChainDb": true,
"TraceChainSyncClient": false,
"TraceChainSyncBlockServer": false,
"TraceChainSyncHeaderServer": false,
"TraceChainSyncProtocol": false,
"TraceDNSResolver": true,
"TraceDNSSubscription": true,
"TraceErrorPolicy": true,
"TraceLocalErrorPolicy": true,
"TraceForge": true,
"TraceHandshake": false,
"TraceIpSubscription": true,
"TraceLocalRootPeers": true,
"TracePublicRootPeers": true,
"TracePeerSelection": true,
"TraceDebugPeerSelection": false,
"TracePeerSelectionActions": true,
"TraceConnectionManager": true,
"TraceServer": true,
"TraceLocalConnectionManager": false,
"TraceLocalServer": false,
"TraceLocalChainSyncProtocol": false,
"TraceLocalHandshake": false,
"TraceLocalTxSubmissionProtocol": false,
"TraceLocalTxSubmissionServer": false,
"TraceMempool": true,
"TraceMux": false,
"TraceTxInbound": false,
"TraceTxOutbound": false,
"TraceTxSubmissionProtocol": false,
"options": {
"mapBackends": {
"cardano.node.metrics": ["EKGViewBK"]
},
"mapScribes": {
"cardano.node.metrics": ["FileSK::logs/mainnet.log"]
},
"mapSeverity": {
"cardano.node.ChainDB": "Notice",
"cardano.node.DnsSubscription": "Debug"
}
},
"TestShelleyHardForkAtEpoch": 0,
"TestAllegraHardForkAtEpoch": 0,
"TestMaryHardForkAtEpoch": 0,
"TestAlonzoHardForkAtEpoch": 0,
"TestBabbageHardForkAtEpoch": 0,
"ExperimentalProtocolsEnabled": true,
"EnableP2P": true,
"TargetNumberOfRootPeers": 20,
"TargetNumberOfKnownPeers": 20,
"TargetNumberOfEstablishedPeers": 10,
"TargetNumberOfActivePeers": 10,
"TraceInboundGovernorCounters": true,
"TraceConnectionManagerTransitions": true,
"TraceLedgerPeers": true,
"TracePeerSelectionCounters": true,
"TracePeerStateActions": true
}
5 changes: 0 additions & 5 deletions bootstrap/instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ variable "node_private_dns" {

variable "network" {
type = string

validation {
condition = contains(["mainnet", "preprod", "preview", "vector-testnet"], var.network)
error_message = "Invalid network. Allowed values are mainnet, preprod, preview and vector-testnet."
}
}

variable "replicas" {
Expand Down
21 changes: 21 additions & 0 deletions bootstrap/instance/ogmios.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ resource "kubernetes_deployment_v1" "ogmios" {
}
spec {
replicas = var.replicas

strategy {
rolling_update {
max_surge = 2
max_unavailable = 0
}
}

selector {
match_labels = {
"role" = "instance"
Expand Down Expand Up @@ -82,6 +90,19 @@ resource "kubernetes_deployment_v1" "ogmios" {
name = "node-config"
mount_path = "/config"
}

liveness_probe {
http_get {
path = "/health"
port = "api"
scheme = "HTTP"
}
initial_delay_seconds = 60
period_seconds = 30
timeout_seconds = 5
success_threshold = 1
failure_threshold = 2
}
}

container {
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module "ogmios_v1_proxy" {
replicas = var.proxy_blue_replicas
proxy_image_tag = var.proxy_blue_image_tag
extension_name = var.extension_name
networks = ["mainnet", "preprod", "preview"]
networks = var.networks
name = "proxy"
}

Expand Down
5 changes: 5 additions & 0 deletions bootstrap/proxy/deployment.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ resource "kubernetes_deployment_v1" "ogmios_proxy" {
value = var.ogmios_port
}

env {
name = "OGMIOS_DNS"
value = "ext-ogmios-m1.svc.cluster.local"
}

env {
name = "SSL_CRT_PATH"
value = "/certs/tls.crt"
Expand Down
1 change: 1 addition & 0 deletions bootstrap/proxy/proxy-config.toml.tftpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%{ for tier in tiers ~}
[[tiers]]
name = "${tier.name}"
max_connections = ${tier.max_connections}
%{ for rate in tier.rates ~}
[[tiers.rates]]
interval = "${rate.interval}"
Expand Down
5 changes: 0 additions & 5 deletions bootstrap/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ variable "namespace" {

variable "network" {
description = "cardano node network"

validation {
condition = contains(["mainnet", "preprod", "preview", "vector-testnet"], var.network)
error_message = "Invalid network. Allowed values are mainnet, preprod, preview and vector-testnet."
}
}

variable "ogmios_version" {
Expand Down
Loading