Browse Source

updated config files

features/migration-dotnet3
eiximenis 5 years ago
parent
commit
784ad9d414
28 changed files with 228 additions and 717 deletions
  1. +0
    -2
      k8s/helm/webmvc/templates/configmap.yaml
  2. +0
    -4
      k8s/helm/webmvc/values.yaml
  3. +0
    -2
      k8s/helm/webspa/templates/configmap.yaml
  4. +0
    -4
      k8s/helm/webspa/values.yaml
  5. +21
    -37
      k8s/helm/webstatus/values.yaml
  6. +0
    -24
      src/ApiGateways/ApiGw-Base/Dockerfile
  7. +0
    -14
      src/ApiGateways/ApiGw-Base/Dockerfile.develop
  8. +0
    -18
      src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj
  9. +0
    -41
      src/ApiGateways/ApiGw-Base/Program.cs
  10. +0
    -27
      src/ApiGateways/ApiGw-Base/Properties/launchSettings.json
  11. +0
    -108
      src/ApiGateways/ApiGw-Base/Startup.cs
  12. +0
    -10
      src/ApiGateways/ApiGw-Base/appsettings.json
  13. +49
    -0
      src/ApiGateways/Envoy/config/mobilemarketing/envoy.yaml
  14. +0
    -0
      src/ApiGateways/Envoy/config/mobileshopping/envoy.yaml
  15. +49
    -0
      src/ApiGateways/Envoy/config/webmarketing/envoy.yaml
  16. +80
    -0
      src/ApiGateways/Envoy/config/webshopping/envoy.yaml
  17. +0
    -44
      src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml
  18. +0
    -34
      src/ApiGateways/Mobile.Bff.Marketing/apigw/configuration.json
  19. +0
    -2
      src/ApiGateways/Mobile.Bff.Marketing/apigw/values.dev.yaml
  20. +0
    -44
      src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml
  21. +0
    -34
      src/ApiGateways/Web.Bff.Marketing/apigw/configuration.json
  22. +0
    -2
      src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml
  23. +0
    -43
      src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml
  24. +0
    -130
      src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json
  25. +0
    -2
      src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml
  26. +0
    -2
      src/Web/WebMVC/Startup.cs
  27. +0
    -2
      src/Web/WebSPA/Startup.cs
  28. +29
    -87
      src/docker-compose.override.yml

+ 0
- 2
k8s/helm/webmvc/templates/configmap.yaml View File

@ -20,9 +20,7 @@ data:
webmvc__keystore: {{ .Values.inf.redis.keystore.constr }}
internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }}
internalurls__apigwwm: http://{{ .Values.app.svc.webmarketingapigw }}
internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}/hc
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}/hc
urls__apigwws: http://{{ $webshoppingapigw }}
urls__mvc: http://{{ $mvc }}
urls__IdentityUrl: http://{{ $identity }}

+ 0
- 4
k8s/helm/webmvc/values.yaml View File

@ -46,12 +46,8 @@ env:
key: urls__IdentityUrl
- name: MarketingUrl
key: internalurls__apigwwm
- name: PurchaseUrlHC
key: internalurls__apigwws__hc
- name: IdentityUrlHC
key: internalurls__identity__hc
- name: MarketingUrlHC
key: internalurls__apigwwm__hc
- name: SignalrHubUrl
key: urls__apigwws
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)


+ 0
- 2
k8s/helm/webspa/templates/configmap.yaml View File

@ -20,9 +20,7 @@ data:
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
webspa__keystore: {{ .Values.inf.redis.keystore.constr }}
internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }}
internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}/hc
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}/hc
urls__apigwws: http://{{ $webshoppingapigw }}
urls__spa: http://{{ $spa }}
urls__IdentityUrl: http://{{ $identity }}

+ 0
- 4
k8s/helm/webspa/values.yaml View File

@ -44,12 +44,8 @@ env:
key: urls__IdentityUrl
- name: MarketingUrl
key: urls__apigwwm
- name: PurchaseUrlHC
key: internalurls__apigwws__hc
- name: IdentityUrlHC
key: internalurls__identity__hc
- name: MarketingUrlHC
key: internalurls__apigwwm__hc
- name: SignalrHubUrl
key: urls__apigwws
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)


