trying with script
This commit is contained in:
parent
fab855c4bb
commit
c653afa554
|
@ -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 \
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue