trying with script

This commit is contained in:
benbierens 2023-10-07 07:53:10 +02:00
parent fab855c4bb
commit c653afa554
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
3 changed files with 22 additions and 20 deletions

View File

@ -1,3 +1,5 @@
set -e
replication=10
echo "Deploying..."
@ -23,7 +25,7 @@ do
--check-connect=1
done
echo "Starting tests..."
cd ../../Tests/CodexContinousTests
cd ../../Tests/CodexContinuousTests
for i in {0..$replication}
do
screen -d -m dotnet run \

View File

@ -68,8 +68,8 @@ 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("replication", "rep", "REPLICATION", false, "Number of times to repeat")]
public int Replication { get; set; } = 0;
//[Uniform("replication", "rep", "REPLICATION", false, "Number of times to repeat")]
//public int Replication { get; set; } = 0;
public List<string> Validate()
{

View File

@ -30,7 +30,7 @@ public class Program
Console.WriteLine("I think so too.");
}
if (config.Replication == 0)
//if (config.Replication == 0)
{
var deployer = new Deployer(config);
deployer.AnnouncePlugins();
@ -40,25 +40,25 @@ public class Program
File.WriteAllText(config.DeployFile, JsonConvert.SerializeObject(deployment, Formatting.Indented));
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");
//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();
// 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($"Writing deployment file '{config.DeployFile}'...");
// File.WriteAllText(config.DeployFile, JsonConvert.SerializeObject(deployment, Formatting.Indented));
// }
Console.WriteLine("Done!");
}
// Console.WriteLine("Done!");
//}
}
private static void PrintHelp()