+ 21
- 37
k8s/helm/webstatus/values.yaml View File

@ -43,64 +43,48 @@ env:
- name: HealthChecks-UI__HealthChecks__1__Uri
key: internalurls__spa__hc
- name: HealthChecks-UI__HealthChecks__2__Name
key: name__apigwws__hc
- name: HealthChecks-UI__HealthChecks__2__Uri
key: internalurls__apigwws__hc
- name: HealthChecks-UI__HealthChecks__3__Name
key: name__apigwwm__hc
- name: HealthChecks-UI__HealthChecks__3__Uri
key: internalurls__apigwwm__hc
- name: HealthChecks-UI__HealthChecks__4__Name
key: name__apigwms__hc
- name: HealthChecks-UI__HealthChecks__4__Uri
key: internalurls__apigwms__hc
- name: HealthChecks-UI__HealthChecks__5__Name
key: name__apigwmm__hc
- name: HealthChecks-UI__HealthChecks__5__Uri
key: internalurls__apigwmm__hc
- name: HealthChecks-UI__HealthChecks__6__Name
key: name__apigwwsagg__hc
- name: HealthChecks-UI__HealthChecks__6__Uri
- name: HealthChecks-UI__HealthChecks__2__Uri
key: internalurls__apigwwsagg__hc
- name: HealthChecks-UI__HealthChecks__7__Name
- name: HealthChecks-UI__HealthChecks__3__Name
key: name__apigwmsagg__hc
- name: HealthChecks-UI__HealthChecks__7__Uri
- name: HealthChecks-UI__HealthChecks__3__Uri
key: internalurls__apigwmsagg__hc
- name: HealthChecks-UI__HealthChecks__8__Name
- name: HealthChecks-UI__HealthChecks__4__Name
key: name__ordering__hc
- name: HealthChecks-UI__HealthChecks__8__Uri
- name: HealthChecks-UI__HealthChecks__4__Uri
key: internalurls__ordering__hc
- name: HealthChecks-UI__HealthChecks__9__Name
- name: HealthChecks-UI__HealthChecks__5__Name
key: name__orderingbackground__hc
- name: HealthChecks-UI__HealthChecks__9__Uri
- name: HealthChecks-UI__HealthChecks__5__Uri
key: internalurls__orderingbackground__hc
- name: HealthChecks-UI__HealthChecks__10__Name
- name: HealthChecks-UI__HealthChecks__6__Name
key: name__signalrhub__hc
- name: HealthChecks-UI__HealthChecks__10__Uri
- name: HealthChecks-UI__HealthChecks__6__Uri
key: internalurls__signalrhub__hc
- name: HealthChecks-UI__HealthChecks__11__Name
- name: HealthChecks-UI__HealthChecks__7__Name
key: name__basket__hc
- name: HealthChecks-UI__HealthChecks__11__Uri
- name: HealthChecks-UI__HealthChecks__7__Uri
key: internalurls__basket__hc
- name: HealthChecks-UI__HealthChecks__12__Name
- name: HealthChecks-UI__HealthChecks__8__Name
key: name__catalog__hc
- name: HealthChecks-UI__HealthChecks__12__Uri
- name: HealthChecks-UI__HealthChecks__8__Uri
key: internalurls__catalog__hc
- name: HealthChecks-UI__HealthChecks__13__Name
- name: HealthChecks-UI__HealthChecks__9__Name
key: name__identity__hc
- name: HealthChecks-UI__HealthChecks__13__Uri
- name: HealthChecks-UI__HealthChecks__9__Uri
key: internalurls__identity__hc
- name: HealthChecks-UI__HealthChecks__14__Name
- name: HealthChecks-UI__HealthChecks__10__Name
key: name__marketing__hc
- name: HealthChecks-UI__HealthChecks__14__Uri
- name: HealthChecks-UI__HealthChecks__10__Uri
key: internalurls__marketing__hc
- name: HealthChecks-UI__HealthChecks__15__Name
- name: HealthChecks-UI__HealthChecks__11__Name
key: name__locations__hc
- name: HealthChecks-UI__HealthChecks__15__Uri
- name: HealthChecks-UI__HealthChecks__11__Uri
key: internalurls__locations__hc
- name: HealthChecks-UI__HealthChecks__16__Name
- name: HealthChecks-UI__HealthChecks__12__Name
key: name__payment__hc
- name: HealthChecks-UI__HealthChecks__16__Uri
- name: HealthChecks-UI__HealthChecks__12__Uri
key: internalurls__payment__hc
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values:


