diff --git a/src/CleanMicroserviceSystem.sln b/src/CleanMicroserviceSystem.sln index 77ce035a..b5170a3c 100644 --- a/src/CleanMicroserviceSystem.sln +++ b/src/CleanMicroserviceSystem.sln @@ -8,6 +8,9 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Aphrodite", "WebUI\CleanMicroserviceSystem.Aphrodite\CleanMicroserviceSystem.Aphrodite.csproj", "{40C063A8-B595-4C98-A5B4-2A54E8B42EAC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Aphrodite.Domain", "WebUI\CleanMicroserviceSystem.Aphrodite.Domain\CleanMicroserviceSystem.Aphrodite.Domain.csproj", "{AB06CB3D-50D3-4394-825E-8387701AA509}" + ProjectSection(ProjectDependencies) = postProject + {7A5F6030-F900-4A58-A2AE-CC40B282CEBC} = {7A5F6030-F900-4A58-A2AE-CC40B282CEBC} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CommonLibrary", "CommonLibrary", "{ADEF00F4-7359-4188-AC22-108E3C82205D}" EndProject @@ -140,20 +143,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Ast EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Astra.Client", "MicroserviceComponents\NuGetServer\CleanMicroserviceSystem.Astra.Client\CleanMicroserviceSystem.Astra.Client.csproj", "{BC7B9B44-7A73-4697-9E17-E20F1BA88A43}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "K8sAgent", "K8sAgent", "{9EA646DE-73AB-4A84-9715-4FF81A196272}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Hermes.Application", "MicroserviceComponents\K8sAgent\CleanMicroserviceSystem.Hermes.Application\CleanMicroserviceSystem.Hermes.Application.csproj", "{E2E8761F-318B-460C-87F9-41111A901899}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Hermes.Client", "MicroserviceComponents\K8sAgent\CleanMicroserviceSystem.Hermes.Client\CleanMicroserviceSystem.Hermes.Client.csproj", "{E8731EC9-32FB-4C40-A16F-53D26965AB2A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Hermes.Contract", "MicroserviceComponents\K8sAgent\CleanMicroserviceSystem.Hermes.Contract\CleanMicroserviceSystem.Hermes.Contract.csproj", "{3F19D5F5-F204-4613-B0F4-49BE87D4500F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Hermes.Domain", "MicroserviceComponents\K8sAgent\CleanMicroserviceSystem.Hermes.Domain\CleanMicroserviceSystem.Hermes.Domain.csproj", "{8B1F2DFB-E622-454D-B01E-E4209E5E6F14}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Hermes.Infrastructure", "MicroserviceComponents\K8sAgent\CleanMicroserviceSystem.Hermes.Infrastructure\CleanMicroserviceSystem.Hermes.Infrastructure.csproj", "{02DB66F2-BFA8-455C-A56D-828855883979}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Hermes.WebAPI", "MicroserviceComponents\K8sAgent\CleanMicroserviceSystem.Hermes.WebAPI\CleanMicroserviceSystem.Hermes.WebAPI.csproj", "{7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMicroserviceSystem.Themis.NTLMWeb", "MicroserviceComponents\IdentityService\CleanMicroserviceSystem.Themis.NTLMWeb\CleanMicroserviceSystem.Themis.NTLMWeb.csproj", "{C156834C-1DBB-4232-AC69-778473AD6D2F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BondiCompetition", "BondiCompetition", "{86342751-D959-4429-A59A-66FF4024AE28}" @@ -517,54 +506,6 @@ Global {BC7B9B44-7A73-4697-9E17-E20F1BA88A43}.Release|Any CPU.Build.0 = Release|Any CPU {BC7B9B44-7A73-4697-9E17-E20F1BA88A43}.Release|x86.ActiveCfg = Release|Any CPU {BC7B9B44-7A73-4697-9E17-E20F1BA88A43}.Release|x86.Build.0 = Release|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Debug|x86.ActiveCfg = Debug|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Debug|x86.Build.0 = Debug|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Release|Any CPU.Build.0 = Release|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Release|x86.ActiveCfg = Release|Any CPU - {E2E8761F-318B-460C-87F9-41111A901899}.Release|x86.Build.0 = Release|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Debug|x86.ActiveCfg = Debug|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Debug|x86.Build.0 = Debug|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Release|Any CPU.Build.0 = Release|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Release|x86.ActiveCfg = Release|Any CPU - {E8731EC9-32FB-4C40-A16F-53D26965AB2A}.Release|x86.Build.0 = Release|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Debug|x86.ActiveCfg = Debug|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Debug|x86.Build.0 = Debug|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Release|Any CPU.Build.0 = Release|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Release|x86.ActiveCfg = Release|Any CPU - {3F19D5F5-F204-4613-B0F4-49BE87D4500F}.Release|x86.Build.0 = Release|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Debug|x86.ActiveCfg = Debug|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Debug|x86.Build.0 = Debug|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Release|Any CPU.Build.0 = Release|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Release|x86.ActiveCfg = Release|Any CPU - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14}.Release|x86.Build.0 = Release|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Debug|Any CPU.Build.0 = Debug|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Debug|x86.ActiveCfg = Debug|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Debug|x86.Build.0 = Debug|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Release|Any CPU.ActiveCfg = Release|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Release|Any CPU.Build.0 = Release|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Release|x86.ActiveCfg = Release|Any CPU - {02DB66F2-BFA8-455C-A56D-828855883979}.Release|x86.Build.0 = Release|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Debug|x86.ActiveCfg = Debug|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Debug|x86.Build.0 = Debug|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Release|Any CPU.Build.0 = Release|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Release|x86.ActiveCfg = Release|Any CPU - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB}.Release|x86.Build.0 = Release|Any CPU {C156834C-1DBB-4232-AC69-778473AD6D2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C156834C-1DBB-4232-AC69-778473AD6D2F}.Debug|Any CPU.Build.0 = Debug|Any CPU {C156834C-1DBB-4232-AC69-778473AD6D2F}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -677,13 +618,6 @@ Global {99D23F2F-3673-4423-83AB-005D0B6A2104} = {23FDB838-00DE-4A6A-9D22-9216984B4696} {BCB0D073-0ABA-44AF-8800-C19C0769723B} = {23FDB838-00DE-4A6A-9D22-9216984B4696} {BC7B9B44-7A73-4697-9E17-E20F1BA88A43} = {23FDB838-00DE-4A6A-9D22-9216984B4696} - {9EA646DE-73AB-4A84-9715-4FF81A196272} = {5B1F846E-EADB-49F2-9B23-12A25E4EC17D} - {E2E8761F-318B-460C-87F9-41111A901899} = {9EA646DE-73AB-4A84-9715-4FF81A196272} - {E8731EC9-32FB-4C40-A16F-53D26965AB2A} = {9EA646DE-73AB-4A84-9715-4FF81A196272} - {3F19D5F5-F204-4613-B0F4-49BE87D4500F} = {9EA646DE-73AB-4A84-9715-4FF81A196272} - {8B1F2DFB-E622-454D-B01E-E4209E5E6F14} = {9EA646DE-73AB-4A84-9715-4FF81A196272} - {02DB66F2-BFA8-455C-A56D-828855883979} = {9EA646DE-73AB-4A84-9715-4FF81A196272} - {7EFE4FCE-F63B-4FA9-A467-0B99D9A46CAB} = {9EA646DE-73AB-4A84-9715-4FF81A196272} {C156834C-1DBB-4232-AC69-778473AD6D2F} = {65AA7E50-47CF-4AA9-82F9-C1BB5926A81A} {86342751-D959-4429-A59A-66FF4024AE28} = {5B1F846E-EADB-49F2-9B23-12A25E4EC17D} {FB1E6147-29BD-429A-B0E6-40B4D6C76C35} = {86342751-D959-4429-A59A-66FF4024AE28} diff --git a/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Development.json b/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Development.json index ac764caf..6cf491fb 100644 --- a/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Development.json +++ b/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Development.json @@ -41,17 +41,6 @@ "Type": "RoundRobin" } }, - { - "DownstreamPathTemplate": "/{url}", - "DownstreamScheme": "https", - "UpstreamPathTemplate": "/Ocelot/Hermes/{url}", - "UpstreamHttpMethod": [ "Get", "Post", "Put", "Patch", "Delete", "Options", "Head" ], - "ServiceName": "K8sAgent-Hermes-Dev", - "UseServiceDiscovery": true, - "LoadBalancerOptions": { - "Type": "RoundRobin" - } - }, { "DownstreamPathTemplate": "/{url}", "DownstreamScheme": "https", diff --git a/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Production.json b/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Production.json index 8b422f90..bb9dc703 100644 --- a/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Production.json +++ b/src/MicroserviceComponents/Gateway/CleanMicroserviceSystem.Uranus.WebAPI/appsettings.Production.json @@ -41,17 +41,6 @@ "Type": "RoundRobin" } }, - { - "DownstreamPathTemplate": "/{url}", - "DownstreamScheme": "https", - "UpstreamPathTemplate": "/Ocelot/Hermes/{url}", - "UpstreamHttpMethod": [ "Get", "Post", "Put", "Patch", "Delete", "Options", "Head" ], - "ServiceName": "K8sAgent-Hermes-Prod", - "UseServiceDiscovery": true, - "LoadBalancerOptions": { - "Type": "RoundRobin" - } - }, { "DownstreamPathTemplate": "/{url}", "DownstreamScheme": "https", diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Application/CleanMicroserviceSystem.Hermes.Application.csproj b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Application/CleanMicroserviceSystem.Hermes.Application.csproj deleted file mode 100644 index 35bf4481..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Application/CleanMicroserviceSystem.Hermes.Application.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - - diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/CleanMicroserviceSystem.Hermes.Client.csproj b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/CleanMicroserviceSystem.Hermes.Client.csproj deleted file mode 100644 index 082f522c..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/CleanMicroserviceSystem.Hermes.Client.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - - - - - - - - diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClient.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClient.cs deleted file mode 100644 index 9017fdf1..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClient.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Net.Http.Json; -using CleanMicroserviceSystem.Hermes.Contract; -using CleanMicroserviceSystem.Oceanus.Client.Abstraction; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; - -namespace CleanMicroserviceSystem.Hermes.Client; - -public class K8sAgentClient : OceanusServiceClientBase -{ - public K8sAgentClient( - ILogger logger, - IHttpClientFactory httpClientFactory, - IOptionsSnapshot options) : - base(logger, httpClientFactory, options.Value.GatewayClientName, K8sAgentClientContract.HermesUriPrefix) - { - } - - public async Task SendAsync(SendParameter parameter) - { - var uri = this.BuildUri("/home/index"); - var response = await this.httpClient.PostAsJsonAsync(uri, parameter); - return await response.Content.ReadAsStringAsync(); - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientConfiguration.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientConfiguration.cs deleted file mode 100644 index c4a2e4e9..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientConfiguration.cs +++ /dev/null @@ -1,7 +0,0 @@ -using CleanMicroserviceSystem.Oceanus.Client.Abstraction; - -namespace CleanMicroserviceSystem.Hermes.Client; - -public class K8sAgentClientConfiguration : OceanusServiceClientConfiguration -{ -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientContract.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientContract.cs deleted file mode 100644 index 1c330e58..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientContract.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CleanMicroserviceSystem.Gateway.Contract; - -namespace CleanMicroserviceSystem.Hermes.Client; - -public static class K8sAgentClientContract -{ - public const string HermesUriPrefix = $"{GatewayContract.GatewayUriPrefix}/Hermes"; -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientExtension.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientExtension.cs deleted file mode 100644 index 010af9f0..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Client/K8sAgentClientExtension.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; - -namespace CleanMicroserviceSystem.Hermes.Client; - -public static class K8sAgentClientExtension -{ - public static IServiceCollection AddHermesClients(this IServiceCollection services, Action options) - { - _ = services.Configure(options); - services - .AddScoped(); - return services; - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Contract/CleanMicroserviceSystem.Hermes.Contract.csproj b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Contract/CleanMicroserviceSystem.Hermes.Contract.csproj deleted file mode 100644 index 23c7f346..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Contract/CleanMicroserviceSystem.Hermes.Contract.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Contract/SendParameter.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Contract/SendParameter.cs deleted file mode 100644 index 233bb1e2..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Contract/SendParameter.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace CleanMicroserviceSystem.Hermes.Contract; - -public class SendParameter -{ - public string? Name { get; set; } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Domain/CleanMicroserviceSystem.Hermes.Domain.csproj b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Domain/CleanMicroserviceSystem.Hermes.Domain.csproj deleted file mode 100644 index 23efb13b..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Domain/CleanMicroserviceSystem.Hermes.Domain.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/CleanMicroserviceSystem.Hermes.Infrastructure.csproj b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/CleanMicroserviceSystem.Hermes.Infrastructure.csproj deleted file mode 100644 index 862fb548..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/CleanMicroserviceSystem.Hermes.Infrastructure.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - - - - - - - diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/DependencyInjection.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/DependencyInjection.cs deleted file mode 100644 index 749e2971..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/DependencyInjection.cs +++ /dev/null @@ -1,26 +0,0 @@ -using CleanMicroserviceSystem.Hermes.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace CleanMicroserviceSystem.Hermes.Infrastructure; - -public static class DependencyInjection -{ - public static IServiceCollection AddInfrastructure( - this IServiceCollection services, IConfiguration configuration) - { - var connectionString = configuration.GetConnectionString("ServiceDB")!; - return services - .AddCors(options => options - .AddDefaultPolicy(builder => builder - .AllowAnyOrigin() - .AllowAnyMethod() - .AllowAnyHeader())) - .AddDbContext( - options => options - .UseSqlite(connectionString) - .UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking) - .UseLazyLoadingProxies()); - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/20221218084209_InitialMigration.Designer.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/20221218084209_InitialMigration.Designer.cs deleted file mode 100644 index d2dcdf34..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/20221218084209_InitialMigration.Designer.cs +++ /dev/null @@ -1,140 +0,0 @@ -// -using System; -using CleanMicroserviceSystem.Hermes.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace CleanMicroserviceSystem.Hermes.Infrastructure.Migrations -{ - [DbContext(typeof(HermesDbContext))] - [Migration("20221218084209_InitialMigration")] - partial class InitialMigration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.0") - .HasAnnotation("Proxies:ChangeTracking", false) - .HasAnnotation("Proxies:CheckEquality", false) - .HasAnnotation("Proxies:LazyLoading", true); - - modelBuilder.Entity("CleanMicroserviceSystem.Oceanus.Domain.Abstraction.Entities.GenericOption", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Category") - .HasColumnType("TEXT") - .UseCollation("NOCASE"); - - b.Property("CreatedBy") - .HasColumnType("INTEGER"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OptionName") - .IsRequired() - .HasColumnType("TEXT") - .UseCollation("NOCASE"); - - b.Property("OptionValue") - .HasColumnType("TEXT"); - - b.Property("OwnerLevel") - .HasColumnType("TEXT") - .UseCollation("NOCASE"); - - b.HasKey("ID"); - - b.HasIndex("OptionName", "Category", "OwnerLevel") - .IsUnique(); - - b.ToTable("GenericOptions"); - }); - - modelBuilder.Entity("CleanMicroserviceSystem.Oceanus.Domain.Abstraction.Entities.WebAPILog", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .HasColumnType("INTEGER"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("ElapsedTime") - .HasColumnType("INTEGER"); - - b.Property("Exception") - .HasColumnType("TEXT"); - - b.Property("IdentityName") - .HasColumnType("TEXT"); - - b.Property("IsAuthenticated") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Method") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("QueryString") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RequestBody") - .HasColumnType("TEXT"); - - b.Property("RequestURI") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ResponseBody") - .HasColumnType("TEXT"); - - b.Property("SourceHost") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatusCode") - .HasColumnType("INTEGER"); - - b.Property("TraceIdentifier") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserAgent") - .HasColumnType("TEXT"); - - b.HasKey("ID"); - - b.HasIndex("RequestURI", "SourceHost", "IdentityName", "CreatedOn"); - - b.ToTable("WebAPILogs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/20221218084209_InitialMigration.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/20221218084209_InitialMigration.cs deleted file mode 100644 index 42dd5600..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/20221218084209_InitialMigration.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace CleanMicroserviceSystem.Hermes.Infrastructure.Migrations -{ - /// - public partial class InitialMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "GenericOptions", - columns: table => new - { - ID = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - OptionName = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), - OptionValue = table.Column(type: "TEXT", nullable: true), - Category = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), - OwnerLevel = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), - CreatedBy = table.Column(type: "INTEGER", nullable: false), - CreatedOn = table.Column(type: "TEXT", nullable: false), - LastModifiedBy = table.Column(type: "INTEGER", nullable: true), - LastModifiedOn = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_GenericOptions", x => x.ID); - }); - - migrationBuilder.CreateTable( - name: "WebAPILogs", - columns: table => new - { - ID = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - RequestURI = table.Column(type: "TEXT", nullable: false), - QueryString = table.Column(type: "TEXT", nullable: false), - Method = table.Column(type: "TEXT", nullable: false), - SourceHost = table.Column(type: "TEXT", nullable: false), - UserAgent = table.Column(type: "TEXT", nullable: true), - TraceIdentifier = table.Column(type: "TEXT", nullable: false), - IsAuthenticated = table.Column(type: "INTEGER", nullable: false), - IdentityName = table.Column(type: "TEXT", nullable: true), - RequestBody = table.Column(type: "TEXT", nullable: true), - ResponseBody = table.Column(type: "TEXT", nullable: true), - StatusCode = table.Column(type: "INTEGER", nullable: false), - ElapsedTime = table.Column(type: "INTEGER", nullable: false), - Exception = table.Column(type: "TEXT", nullable: true), - CreatedBy = table.Column(type: "INTEGER", nullable: false), - CreatedOn = table.Column(type: "TEXT", nullable: false), - LastModifiedBy = table.Column(type: "INTEGER", nullable: true), - LastModifiedOn = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_WebAPILogs", x => x.ID); - }); - - migrationBuilder.CreateIndex( - name: "IX_GenericOptions_OptionName_Category_OwnerLevel", - table: "GenericOptions", - columns: new[] { "OptionName", "Category", "OwnerLevel" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_WebAPILogs_RequestURI_SourceHost_IdentityName_CreatedOn", - table: "WebAPILogs", - columns: new[] { "RequestURI", "SourceHost", "IdentityName", "CreatedOn" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "GenericOptions"); - - migrationBuilder.DropTable( - name: "WebAPILogs"); - } - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/TethysDBContextModelSnapshot.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/TethysDBContextModelSnapshot.cs deleted file mode 100644 index fb9116d7..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Migrations/TethysDBContextModelSnapshot.cs +++ /dev/null @@ -1,137 +0,0 @@ -// -using System; -using CleanMicroserviceSystem.Hermes.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace CleanMicroserviceSystem.Hermes.Infrastructure.Migrations -{ - [DbContext(typeof(HermesDbContext))] - partial class HermesDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.0") - .HasAnnotation("Proxies:ChangeTracking", false) - .HasAnnotation("Proxies:CheckEquality", false) - .HasAnnotation("Proxies:LazyLoading", true); - - modelBuilder.Entity("CleanMicroserviceSystem.Oceanus.Domain.Abstraction.Entities.GenericOption", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Category") - .HasColumnType("TEXT") - .UseCollation("NOCASE"); - - b.Property("CreatedBy") - .HasColumnType("INTEGER"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("LastModifiedBy") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("OptionName") - .IsRequired() - .HasColumnType("TEXT") - .UseCollation("NOCASE"); - - b.Property("OptionValue") - .HasColumnType("TEXT"); - - b.Property("OwnerLevel") - .HasColumnType("TEXT") - .UseCollation("NOCASE"); - - b.HasKey("ID"); - - b.HasIndex("OptionName", "Category", "OwnerLevel") - .IsUnique(); - - b.ToTable("GenericOptions"); - }); - - modelBuilder.Entity("CleanMicroserviceSystem.Oceanus.Domain.Abstraction.Entities.WebAPILog", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CreatedBy") - .HasColumnType("INTEGER"); - - b.Property("CreatedOn") - .HasColumnType("TEXT"); - - b.Property("ElapsedTime") - .HasColumnType("INTEGER"); - - b.Property("Exception") - .HasColumnType("TEXT"); - - b.Property("IdentityName") - .HasColumnType("TEXT"); - - b.Property("IsAuthenticated") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedBy") - .HasColumnType("INTEGER"); - - b.Property("LastModifiedOn") - .HasColumnType("TEXT"); - - b.Property("Method") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("QueryString") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("RequestBody") - .HasColumnType("TEXT"); - - b.Property("RequestURI") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ResponseBody") - .HasColumnType("TEXT"); - - b.Property("SourceHost") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("StatusCode") - .HasColumnType("INTEGER"); - - b.Property("TraceIdentifier") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserAgent") - .HasColumnType("TEXT"); - - b.HasKey("ID"); - - b.HasIndex("RequestURI", "SourceHost", "IdentityName", "CreatedOn"); - - b.ToTable("WebAPILogs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Persistence/TethysDBContext.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Persistence/TethysDBContext.cs deleted file mode 100644 index 7500d4e9..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.Infrastructure/Persistence/TethysDBContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using CleanMicroserviceSystem.Oceanus.Infrastructure.Abstraction.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; - -namespace CleanMicroserviceSystem.Hermes.Infrastructure.Persistence; - -public class HermesDbContext : OceanusDbContext -{ - public HermesDbContext( - ILogger logger) - : base(logger) - { - } - - public HermesDbContext( - ILogger logger, - DbContextOptions options) - : base(logger, options) - { - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/.config/dotnet-tools.json b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/.config/dotnet-tools.json deleted file mode 100644 index 812c6cdb..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/.config/dotnet-tools.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "dotnet-ef": { - "version": "7.0.8", - "commands": [ - "dotnet-ef" - ] - } - } -} \ No newline at end of file diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/CleanMicroserviceSystem.Hermes.WebAPI.csproj b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/CleanMicroserviceSystem.Hermes.WebAPI.csproj deleted file mode 100644 index ef41667c..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/CleanMicroserviceSystem.Hermes.WebAPI.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - net8.0 - enable - enable - Hermes.ico - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - PreserveNewest - true - PreserveNewest - - - - diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Controllers/HomeController.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Controllers/HomeController.cs deleted file mode 100644 index 8771c70d..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Controllers/HomeController.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Text; -using CleanMicroserviceSystem.Hermes.Contract; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; - -namespace CleanMicroserviceSystem.Hermes.WebAPI.Controllers; - -[ApiController] -[AllowAnonymous] -[Route("[controller]/[action]")] -public class HomeController : Controller -{ - private readonly ILogger logger; - - public HomeController( - ILogger logger) - { - this.logger = logger; - } - - [HttpPost] - public ActionResult Index(SendParameter parameter) - { - this.logger.LogInformation(parameter.ToString()); - var builder = new StringBuilder(); - builder.AppendLine($"Response from WebAPI."); - builder.AppendLine(this.ControllerContext.ActionDescriptor.DisplayName); - builder.AppendLine(this.HttpContext.TraceIdentifier); - builder.AppendLine($"{this.HttpContext.Connection.RemoteIpAddress?.ToString()}:{this.HttpContext.Connection.RemotePort}"); - builder.AppendLine($"{this.HttpContext.Request.Method} {this.HttpContext.Request.Protocol}"); - builder.AppendLine(this.HttpContext.Request.Path.ToUriComponent()); - builder.AppendLine(this.HttpContext.Request.QueryString.ToUriComponent()); - var log = builder.ToString(); - return this.Ok(log); - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Hermes.ico b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Hermes.ico deleted file mode 100644 index 3a288ddc..00000000 Binary files a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Hermes.ico and /dev/null differ diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/HermesProgram.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/HermesProgram.cs deleted file mode 100644 index b2700b11..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/HermesProgram.cs +++ /dev/null @@ -1,15 +0,0 @@ -using CleanMicroserviceSystem.Oceanus.WebAPI.Abstraction; -using CleanMicroserviceSystem.Hermes.Infrastructure; - -namespace CleanMicroserviceSystem.Hermes.WebAPI; - -public class HermesProgram : OceanusProgram -{ - public HermesProgram(NLog.ILogger logger) : base(logger) { } - - public override void ConfigureServices() - { - webAppBuilder.Services.AddInfrastructure(this.configManager); - base.ConfigureServices(); - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/NLog.config b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/NLog.config deleted file mode 100644 index ac6081c0..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/NLog.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Program.cs b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Program.cs deleted file mode 100644 index 22358bd7..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Program.cs +++ /dev/null @@ -1,27 +0,0 @@ -using CleanMicroserviceSystem.Hermes.WebAPI; -using NLog; -using NLog.Web; - -var assemblyName = typeof(Program).Assembly.GetName(); -var setupInformation = AppDomain.CurrentDomain.SetupInformation; -var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger(); -logger.Info($"{assemblyName.Name} launches, TargetFrameworkName={setupInformation.TargetFrameworkName}, Version={assemblyName.Version}"); - -try -{ - var program = new HermesProgram(logger); - program.ConfigureHostBuilder(args); - program.ConfigureServices(); - program.ConfigurePipelines(); - program.ConfigureWebApp(); - program.Run(); -} -catch (Exception ex) -{ - logger.Error(ex, $"{assemblyName.Name} launches failed."); -} -finally -{ - logger.Info($"{assemblyName.Name} shutdown, Version={assemblyName.Version}"); - LogManager.Shutdown(); -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Properties/launchSettings.json b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Properties/launchSettings.json deleted file mode 100644 index 6c715a69..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Properties/launchSettings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "profiles": { - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:11000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Service.db b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Service.db deleted file mode 100644 index 45d93984..00000000 Binary files a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/Service.db and /dev/null differ diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.Development.json b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.Development.json deleted file mode 100644 index 5645362f..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.Development.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "urls": "https://*:11004", - - "JwtBearerConfiguration": { - "JwtSecurityKey": "JWT_SECURITY_KEY_DEVELOPMENT", - "JwtIssuer": "Themis-Dev", - "JwtAudience": "Hermes-Dev", - "JwtExpiryForUser": 30, - "JwtExpiryForClient": 1440 - }, - - "AgentServiceRegistrationConfiguration": { - "ServicesProviderAddress": "http://localhost:8500", - "ServiceName": "K8sAgent-Hermes-Dev", - "ServiceInstanceId": "K8sAgent_Hermes_Dev_000", - "SelfHost": "localhost", - "SelfPort": "11004", - "HealthCheckUrl": "https://localhost:11004/healthcheck" - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.Production.json b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.Production.json deleted file mode 100644 index bc88d3f8..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.Production.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "urls": "https://*:21004", - - "JwtBearerConfiguration": { - "JwtSecurityKey": "JWT_SECURITY_KEY_PRODUCTION", - "JwtIssuer": "Themis-Prod", - "JwtAudience": "Hermes-Prod", - "JwtExpiryForUser": 30, - "JwtExpiryForClient": 1440 - }, - - "AgentServiceRegistrationConfiguration": { - "ServicesProviderAddress": "http://localhost:8500", - "ServiceName": "K8sAgent-Hermes-Prod", - "ServiceInstanceId": "K8sAgent_Hermes_Prod_000", - "SelfHost": "localhost", - "SelfPort": "21004", - "HealthCheckUrl": "https://localhost:21004/healthcheck" - } -} diff --git a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.json b/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.json deleted file mode 100644 index 57ab35d5..00000000 --- a/src/MicroserviceComponents/K8sAgent/CleanMicroserviceSystem.Hermes.WebAPI/appsettings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - - "ConnectionStrings": { - "ServiceDB": "DATA SOURCE=.\\Service.db" - }, - - "AllowedHosts": "*" -} diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite.Domain/RouterContract.cs b/src/WebUI/CleanMicroserviceSystem.Aphrodite.Domain/RouterContract.cs index 421947dc..d137fe10 100644 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite.Domain/RouterContract.cs +++ b/src/WebUI/CleanMicroserviceSystem.Aphrodite.Domain/RouterContract.cs @@ -22,7 +22,5 @@ public class RouterContract public const string PackagesUri = "/nugetserver/packages"; - public const string K8SConsoleUri = "/k8sconsole"; - public const string BondiCompetitionUri = "/bondicompetition"; } diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/CleanMicroserviceSystem.Aphrodite.Infrastructure.csproj b/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/CleanMicroserviceSystem.Aphrodite.Infrastructure.csproj index 4ba7622d..18a7f12e 100644 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/CleanMicroserviceSystem.Aphrodite.Infrastructure.csproj +++ b/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/CleanMicroserviceSystem.Aphrodite.Infrastructure.csproj @@ -20,7 +20,6 @@ - diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/DependencyInjection.cs b/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/DependencyInjection.cs index 90df759b..9327fc85 100644 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/DependencyInjection.cs +++ b/src/WebUI/CleanMicroserviceSystem.Aphrodite.Infrastructure/DependencyInjection.cs @@ -7,7 +7,6 @@ using CleanMicroserviceSystem.Authentication.Application; using CleanMicroserviceSystem.Authentication.Domain; using CleanMicroserviceSystem.BondiCompetition.Client; -using CleanMicroserviceSystem.Hermes.Client; using CleanMicroserviceSystem.Themis.Client; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; @@ -60,10 +59,6 @@ public static IServiceCollection ConfigureServices(this WebAssemblyHostBuilder b { options.GatewayClientName = ApiContract.GatewayHttpClientName; }) - .AddHermesClients(options => - { - options.GatewayClientName = ApiContract.GatewayHttpClientName; - }) .AddBondiCompetitionClients(options => { options.GatewayClientName = ApiContract.GatewayHttpClientName; diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite/CleanMicroserviceSystem.Aphrodite.csproj b/src/WebUI/CleanMicroserviceSystem.Aphrodite/CleanMicroserviceSystem.Aphrodite.csproj index 13fbeb48..250d988c 100644 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite/CleanMicroserviceSystem.Aphrodite.csproj +++ b/src/WebUI/CleanMicroserviceSystem.Aphrodite/CleanMicroserviceSystem.Aphrodite.csproj @@ -16,7 +16,6 @@ - diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite/Pages/K8SConsolePages/K8SConsoleNavigator.razor b/src/WebUI/CleanMicroserviceSystem.Aphrodite/Pages/K8SConsolePages/K8SConsoleNavigator.razor deleted file mode 100644 index cd81940b..00000000 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite/Pages/K8SConsolePages/K8SConsoleNavigator.razor +++ /dev/null @@ -1,5 +0,0 @@ -@inherits NavigatorBase - - -@code { -} diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite/Pages/K8SConsolePages/K8SConsolePage.razor b/src/WebUI/CleanMicroserviceSystem.Aphrodite/Pages/K8SConsolePages/K8SConsolePage.razor deleted file mode 100644 index 5cba560c..00000000 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite/Pages/K8SConsolePages/K8SConsolePage.razor +++ /dev/null @@ -1,44 +0,0 @@ -@page "/k8sconsole" -@using CleanMicroserviceSystem.Hermes.Contract; -@inherits AphroditePageBase -@inject ILogger logger -@inject IPopupService popupService -@inject K8sAgentClient k8sAgentClient - -K8S Console - - - - - - - - - - Test -

- TODO: Implement console. @this.TestCount -

-
- - @code { - private int TestCount { get; set; } - - protected override async Task OnInitializedAsync() - { - await base.OnInitializedAsync(); - } - - private async void OnButtonClick() - { - try - { - var response = await this.k8sAgentClient.SendAsync(new SendParameter() { Name = "TestName" }); - this.logger.LogInformation(response); - } - catch (Exception ex) - { - this.logger.LogError(ex, "Error when send request."); - } - } -} diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite/Shared/MainNavigationBar.razor b/src/WebUI/CleanMicroserviceSystem.Aphrodite/Shared/MainNavigationBar.razor index 47e412b9..0c65d970 100644 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite/Shared/MainNavigationBar.razor +++ b/src/WebUI/CleanMicroserviceSystem.Aphrodite/Shared/MainNavigationBar.razor @@ -30,7 +30,6 @@ - diff --git a/src/WebUI/CleanMicroserviceSystem.Aphrodite/_Imports.razor b/src/WebUI/CleanMicroserviceSystem.Aphrodite/_Imports.razor index ecb39cfa..9659e285 100644 --- a/src/WebUI/CleanMicroserviceSystem.Aphrodite/_Imports.razor +++ b/src/WebUI/CleanMicroserviceSystem.Aphrodite/_Imports.razor @@ -23,7 +23,6 @@ @using CleanMicroserviceSystem.Aphrodite.Pages.AccountPages; @using CleanMicroserviceSystem.Aphrodite.Pages.AccountPages.Components; @using CleanMicroserviceSystem.Aphrodite.Pages.NuGetServerPages; -@using CleanMicroserviceSystem.Aphrodite.Pages.K8SConsolePages; @using CleanMicroserviceSystem.Aphrodite.Pages.BondiCompetitionPages; @using CleanMicroserviceSystem.Aphrodite.Pages.PermissionPages; @using CleanMicroserviceSystem.Aphrodite.Pages.PermissionPages.Components; @@ -38,7 +37,6 @@ @using CleanMicroserviceSystem.Themis.Contract.Roles; @using CleanMicroserviceSystem.Themis.Contract.Claims; @using CleanMicroserviceSystem.Themis.Contract.Users; -@using CleanMicroserviceSystem.Hermes.Client; @using CleanMicroserviceSystem.BondiCompetition.Client; @using BlazorComponent @using Masa.Blazor