From 4ffa047d7292700f63f3c93643833562e45cb177 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 4 Feb 2026 11:55:01 +0800 Subject: [PATCH] feat: Add kibana components --- aspnet-core/LINGYUN.MicroService.Aspire.slnx | 561 ++++++++++++++++++ .../AppHost.cs | 13 +- ...INGYUN.Abp.MicroService.TaskService.csproj | 1 + .../TaskServiceModule.cs | 2 + 4 files changed, 575 insertions(+), 2 deletions(-) create mode 100644 aspnet-core/LINGYUN.MicroService.Aspire.slnx diff --git a/aspnet-core/LINGYUN.MicroService.Aspire.slnx b/aspnet-core/LINGYUN.MicroService.Aspire.slnx new file mode 100644 index 000000000..670b925f3 --- /dev/null +++ b/aspnet-core/LINGYUN.MicroService.Aspire.slnx @@ -0,0 +1,561 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/AppHost.cs b/aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/AppHost.cs index def8a420f..dadaf8d82 100644 --- a/aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/AppHost.cs +++ b/aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/AppHost.cs @@ -10,8 +10,17 @@ var redis = builder.AddRedis("redis") // Elasticsearch var elasticsearch = builder.AddElasticsearch("elasticsearch") .WithContainerName("elasticsearch") + .WithImageTag("8.17.3") .WithDataVolume("elasticsearch-dev") - .WithEnvironment("ES_JAVA_OPTS", "-Xms2g -Xmx2g"); + .WithEnvironment("ES_JAVA_OPTS", "-Xms2g -Xmx2g") + // see: https://www.funkysi1701.com/posts/2025/adding-elasticsearch-with-aspire/ + .WithEnvironment("xpack.security.enabled", "false"); + +// Kibana +builder.AddContainer("kibana", "kibana", "8.17.3") + .WithReference(elasticsearch) + .WithEndpoint(5601, 5601) + .WaitFor(elasticsearch); // Postgres var postgres = builder.AddPostgres("postgres") @@ -229,7 +238,7 @@ AddDotNetProject< // ApiGateway var apigateway = builder.AddProject("ApiGateway") - .WithHttpEndpoint(port: 30000, name: "gateway") + // .WithHttpEndpoint(port: 30000, name: "gateway") .WithExternalHttpEndpoints() .WithReference(redis, "Redis") .WithReference(elasticsearch, "Elasticsearch") diff --git a/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/LINGYUN.Abp.MicroService.TaskService.csproj b/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/LINGYUN.Abp.MicroService.TaskService.csproj index 2a4b28ffb..ba3e066a1 100644 --- a/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/LINGYUN.Abp.MicroService.TaskService.csproj +++ b/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/LINGYUN.Abp.MicroService.TaskService.csproj @@ -55,6 +55,7 @@ + diff --git a/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/TaskServiceModule.cs b/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/TaskServiceModule.cs index 42e80af93..4933dbb3b 100644 --- a/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/TaskServiceModule.cs +++ b/aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/TaskServiceModule.cs @@ -10,6 +10,7 @@ using LINGYUN.Abp.BackgroundTasks.Notifications; using LINGYUN.Abp.BackgroundTasks.Quartz; using LINGYUN.Abp.Claims.Mapping; using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Elasticsearch.Jobs; using LINGYUN.Abp.Emailing.Platform; using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.ExceptionHandling.Emailing; @@ -54,6 +55,7 @@ namespace LINGYUN.Abp.MicroService.TaskService; typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpAspNetCoreMultiTenancyModule), typeof(AbpAspNetCoreMvcLocalizationModule), + typeof(AbpElasticsearchJobsModule), typeof(AbpBackgroundTasksJobsModule), typeof(AbpBackgroundTasksQuartzModule), typeof(AbpBackgroundTasksDistributedLockingModule),