2023-10-20 07:49:23 +00:00
|
|
|
|
using CodexContractsPlugin;
|
|
|
|
|
using GethPlugin;
|
2023-11-12 09:07:23 +00:00
|
|
|
|
using KubernetesWorkflow.Types;
|
2023-06-23 06:44:27 +00:00
|
|
|
|
|
2023-09-11 09:59:33 +00:00
|
|
|
|
namespace CodexPlugin
|
2023-06-23 06:44:27 +00:00
|
|
|
|
{
|
|
|
|
|
public class CodexDeployment
|
|
|
|
|
{
|
2024-02-22 13:41:07 +00:00
|
|
|
|
public CodexDeployment(CodexInstance[] codexInstances, GethDeployment gethDeployment,
|
2024-04-13 14:09:17 +00:00
|
|
|
|
CodexContractsDeployment codexContractsDeployment, RunningPod? prometheusContainer,
|
|
|
|
|
RunningPod? discordBotContainer, DeploymentMetadata metadata,
|
2024-02-22 13:41:07 +00:00
|
|
|
|
String id)
|
2023-06-23 06:44:27 +00:00
|
|
|
|
{
|
2024-02-22 13:41:07 +00:00
|
|
|
|
Id = id;
|
2023-10-25 07:14:35 +00:00
|
|
|
|
CodexInstances = codexInstances;
|
2023-09-20 10:02:32 +00:00
|
|
|
|
GethDeployment = gethDeployment;
|
2023-10-20 07:49:23 +00:00
|
|
|
|
CodexContractsDeployment = codexContractsDeployment;
|
2023-07-11 10:21:48 +00:00
|
|
|
|
PrometheusContainer = prometheusContainer;
|
2023-10-24 08:29:07 +00:00
|
|
|
|
DiscordBotContainer = discordBotContainer;
|
2023-06-23 07:08:18 +00:00
|
|
|
|
Metadata = metadata;
|
2023-06-23 06:44:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-22 13:41:07 +00:00
|
|
|
|
public String Id { get; }
|
2023-10-25 07:14:35 +00:00
|
|
|
|
public CodexInstance[] CodexInstances { get; }
|
2023-09-20 10:02:32 +00:00
|
|
|
|
public GethDeployment GethDeployment { get; }
|
2023-10-20 07:49:23 +00:00
|
|
|
|
public CodexContractsDeployment CodexContractsDeployment { get; }
|
2024-04-13 14:09:17 +00:00
|
|
|
|
public RunningPod? PrometheusContainer { get; }
|
|
|
|
|
public RunningPod? DiscordBotContainer { get; }
|
2023-06-23 07:08:18 +00:00
|
|
|
|
public DeploymentMetadata Metadata { get; }
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-25 07:14:35 +00:00
|
|
|
|
public class CodexInstance
|
|
|
|
|
{
|
2024-04-13 14:09:17 +00:00
|
|
|
|
public CodexInstance(RunningPod pod, DebugInfo info)
|
2023-10-25 07:14:35 +00:00
|
|
|
|
{
|
2024-04-13 14:09:17 +00:00
|
|
|
|
Pod = pod;
|
2023-10-25 07:14:35 +00:00
|
|
|
|
Info = info;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-13 14:09:17 +00:00
|
|
|
|
public RunningPod Pod { get; }
|
2024-03-26 07:58:16 +00:00
|
|
|
|
public DebugInfo Info { get; }
|
2023-10-25 07:14:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-06-23 07:08:18 +00:00
|
|
|
|
public class DeploymentMetadata
|
|
|
|
|
{
|
2024-02-22 13:41:07 +00:00
|
|
|
|
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)
|
2023-06-23 07:08:18 +00:00
|
|
|
|
{
|
2023-10-23 08:19:52 +00:00
|
|
|
|
Name = name;
|
2023-10-16 09:19:57 +00:00
|
|
|
|
StartUtc = startUtc;
|
|
|
|
|
FinishedUtc = finishedUtc;
|
2023-06-23 07:08:18 +00:00
|
|
|
|
KubeNamespace = kubeNamespace;
|
|
|
|
|
NumberOfCodexNodes = numberOfCodexNodes;
|
|
|
|
|
NumberOfValidators = numberOfValidators;
|
|
|
|
|
StorageQuotaMB = storageQuotaMB;
|
|
|
|
|
CodexLogLevel = codexLogLevel;
|
2023-06-28 06:48:46 +00:00
|
|
|
|
InitialTestTokens = initialTestTokens;
|
|
|
|
|
MinPrice = minPrice;
|
|
|
|
|
MaxCollateral = maxCollateral;
|
|
|
|
|
MaxDuration = maxDuration;
|
2023-08-23 06:29:16 +00:00
|
|
|
|
BlockTTL = blockTTL;
|
|
|
|
|
BlockMI = blockMI;
|
|
|
|
|
BlockMN = blockMN;
|
2023-06-23 07:08:18 +00:00
|
|
|
|
}
|
2023-06-28 06:48:46 +00:00
|
|
|
|
|
2023-10-23 08:19:52 +00:00
|
|
|
|
public string Name { get; }
|
2023-10-16 09:19:57 +00:00
|
|
|
|
public DateTime StartUtc { get; }
|
|
|
|
|
public DateTime FinishedUtc { get; }
|
2023-06-23 07:08:18 +00:00
|
|
|
|
public string KubeNamespace { get; }
|
|
|
|
|
public int NumberOfCodexNodes { get; }
|
|
|
|
|
public int NumberOfValidators { get; }
|
|
|
|
|
public int StorageQuotaMB { get; }
|
|
|
|
|
public CodexLogLevel CodexLogLevel { get; }
|
2023-06-28 06:48:46 +00:00
|
|
|
|
public int InitialTestTokens { get; }
|
|
|
|
|
public int MinPrice { get; }
|
|
|
|
|
public int MaxCollateral { get; }
|
|
|
|
|
public int MaxDuration { get; }
|
2023-08-23 06:29:16 +00:00
|
|
|
|
public int BlockTTL { get; }
|
|
|
|
|
public int BlockMI { get; }
|
|
|
|
|
public int BlockMN { get; }
|
2023-06-23 06:44:27 +00:00
|
|
|
|
}
|
2024-02-22 13:41:07 +00:00
|
|
|
|
}
|