Wires up the codex log topics config options.
This commit is contained in:
parent
ab9257ce56
commit
4f764ac4c7
@ -36,7 +36,7 @@ namespace CodexNetDeployer
|
|||||||
codexNode = ci.StartCodexNode(s =>
|
codexNode = ci.StartCodexNode(s =>
|
||||||
{
|
{
|
||||||
s.WithName(name);
|
s.WithName(name);
|
||||||
s.WithLogLevel(config.CodexLogLevel);
|
s.WithLogLevel(config.CodexLogLevel, new CodexLogCustomTopics(config.Discv5LogLevel, config.Libp2pLogLevel));
|
||||||
s.WithStorageQuota(config.StorageQuota!.Value.MB());
|
s.WithStorageQuota(config.StorageQuota!.Value.MB());
|
||||||
s.EnableMarketplace(gethNode, contracts, 100.Eth(), config.InitialTestTokens.TestTokens(), validatorsLeft > 0);
|
s.EnableMarketplace(gethNode, contracts, 100.Eth(), config.InitialTestTokens.TestTokens(), validatorsLeft > 0);
|
||||||
s.EnableMetrics();
|
s.EnableMetrics();
|
||||||
|
@ -37,6 +37,12 @@ namespace CodexNetDeployer
|
|||||||
[Uniform("log-level", "l", "LOGLEVEL", true, "Log level used by each Codex node. [Trace, Debug*, Info, Warn, Error]")]
|
[Uniform("log-level", "l", "LOGLEVEL", true, "Log level used by each Codex node. [Trace, Debug*, Info, Warn, Error]")]
|
||||||
public CodexLogLevel CodexLogLevel { get; set; } = CodexLogLevel.Debug;
|
public CodexLogLevel CodexLogLevel { get; set; } = CodexLogLevel.Debug;
|
||||||
|
|
||||||
|
[Uniform("log-level-libp2p", "lp2p", "LOGLEVELLIBP2P", true, "Log level for all libp2p topics. [Trace, Debug, Info, Warn*, Error]")]
|
||||||
|
public CodexLogLevel Libp2pLogLevel { get; set; } = CodexLogLevel.Warn;
|
||||||
|
|
||||||
|
[Uniform("log-level-discv5", "ldv5", "LOGLEVELDISCV5", true, "Log level for all discv5 topics. [Trace, Debug, Info, Warn*, Error]")]
|
||||||
|
public CodexLogLevel Discv5LogLevel { get; set; } = CodexLogLevel.Warn;
|
||||||
|
|
||||||
[Uniform("test-tokens", "tt", "TESTTOKENS", true, "Initial amount of test-tokens minted for each Codex node.")]
|
[Uniform("test-tokens", "tt", "TESTTOKENS", true, "Initial amount of test-tokens minted for each Codex node.")]
|
||||||
public int InitialTestTokens { get; set; } = int.MaxValue;
|
public int InitialTestTokens { get; set; } = int.MaxValue;
|
||||||
|
|
||||||
@ -68,9 +74,6 @@ namespace CodexNetDeployer
|
|||||||
[Uniform("check-connect", "cc", "CHECKCONNECT", false, "If true, deployer check ensure peer-connectivity between all deployed nodes after deployment. Default is false.")]
|
[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;
|
public bool CheckPeerConnection { get; set; } = false;
|
||||||
|
|
||||||
//[Uniform("replication", "rep", "REPLICATION", false, "Number of times to repeat")]
|
|
||||||
//public int Replication { get; set; } = 0;
|
|
||||||
|
|
||||||
public List<string> Validate()
|
public List<string> Validate()
|
||||||
{
|
{
|
||||||
var errors = new List<string>();
|
var errors = new List<string>();
|
||||||
|
@ -23,6 +23,9 @@ public class Program
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var deployer = new Deployer(config);
|
||||||
|
deployer.AnnouncePlugins();
|
||||||
|
|
||||||
if (!args.Any(a => a == "-y"))
|
if (!args.Any(a => a == "-y"))
|
||||||
{
|
{
|
||||||
Console.WriteLine("Does the above config look good? [y/n]");
|
Console.WriteLine("Does the above config look good? [y/n]");
|
||||||
@ -30,35 +33,11 @@ public class Program
|
|||||||
Console.WriteLine("I think so too.");
|
Console.WriteLine("I think so too.");
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (config.Replication == 0)
|
var deployment = deployer.Deploy();
|
||||||
{
|
|
||||||
var deployer = new Deployer(config);
|
|
||||||
deployer.AnnouncePlugins();
|
|
||||||
var deployment = deployer.Deploy();
|
|
||||||
|
|
||||||
Console.WriteLine($"Writing deployment file '{config.DeployFile}'...");
|
Console.WriteLine($"Writing deployment file '{config.DeployFile}'...");
|
||||||
File.WriteAllText(config.DeployFile, JsonConvert.SerializeObject(deployment, Formatting.Indented));
|
File.WriteAllText(config.DeployFile, JsonConvert.SerializeObject(deployment, Formatting.Indented));
|
||||||
Console.WriteLine("Done!");
|
Console.WriteLine("Done!");
|
||||||
}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// var originalNamespace = config.KubeNamespace;
|
|
||||||
// var originalDeployFile = config.DeployFile;
|
|
||||||
// for (var i = 0; i < config.Replication; i++)
|
|
||||||
// {
|
|
||||||
// config.KubeNamespace = originalNamespace + "-" + i;
|
|
||||||
// config.DeployFile = originalDeployFile.ToLowerInvariant().Replace(".json", $"-{i}.json");
|
|
||||||
|
|
||||||
// var deployer = new Deployer(config);
|
|
||||||
// deployer.AnnouncePlugins();
|
|
||||||
// var deployment = deployer.Deploy();
|
|
||||||
|
|
||||||
// Console.WriteLine($"Writing deployment file '{config.DeployFile}'...");
|
|
||||||
// File.WriteAllText(config.DeployFile, JsonConvert.SerializeObject(deployment, Formatting.Indented));
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Console.WriteLine("Done!");
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void PrintHelp()
|
private static void PrintHelp()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user