+ 0
- 24
src/ApiGateways/ApiGw-Base/Dockerfile View File

@ -1,24 +0,0 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
COPY scripts scripts/
COPY ApiGateways/*/*.csproj csproj-files/
COPY ApiGateways/*/*/*.csproj csproj-files/
COPY BuildingBlocks/*/*/*.csproj csproj-files/
COPY Services/*/*/*.csproj csproj-files/
COPY Web/*/*.csproj csproj-files/
COPY . .
WORKDIR /src/ApiGateways/ApiGw-Base/
RUN dotnet publish -c Release -o /app
FROM build AS publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "OcelotApiGw.dll"]

+ 0
- 14
src/ApiGateways/ApiGw-Base/Dockerfile.develop View File

@ -1,14 +0,0 @@
FROM microsoft/dotnet:2.2-sdk
ARG BUILD_CONFIGURATION=Debug
ENV ASPNETCORE_ENVIRONMENT=Development
ENV DOTNET_USE_POLLING_FILE_WATCHER=true
EXPOSE 80
WORKDIR /src
COPY ["src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj", "src/ApiGateways/ApiGw-Base/"]
RUN dotnet restore "src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj"
COPY . .
WORKDIR "/src/src/ApiGateways/ApiGw-Base"
RUN dotnet build --no-restore "OcelotApiGw.csproj" -c $BUILD_CONFIGURATION
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]

+ 0
- 18
src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj View File

@ -1,18 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>$(LangVersion)</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Ocelot" Version="12.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
</ItemGroup>
</Project>

+ 0
- 41
src/ApiGateways/ApiGw-Base/Program.cs View File

@ -1,41 +0,0 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Serilog;
using System.IO;
namespace OcelotApiGw
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args)
{
IWebHostBuilder builder = WebHost.CreateDefaultBuilder(args);
builder.ConfigureServices(s => s.AddSingleton(builder))
.ConfigureAppConfiguration(ic => ic.AddJsonFile(Path.Combine("configuration", "configuration.json")))
.UseStartup<Startup>()
.ConfigureLogging((hostingContext, loggingbuilder) =>
{
loggingbuilder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
loggingbuilder.AddConsole();
loggingbuilder.AddDebug();
})
.UseSerilog((builderContext, config) =>
{
config
.MinimumLevel.Information()
.Enrich.FromLogContext()
.WriteTo.Console();
});
IWebHost host = builder.Build();
return host;
}
}
}

+ 0
- 27
src/ApiGateways/ApiGw-Base/Properties/launchSettings.json View File

@ -1,27 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:56755/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"OcelotApiGw": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:64021/"
}
}
}

+ 0
- 108
src/ApiGateways/ApiGw-Base/Startup.cs View File

