Setting up deployer config for public testnet deploying.

This commit is contained in:
benbierens 2023-10-23 12:43:50 +02:00
parent bcb690d143
commit ec8a041257
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 43 additions and 0 deletions

View File

@ -80,6 +80,18 @@ namespace CodexNetDeployer
[Uniform("check-connect", "cc", "CHECKCONNECT", false, "If true, deployer check ensure peer-connectivity between all deployed nodes after deployment. Default is false.")]
public bool CheckPeerConnection { get; set; } = false;
[Uniform("public-testnet", "ptn", "PUBLICTESTNET", false, "If true, deployment is created for public exposure. Default is false.")]
public bool IsPublicTestNet { get; set; } = false;
[Uniform("public-ip", "pip", "PUBLICIP", false, "Required if public-testnet is true. Public IP used by nodes for network annoucements.")]
public string PublicIP { get; set; } = string.Empty;
[Uniform("public-discports", "pdps", "PUBLICDISCPORTS", false, "Required if public-testnet is true. Comma-separated port numbers used for discovery. Number must match number of nodes.")]
public string PublicDiscPorts { get; set; } = string.Empty;
[Uniform("public-listenports", "plps", "PUBLICLISTENPORTS", false, "Required if public-testnet is true. Comma-separated port numbers used for listening. Number must match number of nodes.")]
public string PublicListenPorts { get; set; } = string.Empty;
public List<string> Validate()
{
var errors = new List<string>();
@ -100,6 +112,13 @@ namespace CodexNetDeployer
errors.Add("StorageSell cannot be greater than or equal to StorageQuota.");
}
if (IsPublicTestNet)
{
if (string.IsNullOrEmpty(PublicIP)) errors.Add("Public IP required when deploying public testnet.");
if (PublicDiscPorts.Split(",").Length != NumberOfCodexNodes) errors.Add("Number of public discovery-ports provided does not match number of codex nodes.");
if (PublicListenPorts.Split(",").Length != NumberOfCodexNodes) errors.Add("Number of public listen-ports provided does not match number of codex nodes.");
}
return errors;
}

View File

@ -0,0 +1,24 @@
dotnet run \
--deploy-name=codex-public-testnet \
--kube-config=/opt/kubeconfig.yaml \
--kube-namespace=codex-public-testnet \
--deploy-file=codex-public-testnet-deployment.json \
--nodes=3 \
--validators=1 \
--log-level=Trace \
--storage-quota=2048 \
--storage-sell=1024 \
--min-price=1024 \
--max-collateral=1024 \
--max-duration=3600000 \
--block-ttl=180 \
--block-mi=120 \
--block-mn=10000 \
--metrics-endpoints=1 \
--metrics-scraper=0 \
--check-connect=1 \
\
--public-testnet=1 \
--public-ip=1.2.3.4 \
--public-discports=20010,20020,20030 \
--public-listenports=20011,20021,20031