2023-08-11 07:37:30 +00:00
|
|
|
|
using KubernetesWorkflow;
|
|
|
|
|
|
|
|
|
|
namespace DistTestCore.Metrics
|
|
|
|
|
{
|
|
|
|
|
public class GrafanaContainerRecipe : ContainerRecipeFactory
|
|
|
|
|
{
|
|
|
|
|
public override string AppName => "grafana";
|
|
|
|
|
public override string Image => "grafana/grafana-oss:10.0.3";
|
|
|
|
|
|
2023-08-13 09:19:35 +00:00
|
|
|
|
public const string DefaultAdminUser = "adminium";
|
|
|
|
|
public const string DefaultAdminPassword = "passwordium";
|
|
|
|
|
|
2023-08-11 07:37:30 +00:00
|
|
|
|
protected override void Initialize(StartupConfig startupConfig)
|
|
|
|
|
{
|
|
|
|
|
AddExposedPort(3000);
|
2023-08-11 08:16:19 +00:00
|
|
|
|
|
2023-08-11 10:38:26 +00:00
|
|
|
|
AddEnvVar("GF_AUTH_ANONYMOUS_ENABLED", "true");
|
2023-08-13 06:27:30 +00:00
|
|
|
|
AddEnvVar("GF_AUTH_ANONYMOUS_ORG_NAME", "Main Org.");
|
|
|
|
|
AddEnvVar("GF_AUTH_ANONYMOUS_ORG_ROLE", "Editor");
|
|
|
|
|
|
2023-08-13 09:19:35 +00:00
|
|
|
|
AddEnvVar("GF_SECURITY_ADMIN_USER", DefaultAdminUser);
|
|
|
|
|
AddEnvVar("GF_SECURITY_ADMIN_PASSWORD", DefaultAdminPassword);
|
2023-08-11 07:37:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|