@ -1,108 +0,0 @@
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
using System;
namespace OcelotApiGw
{
public class Startup
{
private readonly IConfiguration _cfg;
public Startup(IConfiguration configuration)
{
_cfg = configuration;
}
public void ConfigureServices(IServiceCollection services)
{
var identityUrl = _cfg.GetValue<string>("IdentityUrl");
var authenticationProviderKey = "IdentityApiKey";
services.AddHealthChecks()
.AddCheck("self", () => HealthCheckResult.Healthy())
.AddUrlGroup(new Uri(_cfg["CatalogUrlHC"]), name: "catalogapi-check", tags: new string[] { "catalogapi" })
.AddUrlGroup(new Uri(_cfg["OrderingUrlHC"]), name: "orderingapi-check", tags: new string[] { "orderingapi" })
.AddUrlGroup(new Uri(_cfg["BasketUrlHC"]), name: "basketapi-check", tags: new string[] { "basketapi" })
.AddUrlGroup(new Uri(_cfg["IdentityUrlHC"]), name: "identityapi-check", tags: new string[] { "identityapi" })
.AddUrlGroup(new Uri(_cfg["MarketingUrlHC"]), name: "marketingapi-check", tags: new string[] { "marketingapi" })
.AddUrlGroup(new Uri(_cfg["PaymentUrlHC"]), name: "paymentapi-check", tags: new string[] { "paymentapi" })
.AddUrlGroup(new Uri(_cfg["LocationUrlHC"]), name: "locationapi-check", tags: new string[] { "locationapi" });
services.AddCors(options =>
{
options.AddPolicy("CorsPolicy",
builder => builder
.AllowAnyMethod()
.AllowAnyHeader()
.SetIsOriginAllowed((host) => true)
.AllowCredentials());
});
services.AddAuthentication()
.AddJwtBearer(authenticationProviderKey, x =>
{
x.Authority = identityUrl;
x.RequireHttpsMetadata = false;
x.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters()
{
ValidAudiences = new[] { "orders", "basket", "locations", "marketing", "mobileshoppingagg", "webshoppingagg" }
};
x.Events = new Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerEvents()
{
OnAuthenticationFailed = async ctx =>
{
int i = 0;
},
OnTokenValidated = async ctx =>
{
int i = 0;
},
OnMessageReceived = async ctx =>
{
int i = 0;
}
};
});
services.AddOcelot(_cfg);
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
var pathBase = _cfg["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))
{
app.UsePathBase(pathBase);
}
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHealthChecks("/hc", new HealthCheckOptions()
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
app.UseHealthChecks("/liveness", new HealthCheckOptions
{
Predicate = r => r.Name.Contains("self")
});
app.UseCors("CorsPolicy");
app.UseOcelot().Wait();
}
}
}

+ 0
- 10
src/ApiGateways/ApiGw-Base/appsettings.json View File

@ -1,10 +0,0 @@
{
"Logging": {
"IncludeScopes": true,
"LogLevel": {
"Default": "Trace",
"System": "Information",
"Microsoft": "Information"
}
}
}

+ 49
- 0
src/ApiGateways/Envoy/config/mobilemarketing/envoy.yaml View File

@ -0,0 +1,49 @@
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http
route_config:
name: eshop_backend_route
virtual_hosts:
- name: eshop_backend
domains:
- "*"
routes:
- match:
prefix: "/api/v1/m/"
route:
prefix_rewrite: "/api/v1/"
cluster: marketing
http_filters:
- name: envoy.router
clusters:
- name: marketing
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: marketing-api
port_value: 80
- name: locations
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: locations-api
port_value: 80

src/ApiGateways/Envoy/config/envoy.yaml → src/ApiGateways/Envoy/config/mobileshopping/envoy.yaml View File


+ 49
- 0
src/ApiGateways/Envoy/config/webmarketing/envoy.yaml View File

@ -0,0 +1,49 @@
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http
route_config:
name: eshop_backend_route
virtual_hosts:
- name: eshop_backend
domains:
- "*"
routes:
- match:
prefix: "/api/v1/m/"
route:
prefix_rewrite: "/api/v1/"
cluster: marketing
http_filters:
- name: envoy.router
clusters:
- name: marketing
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: marketing-api
port_value: 80
- name: locations
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: locations-api
port_value: 80

+ 80
- 0
src/ApiGateways/Envoy/config/webshopping/envoy.yaml View File

@ -0,0 +1,80 @@
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http
route_config:
name: eshop_backend_route
virtual_hosts:
- name: eshop_backend
domains:
- "*"
routes:
- match:
prefix: "/api/v1/c/"
route:
prefix_rewrite: "/api/v1/"
cluster: catalog
- match:
prefix: "/api/v1/o/"
route:
prefix_rewrite: "/api/v1/"
cluster: ordering
- match:
prefix: "/api/v1/b/"
route:
prefix_rewrite: "/api/v1/"
cluster: basket
- match:
prefix: "/"
route:
prefix_rewrite: "/"
cluster: shoppingagg
http_filters:
- name: envoy.router
clusters:
- name: shoppingagg
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: webshoppingagg
port_value: 80
- name: catalog
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: catalog-api
port_value: 80
- name: basket
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: basket-api
port_value: 80
- name: ordering
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-api
port_value: 80

+ 0
- 44
src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml View File

@ -1,44 +0,0 @@
kind: helm-release
apiVersion: 1.1
build:
context: ..\..\..\..\
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile
install:
chart: ../../../../k8s/helm/apigwmm
set:
replicaCount: 1
image:
tag: $(tag)
pullPolicy: Never
ingress:
annotations:
kubernetes.io/ingress.class: traefik-azds
hosts:
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
- $(spacePrefix)eshop$(hostSuffix)
inf:
k8s:
dns: $(spacePrefix)eshop$(hostSuffix)
values:
- values.dev.yaml?
- secrets.dev.yaml?
- inf.yaml
- app.yaml
configurations:
develop:
build:
useGitIgnore: true
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile.develop
args:
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug}
container:
sync:
- '**/Pages/**'
- '**/Views/**'
- '**/wwwroot/**'
- '!**/*.{sln,csproj}'
command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"]
iterate:
processesToKill: [dotnet, vsdbg]
buildCommands:
- [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"]

+ 0
- 34
src/ApiGateways/Mobile.Bff.Marketing/apigw/configuration.json View File

@ -1,34 +0,0 @@
{
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "marketing.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/m/{everything}",
"UpstreamHttpMethod": []
},
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "locations.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/l/{everything}",
"UpstreamHttpMethod": []
}
],
"GlobalConfiguration": {
"RequestIdKey": "OcRequestId",
"AdministrationPath": "/administration"
}
}

