-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prime-node / vector-node / readiness probe (#54)
- Loading branch information
Showing
5 changed files
with
215 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"ByronGenesisFile": "/genesis/byron/genesis.json", | ||
"ShelleyGenesisFile": "/genesis/shelley/genesis.json", | ||
"AlonzoGenesisFile": "/genesis/shelley/genesis.alonzo.json", | ||
"ConwayGenesisFile": "/genesis/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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"localRoots": [ | ||
], | ||
"publicRoots" : [ | ||
{ "accessPoints": [ | ||
{ "address": "relay-0.prime.testnet.apexfusion.org", "port": 5521 }, | ||
{ "address": "relay-1.prime.testnet.apexfusion.org", "port": 5521 } | ||
], | ||
"advertise": true, | ||
"valency": 1 | ||
} | ||
], | ||
"useLedgerAfterSlot": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
resource "kubernetes_config_map" "node-readiness" { | ||
metadata { | ||
namespace = var.namespace | ||
name = "node-readiness" | ||
} | ||
|
||
data = { | ||
"readiness.sh" = "${file("${path.module}/readiness.sh")}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
if ! command -v jq &> /dev/null; then | ||
echo "Error: jq is not installed. Please install jq to use this script." | ||
exit 1 | ||
fi | ||
|
||
if ! command -v cardano-cli &> /dev/null; then | ||
echo "Error: cardano-cli is not installed. Please install cardano-cli to use this script." | ||
exit 1 | ||
fi | ||
|
||
if ! command -v bc &> /dev/null; then | ||
echo "Error: bc is not installed. Please install bc to use this script." | ||
exit 1 | ||
fi | ||
|
||
if [ "$CARDANO_NODE_NETWORK_ID" == "764824073" ]; then | ||
JSON_DATA=$(cardano-cli query tip --mainnet) | ||
else | ||
JSON_DATA=$(cardano-cli query tip --testnet-magic "$CARDANO_NODE_NETWORK_ID") | ||
fi | ||
|
||
SYNC_PROGRESS=$(echo "$JSON_DATA" | jq -r '.syncProgress') | ||
MIN_EXPECTED_SYNC_PROGRESS="99.00" | ||
MAX_EXPECTED_SYNC_PROGRESS="100.00" | ||
|
||
if (( $(echo "$SYNC_PROGRESS >= $MIN_EXPECTED_SYNC_PROGRESS" | bc -l) )) && (( $(echo "$SYNC_PROGRESS <= $MAX_EXPECTED_SYNC_PROGRESS" | bc -l) )); then | ||
echo "syncProgress is within the acceptable range of 99 to 100" | ||
else | ||
echo "Error: syncProgress is not within the acceptable range of 99 to 100" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters