diff --git a/ProjectPlugins/CodexPlugin/CodexDeployment.cs b/ProjectPlugins/CodexPlugin/CodexDeployment.cs index f63d8bbc..b0b50c0b 100644 --- a/ProjectPlugins/CodexPlugin/CodexDeployment.cs +++ b/ProjectPlugins/CodexPlugin/CodexDeployment.cs @@ -24,8 +24,9 @@ namespace CodexPlugin public class DeploymentMetadata { - public DeploymentMetadata(DateTime startUtc, DateTime finishedUtc, string kubeNamespace, int numberOfCodexNodes, int numberOfValidators, int storageQuotaMB, CodexLogLevel codexLogLevel, int initialTestTokens, int minPrice, int maxCollateral, int maxDuration, int blockTTL, int blockMI, int blockMN) + public DeploymentMetadata(string name, DateTime startUtc, DateTime finishedUtc, string kubeNamespace, int numberOfCodexNodes, int numberOfValidators, int storageQuotaMB, CodexLogLevel codexLogLevel, int initialTestTokens, int minPrice, int maxCollateral, int maxDuration, int blockTTL, int blockMI, int blockMN) { + Name = name; StartUtc = startUtc; FinishedUtc = finishedUtc; KubeNamespace = kubeNamespace; @@ -42,6 +43,7 @@ namespace CodexPlugin BlockMN = blockMN; } + public string Name { get; } public DateTime StartUtc { get; } public DateTime FinishedUtc { get; } public string KubeNamespace { get; } diff --git a/Tests/CodexContinuousTests/deploy-and-run.sh b/Tests/CodexContinuousTests/deploy-and-run.sh index 1fa50372..dfc5e10b 100644 --- a/Tests/CodexContinuousTests/deploy-and-run.sh +++ b/Tests/CodexContinuousTests/deploy-and-run.sh @@ -9,6 +9,7 @@ cd ../../Tools/CodexNetDeployer for i in $( seq 0 $replication) do dotnet run \ + --deploy-name=codex-continuous-$name-$i \ --kube-config=/opt/kubeconfig.yaml \ --kube-namespace=codex-continuous-$name-tests-$i \ --deploy-file=codex-deployment-$name-$i.json \ diff --git a/Tools/BiblioTech/Commands/DeploymentsCommand.cs b/Tools/BiblioTech/Commands/DeploymentsCommand.cs index a3cca79e..50dc95fd 100644 --- a/Tools/BiblioTech/Commands/DeploymentsCommand.cs +++ b/Tools/BiblioTech/Commands/DeploymentsCommand.cs @@ -1,4 +1,5 @@ -using Discord.WebSocket; +using CodexPlugin; +using Discord.WebSocket; namespace BiblioTech.Commands { @@ -25,7 +26,13 @@ namespace BiblioTech.Commands return; } - await command.FollowupAsync($"Deployments: {string.Join(", ", deployments.Select(d => d.Metadata.StartUtc.ToString("o")))}"); + await command.FollowupAsync($"Deployments: {string.Join(", ", deployments.Select(FormatDeployment))}"); + } + + private string FormatDeployment(CodexDeployment deployment) + { + var m = deployment.Metadata; + return $"{m.Name} ({m.StartUtc.ToString("o")})"; } } } diff --git a/Tools/BiblioTech/docker/docker-compose.yaml b/Tools/BiblioTech/docker/docker-compose.yaml index dae80e44..2eaff90c 100644 --- a/Tools/BiblioTech/docker/docker-compose.yaml +++ b/Tools/BiblioTech/docker/docker-compose.yaml @@ -4,3 +4,4 @@ services: environment: - TOKEN=tokenplz - SERVERNAME=ThatBen's server + - ADMINROLE=adminers diff --git a/Tools/CodexNetDeployer/Configuration.cs b/Tools/CodexNetDeployer/Configuration.cs index 3a371cd7..f37e3426 100644 --- a/Tools/CodexNetDeployer/Configuration.cs +++ b/Tools/CodexNetDeployer/Configuration.cs @@ -8,6 +8,9 @@ namespace CodexNetDeployer public const int SecondsIn1Day = 24 * 60 * 60; public const int TenMinutes = 10 * 60; + [Uniform("deploy-name", "nm", "DEPLOYNAME", false, "Name of the deployment. (optional)")] + public string DeploymentName { get; set; } = "unnamed"; + [Uniform("kube-config", "kc", "KUBECONFIG", false, "Path to Kubeconfig file. Use 'null' (default) to use local cluster.")] public string KubeConfigFile { get; set; } = "null"; diff --git a/Tools/CodexNetDeployer/Deployer.cs b/Tools/CodexNetDeployer/Deployer.cs index 6dd3e6cb..6aa0945c 100644 --- a/Tools/CodexNetDeployer/Deployer.cs +++ b/Tools/CodexNetDeployer/Deployer.cs @@ -151,6 +151,7 @@ namespace CodexNetDeployer private DeploymentMetadata CreateMetadata(DateTime startUtc) { return new DeploymentMetadata( + name: config.DeploymentName, startUtc: startUtc, finishedUtc: DateTime.UtcNow, kubeNamespace: config.KubeNamespace, diff --git a/Tools/CodexNetDeployer/deploy-continuous-testnet.sh b/Tools/CodexNetDeployer/deploy-continuous-testnet.sh index 80362732..2fe63a55 100644 --- a/Tools/CodexNetDeployer/deploy-continuous-testnet.sh +++ b/Tools/CodexNetDeployer/deploy-continuous-testnet.sh @@ -1,4 +1,5 @@ dotnet run \ + --deploy-name=codex-continuous-test-deployment \ --kube-config=/opt/kubeconfig.yaml \ --kube-namespace=codex-continuous-tests \ --deploy-file=codex-deployment.json \