+ 0
- 2
src/ApiGateways/Mobile.Bff.Marketing/apigw/values.dev.yaml View File

@ -1,2 +0,0 @@
ocelot:
configPath: /src/src/ApiGateways/ApiGw-Base/configuration

+ 0
- 44
src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml View File

@ -1,44 +0,0 @@
kind: helm-release
apiVersion: 1.1
build:
context: ..\..\..\..\
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile
install:
chart: ../../../../k8s/helm/apigwwm
set:
replicaCount: 1
image:
tag: $(tag)
pullPolicy: Never
ingress:
annotations:
kubernetes.io/ingress.class: traefik-azds
hosts:
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
- $(spacePrefix)eshop$(hostSuffix)
inf:
k8s:
dns: $(spacePrefix)eshop$(hostSuffix)
values:
- values.dev.yaml?
- secrets.dev.yaml?
- inf.yaml
- app.yaml
configurations:
develop:
build:
useGitIgnore: true
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile.develop
args:
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug}
container:
sync:
- '**/Pages/**'
- '**/Views/**'
- '**/wwwroot/**'
- '!**/*.{sln,csproj}'
command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"]
iterate:
processesToKill: [dotnet, vsdbg]
buildCommands:
- [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"]

+ 0
- 34
src/ApiGateways/Web.Bff.Marketing/apigw/configuration.json View File

@ -1,34 +0,0 @@
{
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "marketing.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/m/{everything}",
"UpstreamHttpMethod": []
},
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "locations.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/l/{everything}",
"UpstreamHttpMethod": []
}
],
"GlobalConfiguration": {
"RequestIdKey": "OcRequestId",
"AdministrationPath": "/administration"
}
}

+ 0
- 2
src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml View File

@ -1,2 +0,0 @@
ocelot:
configPath: /src/src/ApiGateways/ApiGw-Base/configuration

+ 0
- 43
src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml View File

