Wires up deployer config
This commit is contained in:
parent
4280f910ae
commit
020865f5c0
|
@ -49,6 +49,11 @@ namespace CodexNetDeployer
|
|||
if (config.BlockTTL != Configuration.SecondsIn1Day) s.WithBlockTTL(TimeSpan.FromSeconds(config.BlockTTL));
|
||||
if (config.BlockMI != Configuration.TenMinutes) s.WithBlockMaintenanceInterval(TimeSpan.FromSeconds(config.BlockMI));
|
||||
if (config.BlockMN != 1000) s.WithBlockMaintenanceNumber(config.BlockMN);
|
||||
|
||||
if (config.IsPublicTestNet)
|
||||
{
|
||||
s.AsPublicTestNet(CreatePublicTestNetConfig(i));
|
||||
}
|
||||
});
|
||||
|
||||
var debugInfo = codexNode.GetDebugInfo();
|
||||
|
@ -93,6 +98,19 @@ namespace CodexNetDeployer
|
|||
return null;
|
||||
}
|
||||
|
||||
private CodexTestNetConfig CreatePublicTestNetConfig(int i)
|
||||
{
|
||||
var discPort = config.PublicDiscPorts.Split(",")[i];
|
||||
var listenPort = config.PublicListenPorts.Split(",")[i];
|
||||
|
||||
return new CodexTestNetConfig
|
||||
{
|
||||
PublicNatIP = config.PublicIP,
|
||||
PublicDiscoveryPort = Convert.ToInt32(discPort),
|
||||
PublicListenPort = Convert.ToInt32(listenPort)
|
||||
};
|
||||
}
|
||||
|
||||
private string GetCodexContainerName(int i)
|
||||
{
|
||||
if (i == 0) return "BOOTSTRAP";
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace CodexNetDeployer
|
|||
var ci = entryPoint.CreateInterface();
|
||||
|
||||
Log("Deploying Geth instance...");
|
||||
var gethDeployment = ci.DeployGeth(s => s.IsMiner().WithName("geth"));
|
||||
var gethDeployment = DeployGeth(ci);
|
||||
var gethNode = ci.WrapGethDeployment(gethDeployment);
|
||||
|
||||
Log("Geth started. Deploying Codex contracts...");
|
||||
|
@ -98,6 +98,16 @@ namespace CodexNetDeployer
|
|||
return result;
|
||||
}
|
||||
|
||||
private GethDeployment DeployGeth(CoreInterface ci)
|
||||
{
|
||||
return ci.DeployGeth(s =>
|
||||
{
|
||||
s.IsMiner();
|
||||
s.WithName("geth");
|
||||
if (config.IsPublicTestNet) s.AsPublicTestNet();
|
||||
});
|
||||
}
|
||||
|
||||
private RunningContainer? StartMetricsService(CoreInterface ci, List<CodexNodeStartResult> startResults)
|
||||
{
|
||||
if (!config.MetricsScraper) return null;
|
||||
|
|
Loading…
Reference in New Issue