Flips internal/external default.

This commit is contained in:
benbierens 2023-06-23 08:18:48 +02:00
parent f242ad5a16
commit 4f0a278df1
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
3 changed files with 11 additions and 8 deletions

View File

@ -55,8 +55,8 @@
"The deployer will set up the required supporting services, deploy the Codex on-chain contracts, start and bootstrap the Codex instances. " + "The deployer will set up the required supporting services, deploy the Codex on-chain contracts, start and bootstrap the Codex instances. " +
"All Kubernetes objects will be created in the namespace provided, allowing you to easily find, modify, and delete them afterwards." + nl); "All Kubernetes objects will be created in the namespace provided, allowing you to easily find, modify, and delete them afterwards." + nl);
Console.WriteLine("CodexNetDeployer assumes you are running this tool from *outside* the Kubernetes cluster you want to deploy to. " + Console.WriteLine("CodexNetDeployer assumes you are running this tool from *inside* the Kubernetes cluster you want to deploy to. " +
"If you are running this from a container inside the cluster, add the argument '--internal'." + nl); "If you are not running this from a container inside the cluster, add the argument '--external'." + nl);
Console.Write("\t[ CLI argument ] or [ Environment variable ]"); Console.Write("\t[ CLI argument ] or [ Environment variable ]");
Console.CursorLeft = 70; Console.CursorLeft = 70;

View File

@ -46,12 +46,14 @@ namespace CodexNetDeployer
var workflow = workflowCreator.CreateWorkflow(); var workflow = workflowCreator.CreateWorkflow();
var workflowStartup = new StartupConfig(); var workflowStartup = new StartupConfig();
var codexStart = new CodexStartupConfig(config.CodexLogLevel); var codexStart = new CodexStartupConfig(config.CodexLogLevel);
workflowStartup.Add(gethResults);
workflowStartup.Add(codexStart);
if (!string.IsNullOrEmpty(bootstrapSpr)) codexStart.BootstrapSpr = bootstrapSpr; if (!string.IsNullOrEmpty(bootstrapSpr)) codexStart.BootstrapSpr = bootstrapSpr;
codexStart.StorageQuota = config.StorageQuota.Value.MB(); codexStart.StorageQuota = config.StorageQuota.Value.MB();
var marketplaceConfig = new MarketplaceInitialConfig(100000.Eth(), 0.TestTokens(), validatorsLeft > 0); var marketplaceConfig = new MarketplaceInitialConfig(100000.Eth(), 0.TestTokens(), validatorsLeft > 0);
marketplaceConfig.AccountIndexOverride = i; marketplaceConfig.AccountIndexOverride = i;
codexStart.MarketplaceConfig = marketplaceConfig; codexStart.MarketplaceConfig = marketplaceConfig;
workflowStartup.Add(gethResults);
var containers = workflow.Start(1, Location.Unspecified, new CodexContainerRecipe(), workflowStartup); var containers = workflow.Start(1, Location.Unspecified, new CodexContainerRecipe(), workflowStartup);
@ -63,7 +65,7 @@ namespace CodexNetDeployer
if (!string.IsNullOrWhiteSpace(debugInfo.spr)) if (!string.IsNullOrWhiteSpace(debugInfo.spr))
{ {
var pod = container.Pod.PodInfo; var pod = container.Pod.PodInfo;
Console.Write($"Online ({pod.Name} at {pod.Ip} on '{pod.K8SNodeName}'" + Environment.NewLine); Console.Write($"Online ({pod.Name} at {pod.Ip} on '{pod.K8SNodeName}')" + Environment.NewLine);
if (string.IsNullOrEmpty(bootstrapSpr)) bootstrapSpr = debugInfo.spr; if (string.IsNullOrEmpty(bootstrapSpr)) bootstrapSpr = debugInfo.spr;
validatorsLeft--; validatorsLeft--;

View File

@ -15,7 +15,8 @@ public class Program
"--kube-namespace=testing-deployer", "--kube-namespace=testing-deployer",
"--nodes=5", "--nodes=5",
"--validators=3", "--validators=3",
"--storage-quota=1024" "--storage-quota=1024",
"--external"
}; };
var nl = Environment.NewLine; var nl = Environment.NewLine;
@ -29,10 +30,10 @@ public class Program
return; return;
} }
var location = TestRunnerLocation.ExternalToCluster; var location = TestRunnerLocation.InternalToCluster;
if (args.Any(a => a == "--internal")) if (args.Any(a => a == "--external"))
{ {
location = TestRunnerLocation.InternalToCluster; location = TestRunnerLocation.ExternalToCluster;
} }
var config = new Configuration( var config = new Configuration(