@ -1,43 +0,0 @@
kind: helm-release
apiVersion: 1.1
build:
context: ..\..\..\..\
dockerfile: ..\..\..\..\ApiGateways\ApiGw-Base\Dockerfile
install:
chart: ../../../../k8s/helm/apigwws
set:
replicaCount: 1
image:
tag: $(tag)
pullPolicy: Never
ingress:
annotations:
kubernetes.io/ingress.class: traefik-azds
hosts:
- $(spacePrefix)eshop$(hostSuffix)
inf:
k8s:
dns: $(spacePrefix)eshop$(hostSuffix)
values:
- values.dev.yaml?
- secrets.dev.yaml?
- inf.yaml
- app.yaml
configurations:
develop:
build:
useGitIgnore: true
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile.develop
args:
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug}
container:
sync:
- '**/Pages/**'
- '**/Views/**'
- '**/wwwroot/**'
- '!**/*.{sln,csproj}'
command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"]
iterate:
processesToKill: [dotnet, vsdbg]
buildCommands:
- [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"]

+ 0
- 130
src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json View File

@ -1,130 +0,0 @@
{
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "envoy",
"Port": 51051
}
],
"UpstreamPathTemplate": "/api/{version}/c/{everything}",
"UpstreamHttpMethod": [ "GET" ]
},
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "basket.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/b/{everything}",
"UpstreamHttpMethod": [],
"AuthenticationOptions": {
"AuthenticationProviderKey": "IdentityApiKey",
"AllowedScopes": []
}
},
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "ordering.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/o/{everything}",
"UpstreamHttpMethod": [],
"AuthenticationOptions": {
"AuthenticationProviderKey": "IdentityApiKey",
"AllowedScopes": []
}
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "webshoppingagg",
"Port": 80
}
],
"UpstreamPathTemplate": "/{everything}",
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
"AuthenticationOptions": {
"AuthenticationProviderKey": "IdentityApiKey",
"AllowedScopes": []
}
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "ordering.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/orders-api/{everything}",
"UpstreamHttpMethod": []
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "ordering.signalrhub",
"Port": 80
}
],
"UpstreamPathTemplate": "/hub/{everything}",
"UpstreamHttpMethod": []
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "basket.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/basket-api/{everything}",
"UpstreamHttpMethod": []
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "catalog.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/catalog-api/{everything}",
"UpstreamHttpMethod": []
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "payment.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/payment-api/{everything}",
"UpstreamHttpMethod": []
}
],
"GlobalConfiguration": {
"RequestIdKey": "OcRequestId",
"AdministrationPath": "/administration"
}
}

+ 0
- 2
src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml View File

@ -1,2 +0,0 @@
ocelot:
configPath: /src/src/ApiGateways/ApiGw-Base/configuration

+ 0
- 2
src/Web/WebMVC/Startup.cs View File

