Browse Source

Added mca-testnet

mca-cardano-ops
Craige McWhirter 1 year ago
parent
commit
6a215adf42
Signed by: craige GPG Key ID: 7DBA9F5689EFB6AA
  1. 33
      globals-mca-testnet.nix
  2. 63
      topologies/mca-testnet.nix

33
globals-mca-testnet.nix

@ -0,0 +1,33 @@
pkgs: {
deploymentName = "mca-testnet";
dnsZone = "${pkgs.globals.domain}";
domain = "testnet.mcwhirter.com.au";
withSubmitApi = true;
withFaucet = true;
withSmash = true;
faucetHostname = "faucet2";
initialPythonExplorerDBSyncDone = true;
environmentName = "mca-testnet";
topology = import ./topologies/mca-testnet.nix pkgs;
ec2 = {
credentials = {
accessKeyIds = {
MCA = "default";
dns = "default";
};
};
};
alertChainDensityLow = "90";
alertTcpHigh = "220";
alertTcpCrit = "250";
}

63
topologies/mca-testnet.nix

@ -0,0 +1,63 @@
pkgs: with pkgs; with lib; with topology-lib;
let
regions = {
a = { name = "eu-central-1"; # Europe (Frankfurt);
minRelays = 0;
};
b = { name = "us-east-2"; # US East (Ohio)
minRelays = 0;
};
c = { name = "ap-southeast-1"; # Asia Pacific (Singapore)
minRelays = 0;
};
d = { name = "eu-west-2"; # Europe (London)
minRelays = 0;
};
e = { name = "us-west-1"; # US West (N. California)
minRelays = 0;
};
f = { name = "ap-northeast-1"; # Asia Pacific (Tokyo)
minRelays = 0;
};
g = { name = "ap-southeast-2"; # Asia Pacific (Sydney)
minRelays = 2;
};
};
bftCoreNodes = let
mkBftCoreNode = mkBftCoreNodeForRegions regions;
in regionalConnectGroupWith (reverseList stakingPoolNodes)
(fullyConnectNodes [
# OBFT centralized nodes recovery nodes
(mkBftCoreNode "g" 1 {
org = "MCA";
nodeId = 1;
})
(mkBftCoreNode "g" 2 {
org = "MCA";
nodeId = 2;
})
]);
stakingPoolNodes = let
mkStakingPool = mkStakingPoolForRegions regions;
in regionalConnectGroupWith bftCoreNodes (fullyConnectNodes [
(mkStakingPool "g" 1 "" { nodeId = 3; })
]);
coreNodes = map (withAutoRestartEvery 6) (bftCoreNodes ++ stakingPoolNodes);
relayNodes = map (withAutoRestartEvery 6) (mkRelayTopology {
inherit regions coreNodes;
autoscaling = false;
maxProducersPerNode = 20;
maxInRegionPeers = 2;
});
in {
inherit coreNodes relayNodes;
services.monitoring-services.publicGrafana = true;
}
Loading…
Cancel
Save