@ -126,8 +126,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
{
services.AddHealthChecks()
.AddCheck("self", () => HealthCheckResult.Healthy())
.AddUrlGroup(new Uri(configuration["PurchaseUrlHC"]), name: "purchaseapigw-check", tags: new string[] { "purchaseapigw" })
.AddUrlGroup(new Uri(configuration["MarketingUrlHC"]), name: "marketingapigw-check", tags: new string[] { "marketingapigw" })
.AddUrlGroup(new Uri(configuration["IdentityUrlHC"]), name: "identityapi-check", tags: new string[] { "identityapi" });
return services;


+ 0
- 2
src/Web/WebSPA/Startup.cs View File

@ -39,8 +39,6 @@ namespace eShopConContainers.WebSPA
services.AddHealthChecks()
.AddCheck("self", () => HealthCheckResult.Healthy())
.AddUrlGroup(new Uri(Configuration["PurchaseUrlHC"]), name: "purchaseapigw-check", tags: new string[] { "purchaseapigw" })
.AddUrlGroup(new Uri(Configuration["MarketingUrlHC"]), name: "marketingapigw-check", tags: new string[] { "marketingapigw" })
.AddUrlGroup(new Uri(Configuration["IdentityUrlHC"]), name: "identityapi-check", tags: new string[] { "identityapi" });
services.Configure<AppSettings>(Configuration);


+ 29
- 87
src/docker-compose.override.yml View File

@ -207,75 +207,29 @@ services:
- "5113:80"
mobileshoppingapigw:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- IdentityUrl=http://identity-api
- urls__basket=http://basket-api
- urls__catalog=http://catalog-api
- urls__orders=http://ordering-api
- urls__identity=http://identity-api
- CatalogUrlHC=http://catalog-api/hc
- OrderingUrlHC=http://ordering-api/hc
- IdentityUrlHC=http://identity-api/hc
- BasketUrlHC=http://basket-api/hc
- MarketingUrlHC=http://marketing-api/hc
- PaymentUrlHC=http://payment-api/hc
- LocationUrlHC=http://locations-api/hc
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
ports:
- "5200:80"
volumes:
- ./ApiGateways/Mobile.Bff.Shopping/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
- ./ApiGateways/Envoy/config/mobilemarketing:/etc/envoy
ports:
- "5200:80"
- "15200:8001"
mobilemarketingapigw:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- IdentityUrl=http://identity-api
- CatalogUrlHC=http://catalog-api/hc
- OrderingUrlHC=http://ordering-api/hc
- IdentityUrlHC=http://identity-api/hc
- BasketUrlHC=http://basket-api/hc
- MarketingUrlHC=http://marketing-api/hc
- PaymentUrlHC=http://payment-api/hc
- LocationUrlHC=http://locations-api/hc
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
ports:
- "5201:80"
volumes:
- ./ApiGateways/Mobile.Bff.Marketing/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
- ./ApiGateways/Envoy/config/mobileshopping:/etc/envoy
ports:
- "5201:80"
- "15201:8001"
webshoppingapigw:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- IdentityUrl=http://identity-api
- CatalogUrlHC=http://catalog-api/hc
- OrderingUrlHC=http://ordering-api/hc
- IdentityUrlHC=http://identity-api/hc
- BasketUrlHC=http://basket-api/hc
- MarketingUrlHC=http://marketing-api/hc
- PaymentUrlHC=http://payment-api/hc
- LocationUrlHC=http://locations-api/hc
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
volumes:
- ./ApiGateways/Envoy/config:/etc/envoy
- ./ApiGateways/Envoy/config/webshopping:/etc/envoy
ports:
- "5202:80"
- "15202:8001"
webmarketingapigw:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- IdentityUrl=http://identity-api
- CatalogUrlHC=http://catalog-api/hc
- OrderingUrlHC=http://ordering-api/hc
- IdentityUrlHC=http://identity-api/hc
- BasketUrlHC=http://basket-api/hc
- MarketingUrlHC=http://marketing-api/hc
- PaymentUrlHC=http://payment-api/hc
- LocationUrlHC=http://locations-api/hc
- IdentityUrlExternal=http://10.0.75.1:5105
volumes:
- ./ApiGateways/Envoy/config:/etc/envoy
- ./ApiGateways/Envoy/config/webmarketing:/etc/envoy
ports:
- "5203:80"
- "15203:8001"
@ -299,7 +253,7 @@ services:
- LocationUrlHC=http://locations-api/hc
- IdentityUrlExternal=http://10.0.75.1:5105
ports:
- "5120:80"
- "5120:80"
webshoppingagg:
environment:
@ -348,32 +302,24 @@ services:
- HealthChecks-UI__HealthChecks__2__Uri=http://webshoppingagg/hc
- HealthChecks-UI__HealthChecks__3__Name=Mobile Shopping Aggregator HTTP Check
- HealthChecks-UI__HealthChecks__3__Uri=http://mobileshoppingagg/hc
- HealthChecks-UI__HealthChecks__4__Name=Mobile Shopping API GW HTTP Check
- HealthChecks-UI__HealthChecks__4__Uri=http://mobileshoppingapigw/hc
- HealthChecks-UI__HealthChecks__5__Name=Mobile Marketing API GW HTTP Check
- HealthChecks-UI__HealthChecks__5__Uri=http://mobilemarketingapigw/hc
- HealthChecks-UI__HealthChecks__6__Name=Web Shopping API GW HTTP Check
- HealthChecks-UI__HealthChecks__6__Uri=http://webshoppingapigw/hc
- HealthChecks-UI__HealthChecks__7__Name=Web Marketing API GW HTTP Check
- HealthChecks-UI__HealthChecks__7__Uri=http://webmarketingapigw/hc
- HealthChecks-UI__HealthChecks__8__Name=Ordering HTTP Check
- HealthChecks-UI__HealthChecks__8__Uri=http://ordering-api/hc
- HealthChecks-UI__HealthChecks__9__Name=Basket HTTP Check
- HealthChecks-UI__HealthChecks__9__Uri=http://basket-api/hc
- HealthChecks-UI__HealthChecks__10__Name=Catalog HTTP Check
- HealthChecks-UI__HealthChecks__10__Uri=http://catalog-api/hc
- HealthChecks-UI__HealthChecks__11__Name=Identity HTTP Check
- HealthChecks-UI__HealthChecks__11__Uri=http://identity-api/hc
- HealthChecks-UI__HealthChecks__12__Name=Marketing HTTP Check
- HealthChecks-UI__HealthChecks__12__Uri=http://marketing-api/hc
- HealthChecks-UI__HealthChecks__13__Name=Locations HTTP Check
- HealthChecks-UI__HealthChecks__13__Uri=http://locations-api/hc
- HealthChecks-UI__HealthChecks__14__Name=Payments HTTP Check
- HealthChecks-UI__HealthChecks__14__Uri=http://payment-api/hc
- HealthChecks-UI__HealthChecks__15__Name=Ordering SignalRHub HTTP Check
- HealthChecks-UI__HealthChecks__15__Uri=http://ordering-signalrhub/hc
- HealthChecks-UI__HealthChecks__16__Name=Ordering HTTP Background Check
- HealthChecks-UI__HealthChecks__16__Uri=http://ordering-backgroundtasks/hc
- HealthChecks-UI__HealthChecks__4__Name=Ordering HTTP Check
- HealthChecks-UI__HealthChecks__4__Uri=http://ordering-api/hc
- HealthChecks-UI__HealthChecks__5__Name=Basket HTTP Check
- HealthChecks-UI__HealthChecks__5__Uri=http://basket-api/hc
- HealthChecks-UI__HealthChecks__6__Name=Catalog HTTP Check
- HealthChecks-UI__HealthChecks__6__Uri=http://catalog-api/hc
- HealthChecks-UI__HealthChecks__7__Name=Identity HTTP Check
- HealthChecks-UI__HealthChecks__7__Uri=http://identity-api/hc
- HealthChecks-UI__HealthChecks__8__Name=Marketing HTTP Check
- HealthChecks-UI__HealthChecks__8__Uri=http://marketing-api/hc
- HealthChecks-UI__HealthChecks__9__Name=Locations HTTP Check
- HealthChecks-UI__HealthChecks__9__Uri=http://locations-api/hc
- HealthChecks-UI__HealthChecks__10__Name=Payments HTTP Check
- HealthChecks-UI__HealthChecks__10__Uri=http://payment-api/hc
- HealthChecks-UI__HealthChecks__11__Name=Ordering SignalRHub HTTP Check
- HealthChecks-UI__HealthChecks__11__Uri=http://ordering-signalrhub/hc
- HealthChecks-UI__HealthChecks__12__Name=Ordering HTTP Background Check
- HealthChecks-UI__HealthChecks__12__Uri=http://ordering-backgroundtasks/hc
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
@ -386,8 +332,6 @@ services:
- IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
- PurchaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5202
- MarketingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5203
- PurchaseUrlHC=http://webshoppingapigw/hc
- MarketingUrlHC=http://webmarketingapigw/hc
- IdentityUrlHC=http://identity-api/hc
- UseCustomizationData=True
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
@ -405,8 +349,6 @@ services:
- MarketingUrl=http://webmarketingapigw
- SignalrHubUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5202
- IdentityUrlHC=http://identity-api/hc
- PurchaseUrlHC=http://webshoppingapigw/hc
- MarketingUrlHC=http://webmarketingapigw/hc
- UseCustomizationData=True
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}


Loading…
Cancel
Save