From cc28b8cd76e62f99b26015b0383126f30b6caf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 21 Dec 2020 13:19:33 +0100 Subject: [PATCH 1/6] remove marketing and locations --- .../Envoy/config/mobilemarketing/envoy.yaml | 75 ------ .../Envoy/config/webmarketing/envoy.yaml | 88 ------- .../Mobile.Bff.Shopping/aggregator/Startup.cs | 4 +- .../Web.Bff.Shopping/aggregator/Startup.cs | 4 +- .../Application.FunctionalTests.csproj | 27 --- .../Location/LocationsScenariosBase.cs | 51 ---- .../Location/LocationsTestsStartup.cs | 49 ---- .../Services/Location/appsettings.json | 9 - .../Marketing/CampaignScenariosBase.cs | 35 --- .../Services/Marketing/MarketingScenarios.cs | 49 ---- .../Marketing/MarketingScenariosBase.cs | 47 ---- .../Marketing/MarketingTestsStartup.cs | 27 --- .../UserLocationRoleScenariosBase.cs | 40 ---- .../Services/Marketing/appsettings.json | 11 - src/docker-compose.override.yml | 72 +----- src/docker-compose.prod.yml | 70 ------ src/docker-compose.yml | 31 --- src/eShopOnContainers-ServicesAndWebApps.sln | 222 ------------------ 18 files changed, 3 insertions(+), 908 deletions(-) delete mode 100644 src/ApiGateways/Envoy/config/mobilemarketing/envoy.yaml delete mode 100644 src/ApiGateways/Envoy/config/webmarketing/envoy.yaml delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Location/appsettings.json delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs delete mode 100644 src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json diff --git a/src/ApiGateways/Envoy/config/mobilemarketing/envoy.yaml b/src/ApiGateways/Envoy/config/mobilemarketing/envoy.yaml deleted file mode 100644 index 54b1afa06..000000000 --- a/src/ApiGateways/Envoy/config/mobilemarketing/envoy.yaml +++ /dev/null @@ -1,75 +0,0 @@ -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: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - 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 diff --git a/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml b/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml deleted file mode 100644 index 11ef504da..000000000 --- a/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml +++ /dev/null @@ -1,88 +0,0 @@ -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: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - - name: "l-short" - match: - prefix: "/l/" - route: - auto_host_rewrite: true - prefix_rewrite: "/locations-api/" - cluster: locations - - name: "l-long" - match: - prefix: "/locations-api/" - route: - auto_host_rewrite: true - cluster: locations - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - clusters: - - name: marketing - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: marketing-api - port_value: 80 - - name: locations - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: locations-api - port_value: 80 diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs index 4f6e18d7c..3e1ec3887 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs @@ -43,9 +43,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator .AddUrlGroup(new Uri(Configuration["OrderingUrlHC"]), name: "orderingapi-check", tags: new string[] { "orderingapi" }) .AddUrlGroup(new Uri(Configuration["BasketUrlHC"]), name: "basketapi-check", tags: new string[] { "basketapi" }) .AddUrlGroup(new Uri(Configuration["IdentityUrlHC"]), name: "identityapi-check", tags: new string[] { "identityapi" }) - .AddUrlGroup(new Uri(Configuration["MarketingUrlHC"]), name: "marketingapi-check", tags: new string[] { "marketingapi" }) - .AddUrlGroup(new Uri(Configuration["PaymentUrlHC"]), name: "paymentapi-check", tags: new string[] { "paymentapi" }) - .AddUrlGroup(new Uri(Configuration["LocationUrlHC"]), name: "locationapi-check", tags: new string[] { "locationapi" }); + .AddUrlGroup(new Uri(Configuration["PaymentUrlHC"]), name: "paymentapi-check", tags: new string[] { "paymentapi" }); services.AddCustomMvc(Configuration) .AddCustomAuthentication(Configuration) diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs index 5c586b324..5cb69ecc7 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs @@ -43,9 +43,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator .AddUrlGroup(new Uri(Configuration["OrderingUrlHC"]), name: "orderingapi-check", tags: new string[] { "orderingapi" }) .AddUrlGroup(new Uri(Configuration["BasketUrlHC"]), name: "basketapi-check", tags: new string[] { "basketapi" }) .AddUrlGroup(new Uri(Configuration["IdentityUrlHC"]), name: "identityapi-check", tags: new string[] { "identityapi" }) - .AddUrlGroup(new Uri(Configuration["MarketingUrlHC"]), name: "marketingapi-check", tags: new string[] { "marketingapi" }) - .AddUrlGroup(new Uri(Configuration["PaymentUrlHC"]), name: "paymentapi-check", tags: new string[] { "paymentapi" }) - .AddUrlGroup(new Uri(Configuration["LocationUrlHC"]), name: "locationapi-check", tags: new string[] { "locationapi" }); + .AddUrlGroup(new Uri(Configuration["PaymentUrlHC"]), name: "paymentapi-check", tags: new string[] { "paymentapi" }); services.AddCustomMvc(Configuration) .AddCustomAuthentication(Configuration) diff --git a/src/Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj b/src/Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj index 950daac27..692ada459 100644 --- a/src/Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj +++ b/src/Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj @@ -8,15 +8,6 @@ false - - - - - - - - - @@ -26,16 +17,6 @@ - - - - - - - - - - PreserveNewest @@ -55,12 +36,6 @@ Always - - PreserveNewest - - - PreserveNewest - PreserveNewest @@ -79,8 +54,6 @@ - - diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs deleted file mode 100644 index 4c3bd1b29..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace FunctionalTests.Services.Locations -{ - using Microsoft.AspNetCore; - using Microsoft.AspNetCore.Hosting; - using Microsoft.AspNetCore.TestHost; - using Microsoft.Extensions.Configuration; - using System; - using System.IO; - using System.Reflection; - - public class LocationsScenariosBase - { - public TestServer CreateServer() - { - var path = Assembly.GetAssembly(typeof(LocationsScenariosBase)) - .Location; - - var hostBuilder = new WebHostBuilder() - .UseContentRoot(Path.GetDirectoryName(path)) - .ConfigureAppConfiguration(cb => - { - cb.AddJsonFile("Services/Location/appsettings.json", optional: false) - .AddEnvironmentVariables(); - }).UseStartup(); - - var testServer = new TestServer(hostBuilder); - - return testServer; - } - - public static class Get - { - public static string Locations = "api/v1/locations"; - - public static string LocationBy(string id) - { - return $"api/v1/locations/{id}"; - } - - public static string UserLocationBy(Guid id) - { - return $"api/v1/locations/user/{id}"; - } - } - - public static class Post - { - public static string AddNewLocation = "api/v1/locations/"; - } - } -} diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs deleted file mode 100644 index 709c4e7eb..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace FunctionalTests.Services.Locations -{ - using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; - using Microsoft.AspNetCore.Http; - using Microsoft.eShopOnContainers.Services.Locations.API; - using Microsoft.Extensions.Configuration; - using System.Security.Claims; - using System.Threading.Tasks; - - public class LocationsTestsStartup : Startup - { - public LocationsTestsStartup(IConfiguration configuration) : base(configuration) - { - } - - protected override void ConfigureAuth(IApplicationBuilder app) - { - if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) - { - app.UseMiddleware(); - app.UseAuthorization(); - } - else - { - base.ConfigureAuth(app); - } - } - - class LocationAuthorizeMiddleware - { - private readonly RequestDelegate _next; - - public LocationAuthorizeMiddleware(RequestDelegate rd) - { - _next = rd; - } - - public async Task Invoke(HttpContext httpContext) - { - var identity = new ClaimsIdentity("cookies"); - identity.AddClaim(new Claim("sub", "4611ce3f-380d-4db5-8d76-87a8689058ed")); - httpContext.User.AddIdentity(identity); - - await _next.Invoke(httpContext); - } - } - } -} diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/appsettings.json b/src/Tests/Services/Application.FunctionalTests/Services/Location/appsettings.json deleted file mode 100644 index 977401adc..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ConnectionString": "mongodb://localhost:27017", - "Database": "LocationsDb", - "ExternalCatalogBaseUrl": "http://localhost:5101", - "IdentityUrl": "http://localhost:5105", - "isTest": "true", - "EventBusConnection": "localhost", - "SubscriptionClientName": "Location" -} diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs deleted file mode 100644 index ab21dccba..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace FunctionalTests.Services.Marketing -{ - using System; - - public class CampaignScenariosBase : MarketingScenariosBase - { - public static class Get - { - public static string Campaigns = CampaignsUrlBase; - - public static string CampaignBy(int id) - => $"{CampaignsUrlBase}/{id}"; - - public static string UserCampaignsByUserId() - => $"{CampaignsUrlBase}/user"; - } - - public static class Post - { - public static string AddNewCampaign = CampaignsUrlBase; - } - - public static class Put - { - public static string CampaignBy(int id) - => $"{CampaignsUrlBase}/{id}"; - } - - public static class Delete - { - public static string CampaignBy(int id) - => $"{CampaignsUrlBase}/{id}"; - } - } -} \ No newline at end of file diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs deleted file mode 100644 index 4c808565b..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace FunctionalTests.Services.Marketing -{ - using UserLocation = Microsoft.eShopOnContainers.Services.Locations.API.Model.UserLocation; - using LocationRequest = Microsoft.eShopOnContainers.Services.Locations.API.ViewModel.LocationRequest; - using FunctionalTests.Services.Locations; - using Newtonsoft.Json; - using System; - using System.Net.Http; - using System.Text; - using System.Threading.Tasks; - using Xunit; - using System.Collections.Generic; - using Microsoft.eShopOnContainers.Services.Marketing.API.Dto; - using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; - - public class MarketingScenarios : MarketingScenariosBase - { - [Fact] - public async Task Set_new_user_location_and_get_location_campaign_by_user_id() - { - using (var locationsServer = new LocationsScenariosBase().CreateServer()) - using (var marketingServer = new MarketingScenariosBase().CreateServer()) - { - var location = new LocationRequest - { - Longitude = -122.315752, - Latitude = 47.60461 - }; - var content = new StringContent(JsonConvert.SerializeObject(location), - Encoding.UTF8, "application/json"); - - // GIVEN a new location of user is created - await locationsServer.CreateClient() - .PostAsync(LocationsScenariosBase.Post.AddNewLocation, content); - - await Task.Delay(300); - - //Get campaing from Marketing.API - var campaignsResponse = await marketingServer.CreateClient() - .GetAsync(CampaignScenariosBase.Get.Campaigns); - - var responseBody = await campaignsResponse.Content.ReadAsStringAsync(); - var campaigns = JsonConvert.DeserializeObject>(responseBody); - - Assert.True(campaigns.Count > 0); - } - } - } -} diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs deleted file mode 100644 index 63b9214b2..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.TestHost; -using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using System.IO; -using System.Reflection; -using Microsoft.Extensions.Configuration; - -namespace FunctionalTests.Services.Marketing -{ - - public class MarketingScenariosBase - { - public static string CampaignsUrlBase => "api/v1/campaigns"; - - public TestServer CreateServer() - { - var path = Assembly.GetAssembly(typeof(MarketingScenariosBase)) - .Location; - - var hostBuilder = new WebHostBuilder() - .UseContentRoot(Path.GetDirectoryName(path)) - .ConfigureAppConfiguration(cb => - { - cb.AddJsonFile("Services/Marketing/appsettings.json", optional: false) - .AddEnvironmentVariables(); - }).UseStartup(); - - var testServer = new TestServer(hostBuilder); - - testServer.Host - .MigrateDbContext((context, services) => - { - var logger = services.GetService>(); - - new MarketingContextSeed() - .SeedAsync(context, logger) - .Wait(); - }); - - - return testServer; - } - } -} \ No newline at end of file diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs deleted file mode 100644 index d5d824867..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace FunctionalTests.Services.Marketing -{ - using FunctionalTests.Middleware; - using Microsoft.AspNetCore.Builder; - using Microsoft.eShopOnContainers.Services.Marketing.API; - using Microsoft.Extensions.Configuration; - - public class MarketingTestsStartup : Startup - { - public MarketingTestsStartup(IConfiguration configuration) : base(configuration) - { - } - - protected override void ConfigureAuth(IApplicationBuilder app) - { - if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) - { - app.UseMiddleware(); - app.UseAuthorization(); - } - else - { - base.ConfigureAuth(app); - } - } - } -} diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs deleted file mode 100644 index 20beeef48..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace FunctionalTests.Services.Marketing -{ - public class UserLocationRoleScenariosBase : MarketingScenariosBase - { - private const string EndpointLocationName = "locations"; - public static class Get - { - public static string UserLocationRulesByCampaignId(int campaignId) - => GetUserLocationRolesUrlBase(campaignId); - - public static string UserLocationRuleByCampaignAndUserLocationRuleId(int campaignId, - int userLocationRuleId) - => $"{GetUserLocationRolesUrlBase(campaignId)}/{userLocationRuleId}"; - } - - public static class Post - { - public static string AddNewuserLocationRule(int campaignId) - => GetUserLocationRolesUrlBase(campaignId); - } - - public static class Put - { - public static string UserLocationRoleBy(int campaignId, - int userLocationRuleId) - => $"{GetUserLocationRolesUrlBase(campaignId)}/{userLocationRuleId}"; - } - - public static class Delete - { - public static string UserLocationRoleBy(int campaignId, - int userLocationRuleId) - => $"{GetUserLocationRolesUrlBase(campaignId)}/{userLocationRuleId}"; - } - - - private static string GetUserLocationRolesUrlBase(int campaignId) - => $"{CampaignsUrlBase}/{campaignId}/{EndpointLocationName}"; - } -} \ No newline at end of file diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json deleted file mode 100644 index 6d2d7870d..000000000 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "AzureServiceBusEnabled": false, - "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word", - "EventBusConnection": "localhost", - "IdentityUrl": "http://localhost:5105", - "isTest": "true", - "MongoConnectionString": "mongodb://localhost:27017", - "MongoDatabase": "MarketingDb", - "PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/", - "SubscriptionClientName": "Marketing" -} diff --git a/src/docker-compose.override.yml b/src/docker-compose.override.yml index 8ec8426ec..f8c20f596 100644 --- a/src/docker-compose.override.yml +++ b/src/docker-compose.override.yml @@ -46,8 +46,6 @@ services: - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 - - LocationApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109 - - MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 - BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 - OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 - MobileShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120 @@ -147,31 +145,6 @@ services: ports: - "5111:80" - marketing-api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} - - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosqldata} - - MongoDatabase=MarketingDb - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} - - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - - identityUrl=http://identity-api - - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} - - PicBaseUrl=${ESHOP_STORAGE_MARKETING_URL} - - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME} - - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} - - AzureServiceBusEnabled=False - - AzureStorageEnabled=False - - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - - OrchestratorType=${ORCHESTRATOR_TYPE} - - UseLoadTest=${USE_LOADTEST:-False} - - PATH_BASE=/marketing-api - ports: - - "5110:80" - payment-api: environment: - ASPNETCORE_ENVIRONMENT=Development @@ -187,25 +160,6 @@ services: ports: - "5108:80" - locations-api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosqldata} - - Database=LocationsDb - - identityUrl=http://identity-api - - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} - - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - - AzureServiceBusEnabled=False - - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - - OrchestratorType=${ORCHESTRATOR_TYPE} - - UseLoadTest=${USE_LOADTEST:-False} - - PATH_BASE=/locations-api - ports: - - "5109:80" - webhooks-api: environment: - ASPNETCORE_ENVIRONMENT=Development @@ -221,18 +175,11 @@ services: mobileshoppingapigw: volumes: - - ./ApiGateways/Envoy/config/mobilemarketing:/etc/envoy + - ./ApiGateways/Envoy/config/mobileshopping:/etc/envoy ports: - "5200:80" - "15200:8001" - mobilemarketingapigw: - volumes: - - ./ApiGateways/Envoy/config/mobileshopping:/etc/envoy - ports: - - "5201:80" - - "15201:8001" - webshoppingapigw: volumes: - ./ApiGateways/Envoy/config/webshopping:/etc/envoy @@ -240,13 +187,6 @@ services: - "5202:80" - "15202:8001" - webmarketingapigw: - volumes: - - ./ApiGateways/Envoy/config/webmarketing:/etc/envoy - ports: - - "5203:80" - - "15203:8001" - mobileshoppingagg: environment: - ASPNETCORE_ENVIRONMENT=Development @@ -261,9 +201,7 @@ services: - 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: - "5120:80" @@ -282,9 +220,7 @@ services: - 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: - "5121:80" @@ -323,10 +259,6 @@ services: - HealthChecksUI__HealthChecks__6__Uri=http://catalog-api/hc - HealthChecksUI__HealthChecks__7__Name=Identity HTTP Check - HealthChecksUI__HealthChecks__7__Uri=http://identity-api/hc - - HealthChecksUI__HealthChecks__8__Name=Marketing HTTP Check - - HealthChecksUI__HealthChecks__8__Uri=http://marketing-api/hc - - HealthChecksUI__HealthChecks__9__Name=Locations HTTP Check - - HealthChecksUI__HealthChecks__9__Uri=http://locations-api/hc - HealthChecksUI__HealthChecks__10__Name=Payments HTTP Check - HealthChecksUI__HealthChecks__10__Uri=http://payment-api/hc - HealthChecksUI__HealthChecks__11__Name=Ordering SignalRHub HTTP Check @@ -344,7 +276,6 @@ services: - ASPNETCORE_URLS=http://0.0.0.0:80 - 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 - IdentityUrlHC=http://identity-api/hc - UseCustomizationData=True - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} @@ -359,7 +290,6 @@ services: - ASPNETCORE_URLS=http://0.0.0.0:80 - PurchaseUrl=http://webshoppingapigw - IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - - MarketingUrl=http://webmarketingapigw - SignalrHubUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5202 - IdentityUrlHC=http://identity-api/hc - UseCustomizationData=True diff --git a/src/docker-compose.prod.yml b/src/docker-compose.prod.yml index 3aaeee444..3ff3aa2f2 100644 --- a/src/docker-compose.prod.yml +++ b/src/docker-compose.prod.yml @@ -60,8 +60,6 @@ services: - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110. - - LocationApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109 - - MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110 - BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 - MobileShoppingAggClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5120 @@ -109,42 +107,16 @@ services: ports: - "5111:80" - marketing-api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} - - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosqldata} - - MongoDatabase=MarketingDb - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} - - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - - identityUrl=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110. - - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} - - PicBaseUrl=${ESHOP_STORAGE_MARKETING_URL} - - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME} - - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} - - AzureServiceBusEnabled=False - - AzureStorageEnabled=False - - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - - OrchestratorType=${ORCHESTRATOR_TYPE} - - UseLoadTest=${USE_LOADTEST:-False} - ports: - - "80" # The API Gateway redirects and access through the internal port (80). - webspa: environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - PurchaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5202 - - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5203 - CatalogUrlHC=http://catalog-api/hc - OrderingUrlHC=http://ordering-api/hc - IdentityUrlHC=http://identity-api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - BasketUrlHC=http://basket-api/hc - - MarketingUrlHC=http://marketing-api/hc - PaymentUrlHC=http://payment-api/hc - UseCustomizationData=True - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} @@ -158,12 +130,10 @@ services: - ASPNETCORE_URLS=http://0.0.0.0:80 - PurchaseUrl=http://webshoppingapigw - IdentityUrl=http://10.0.75.1:5105 # Local Mac: Use http://docker.for.mac.localhost:5105 || Local Windows: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. || #Remote access: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. - - MarketingUrl=http://webmarketingapigw - CatalogUrlHC=http://catalog-api/hc - OrderingUrlHC=http://ordering-api/hc - IdentityUrlHC=http://identity-api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - BasketUrlHC=http://basket-api/hc - - MarketingUrlHC=http://marketing-api/hc - PaymentUrlHC=http://payment-api/hc - UseCustomizationData=True - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} @@ -180,8 +150,6 @@ services: - OrderingUrl=http://ordering-api/hc - BasketUrl=http://basket-api/hc - IdentityUrl=http://identity-api/hc - - LocationsUrl=http://locations-api/hc - - MarketingUrl=http://marketing-api/hc - PaymentUrl=http://payment-api/hc - mvc=http://webmvc/hc - spa=http://webspa/hc @@ -203,24 +171,6 @@ services: ports: - "80" # The API Gateway redirects and access through the internal port (80). - locations-api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosqldata} - - Database=LocationsDb - - identityUrl=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110. - - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} - - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - - AzureServiceBusEnabled=False - - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - - OrchestratorType=${ORCHESTRATOR_TYPE} - - UseLoadTest=${USE_LOADTEST:-False} - ports: - - "80" # The API Gateway redirects and access through the internal port (80). - sqldata: environment: - SA_PASSWORD=Pass@word @@ -251,16 +201,6 @@ services: volumes: - ./ApiGateways/Mobile.Bff.Shopping/apigw:/app/configuration - mobilemarketingapigw: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - IdentityUrl=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110. - ports: - - "5201:80" # Important: In a production environment your should remove the external port (5201) kept here for microservice debugging purposes. - # The API Gateway redirects and access through the internal port (80). - volumes: - - ./ApiGateways/Mobile.Bff.Marketing/apigw:/app/configuration - webshoppingapigw: environment: - ASPNETCORE_ENVIRONMENT=Development @@ -271,16 +211,6 @@ services: volumes: - ./ApiGateways/Web.Bff.Shopping/apigw:/app/configuration - webmarketingapigw: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - IdentityUrl=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110. - ports: - - "5203:80" # Important: In a production environment your should remove the external port (5203) kept here for microservice debugging purposes. - # The API Gateway redirects and access through the internal port (80). - volumes: - - ./ApiGateways/Web.Bff.Marketing/apigw:/app/configuration - mobileshoppingagg: environment: - ASPNETCORE_ENVIRONMENT=Development diff --git a/src/docker-compose.yml b/src/docker-compose.yml index b51c65621..74d606822 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -62,17 +62,6 @@ services: - sqldata - rabbitmq - marketing-api: - image: ${REGISTRY:-eshop}/marketing.api:${PLATFORM:-linux}-${TAG:-latest} - build: - context: . - dockerfile: Services/Marketing/Marketing.API/Dockerfile - depends_on: - - sqldata - - nosqldata - - identity-api - - rabbitmq - payment-api: image: ${REGISTRY:-eshop}/payment.api:${PLATFORM:-linux}-${TAG:-latest} build: @@ -81,15 +70,6 @@ services: depends_on: - rabbitmq - locations-api: - image: ${REGISTRY:-eshop}/locations.api:${PLATFORM:-linux}-${TAG:-latest} - build: - context: . - dockerfile: Services/Location/Locations.API/Dockerfile - depends_on: - - nosqldata - - rabbitmq - webhooks-api: image: ${REGISTRY:-eshop}/webhooks.api:${PLATFORM:-linux}-${TAG:-latest} build: @@ -101,9 +81,6 @@ services: mobileshoppingapigw: image: envoyproxy/envoy:v1.11.1 - mobilemarketingapigw: - image: envoyproxy/envoy:v1.11.1 - mobileshoppingagg: image: ${REGISTRY:-eshop}/mobileshoppingagg:${PLATFORM:-linux}-${TAG:-latest} build: @@ -115,7 +92,6 @@ services: - identity-api - rabbitmq - ordering-api - - marketing-api - catalog-api - basket-api @@ -130,7 +106,6 @@ services: - identity-api - rabbitmq - ordering-api - - marketing-api - catalog-api - basket-api @@ -145,7 +120,6 @@ services: - identity-api - rabbitmq - ordering-api - - marketing-api - catalog-api - basket-api @@ -165,7 +139,6 @@ services: # depends_on: # - webshoppingagg # - webshoppingapigw -# - webmarketingapigw webmvc: image: ${REGISTRY:-eshop}/webmvc:${PLATFORM:-linux}-${TAG:-latest} @@ -175,7 +148,6 @@ services: depends_on: - webshoppingagg - webshoppingapigw - - webmarketingapigw webhooks-client: image: ${REGISTRY:-eshop}/webhooks.client:${PLATFORM:-linux}-${TAG:-latest} @@ -187,6 +159,3 @@ services: webshoppingapigw: image: envoyproxy/envoy:v1.11.1 - - webmarketingapigw: - image: envoyproxy/envoy:v1.11.1 diff --git a/src/eShopOnContainers-ServicesAndWebApps.sln b/src/eShopOnContainers-ServicesAndWebApps.sln index 95a8ad397..f0d907d8b 100644 --- a/src/eShopOnContainers-ServicesAndWebApps.sln +++ b/src/eShopOnContainers-ServicesAndWebApps.sln @@ -57,14 +57,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationEventLogEF", "Bu EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "Web\WebStatus\WebStatus.csproj", "{C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{41139F64-4046-4F16-96B7-D941D96FA9C6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.API", "Services\Location\Locations.API\Locations.API.csproj", "{E7581357-FC34-474C-B8F5-307EE3CE05EF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Marketing", "Marketing", "{A5260DE0-1FDD-467E-9CC1-A028AB081CEE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Marketing.API", "Services\Marketing\Marketing.API\Marketing.API.csproj", "{DF395F85-B010-465D-857A-7EBCC512C0C2}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBusServiceBus", "BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj", "{69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebHost", "WebHost", "{1815B651-941C-466B-AE33-D1D7EEB8F77F}" @@ -89,22 +81,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.UnitTests", "Servi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Catalog.FunctionalTests", "Services\Catalog\Catalog.FunctionalTests\Catalog.FunctionalTests.csproj", "{38107691-A437-461D-A85C-ACD3AC7ACFAB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.FunctionalTests", "Services\Location\Locations.FunctionalTests\Locations.FunctionalTests.csproj", "{16F463AA-9CF6-44DC-B18C-7310CCF663FF}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.FunctionalTests", "Services\Ordering\Ordering.FunctionalTests\Ordering.FunctionalTests.csproj", "{DA7D3E03-D0B6-4591-8143-779D3E9F3F30}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Marketing.FunctionalTests", "Services\Marketing\Marketing.FunctionalTests\Marketing.FunctionalTests.csproj", "{94176D9B-9CAA-4762-8D12-1621E240EE34}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application.FunctionalTests", "Tests\Services\Application.FunctionalTests\Application.FunctionalTests.csproj", "{639BB197-D112-47A7-A44A-471DDB0FA1AE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2751AC5C-D148-4D7A-AE8F-149B47C9A82D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5FB21302-3973-4992-962A-6F87F5EC99FD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C3F6ED48-E26D-4D57-970F-B82E69467BA1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{32EE4736-7534-47EC-BAAD-C00AF3130F80}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{120CABB3-0FEA-4B40-B4B5-2D3041798C80}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payment", "Payment", "{C61C5CFE-4876-4A46-A96E-5BBF596A984A}" @@ -127,11 +111,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{3ABEEE EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "Services\Ordering\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webmarketing", "webmarketing", "{4AB8D97B-1A96-434D-A10F-2A646A687859}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Envoy\config\webmarketing\envoy.yaml = ApiGateways\Envoy\config\webmarketing\envoy.yaml - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webshopping", "webshopping", "{966B1B0B-2AE0-4438-8741-1C5A05556095}" ProjectSection(SolutionItems) = preProject ApiGateways\Envoy\config\webshopping\envoy.yaml = ApiGateways\Envoy\config\webshopping\envoy.yaml @@ -683,102 +662,6 @@ Global {C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}.Release|x64.Build.0 = Release|Any CPU {C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}.Release|x86.ActiveCfg = Release|Any CPU {C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}.Release|x86.Build.0 = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|ARM.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|iPhone.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|x64.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|x64.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|x86.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.AppStore|x86.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|ARM.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|ARM.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|iPhone.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|x64.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|x64.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|x86.ActiveCfg = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Debug|x86.Build.0 = Debug|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|Any CPU.Build.0 = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|ARM.ActiveCfg = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|ARM.Build.0 = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|iPhone.ActiveCfg = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|iPhone.Build.0 = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|x64.ActiveCfg = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|x64.Build.0 = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|x86.ActiveCfg = Release|Any CPU - {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|x86.Build.0 = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|ARM.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|iPhone.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|x64.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|x64.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|x86.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.AppStore|x86.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|ARM.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|ARM.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|iPhone.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|x64.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|x64.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|x86.ActiveCfg = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Debug|x86.Build.0 = Debug|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|Any CPU.Build.0 = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|ARM.ActiveCfg = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|ARM.Build.0 = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|iPhone.ActiveCfg = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|iPhone.Build.0 = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x64.ActiveCfg = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x64.Build.0 = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x86.ActiveCfg = Release|Any CPU - {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x86.Build.0 = Release|Any CPU {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1211,54 +1094,6 @@ Global {38107691-A437-461D-A85C-ACD3AC7ACFAB}.Release|x64.Build.0 = Release|Any CPU {38107691-A437-461D-A85C-ACD3AC7ACFAB}.Release|x86.ActiveCfg = Release|Any CPU {38107691-A437-461D-A85C-ACD3AC7ACFAB}.Release|x86.Build.0 = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|ARM.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|iPhone.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|x64.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|x64.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|x86.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.AppStore|x86.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|ARM.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|ARM.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|iPhone.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|x64.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|x64.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|x86.ActiveCfg = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Debug|x86.Build.0 = Debug|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|Any CPU.Build.0 = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|ARM.ActiveCfg = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|ARM.Build.0 = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|iPhone.ActiveCfg = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|iPhone.Build.0 = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|x64.ActiveCfg = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|x64.Build.0 = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|x86.ActiveCfg = Release|Any CPU - {16F463AA-9CF6-44DC-B18C-7310CCF663FF}.Release|x86.Build.0 = Release|Any CPU {DA7D3E03-D0B6-4591-8143-779D3E9F3F30}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {DA7D3E03-D0B6-4591-8143-779D3E9F3F30}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {DA7D3E03-D0B6-4591-8143-779D3E9F3F30}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1307,54 +1142,6 @@ Global {DA7D3E03-D0B6-4591-8143-779D3E9F3F30}.Release|x64.Build.0 = Release|Any CPU {DA7D3E03-D0B6-4591-8143-779D3E9F3F30}.Release|x86.ActiveCfg = Release|Any CPU {DA7D3E03-D0B6-4591-8143-779D3E9F3F30}.Release|x86.Build.0 = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|ARM.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|iPhone.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|x64.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|x64.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|x86.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.AppStore|x86.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|Any CPU.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|ARM.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|ARM.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|iPhone.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|x64.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|x64.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|x86.ActiveCfg = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Debug|x86.Build.0 = Debug|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|Any CPU.ActiveCfg = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|Any CPU.Build.0 = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|ARM.ActiveCfg = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|ARM.Build.0 = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|iPhone.ActiveCfg = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|iPhone.Build.0 = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|x64.ActiveCfg = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|x64.Build.0 = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|x86.ActiveCfg = Release|Any CPU - {94176D9B-9CAA-4762-8D12-1621E240EE34}.Release|x86.Build.0 = Release|Any CPU {639BB197-D112-47A7-A44A-471DDB0FA1AE}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {639BB197-D112-47A7-A44A-471DDB0FA1AE}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {639BB197-D112-47A7-A44A-471DDB0FA1AE}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1717,10 +1504,6 @@ Global {8088F3FC-6787-45FA-A924-816EC81CBFAC} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} {9EE28E45-1533-472B-8267-56C48855BA0E} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} {C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04} - {41139F64-4046-4F16-96B7-D941D96FA9C6} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} - {E7581357-FC34-474C-B8F5-307EE3CE05EF} = {41139F64-4046-4F16-96B7-D941D96FA9C6} - {A5260DE0-1FDD-467E-9CC1-A028AB081CEE} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} - {DF395F85-B010-465D-857A-7EBCC512C0C2} = {A5260DE0-1FDD-467E-9CC1-A028AB081CEE} {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} {1815B651-941C-466B-AE33-D1D7EEB8F77F} = {DB0EFB20-B024-4E5E-A75C-52143C131D25} {15F4B3AA-89B6-4A0D-9051-414305974781} = {1815B651-941C-466B-AE33-D1D7EEB8F77F} @@ -1733,14 +1516,10 @@ Global {3F6202D0-2842-4C2F-98E1-9462709EAFBE} = {2751AC5C-D148-4D7A-AE8F-149B47C9A82D} {B1182FD9-C245-4018-8412-C66F290C7F4C} = {120CABB3-0FEA-4B40-B4B5-2D3041798C80} {38107691-A437-461D-A85C-ACD3AC7ACFAB} = {5FB21302-3973-4992-962A-6F87F5EC99FD} - {16F463AA-9CF6-44DC-B18C-7310CCF663FF} = {C3F6ED48-E26D-4D57-970F-B82E69467BA1} {DA7D3E03-D0B6-4591-8143-779D3E9F3F30} = {120CABB3-0FEA-4B40-B4B5-2D3041798C80} - {94176D9B-9CAA-4762-8D12-1621E240EE34} = {32EE4736-7534-47EC-BAAD-C00AF3130F80} {639BB197-D112-47A7-A44A-471DDB0FA1AE} = {EF0337F2-ED00-4643-89FD-EE10863F1870} {2751AC5C-D148-4D7A-AE8F-149B47C9A82D} = {BF3EF4F3-E4F5-41DA-9D2D-57223687D1A8} {5FB21302-3973-4992-962A-6F87F5EC99FD} = {326A7FB3-5295-468C-A4FE-67DCB823E1E5} - {C3F6ED48-E26D-4D57-970F-B82E69467BA1} = {41139F64-4046-4F16-96B7-D941D96FA9C6} - {32EE4736-7534-47EC-BAAD-C00AF3130F80} = {A5260DE0-1FDD-467E-9CC1-A028AB081CEE} {120CABB3-0FEA-4B40-B4B5-2D3041798C80} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} {C61C5CFE-4876-4A46-A96E-5BBF596A984A} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {0AB40131-8AD7-436F-9C6B-EDA59CFA3A84} = {C61C5CFE-4876-4A46-A96E-5BBF596A984A} @@ -1752,7 +1531,6 @@ Global {882A8F3A-C61F-4C44-86DD-A5A258714BF2} = {77849D35-37D4-4802-81DC-9477B2775A40} {3ABEEE8C-35E0-4185-9825-C44326151F5B} = {882A8F3A-C61F-4C44-86DD-A5A258714BF2} {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} - {4AB8D97B-1A96-434D-A10F-2A646A687859} = {3ABEEE8C-35E0-4185-9825-C44326151F5B} {966B1B0B-2AE0-4438-8741-1C5A05556095} = {3ABEEE8C-35E0-4185-9825-C44326151F5B} {798BFC44-2CCD-45FA-B37A-5173B03C2B30} = {77849D35-37D4-4802-81DC-9477B2775A40} {B62E859F-825E-4C8B-93EC-5966EACFD026} = {798BFC44-2CCD-45FA-B37A-5173B03C2B30} From 6fecd22ce809e9a4dae66fa3a1d26c43790ba426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 21 Dec 2020 13:21:53 +0100 Subject: [PATCH 2/6] update mvc references --- src/Web/WebMVC/AppSettings.cs | 1 - .../WebMVC/Controllers/CampaignsController.cs | 100 --------------- src/Web/WebMVC/Infrastructure/API.cs | 21 ---- src/Web/WebMVC/Services/CampaignService.cs | 49 -------- src/Web/WebMVC/Services/ICampaignService.cs | 13 -- src/Web/WebMVC/Services/ILocationService.cs | 10 -- src/Web/WebMVC/Services/LocationService.cs | 38 ------ src/Web/WebMVC/Startup.cs | 7 -- .../CampaignViewModel/CampaignViewModel.cs | 20 --- src/Web/WebMVC/Views/Campaigns/Details.cshtml | 31 ----- src/Web/WebMVC/Views/Campaigns/Index.cshtml | 79 ------------ .../WebMVC/Views/Campaigns/_campaign.cshtml | 23 ---- .../WebMVC/Views/Campaigns/_pagination.cshtml | 32 ----- src/Web/WebMVC/Views/Shared/_Layout.cshtml | 1 - .../WebMVC/Views/Shared/_LoginPartial.cshtml | 8 -- src/Web/WebMVC/appsettings.json | 2 - .../css/campaigns/campaigns.component.css | 116 ------------------ 17 files changed, 551 deletions(-) delete mode 100644 src/Web/WebMVC/Controllers/CampaignsController.cs delete mode 100644 src/Web/WebMVC/Services/CampaignService.cs delete mode 100644 src/Web/WebMVC/Services/ICampaignService.cs delete mode 100644 src/Web/WebMVC/Services/ILocationService.cs delete mode 100644 src/Web/WebMVC/Services/LocationService.cs delete mode 100644 src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs delete mode 100644 src/Web/WebMVC/Views/Campaigns/Details.cshtml delete mode 100644 src/Web/WebMVC/Views/Campaigns/Index.cshtml delete mode 100644 src/Web/WebMVC/Views/Campaigns/_campaign.cshtml delete mode 100644 src/Web/WebMVC/Views/Campaigns/_pagination.cshtml delete mode 100644 src/Web/WebMVC/wwwroot/css/campaigns/campaigns.component.css diff --git a/src/Web/WebMVC/AppSettings.cs b/src/Web/WebMVC/AppSettings.cs index a705c5a90..dd0c25f1f 100644 --- a/src/Web/WebMVC/AppSettings.cs +++ b/src/Web/WebMVC/AppSettings.cs @@ -8,7 +8,6 @@ namespace Microsoft.eShopOnContainers.WebMVC public class AppSettings { //public Connectionstrings ConnectionStrings { get; set; } - public string MarketingUrl { get; set; } public string PurchaseUrl { get; set; } public string SignalrHubUrl { get; set; } public bool ActivateCampaignDetailFunction { get; set; } diff --git a/src/Web/WebMVC/Controllers/CampaignsController.cs b/src/Web/WebMVC/Controllers/CampaignsController.cs deleted file mode 100644 index 920269467..000000000 --- a/src/Web/WebMVC/Controllers/CampaignsController.cs +++ /dev/null @@ -1,100 +0,0 @@ -namespace Microsoft.eShopOnContainers.WebMVC.Controllers -{ - using AspNetCore.Authorization; - using AspNetCore.Mvc; - using global::WebMVC.Services.ModelDTOs; - using global::WebMVC.Services; - using global::WebMVC.ViewModels; - using Microsoft.Extensions.Options; - using Services; - using System; - using System.Threading.Tasks; - using ViewModels; - using ViewModels.Pagination; - using Microsoft.AspNetCore.Authentication.OpenIdConnect; - - [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] - public class CampaignsController : Controller - { - private readonly ICampaignService _campaignService; - private readonly ILocationService _locationService; - private readonly AppSettings _settings; - - public CampaignsController(ICampaignService campaignService, ILocationService locationService, IOptionsSnapshot settings) - { - _campaignService = campaignService; - _settings = settings.Value; - _locationService = locationService; - } - - public async Task Index(int page = 0, int pageSize = 10) - { - var campaignList = await _campaignService.GetCampaigns(pageSize, page); - - if(campaignList is null) - { - return View(); - } - - var totalPages = (int) Math.Ceiling((decimal) campaignList.Count / pageSize); - - var vm = new CampaignViewModel - { - CampaignItems = campaignList.Data, - PaginationInfo = new PaginationInfo - { - ActualPage = page, - ItemsPerPage = campaignList.Data.Count, - TotalItems = campaignList.Count, - TotalPages = totalPages, - Next = page == totalPages - 1 ? "is-disabled" : "", - Previous = page == 0 ? "is-disabled" : "" - } - }; - - ViewBag.IsCampaignDetailFunctionActive = _settings.ActivateCampaignDetailFunction; - - return View(vm); - } - - public async Task Details(int id) - { - var campaignDto = await _campaignService.GetCampaignById(id); - - if (campaignDto is null) - { - return NotFound(); - } - - var campaign = new CampaignItem - { - Id = campaignDto.Id, - Name = campaignDto.Name, - Description = campaignDto.Description, - From = campaignDto.From, - To = campaignDto.To, - PictureUri = campaignDto.PictureUri - }; - - return View(campaign); - } - - [HttpPost] - public async Task CreateNewUserLocation(CampaignViewModel model) - { - if (ModelState.IsValid) - { - var location = new LocationDTO() - { - Longitude = model.Lon, - Latitude = model.Lat - }; - await _locationService.CreateOrUpdateUserLocation(location); - - return RedirectToAction(nameof(Index)); - } - - return View(nameof(Index), model); - } - } -} \ No newline at end of file diff --git a/src/Web/WebMVC/Infrastructure/API.cs b/src/Web/WebMVC/Infrastructure/API.cs index b601282e0..0faeeb886 100644 --- a/src/Web/WebMVC/Infrastructure/API.cs +++ b/src/Web/WebMVC/Infrastructure/API.cs @@ -82,26 +82,5 @@ return $"{baseUri}catalogTypes"; } } - - public static class Marketing - { - public static string GetAllCampaigns(string baseUri, int take, int page) - { - return $"{baseUri}user?pageSize={take}&pageIndex={page}"; - } - - public static string GetAllCampaignById(string baseUri, int id) - { - return $"{baseUri}{id}"; - } - } - - public static class Locations - { - public static string CreateOrUpdateUserLocation(string baseUri) - { - return baseUri; - } - } } } \ No newline at end of file diff --git a/src/Web/WebMVC/Services/CampaignService.cs b/src/Web/WebMVC/Services/CampaignService.cs deleted file mode 100644 index d768c51fd..000000000 --- a/src/Web/WebMVC/Services/CampaignService.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace Microsoft.eShopOnContainers.WebMVC.Services -{ - using global::WebMVC.Infrastructure; - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Options; - using Newtonsoft.Json; - using System.Net.Http; - using System.Threading.Tasks; - using ViewModels; - - public class CampaignService : ICampaignService - { - private readonly IOptions _settings; - private readonly HttpClient _httpClient; - private readonly ILogger _logger; - private readonly string _remoteServiceBaseUrl; - - public CampaignService(IOptions settings, HttpClient httpClient, ILogger logger) - { - _settings = settings; - _httpClient = httpClient; - _logger = logger; - - _remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/m/api/v1/campaigns/"; - } - - public async Task GetCampaigns(int pageSize, int pageIndex) - { - var uri = API.Marketing.GetAllCampaigns(_remoteServiceBaseUrl, pageSize, pageIndex); - - var responseString = await _httpClient.GetStringAsync(uri); - - var response = JsonConvert.DeserializeObject(responseString); - - return response; - } - - public async Task GetCampaignById(int id) - { - var uri = API.Marketing.GetAllCampaignById(_remoteServiceBaseUrl, id); - - var responseString = await _httpClient.GetStringAsync(uri); - - var response = JsonConvert.DeserializeObject(responseString); - - return response; - } - } -} \ No newline at end of file diff --git a/src/Web/WebMVC/Services/ICampaignService.cs b/src/Web/WebMVC/Services/ICampaignService.cs deleted file mode 100644 index ab80e930a..000000000 --- a/src/Web/WebMVC/Services/ICampaignService.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Microsoft.eShopOnContainers.WebMVC.Services -{ - using System.Collections.Generic; - using System.Threading.Tasks; - using ViewModels; - - public interface ICampaignService - { - Task GetCampaigns(int pageSize, int pageIndex); - - Task GetCampaignById(int id); - } -} \ No newline at end of file diff --git a/src/Web/WebMVC/Services/ILocationService.cs b/src/Web/WebMVC/Services/ILocationService.cs deleted file mode 100644 index d5f7b7224..000000000 --- a/src/Web/WebMVC/Services/ILocationService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Threading.Tasks; -using WebMVC.Services.ModelDTOs; - -namespace WebMVC.Services -{ - public interface ILocationService - { - Task CreateOrUpdateUserLocation(LocationDTO location); - } -} diff --git a/src/Web/WebMVC/Services/LocationService.cs b/src/Web/WebMVC/Services/LocationService.cs deleted file mode 100644 index 4619cfd6a..000000000 --- a/src/Web/WebMVC/Services/LocationService.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Microsoft.eShopOnContainers.WebMVC; -using Microsoft.eShopOnContainers.WebMVC.Services; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Newtonsoft.Json; -using System.Net.Http; -using System.Threading.Tasks; -using WebMVC.Infrastructure; -using WebMVC.Services.ModelDTOs; - -namespace WebMVC.Services -{ - public class LocationService : ILocationService - { - private readonly IOptions _settings; - private readonly HttpClient _httpClient; - private readonly ILogger _logger; - private readonly string _remoteServiceBaseUrl; - - public LocationService(HttpClient httpClient, IOptions settings, ILogger logger) - { - _httpClient = httpClient; - _settings = settings; - _logger = logger; - - _remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/l/api/v1/locations/"; - } - - public async Task CreateOrUpdateUserLocation(LocationDTO location) - { - var uri = API.Locations.CreateOrUpdateUserLocation(_remoteServiceBaseUrl); - var locationContent = new StringContent(JsonConvert.SerializeObject(location), System.Text.Encoding.UTF8, "application/json"); - - var response = await _httpClient.PostAsync(uri, locationContent); - response.EnsureSuccessStatusCode(); - } - } -} diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index e438e9d6c..01d607e61 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -175,13 +175,6 @@ namespace Microsoft.eShopOnContainers.WebMVC .AddHttpMessageHandler() .AddDevspacesSupport(); - services.AddHttpClient() - .AddHttpMessageHandler() - .AddDevspacesSupport(); - - services.AddHttpClient() - .AddHttpMessageHandler() - .AddDevspacesSupport(); //add custom application services services.AddTransient, IdentityParser>(); diff --git a/src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs b/src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs deleted file mode 100644 index 80018202f..000000000 --- a/src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace WebMVC.ViewModels -{ - using System.Collections.Generic; - using Microsoft.eShopOnContainers.WebMVC.ViewModels; - using Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination; - using WebMVC.ViewModels.Annotations; - using Newtonsoft.Json; - using System.ComponentModel.DataAnnotations; - - public class CampaignViewModel - { - public IEnumerable CampaignItems { get; set; } - public PaginationInfo PaginationInfo { get; set; } - - [LongitudeCoordinate, Required] - public double Lon { get; set; } = -122.315752; - [LatitudeCoordinate, Required] - public double Lat { get; set; } = 47.604610; - } -} \ No newline at end of file diff --git a/src/Web/WebMVC/Views/Campaigns/Details.cshtml b/src/Web/WebMVC/Views/Campaigns/Details.cshtml deleted file mode 100644 index aaf0151b1..000000000 --- a/src/Web/WebMVC/Views/Campaigns/Details.cshtml +++ /dev/null @@ -1,31 +0,0 @@ -@model CampaignItem - -@{ - ViewData["Title"] = "Campaign details"; - - var headerList= new List
() { - new Header() { Controller = "Catalog", Text = "Back to catalog" }, - new Header() { Controller = "Campaigns", Text = "Back to Campaigns" } }; -} -
-
- -
-
- - - -
-
- Card image cap -
-

@Model.Name

-

@Model.Description

-
- -
-
\ No newline at end of file diff --git a/src/Web/WebMVC/Views/Campaigns/Index.cshtml b/src/Web/WebMVC/Views/Campaigns/Index.cshtml deleted file mode 100644 index 38d0d623c..000000000 --- a/src/Web/WebMVC/Views/Campaigns/Index.cshtml +++ /dev/null @@ -1,79 +0,0 @@ -@model WebMVC.ViewModels.CampaignViewModel - -@{ - ViewData["Title"] = "Campaigns"; - - var headerList= new List
() { - new Header() { Controller = "Catalog", Text = "Back to catalog" } }; -} - -
-
- -
-
- - - -
-
-
- - @if (!ViewData.ModelState.IsValid) - { -
- @Html.ValidationSummary(false) -
- } - -
-
- UPDATE USER LOCATION -
-
-
- - -
-
- Lat -
- -
- -
-
- Lon -
- -
- -
- -
-
-
-
-
- @if (Model != null && Model.CampaignItems !=null && Model.CampaignItems.Any()) - { -
- @foreach (var catalogItem in Model.CampaignItems) - { -
- -
- } -
- - - } - else - { -
- THERE ARE NO CAMPAIGNS -
- } -
- - diff --git a/src/Web/WebMVC/Views/Campaigns/_campaign.cshtml b/src/Web/WebMVC/Views/Campaigns/_campaign.cshtml deleted file mode 100644 index 260e76555..000000000 --- a/src/Web/WebMVC/Views/Campaigns/_campaign.cshtml +++ /dev/null @@ -1,23 +0,0 @@ -@model CampaignItem - -
-
- @Model.Name -
-

@Model.Name

- @if (ViewBag.IsCampaignDetailFunctionActive == true) - { - - } - else - { - - } -
- -
-
diff --git a/src/Web/WebMVC/Views/Campaigns/_pagination.cshtml b/src/Web/WebMVC/Views/Campaigns/_pagination.cshtml deleted file mode 100644 index 038222e93..000000000 --- a/src/Web/WebMVC/Views/Campaigns/_pagination.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@model Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination.PaginationInfo - -
-
-
- -
-
-
- diff --git a/src/Web/WebMVC/Views/Shared/_Layout.cshtml b/src/Web/WebMVC/Views/Shared/_Layout.cshtml index ee0c724c4..9a634b78a 100644 --- a/src/Web/WebMVC/Views/Shared/_Layout.cshtml +++ b/src/Web/WebMVC/Views/Shared/_Layout.cshtml @@ -13,7 +13,6 @@ - diff --git a/src/Web/WebMVC/Views/Shared/_LoginPartial.cshtml b/src/Web/WebMVC/Views/Shared/_LoginPartial.cshtml index f3ce6a729..1b9cde79d 100644 --- a/src/Web/WebMVC/Views/Shared/_LoginPartial.cshtml +++ b/src/Web/WebMVC/Views/Shared/_LoginPartial.cshtml @@ -26,14 +26,6 @@ - - -
Campaigns
- -
- diff --git a/src/Web/WebMVC/appsettings.json b/src/Web/WebMVC/appsettings.json index 436baedb6..7c169c27c 100644 --- a/src/Web/WebMVC/appsettings.json +++ b/src/Web/WebMVC/appsettings.json @@ -2,10 +2,8 @@ "CatalogUrl": "http://localhost:5101", "OrderingUrl": "http://localhost:5102", "BasketUrl": "http://localhost:5103", - "MarketingUrl": "http://localhost:5110", "IdentityUrl": "http://localhost:5105", "CallBackUrl": "http://localhost:5100/", - "LocationsUrl": "http://localhost:5109/", "IsClusterEnv": "False", "UseResilientHttp": "True", "UseLoadTest": false, diff --git a/src/Web/WebMVC/wwwroot/css/campaigns/campaigns.component.css b/src/Web/WebMVC/wwwroot/css/campaigns/campaigns.component.css deleted file mode 100644 index e65758db7..000000000 --- a/src/Web/WebMVC/wwwroot/css/campaigns/campaigns.component.css +++ /dev/null @@ -1,116 +0,0 @@ -.esh-campaigns-hero { - background-image: url("../../images/main_banner.png"); - background-size: cover; - height: 260px; - width: 100%; -} - -.esh-campaigns-title { - position: relative; - top: 74.28571px; -} - - .esh-campaigns-label::before { - color: rgba(255, 255, 255, 0.5); - content: attr(data-title); - font-size: 0.65rem; - margin-top: 0.65rem; - margin-left: 0.5rem; - position: absolute; - text-transform: uppercase; - z-index: 1; - } - - .esh-campaigns-label::after { - background-image: url("../../images/arrow-down.png"); - height: 7px; - content: ''; - position: absolute; - right: 1.5rem; - top: 2.5rem; - width: 10px; - z-index: 1; - } - -.esh-campaigns-items { - margin-top: 1rem; -} - -.esh-campaigns-item { - text-align: center; - margin-bottom: 1.5rem; - width: 33%; - display: inline-block; - float: none !important; -} - -@media screen and (max-width: 1024px) { - .esh-campaigns-item { - width: 50%; - } -} - -@media screen and (max-width: 768px) { - .esh-campaigns-item { - width: 100%; - } -} - -.esh-campaigns-thumbnail { - max-width: 370px; - width: 100%; -} - -.esh-campaigns-button { - background-color: #83D01B; - border: none; - color: #FFFFFF; - cursor: pointer; - font-size: 1rem; - height: 3rem; - margin-top: 1rem; - transition: all 0.35s; - width: 80%; -} - -.esh-campaigns-card-footer-text { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.esh-campaigns-form-button { - background-color: #83D01B; - border: none; - color: #FFFFFF; - cursor: pointer; - font-size: 1rem; - transition: all 0.35s; - width: 80%; - margin-top: -15px; -} - - .esh-campaigns-button.is-disabled { - opacity: .5; - pointer-events: none; - } - - .esh-campaigns-button:hover { - background-color: #4a760f; - transition: all 0.35s; - } - -.esh-campaigns-name { - font-size: 1rem; - font-weight: 300; - margin-top: .5rem; - text-align: center; - text-transform: uppercase; -} - -.esh-campaigns-description { - text-align: center; - font-weight: 300; - font-size: 14px; -} - From 55a177feac4db62f4b92499fa78882caf8f2778f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 21 Dec 2020 13:29:07 +0100 Subject: [PATCH 3/6] update dockerfiles without location & api csprojs --- src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile | 4 ---- src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile | 4 ---- src/Services/Basket/Basket.API/Dockerfile | 4 ---- src/Services/Catalog/Catalog.API/Dockerfile | 4 ---- src/Services/Identity/Identity.API/Dockerfile | 4 ---- src/Services/Ordering/Ordering.API/Dockerfile | 4 ---- src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile | 4 ---- src/Services/Ordering/Ordering.SignalrHub/Dockerfile | 4 ---- src/Services/Payment/Payment.API/Dockerfile | 4 ---- src/Services/Webhooks/Webhooks.API/Dockerfile | 4 ---- src/Web/WebMVC/Dockerfile | 4 ---- src/Web/WebSPA/Dockerfile | 4 ---- src/Web/WebStatus/Dockerfile | 4 ---- src/Web/WebhookClient/Dockerfile | 4 ---- 14 files changed, 56 deletions(-) diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile index e76e65204..d64cd2f77 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile index c6e7b8be6..6a7eb023b 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index 53bcc38c4..7ba77d156 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 844d7c1b5..74dd100a5 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -25,10 +25,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index 72d419d29..039aba031 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index 012fb97dc..54d63a41c 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile index d21305d11..05b83d441 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile index 29eb9bd6d..ce132b71a 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index d301d77a1..d9bea6830 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile index 6f72dbcf0..c1f031263 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Web/WebMVC/Dockerfile b/src/Web/WebMVC/Dockerfile index a21c9d9a7..acf02ae53 100644 --- a/src/Web/WebMVC/Dockerfile +++ b/src/Web/WebMVC/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Web/WebSPA/Dockerfile b/src/Web/WebSPA/Dockerfile index 258675204..4dc0487ec 100644 --- a/src/Web/WebSPA/Dockerfile +++ b/src/Web/WebSPA/Dockerfile @@ -32,10 +32,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile index e7e66eb7e..54f19c516 100644 --- a/src/Web/WebStatus/Dockerfile +++ b/src/Web/WebStatus/Dockerfile @@ -24,10 +24,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" diff --git a/src/Web/WebhookClient/Dockerfile b/src/Web/WebhookClient/Dockerfile index acfaeb1d4..3b0001032 100644 --- a/src/Web/WebhookClient/Dockerfile +++ b/src/Web/WebhookClient/Dockerfile @@ -25,10 +25,6 @@ COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" From f53e2c028625d8d93a7f50e353df8a302a4eaea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 21 Dec 2020 15:47:17 +0100 Subject: [PATCH 4/6] remove campaings from SPA --- src/Web/WebSPA/Client/modules/app.module.ts | 4 +- src/Web/WebSPA/Client/modules/app.routes.ts | 4 - .../campaigns-detail.component.html | 17 ---- .../campaigns-detail.component.scss | 57 -------------- .../campaigns-detail.component.ts | 30 ------- .../campaigns/campaigns.component.html | 43 ---------- .../campaigns/campaigns.component.scss | 78 ------------------- .../modules/campaigns/campaigns.component.ts | 67 ---------------- .../modules/campaigns/campaigns.module.ts | 15 ---- .../modules/campaigns/campaigns.service.ts | 47 ----------- .../shared/components/identity/identity.html | 7 -- src/docker-compose.yml | 6 +- 12 files changed, 4 insertions(+), 371 deletions(-) delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.html delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.scss delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.ts delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns.component.html delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns.component.scss delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns.component.ts delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns.module.ts delete mode 100644 src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts diff --git a/src/Web/WebSPA/Client/modules/app.module.ts b/src/Web/WebSPA/Client/modules/app.module.ts index 4232ae314..b3693dfcb 100644 --- a/src/Web/WebSPA/Client/modules/app.module.ts +++ b/src/Web/WebSPA/Client/modules/app.module.ts @@ -10,7 +10,6 @@ import { SharedModule } from './shared/shared.module'; import { CatalogModule } from './catalog/catalog.module'; import { OrdersModule } from './orders/orders.module'; import { BasketModule } from './basket/basket.module'; -import { CampaignsModule } from './campaigns/campaigns.module'; import { ToastrModule } from 'ngx-toastr'; @NgModule({ @@ -25,8 +24,7 @@ import { ToastrModule } from 'ngx-toastr'; SharedModule.forRoot(), CatalogModule, OrdersModule, - BasketModule, - CampaignsModule + BasketModule ], providers: [ AppService diff --git a/src/Web/WebSPA/Client/modules/app.routes.ts b/src/Web/WebSPA/Client/modules/app.routes.ts index 32e712514..474d292a2 100644 --- a/src/Web/WebSPA/Client/modules/app.routes.ts +++ b/src/Web/WebSPA/Client/modules/app.routes.ts @@ -5,8 +5,6 @@ import { CatalogComponent } from './catalog/catalog.component'; import { OrdersComponent } from './orders/orders.component'; import { OrdersDetailComponent } from './orders/orders-detail/orders-detail.component'; import { OrdersNewComponent } from './orders/orders-new/orders-new.component'; -import { CampaignsComponent } from './campaigns/campaigns.component'; -import { CampaignsDetailComponent } from './campaigns/campaigns-detail/campaigns-detail.component'; export const routes: Routes = [ { path: '', redirectTo: 'catalog', pathMatch: 'full' }, @@ -15,8 +13,6 @@ export const routes: Routes = [ { path: 'orders', component: OrdersComponent }, { path: 'orders/:id', component: OrdersDetailComponent }, { path: 'order', component: OrdersNewComponent }, - { path: 'campaigns', component: CampaignsComponent }, - { path: 'campaigns/:id', component: CampaignsDetailComponent } ]; export const routing = RouterModule.forRoot(routes); diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.html b/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.html deleted file mode 100644 index bcedc4da2..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.html +++ /dev/null @@ -1,17 +0,0 @@ -Back to campaigns -
-
-
- {{campaign.name}} -
-

{{campaign.name}}

-

{{campaign.description}}

-
- -
-
-
diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.scss b/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.scss deleted file mode 100644 index 7abe3ca15..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.scss +++ /dev/null @@ -1,57 +0,0 @@ -@import '../../variables'; - -.esh-campaign_detail { - min-height: 80vh; - margin-top: 1rem; - - &-section { - padding: 1rem 0; - - &--right { - text-align: right; - } - } - - &-titles { - padding-bottom: 1rem; - padding-top: 2rem; - } - - &-title { - text-transform: uppercase; - } - - &-items { - &--border { - border-bottom: $border-light solid $color-foreground-bright; - padding: .5rem 0; - - &:last-of-type { - border-color: transparent; - } - } - } - - $item-height: 8rem; - - &-item { - font-size: $font-size-m; - font-weight: $font-weight-semilight; - - &--middle { - line-height: $item-height; - - @media screen and (max-width: $media-screen-s) { - line-height: $font-size-m; - } - } - - &--mark { - color: $color-secondary; - } - } - - &-image { - height: $item-height; - } -} diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.ts b/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.ts deleted file mode 100644 index fc9dae9de..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns-detail/campaigns-detail.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { CampaignsService } from '../campaigns.service'; -import { ICampaignItem } from '../../shared/models/campaignItem.model'; -import { ActivatedRoute } from '@angular/router'; - -@Component({ - selector: 'esh-campaigns_detail', - styleUrls: ['./campaigns-detail.component.scss'], - templateUrl: './campaigns-detail.component.html' -}) -export class CampaignsDetailComponent implements OnInit { - public campaign: ICampaignItem = {}; - - constructor(private service: CampaignsService, private route: ActivatedRoute) { } - - ngOnInit() { - this.route.params.subscribe(params => { - let id = +params['id']; // (+) converts string 'id' to a number - this.getCampaign(id); - }); - } - - getCampaign(id: number) { - this.service.getCampaign(id).subscribe(campaign => { - this.campaign = campaign; - console.log('campaign retrieved: ' + campaign.id); - console.log(this.campaign); - }); - } -} \ No newline at end of file diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.html b/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.html deleted file mode 100644 index 41f83c715..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.html +++ /dev/null @@ -1,43 +0,0 @@ -Back to catalog -
- -
- -
- -
-
- -
- {{item.name}} -
-

{{item.name}}

- - - - -
- -
- -
-
-
- -
-
-
- THERE ARE NO RESULTS THAT MATCH YOUR SEARCH -
-
-
-
- - diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.scss b/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.scss deleted file mode 100644 index 514ccb435..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.scss +++ /dev/null @@ -1,78 +0,0 @@ -@import '../variables'; - -.esh-campaign { - $banner-height: 260px; - - &-title { - position: relative; - top: $banner-height / 3.5; - } - - &-items { - margin-top: 1rem; - } - - &-item { - margin-bottom: 1.5rem; - text-align: center; - width: 33%; - display: inline-block; - float: none !important; - - @media screen and (max-width: $media-screen-m) { - width: 50%; - } - - @media screen and (max-width: $media-screen-s) { - width: 100%; - } - } - - &-thumbnail { - max-width: 370px; - width: 100%; - } - - &-button { - background-color: $color-secondary; - border: 0; - color: $color-foreground-brighter; - cursor: pointer; - font-size: $font-size-m; - height: 3rem; - margin-top: 1rem; - transition: all $animation-speed-default; - width: 80%; - - &.is-disabled { - opacity: .5; - pointer-events: none; - } - - &:hover { - background-color: $color-secondary-darker; - transition: all $animation-speed-default; - } - } - - &-name { - font-size: $font-size-m; - font-weight: $font-weight-semilight; - margin-top: .5rem; - text-align: center; - text-transform: uppercase; - } - - &-alert { - margin-top: 10px; - } -} - -.esh-campaigns-card { - - &-footer-text { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} \ No newline at end of file diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.ts b/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.ts deleted file mode 100644 index 0fb52728e..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns.component.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { CampaignsService } from './campaigns.service'; -import { ICampaign } from '../shared/models/campaign.model'; -import { IPager } from '../shared/models/pager.model'; -import { ConfigurationService } from '../shared/services/configuration.service'; -import { Observable } from 'rxjs'; -import { catchError } from 'rxjs/operators'; - -@Component({ - selector: 'esh-campaigns', - styleUrls: ['./campaigns.component.scss'], - templateUrl: './campaigns.component.html' -}) -export class CampaignsComponent implements OnInit { - private interval = null; - paginationInfo: IPager; - campaigns: ICampaign; - isCampaignDetailFunctionEnabled: boolean = false; - errorReceived: boolean; - - constructor(private service: CampaignsService, private configurationService: ConfigurationService) { } - - ngOnInit() { - if (this.configurationService.isReady) { - this.isCampaignDetailFunctionEnabled = this.configurationService.serverSettings.activateCampaignDetailFunction; - this.getCampaigns(9, 0) - } else { - this.configurationService.settingsLoaded$.subscribe(x => { - this.isCampaignDetailFunctionEnabled = this.configurationService.serverSettings.activateCampaignDetailFunction; - this.getCampaigns(9, 0); - }); - } - } - - onPageChanged(value: any) { - console.log('campaigns pager event fired' + value); - //event.preventDefault(); - this.paginationInfo.actualPage = value; - this.getCampaigns(this.paginationInfo.itemsPage, value); - } - - getCampaigns(pageSize: number, pageIndex: number) { - this.errorReceived = false; - this.service.getCampaigns(pageIndex, pageSize) - .pipe(catchError((err) => this.handleError(err))) - .subscribe(campaigns => { - this.campaigns = campaigns; - this.paginationInfo = { - actualPage : campaigns.pageIndex, - itemsPage : campaigns.pageSize, - totalItems : campaigns.count, - totalPages: Math.ceil(campaigns.count / campaigns.pageSize), - items: campaigns.pageSize - }; - }); - } - - onNavigateToDetails(uri: string) { - window.open(uri, "_blank"); - } - - private handleError(error: any) { - this.errorReceived = true; - return Observable.throw(error); - } -} - diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns.module.ts b/src/Web/WebSPA/Client/modules/campaigns/campaigns.module.ts deleted file mode 100644 index 4da504ed9..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { SharedModule } from '../shared/shared.module'; -import { CampaignsComponent } from './campaigns.component'; -import { CampaignsDetailComponent } from './campaigns-detail/campaigns-detail.component'; -import { CampaignsService } from './campaigns.service'; -import { Header } from '../shared/components/header/header'; - -@NgModule({ - imports: [BrowserModule, SharedModule], - declarations: [CampaignsComponent, CampaignsDetailComponent], - providers: [CampaignsService] -}) -export class CampaignsModule { } \ No newline at end of file diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts b/src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts deleted file mode 100644 index 2e9966a1d..000000000 --- a/src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { DataService } from '../shared/services/data.service'; -import { ICampaign } from '../shared/models/campaign.model'; -import { ICampaignItem } from '../shared/models/campaignItem.model'; -import { SecurityService } from '../shared/services/security.service'; -import { ConfigurationService } from '../shared/services/configuration.service'; - -import { Observable } from 'rxjs'; -import { tap } from 'rxjs/operators'; - -@Injectable() -export class CampaignsService { - private marketingUrl: string = ''; - private buyerId: string = ''; - constructor(private service: DataService, private identityService: SecurityService, private configurationService: ConfigurationService) { - if (this.identityService.IsAuthorized) { - if (this.identityService.UserData) { - this.buyerId = this.identityService.UserData.sub; - } - } - - if (this.configurationService.isReady) - this.marketingUrl = this.configurationService.serverSettings.marketingUrl; - else - this.configurationService.settingsLoaded$.subscribe(x => this.marketingUrl = this.configurationService.serverSettings.marketingUrl); - - } - - getCampaigns(pageIndex: number, pageSize: number): Observable { - let url = this.marketingUrl + '/m/api/v1/campaigns/user'; - url = url + '?pageIndex=' + pageIndex + '&pageSize=' + pageSize; - - return this.service.get(url).pipe(tap((response: any) => { - return response; - })); - } - - getCampaign(id: number): Observable { - let url = this.marketingUrl + '/m/api/v1/campaigns/' + id; - - return this.service.get(url).pipe(tap((response: any) => { - return response; - })); - } -} - diff --git a/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html b/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html index 961929bfb..9dce33adc 100644 --- a/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html +++ b/src/Web/WebSPA/Client/modules/shared/components/identity/identity.html @@ -25,13 +25,6 @@ -
- -
My campaigns
- -
-
diff --git a/src/docker-compose.yml b/src/docker-compose.yml index 74d606822..cf02d2307 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -136,9 +136,9 @@ services: dockerfile: Web/WebSPA/Dockerfile args: NODE_IMAGE: ${NODE_IMAGE:-node:10.13} -# depends_on: -# - webshoppingagg -# - webshoppingapigw + depends_on: + - webshoppingagg + - webshoppingapigw webmvc: image: ${REGISTRY:-eshop}/webmvc:${PLATFORM:-linux}-${TAG:-latest} From aa32e5634ddf3ab61db9dfbe9fd74468c3125f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 21 Dec 2020 15:53:29 +0100 Subject: [PATCH 5/6] remove helm deploy marketing locations and builds --- .../location-api/azure-pipelines.yml | 27 ----- .../marketing-api/azure-pipelines.yml | 27 ----- deploy/k8s/helm/apigwmm/.helmignore | 21 ---- deploy/k8s/helm/apigwmm/Chart.yaml | 5 - deploy/k8s/helm/apigwmm/envoy.yaml | 75 ------------ deploy/k8s/helm/apigwmm/templates/NOTES.txt | 2 - .../k8s/helm/apigwmm/templates/_helpers.tpl | 32 ----- deploy/k8s/helm/apigwmm/templates/_names.tpl | 52 --------- .../helm/apigwmm/templates/deployment.yaml | 110 ------------------ .../k8s/helm/apigwmm/templates/envoy-cm.yaml | 14 --- .../k8s/helm/apigwmm/templates/ingress.yaml | 46 -------- .../k8s/helm/apigwmm/templates/service.yaml | 23 ---- deploy/k8s/helm/apigwmm/values.yaml | 45 ------- deploy/k8s/helm/apigwwm/.helmignore | 21 ---- deploy/k8s/helm/apigwwm/Chart.yaml | 5 - deploy/k8s/helm/apigwwm/envoy.yaml | 75 ------------ deploy/k8s/helm/apigwwm/templates/NOTES.txt | 2 - .../k8s/helm/apigwwm/templates/_helpers.tpl | 32 ----- deploy/k8s/helm/apigwwm/templates/_names.tpl | 52 --------- .../helm/apigwwm/templates/deployment.yaml | 110 ------------------ .../k8s/helm/apigwwm/templates/envoy-cm.yaml | 14 --- .../k8s/helm/apigwwm/templates/ingress.yaml | 47 -------- .../k8s/helm/apigwwm/templates/service.yaml | 23 ---- deploy/k8s/helm/apigwwm/values.yaml | 46 -------- deploy/k8s/helm/locations-api/.helmignore | 21 ---- deploy/k8s/helm/locations-api/Chart.yaml | 5 - .../helm/locations-api/templates/NOTES.txt | 9 -- .../helm/locations-api/templates/_helpers.tpl | 32 ----- .../helm/locations-api/templates/_names.tpl | 52 --------- .../locations-api/templates/configmap.yaml | 22 ---- .../locations-api/templates/deployment.yaml | 96 --------------- .../helm/locations-api/templates/service.yaml | 19 --- deploy/k8s/helm/locations-api/values.yaml | 66 ----------- deploy/k8s/helm/marketing-api/.helmignore | 21 ---- deploy/k8s/helm/marketing-api/Chart.yaml | 5 - .../helm/marketing-api/templates/NOTES.txt | 9 -- .../helm/marketing-api/templates/_helpers.tpl | 32 ----- .../helm/marketing-api/templates/_names.tpl | 60 ---------- .../marketing-api/templates/configmap.yaml | 27 ----- .../marketing-api/templates/deployment.yaml | 96 --------------- .../helm/marketing-api/templates/service.yaml | 19 --- deploy/k8s/helm/marketing-api/values.yaml | 70 ----------- 42 files changed, 1567 deletions(-) delete mode 100644 build/azure-devops/location-api/azure-pipelines.yml delete mode 100644 build/azure-devops/marketing-api/azure-pipelines.yml delete mode 100644 deploy/k8s/helm/apigwmm/.helmignore delete mode 100644 deploy/k8s/helm/apigwmm/Chart.yaml delete mode 100644 deploy/k8s/helm/apigwmm/envoy.yaml delete mode 100644 deploy/k8s/helm/apigwmm/templates/NOTES.txt delete mode 100644 deploy/k8s/helm/apigwmm/templates/_helpers.tpl delete mode 100644 deploy/k8s/helm/apigwmm/templates/_names.tpl delete mode 100644 deploy/k8s/helm/apigwmm/templates/deployment.yaml delete mode 100644 deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml delete mode 100644 deploy/k8s/helm/apigwmm/templates/ingress.yaml delete mode 100644 deploy/k8s/helm/apigwmm/templates/service.yaml delete mode 100644 deploy/k8s/helm/apigwmm/values.yaml delete mode 100644 deploy/k8s/helm/apigwwm/.helmignore delete mode 100644 deploy/k8s/helm/apigwwm/Chart.yaml delete mode 100644 deploy/k8s/helm/apigwwm/envoy.yaml delete mode 100644 deploy/k8s/helm/apigwwm/templates/NOTES.txt delete mode 100644 deploy/k8s/helm/apigwwm/templates/_helpers.tpl delete mode 100644 deploy/k8s/helm/apigwwm/templates/_names.tpl delete mode 100644 deploy/k8s/helm/apigwwm/templates/deployment.yaml delete mode 100644 deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml delete mode 100644 deploy/k8s/helm/apigwwm/templates/ingress.yaml delete mode 100644 deploy/k8s/helm/apigwwm/templates/service.yaml delete mode 100644 deploy/k8s/helm/apigwwm/values.yaml delete mode 100644 deploy/k8s/helm/locations-api/.helmignore delete mode 100644 deploy/k8s/helm/locations-api/Chart.yaml delete mode 100644 deploy/k8s/helm/locations-api/templates/NOTES.txt delete mode 100644 deploy/k8s/helm/locations-api/templates/_helpers.tpl delete mode 100644 deploy/k8s/helm/locations-api/templates/_names.tpl delete mode 100644 deploy/k8s/helm/locations-api/templates/configmap.yaml delete mode 100644 deploy/k8s/helm/locations-api/templates/deployment.yaml delete mode 100644 deploy/k8s/helm/locations-api/templates/service.yaml delete mode 100644 deploy/k8s/helm/locations-api/values.yaml delete mode 100644 deploy/k8s/helm/marketing-api/.helmignore delete mode 100644 deploy/k8s/helm/marketing-api/Chart.yaml delete mode 100644 deploy/k8s/helm/marketing-api/templates/NOTES.txt delete mode 100644 deploy/k8s/helm/marketing-api/templates/_helpers.tpl delete mode 100644 deploy/k8s/helm/marketing-api/templates/_names.tpl delete mode 100644 deploy/k8s/helm/marketing-api/templates/configmap.yaml delete mode 100644 deploy/k8s/helm/marketing-api/templates/deployment.yaml delete mode 100644 deploy/k8s/helm/marketing-api/templates/service.yaml delete mode 100644 deploy/k8s/helm/marketing-api/values.yaml diff --git a/build/azure-devops/location-api/azure-pipelines.yml b/build/azure-devops/location-api/azure-pipelines.yml deleted file mode 100644 index d6b87e881..000000000 --- a/build/azure-devops/location-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Location/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/location-api/* - - deploy/k8s/helm/locations-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: locations-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: locations.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/marketing-api/azure-pipelines.yml b/build/azure-devops/marketing-api/azure-pipelines.yml deleted file mode 100644 index 5b253e1c1..000000000 --- a/build/azure-devops/marketing-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Marketing/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/marketing-api/* - - deploy/k8s/helm/marketing-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: marketing-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: marketing.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/deploy/k8s/helm/apigwmm/.helmignore b/deploy/k8s/helm/apigwmm/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/apigwmm/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/apigwmm/Chart.yaml b/deploy/k8s/helm/apigwmm/Chart.yaml deleted file mode 100644 index 50b3d07c6..000000000 --- a/deploy/k8s/helm/apigwmm/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: apigwmm -version: 0.1.0 diff --git a/deploy/k8s/helm/apigwmm/envoy.yaml b/deploy/k8s/helm/apigwmm/envoy.yaml deleted file mode 100644 index 54b1afa06..000000000 --- a/deploy/k8s/helm/apigwmm/envoy.yaml +++ /dev/null @@ -1,75 +0,0 @@ -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: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - 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 diff --git a/deploy/k8s/helm/apigwmm/templates/NOTES.txt b/deploy/k8s/helm/apigwmm/templates/NOTES.txt deleted file mode 100644 index 30ef33447..000000000 --- a/deploy/k8s/helm/apigwmm/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -eShop API Gateway for Mobile Marketing services installed ----------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/helm/apigwmm/templates/_helpers.tpl b/deploy/k8s/helm/apigwmm/templates/_helpers.tpl deleted file mode 100644 index fd3d89212..000000000 --- a/deploy/k8s/helm/apigwmm/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "apigwmm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "apigwmm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apigwmm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/apigwmm/templates/_names.tpl b/deploy/k8s/helm/apigwmm/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/helm/apigwmm/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/apigwmm/templates/deployment.yaml b/deploy/k8s/helm/apigwmm/templates/deployment.yaml deleted file mode 100644 index 70b4ffa8f..000000000 --- a/deploy/k8s/helm/apigwmm/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -{{- $name := include "apigwmm.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "apigwmm.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ $envoycfgname }} - items: - - key: envoy.yaml - path: envoy.yaml - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: IfNotPresent - volumeMounts: - - name: config - mountPath: {{ .Values.envoy.configPath }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - - name: admin - containerPort: 8001 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml deleted file mode 100644 index 66de90f5c..000000000 --- a/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $name := include "apigwmm.fullname" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "envoy-{{ $name }}" - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} - diff --git a/deploy/k8s/helm/apigwmm/templates/ingress.yaml b/deploy/k8s/helm/apigwmm/templates/ingress.yaml deleted file mode 100644 index 44e9a90fc..000000000 --- a/deploy/k8s/helm/apigwmm/templates/ingress.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $ingressPath := include "pathBase" . -}} -{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "apigwmm.fullname" . }} - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} - cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} -{{- end }} -{{- if .Values.inf.mesh.enabled }} -{{- with .Values.ingress.mesh.annotations }} -{{ toYaml . | indent 4 }} -{{- end }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $serviceName }} - servicePort: http - {{- end }} -{{- end }} diff --git a/deploy/k8s/helm/apigwmm/templates/service.yaml b/deploy/k8s/helm/apigwmm/templates/service.yaml deleted file mode 100644 index 286277c7d..000000000 --- a/deploy/k8s/helm/apigwmm/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.mobilemarketingapigw }} - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - - port: {{ .Values.service.adminPort }} - targetPort: admin - protocol: TCP - name: admin - selector: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/apigwmm/values.yaml b/deploy/k8s/helm/apigwmm/values.yaml deleted file mode 100644 index 21f12f27a..000000000 --- a/deploy/k8s/helm/apigwmm/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /mobilemarketingapigw - -image: - repository: envoyproxy/envoy - tag: v1.11.1 - -service: - type: ClusterIP - port: 80 - adminPort: 8001 - -ingress: - enabled: true - annotations: - nginx.ingress.kubernetes.io/rewrite-target: "/" - ingress.kubernetes.io/rewrite-target: "/" - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -env: {} - -envoy: - configPath: /etc/envoy - -probes: - liveness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 15 - port: 8001 - readiness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 60 - port: 8001 \ No newline at end of file diff --git a/deploy/k8s/helm/apigwwm/.helmignore b/deploy/k8s/helm/apigwwm/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/apigwwm/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/apigwwm/Chart.yaml b/deploy/k8s/helm/apigwwm/Chart.yaml deleted file mode 100644 index 4c2082969..000000000 --- a/deploy/k8s/helm/apigwwm/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: apigwwm -version: 0.1.0 diff --git a/deploy/k8s/helm/apigwwm/envoy.yaml b/deploy/k8s/helm/apigwwm/envoy.yaml deleted file mode 100644 index c6f3421de..000000000 --- a/deploy/k8s/helm/apigwwm/envoy.yaml +++ /dev/null @@ -1,75 +0,0 @@ -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: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - clusters: - - name: marketing - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: marketing-api - port_value: 80 - - name: locations - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: locations-api - port_value: 80 diff --git a/deploy/k8s/helm/apigwwm/templates/NOTES.txt b/deploy/k8s/helm/apigwwm/templates/NOTES.txt deleted file mode 100644 index 3420c97c8..000000000 --- a/deploy/k8s/helm/apigwwm/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -eShop API Gateway for Web Marketing services installed ------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/helm/apigwwm/templates/_helpers.tpl b/deploy/k8s/helm/apigwwm/templates/_helpers.tpl deleted file mode 100644 index 194cf96ca..000000000 --- a/deploy/k8s/helm/apigwwm/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "apigwwm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "apigwwm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apigwwm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/apigwwm/templates/_names.tpl b/deploy/k8s/helm/apigwwm/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/helm/apigwwm/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/apigwwm/templates/deployment.yaml b/deploy/k8s/helm/apigwwm/templates/deployment.yaml deleted file mode 100644 index 8c8619f8a..000000000 --- a/deploy/k8s/helm/apigwwm/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -{{- $name := include "apigwwm.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "apigwwm.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ $envoycfgname }} - items: - - key: envoy.yaml - path: envoy.yaml - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: IfNotPresent - volumeMounts: - - name: config - mountPath: {{ .Values.envoy.configPath }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - - name: admin - containerPort: 8001 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml deleted file mode 100644 index e197812c8..000000000 --- a/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $name := include "apigwwm.fullname" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "envoy-{{ $name }}" - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}} - diff --git a/deploy/k8s/helm/apigwwm/templates/ingress.yaml b/deploy/k8s/helm/apigwwm/templates/ingress.yaml deleted file mode 100644 index 00d54c226..000000000 --- a/deploy/k8s/helm/apigwwm/templates/ingress.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $ingressPath := include "pathBase" . -}} -{{- $serviceName := .Values.app.svc.webmarketingapigw -}} - -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "apigwwm.fullname" . }} - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} - cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} -{{- end }} -{{- if .Values.inf.mesh.enabled }} -{{- with .Values.ingress.mesh.annotations }} -{{ toYaml . | indent 4 }} -{{- end }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $serviceName }} - servicePort: http - {{- end }} -{{- end }} diff --git a/deploy/k8s/helm/apigwwm/templates/service.yaml b/deploy/k8s/helm/apigwwm/templates/service.yaml deleted file mode 100644 index cb11cc665..000000000 --- a/deploy/k8s/helm/apigwwm/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.webmarketingapigw }} - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - - port: {{ .Values.service.adminPort }} - targetPort: admin - protocol: TCP - name: admin - selector: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/apigwwm/values.yaml b/deploy/k8s/helm/apigwwm/values.yaml deleted file mode 100644 index d866c2d3c..000000000 --- a/deploy/k8s/helm/apigwwm/values.yaml +++ /dev/null @@ -1,46 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /webmarketingapigw - -image: - repository: envoyproxy/envoy - tag: v1.11.1 - -service: - type: ClusterIP - port: 80 - adminPort: 8001 - -ingress: - enabled: true - annotations: - nginx.ingress.kubernetes.io/rewrite-target: "/" - ingress.kubernetes.io/rewrite-target: "/" - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: {} - -envoy: - configPath: /etc/envoy - -probes: - liveness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 15 - port: 8001 - readiness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 60 - port: 8001 \ No newline at end of file diff --git a/deploy/k8s/helm/locations-api/.helmignore b/deploy/k8s/helm/locations-api/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/locations-api/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/locations-api/Chart.yaml b/deploy/k8s/helm/locations-api/Chart.yaml deleted file mode 100644 index 5126fe847..000000000 --- a/deploy/k8s/helm/locations-api/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: locations-api -version: 0.1.0 diff --git a/deploy/k8s/helm/locations-api/templates/NOTES.txt b/deploy/k8s/helm/locations-api/templates/NOTES.txt deleted file mode 100644 index 3b48889bf..000000000 --- a/deploy/k8s/helm/locations-api/templates/NOTES.txt +++ /dev/null @@ -1,9 +0,0 @@ -eShop Locations API installed. ------------------------------- - -This API is not directly exposed outside cluster. If need to access it use: - -export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "locations-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl port-forward $POD_NAME 8080:80 - diff --git a/deploy/k8s/helm/locations-api/templates/_helpers.tpl b/deploy/k8s/helm/locations-api/templates/_helpers.tpl deleted file mode 100644 index 086a461ba..000000000 --- a/deploy/k8s/helm/locations-api/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "locations-api.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "locations-api.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "locations-api.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/locations-api/templates/_names.tpl b/deploy/k8s/helm/locations-api/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/helm/locations-api/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/locations-api/templates/configmap.yaml b/deploy/k8s/helm/locations-api/templates/configmap.yaml deleted file mode 100644 index c5d752509..000000000 --- a/deploy/k8s/helm/locations-api/templates/configmap.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $name := include "locations-api.fullname" . -}} -{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} -{{- $mongo := include "mongo-name" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cfg-{{ $name }}" - labels: - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" - all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" - all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" - internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} - urls__IdentityUrl: {{ $identity }} - locations__ConnectionString: mongodb://{{ $mongo }} - locations__Database: {{ .Values.inf.mongo.locations.database }} \ No newline at end of file diff --git a/deploy/k8s/helm/locations-api/templates/deployment.yaml b/deploy/k8s/helm/locations-api/templates/deployment.yaml deleted file mode 100644 index 1dba5d166..000000000 --- a/deploy/k8s/helm/locations-api/templates/deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- $name := include "locations-api.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "locations-api.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/locations-api/templates/service.yaml b/deploy/k8s/helm/locations-api/templates/service.yaml deleted file mode 100644 index abd628beb..000000000 --- a/deploy/k8s/helm/locations-api/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.locations }} - labels: - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/locations-api/values.yaml b/deploy/k8s/helm/locations-api/values.yaml deleted file mode 100644 index 4718f2a0b..000000000 --- a/deploy/k8s/helm/locations-api/values.yaml +++ /dev/null @@ -1,66 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /locations-api - -image: - repository: eshop/locations.api - tag: latest - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: - urls: - # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). - configmap: - - name: ApplicationInsights__InstrumentationKey - key: all__InstrumentationKey - - name: EventBusConnection - key: all__EventBusConnection - - name: AzureServiceBusEnabled - key: all__UseAzureServiceBus - - name: UseLoadTest - key: all_EnableLoadTest - - name: IdentityUrl - key: internalurls__IdentityUrl - - name: IdentityUrlExternal - key: urls__IdentityUrl - - name: ConnectionString - key: locations__ConnectionString - - name: Database - key: locations__Database - # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) - values: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: OrchestratorType - value: 'K8S' -probes: - liveness: - path: /liveness - initialDelaySeconds: 10 - periodSeconds: 15 - port: 80 - readiness: - path: /hc - timeoutSeconds: 5 - initialDelaySeconds: 90 - periodSeconds: 60 - port: 80 diff --git a/deploy/k8s/helm/marketing-api/.helmignore b/deploy/k8s/helm/marketing-api/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/marketing-api/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/marketing-api/Chart.yaml b/deploy/k8s/helm/marketing-api/Chart.yaml deleted file mode 100644 index 173f94fd6..000000000 --- a/deploy/k8s/helm/marketing-api/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: marketing-api -version: 0.1.0 diff --git a/deploy/k8s/helm/marketing-api/templates/NOTES.txt b/deploy/k8s/helm/marketing-api/templates/NOTES.txt deleted file mode 100644 index 7fa66ed47..000000000 --- a/deploy/k8s/helm/marketing-api/templates/NOTES.txt +++ /dev/null @@ -1,9 +0,0 @@ -eShop Marketing API installed. ------------------------------- - -This API is not directly exposed outside cluster. If need to access it use: - -export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "marketing-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl port-forward $POD_NAME 8080:80 - diff --git a/deploy/k8s/helm/marketing-api/templates/_helpers.tpl b/deploy/k8s/helm/marketing-api/templates/_helpers.tpl deleted file mode 100644 index c252aeeac..000000000 --- a/deploy/k8s/helm/marketing-api/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "marketing-api.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "marketing-api.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "marketing-api.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/marketing-api/templates/_names.tpl b/deploy/k8s/helm/marketing-api/templates/_names.tpl deleted file mode 100644 index 605e92e7e..000000000 --- a/deploy/k8s/helm/marketing-api/templates/_names.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} - -{{- define "protocol" -}} -{{- if .Values.inf.tls.enabled -}} -{{- printf "%s" "https" -}} -{{- else -}} -{{- printf "%s" "http" -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/marketing-api/templates/configmap.yaml b/deploy/k8s/helm/marketing-api/templates/configmap.yaml deleted file mode 100644 index e6b495a7a..000000000 --- a/deploy/k8s/helm/marketing-api/templates/configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- $name := include "marketing-api.fullname" . -}} -{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} -{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} -{{- $mongo := include "mongo-name" . -}} -{{- $sqlsrv := include "sql-name" . -}} -{{- $protocol := include "protocol" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cfg-{{ $name }}" - labels: - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" - all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" - all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" - internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} - urls__IdentityUrl: {{ $protocol }}://{{ $identity }} - marketing__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.marketing.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; - marketing__MongoConnectionString: mongodb://{{ $mongo }} - marketing__MongoDatabase: {{ .Values.inf.mongo.marketing.database }} - marketing__PicBaseUrl: {{ $protocol }}://{{ $webshoppingapigw }}/c/api/v1/catalog/items/[0]/pic/ \ No newline at end of file diff --git a/deploy/k8s/helm/marketing-api/templates/deployment.yaml b/deploy/k8s/helm/marketing-api/templates/deployment.yaml deleted file mode 100644 index 6b833eb8c..000000000 --- a/deploy/k8s/helm/marketing-api/templates/deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- $name := include "marketing-api.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "marketing-api.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/marketing-api/templates/service.yaml b/deploy/k8s/helm/marketing-api/templates/service.yaml deleted file mode 100644 index 0e9bfbea2..000000000 --- a/deploy/k8s/helm/marketing-api/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.marketing }} - labels: - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/marketing-api/values.yaml b/deploy/k8s/helm/marketing-api/values.yaml deleted file mode 100644 index 00bebf27f..000000000 --- a/deploy/k8s/helm/marketing-api/values.yaml +++ /dev/null @@ -1,70 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /marketing-api - -image: - repository: eshop/marketing.api - tag: latest - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: - urls: - # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). - configmap: - - name: ApplicationInsights__InstrumentationKey - key: all__InstrumentationKey - - name: EventBusConnection - key: all__EventBusConnection - - name: AzureServiceBusEnabled - key: all__UseAzureServiceBus - - name: UseLoadTest - key: all_EnableLoadTest - - name: IdentityUrl - key: internalurls__IdentityUrl - - name: IdentityUrlExternal - key: urls__IdentityUrl - - name: ConnectionString - key: marketing__ConnectionString - - name: MongoConnectionString - key: marketing__MongoConnectionString - - name: MongoDatabase - key: marketing__MongoDatabase - - name: PicBaseUrl - key: marketing__PicBaseUrl - # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) - values: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: OrchestratorType - value: 'K8S' -probes: - liveness: - path: /liveness - initialDelaySeconds: 10 - periodSeconds: 15 - port: 80 - readiness: - path: /hc - timeoutSeconds: 5 - initialDelaySeconds: 90 - periodSeconds: 60 - port: 80 From 98552b778568eeada95e2d24d115c9e6e852300f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Mon, 21 Dec 2020 16:44:02 +0100 Subject: [PATCH 6/6] delete marketing and locations references --- README.md | 2 - build/acr-build/queue-all.ps1 | 2 - .../multiarch-manifests/create-manifests.ps1 | 2 +- deploy/azure/az/servicebus/sbusdeploy.json | 42 -- deploy/azure/az/sql/sqldeploy.json | 17 +- deploy/azure/az/sql/sqldeploy.parameters.json | 3 +- .../az/storage/marketing/deploystorage.json | 94 ----- .../marketing/deploystorage.parameters.json | 15 - deploy/azure/az/storage/marketing/readme.md | 37 -- deploy/azure/readme.md | 2 - deploy/k8s/archived/helm/apigwmm/.helmignore | 21 - deploy/k8s/archived/helm/apigwmm/Chart.yaml | 5 - deploy/k8s/archived/helm/apigwmm/envoy.yaml | 75 ---- .../archived/helm/apigwmm/templates/NOTES.txt | 2 - .../helm/apigwmm/templates/_helpers.tpl | 32 -- .../helm/apigwmm/templates/_names.tpl | 52 --- .../helm/apigwmm/templates/deployment.yaml | 110 ------ .../helm/apigwmm/templates/envoy-cm.yaml | 14 - .../helm/apigwmm/templates/ingress.yaml | 46 --- .../helm/apigwmm/templates/service.yaml | 23 -- deploy/k8s/archived/helm/apigwmm/values.yaml | 45 --- deploy/k8s/archived/helm/apigwwm/.helmignore | 21 - deploy/k8s/archived/helm/apigwwm/Chart.yaml | 5 - deploy/k8s/archived/helm/apigwwm/envoy.yaml | 75 ---- .../archived/helm/apigwwm/templates/NOTES.txt | 2 - .../helm/apigwwm/templates/_helpers.tpl | 32 -- .../helm/apigwwm/templates/_names.tpl | 52 --- .../helm/apigwwm/templates/deployment.yaml | 110 ------ .../helm/apigwwm/templates/envoy-cm.yaml | 14 - .../helm/apigwwm/templates/ingress.yaml | 47 --- .../helm/apigwwm/templates/service.yaml | 23 -- deploy/k8s/archived/helm/apigwwm/values.yaml | 46 --- deploy/k8s/archived/helm/app.yaml | 8 - deploy/k8s/archived/helm/deploy-all.ps1 | 2 +- deploy/k8s/archived/helm/deploy-all.sh | 4 +- .../identity-api/templates/configmap.yaml | 4 - .../archived/helm/identity-api/values.yaml | 4 - deploy/k8s/archived/helm/inf.yaml | 8 - .../archived/helm/locations-api/.helmignore | 21 - .../archived/helm/locations-api/Chart.yaml | 5 - .../helm/locations-api/templates/NOTES.txt | 9 - .../helm/locations-api/templates/_helpers.tpl | 32 -- .../helm/locations-api/templates/_names.tpl | 52 --- .../locations-api/templates/configmap.yaml | 22 -- .../locations-api/templates/deployment.yaml | 96 ----- .../helm/locations-api/templates/service.yaml | 19 - .../archived/helm/locations-api/values.yaml | 66 ---- .../archived/helm/marketing-api/.helmignore | 21 - .../archived/helm/marketing-api/Chart.yaml | 5 - .../helm/marketing-api/templates/NOTES.txt | 9 - .../helm/marketing-api/templates/_helpers.tpl | 32 -- .../helm/marketing-api/templates/_names.tpl | 60 --- .../marketing-api/templates/configmap.yaml | 27 -- .../marketing-api/templates/deployment.yaml | 96 ----- .../helm/marketing-api/templates/service.yaml | 19 - .../archived/helm/marketing-api/values.yaml | 70 ---- .../mobileshoppingagg/templates/NOTES.txt | 2 +- .../templates/configmap.yaml | 2 - .../helm/mobileshoppingagg/values.yaml | 4 - .../helm/webmvc/templates/configmap.yaml | 1 - deploy/k8s/archived/helm/webmvc/values.yaml | 2 - .../webshoppingagg/templates/configmap.yaml | 2 - .../archived/helm/webshoppingagg/values.yaml | 4 - .../helm/webspa/templates/configmap.yaml | 4 +- deploy/k8s/archived/helm/webspa/values.yaml | 2 - .../helm/webstatus/templates/configmap.yaml | 8 - .../k8s/archived/helm/webstatus/values.yaml | 18 +- deploy/k8s/helm/app.yaml | 8 - deploy/k8s/helm/deploy-all-mac.ps1 | 4 +- deploy/k8s/helm/deploy-all.ps1 | 4 +- deploy/k8s/helm/deploy-all.sh | 4 +- .../identity-api/templates/configmap.yaml | 4 - deploy/k8s/helm/identity-api/values.yaml | 4 - deploy/k8s/helm/inf.yaml | 8 - .../mobileshoppingagg/templates/NOTES.txt | 2 +- .../templates/configmap.yaml | 2 - deploy/k8s/helm/mobileshoppingagg/values.yaml | 4 - .../k8s/helm/webmvc/templates/configmap.yaml | 1 - deploy/k8s/helm/webmvc/values.yaml | 2 - .../webshoppingagg/templates/configmap.yaml | 2 - deploy/k8s/helm/webshoppingagg/values.yaml | 4 - .../k8s/helm/webspa/templates/configmap.yaml | 4 +- deploy/k8s/helm/webspa/values.yaml | 2 - .../helm/webstatus/templates/configmap.yaml | 8 - deploy/k8s/helm/webstatus/values.yaml | 18 +- obsolete/readme/README.ENV.md | 14 +- obsolete/readme/readme-docker-compose.md | 1 - src/.dockerignore | 3 +- src/.env | 7 - src/DockerfileSolutionRestore.txt | Bin 9084 -> 7956 bytes .../Identity.API/Configuration/Config.cs | 40 -- .../Data/ConfigurationDbContextSeed.cs | 2 - .../Controllers/HomeController.cs | 15 - .../Controllers/LocationsController.cs | 72 ---- .../Location/Locations.API/Dockerfile | 64 ---- .../Location/Locations.API/Dockerfile.develop | 17 - .../InternalServerErrorObjectResult.cs | 14 - .../Exceptions/LocationDomainException.cs | 21 - .../Filters/AuthorizeCheckOperationFilter.cs | 37 -- .../Filters/HttpGlobalExceptionFilter.cs | 68 ---- .../Infrastructure/LocationsContext.cs | 34 -- .../Infrastructure/LocationsContextSeed.cs | 354 ----------------- .../Middlewares/ByPassAuthMiddleware.cs | 79 ---- .../Repositories/ILocationsRepository.cs | 23 -- .../Repositories/LocationsRepository.cs | 65 ---- .../Services/IIdentityService.cs | 7 - .../Services/ILocationsService.cs | 18 - .../Services/IdentityService.cs | 20 - .../Services/LocationsService.cs | 97 ----- .../UserLocationUpdatedIntegrationEvent.cs | 18 - .../Locations.API/LocationSettings.cs | 15 - .../Locations.API/Locations.API.csproj | 45 --- .../Locations.API/Model/Core/LocationPoint.cs | 24 -- .../Model/Core/LocationPolygon.cs | 25 -- .../Location/Locations.API/Model/Locations.cs | 42 -- .../Locations.API/Model/UserLocation.cs | 16 - .../Model/UserLocationDetails.cs | 9 - .../Location/Locations.API/Program.cs | 88 ----- .../Properties/launchSettings.json | 29 -- .../Location/Locations.API/Startup.cs | 312 --------------- .../ViewModel/LocationRequest.cs | 8 - .../Location/Locations.API/appsettings.json | 29 -- src/Services/Location/Locations.API/azds.yaml | 56 --- .../Location/Locations.API/values.dev.yaml | 3 - .../LocationTestsStartup.cs | 56 --- .../Locations.FunctionalTests.csproj | 34 -- .../LocationsScenarioBase.cs | 47 --- .../LocationsScenarios.cs | 140 ------- .../appsettings.json | 10 - .../MarketingDetailsHttpTrigger/function.json | 16 - .../MarketingDetailsHttpTrigger/project.json | 21 - .../MarketingDetailsHttpTrigger/run.csx | 91 ----- .../Infrastructure/AzureFunctions/host.json | 1 - .../AzureFunctions/local.settings.json | 17 - .../AzureFunctions/marketing-functions.csproj | 35 -- .../Controllers/CampaignsController.cs | 232 ----------- .../Controllers/HomeController.cs | 13 - .../Controllers/LocationsController.cs | 151 -------- .../Controllers/PicController.cs | 28 -- .../Marketing/Marketing.API/Dockerfile | 64 ---- .../Marketing.API/Dockerfile.develop | 18 - .../Marketing.API/Dto/CampaignDTO.cs | 20 - .../Marketing.API/Dto/UserLocationDTO.cs | 11 - .../Marketing.API/Dto/UserLocationRuleDTO.cs | 11 - .../InternalServerErrorObjectResult.cs | 14 - .../CampaignEntityTypeConfiguration.cs | 46 --- .../RuleEntityTypeConfiguration.cs | 30 -- ...UserLocationRuleEntityTypeConfiguration.cs | 17 - .../Exceptions/MarketingDomainException.cs | 21 - .../Filters/AuthorizeCheckOperationFilter.cs | 36 -- .../Filters/HttpGlobalExceptionFilter.cs | 68 ---- .../Infrastructure/MarketingContext.cs | 45 --- .../Infrastructure/MarketingContextSeed.cs | 85 ---- .../20170615163431_Init.Designer.cs | 117 ------ .../20170615163431_Init.cs | 76 ---- ...9102516_added-campaign-details.Designer.cs | 121 ------ .../20170629102516_added-campaign-details.cs | 31 -- .../MarketingContextModelSnapshot.cs | 118 ------ .../MarketingReadDataContext.cs | 29 -- .../Middlewares/ByPassAuthMiddleware.cs | 78 ---- .../Repositories/IMarketingDataRepository.cs | 11 - .../Repositories/MarketingDataRepository.cs | 37 -- .../Services/IIdentityService.cs | 7 - .../Services/IdentityService.cs | 20 - .../UserLocationUpdatedIntegrationEvent.cs | 19 - ...rLocationUpdatedIntegrationEventHandler.cs | 57 --- .../Marketing.API/Marketing.API.csproj | 70 ---- .../Marketing.API/MarketingSettings.cs | 13 - .../Marketing/Marketing.API/Model/Campaign.cs | 32 -- .../Marketing/Marketing.API/Model/Location.cs | 9 - .../Marketing.API/Model/MarketingData.cs | 17 - .../Marketing/Marketing.API/Model/Rule.cs | 27 -- .../Marketing/Marketing.API/Model/RuleType.cs | 51 --- .../Model/UserLocationDetails.cs | 9 - .../Marketing/Marketing.API/Pics/1.png | Bin 139617 -> 0 bytes .../Marketing/Marketing.API/Pics/2.png | Bin 170303 -> 0 bytes .../Marketing/Marketing.API/Program.cs | 100 ----- .../Properties/launchSettings.json | 29 -- .../Marketing/Marketing.API/Startup.cs | 362 ------------------ .../ViewModel/PaginatedItemsViewModel.cs | 23 -- .../Marketing/Marketing.API/appsettings.json | 32 -- .../Marketing/Marketing.API/azds.yaml | 56 --- .../Marketing/Marketing.API/values.dev.yaml | 3 - .../AutoAuthorizeMiddleware.cs | 26 -- .../CampaignScenarioBase.cs | 30 -- .../CampaignScenarios.cs | 129 ------- .../Marketing.FunctionalTests.csproj | 34 -- .../MarketingScenarioBase.cs | 51 --- .../MarketingTestStartup.cs | 36 -- .../Properties/launchSettings.json | 27 -- .../UserLocationRoleScenarioBase.cs | 44 --- .../UserLocationRoleScenarios.cs | 80 ---- .../appsettings.json | 11 - src/Web/WebMVC/Startup.cs | 2 - src/Web/WebSPA/AppSettings.cs | 1 - .../shared/models/configuration.model.ts | 1 - .../shared/services/configuration.service.ts | 1 - .../shared/services/security.service.ts | 2 +- src/Web/WebSPA/appsettings.json | 2 - src/docker-compose-tests.override.yml | 53 --- src/docker-compose-tests.yml | 27 +- src/docker-compose-windows.prod.yml | 41 +- src/docker-compose.override.yml | 12 +- src/prepare-devspaces.ps1 | 15 - 204 files changed, 40 insertions(+), 7201 deletions(-) delete mode 100644 deploy/azure/az/storage/marketing/deploystorage.json delete mode 100644 deploy/azure/az/storage/marketing/deploystorage.parameters.json delete mode 100644 deploy/azure/az/storage/marketing/readme.md delete mode 100644 deploy/k8s/archived/helm/apigwmm/.helmignore delete mode 100644 deploy/k8s/archived/helm/apigwmm/Chart.yaml delete mode 100644 deploy/k8s/archived/helm/apigwmm/envoy.yaml delete mode 100644 deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt delete mode 100644 deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl delete mode 100644 deploy/k8s/archived/helm/apigwmm/templates/_names.tpl delete mode 100644 deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml delete mode 100644 deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml delete mode 100644 deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml delete mode 100644 deploy/k8s/archived/helm/apigwmm/templates/service.yaml delete mode 100644 deploy/k8s/archived/helm/apigwmm/values.yaml delete mode 100644 deploy/k8s/archived/helm/apigwwm/.helmignore delete mode 100644 deploy/k8s/archived/helm/apigwwm/Chart.yaml delete mode 100644 deploy/k8s/archived/helm/apigwwm/envoy.yaml delete mode 100644 deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt delete mode 100644 deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl delete mode 100644 deploy/k8s/archived/helm/apigwwm/templates/_names.tpl delete mode 100644 deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml delete mode 100644 deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml delete mode 100644 deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml delete mode 100644 deploy/k8s/archived/helm/apigwwm/templates/service.yaml delete mode 100644 deploy/k8s/archived/helm/apigwwm/values.yaml delete mode 100644 deploy/k8s/archived/helm/locations-api/.helmignore delete mode 100644 deploy/k8s/archived/helm/locations-api/Chart.yaml delete mode 100644 deploy/k8s/archived/helm/locations-api/templates/NOTES.txt delete mode 100644 deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl delete mode 100644 deploy/k8s/archived/helm/locations-api/templates/_names.tpl delete mode 100644 deploy/k8s/archived/helm/locations-api/templates/configmap.yaml delete mode 100644 deploy/k8s/archived/helm/locations-api/templates/deployment.yaml delete mode 100644 deploy/k8s/archived/helm/locations-api/templates/service.yaml delete mode 100644 deploy/k8s/archived/helm/locations-api/values.yaml delete mode 100644 deploy/k8s/archived/helm/marketing-api/.helmignore delete mode 100644 deploy/k8s/archived/helm/marketing-api/Chart.yaml delete mode 100644 deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt delete mode 100644 deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl delete mode 100644 deploy/k8s/archived/helm/marketing-api/templates/_names.tpl delete mode 100644 deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml delete mode 100644 deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml delete mode 100644 deploy/k8s/archived/helm/marketing-api/templates/service.yaml delete mode 100644 deploy/k8s/archived/helm/marketing-api/values.yaml delete mode 100644 src/Services/Location/Locations.API/Controllers/HomeController.cs delete mode 100644 src/Services/Location/Locations.API/Controllers/LocationsController.cs delete mode 100644 src/Services/Location/Locations.API/Dockerfile delete mode 100644 src/Services/Location/Locations.API/Dockerfile.develop delete mode 100644 src/Services/Location/Locations.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Exceptions/LocationDomainException.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/LocationsContext.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/LocationsContextSeed.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Repositories/ILocationsRepository.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Services/ILocationsService.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs delete mode 100644 src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs delete mode 100644 src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs delete mode 100644 src/Services/Location/Locations.API/LocationSettings.cs delete mode 100644 src/Services/Location/Locations.API/Locations.API.csproj delete mode 100644 src/Services/Location/Locations.API/Model/Core/LocationPoint.cs delete mode 100644 src/Services/Location/Locations.API/Model/Core/LocationPolygon.cs delete mode 100644 src/Services/Location/Locations.API/Model/Locations.cs delete mode 100644 src/Services/Location/Locations.API/Model/UserLocation.cs delete mode 100644 src/Services/Location/Locations.API/Model/UserLocationDetails.cs delete mode 100644 src/Services/Location/Locations.API/Program.cs delete mode 100644 src/Services/Location/Locations.API/Properties/launchSettings.json delete mode 100644 src/Services/Location/Locations.API/Startup.cs delete mode 100644 src/Services/Location/Locations.API/ViewModel/LocationRequest.cs delete mode 100644 src/Services/Location/Locations.API/appsettings.json delete mode 100644 src/Services/Location/Locations.API/azds.yaml delete mode 100644 src/Services/Location/Locations.API/values.dev.yaml delete mode 100644 src/Services/Location/Locations.FunctionalTests/LocationTestsStartup.cs delete mode 100644 src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj delete mode 100644 src/Services/Location/Locations.FunctionalTests/LocationsScenarioBase.cs delete mode 100644 src/Services/Location/Locations.FunctionalTests/LocationsScenarios.cs delete mode 100644 src/Services/Location/Locations.FunctionalTests/appsettings.json delete mode 100644 src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/function.json delete mode 100644 src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/project.json delete mode 100644 src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/run.csx delete mode 100644 src/Services/Marketing/Infrastructure/AzureFunctions/host.json delete mode 100644 src/Services/Marketing/Infrastructure/AzureFunctions/local.settings.json delete mode 100644 src/Services/Marketing/Infrastructure/AzureFunctions/marketing-functions.csproj delete mode 100644 src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs delete mode 100644 src/Services/Marketing/Marketing.API/Controllers/HomeController.cs delete mode 100644 src/Services/Marketing/Marketing.API/Controllers/LocationsController.cs delete mode 100644 src/Services/Marketing/Marketing.API/Controllers/PicController.cs delete mode 100644 src/Services/Marketing/Marketing.API/Dockerfile delete mode 100644 src/Services/Marketing/Marketing.API/Dockerfile.develop delete mode 100644 src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs delete mode 100644 src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs delete mode 100644 src/Services/Marketing/Marketing.API/Dto/UserLocationRuleDTO.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/ActionResult/InternalServerErrorObjectResult.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/CampaignEntityTypeConfiguration.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/RuleEntityTypeConfiguration.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/UserLocationRuleEntityTypeConfiguration.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Exceptions/MarketingDomainException.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingContext.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.Designer.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.Designer.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/MarketingReadDataContext.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Repositories/IMarketingDataRepository.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Services/IIdentityService.cs delete mode 100644 src/Services/Marketing/Marketing.API/Infrastructure/Services/IdentityService.cs delete mode 100644 src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs delete mode 100644 src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs delete mode 100644 src/Services/Marketing/Marketing.API/Marketing.API.csproj delete mode 100644 src/Services/Marketing/Marketing.API/MarketingSettings.cs delete mode 100644 src/Services/Marketing/Marketing.API/Model/Campaign.cs delete mode 100644 src/Services/Marketing/Marketing.API/Model/Location.cs delete mode 100644 src/Services/Marketing/Marketing.API/Model/MarketingData.cs delete mode 100644 src/Services/Marketing/Marketing.API/Model/Rule.cs delete mode 100644 src/Services/Marketing/Marketing.API/Model/RuleType.cs delete mode 100644 src/Services/Marketing/Marketing.API/Model/UserLocationDetails.cs delete mode 100644 src/Services/Marketing/Marketing.API/Pics/1.png delete mode 100644 src/Services/Marketing/Marketing.API/Pics/2.png delete mode 100644 src/Services/Marketing/Marketing.API/Program.cs delete mode 100644 src/Services/Marketing/Marketing.API/Properties/launchSettings.json delete mode 100644 src/Services/Marketing/Marketing.API/Startup.cs delete mode 100644 src/Services/Marketing/Marketing.API/ViewModel/PaginatedItemsViewModel.cs delete mode 100644 src/Services/Marketing/Marketing.API/appsettings.json delete mode 100644 src/Services/Marketing/Marketing.API/azds.yaml delete mode 100644 src/Services/Marketing/Marketing.API/values.dev.yaml delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/AutoAuthorizeMiddleware.cs delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarioBase.cs delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarios.cs delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/MarketingScenarioBase.cs delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/MarketingTestStartup.cs delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/Properties/launchSettings.json delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/UserLocationRoleScenarioBase.cs delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/UserLocationRoleScenarios.cs delete mode 100644 src/Services/Marketing/Marketing.FunctionalTests/appsettings.json diff --git a/README.md b/README.md index e457ff9ea..d09cc2fb3 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,6 @@ Sample .NET Core reference application, powered by Microsoft, based on a simplif | Basket API | [![Basket API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/basket?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=199&branchName=dev) | Shopping Aggregator (Mobile) | [![Mobile Shopping Aggregator](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/mobile-shopping-agg?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=204&branchName=dev) | | Catalog API | [![Catalog API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/catalog?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=197&branchName=dev) | Web Client (MVC) | [![WebMVC Client](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webmvc?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=209&branchName=dev) | |Identity API | [![Identity API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/identity?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=200&branchName=dev) | Web Client (SPA) | [![WebSPA Client](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webspa?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=210&branchName=dev) | -| Location API | [![Location API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/location?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=202&branchName=dev) | Web Status (Health) | [![Web Status](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webstatus?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=211&branchName=dev) | -| Marketing API | [![Marketing API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/marketing?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=203&branchName=dev) | Webhooks API | [![Webhooks API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webhooks?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=207&branchName=dev) | | Ordering API | [![Ordering API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/ordering?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=198&branchName=dev) | Webhooks Client | [![Webhooks demo client](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webhooks-client?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=208&branchName=dev) | | Payment API | [![Payment API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/payment?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=205&branchName=dev) | | | diff --git a/build/acr-build/queue-all.ps1 b/build/acr-build/queue-all.ps1 index 69448f9a2..d160abfc1 100644 --- a/build/acr-build/queue-all.ps1 +++ b/build/acr-build/queue-all.ps1 @@ -14,12 +14,10 @@ $services = @( @{ Name="eshopidentity"; Image="eshop/identity.api"; File="src/Services/Identity/Identity.API/Dockerfile" }, @{ Name="eshopordering"; Image="eshop/ordering.api"; File="src/Services/Ordering/Ordering.API/Dockerfile" }, @{ Name="eshoporderingbg"; Image="eshop/ordering.backgroundtasks"; File="src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile" }, - @{ Name="eshopmarketing"; Image="eshop/marketing.api"; File="src/Services/Marketing/Marketing.API/Dockerfile" }, @{ Name="eshopwebspa"; Image="eshop/webspa"; File="src/Web/WebSPA/Dockerfile" }, @{ Name="eshopwebmvc"; Image="eshop/webmvc"; File="src/Web/WebMVC/Dockerfile" }, @{ Name="eshopwebstatus"; Image="eshop/webstatus"; File="src/Web/WebStatus/Dockerfile" }, @{ Name="eshoppayment"; Image="eshop/payment.api"; File="src/Services/Payment/Payment.API/Dockerfile" }, - @{ Name="eshoplocations"; Image="eshop/locations.api"; File="src/Services/Location/Locations.API/Dockerfile" }, @{ Name="eshopocelotapigw"; Image="eshop/ocelotapigw"; File="src/ApiGateways/ApiGw-Base/Dockerfile" }, @{ Name="eshopmobileshoppingagg"; Image="eshop/mobileshoppingagg"; File="src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile" }, @{ Name="eshopwebshoppingagg"; Image="eshop/webshoppingagg"; File="src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile" }, diff --git a/build/multiarch-manifests/create-manifests.ps1 b/build/multiarch-manifests/create-manifests.ps1 index cc7f05194..6fc67b065 100644 --- a/build/multiarch-manifests/create-manifests.ps1 +++ b/build/multiarch-manifests/create-manifests.ps1 @@ -12,7 +12,7 @@ Write-Host "Tags used are linux-master, win-master, linux-dev, win-dev, linux-la Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow -$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "marketing.api", "payment.api", "locations.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client" +$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "payment.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client" foreach ($svc in $services) { Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev" diff --git a/deploy/azure/az/servicebus/sbusdeploy.json b/deploy/azure/az/servicebus/sbusdeploy.json index 50c1c6c54..46ac930aa 100644 --- a/deploy/azure/az/servicebus/sbusdeploy.json +++ b/deploy/azure/az/servicebus/sbusdeploy.json @@ -14,8 +14,6 @@ "BasketSubscriptionName": "Basket", "CatalogSubscriptionName": "Catalog", "OrderingSubscriptionName": "Ordering", - "LocationsSubscriptionName": "Locations", - "MarketingSubscriptionName": "Marketing", "GracePeriodSubscriptionName": "GracePeriod", "PaymentSubscriptionName": "Payment", "location": "[resourceGroup().location]", @@ -135,46 +133,6 @@ "entityAvailabilityStatus": "Available" } }, - { - "apiVersion": "[variables('sbVersion')]", - "name": "[variables('LocationsSubscriptionName')]", - "type": "Subscriptions", - "dependsOn": [ - "[variables('serviceBusTopicName')]" - ], - "properties": { - "lockDuration": "00:00:30", - "requiresSession": false, - "defaultMessageTimeToLive": "14.00:00:00", - "deadLetteringOnMessageExpiration": true, - "deadLetteringOnFilterEvaluationExceptions": true, - "maxDeliveryCount": 10, - "enableBatchedOperations": false, - "status": "Active", - "autoDeleteOnIdle": "10675199.02:48:05.4775807", - "entityAvailabilityStatus": "Available" - } - }, - { - "apiVersion": "[variables('sbVersion')]", - "name": "[variables('MarketingSubscriptionName')]", - "type": "Subscriptions", - "dependsOn": [ - "[variables('serviceBusTopicName')]" - ], - "properties": { - "lockDuration": "00:00:30", - "requiresSession": false, - "defaultMessageTimeToLive": "14.00:00:00", - "deadLetteringOnMessageExpiration": true, - "deadLetteringOnFilterEvaluationExceptions": true, - "maxDeliveryCount": 10, - "enableBatchedOperations": false, - "status": "Active", - "autoDeleteOnIdle": "10675199.02:48:05.4775807", - "entityAvailabilityStatus": "Available" - } - }, { "apiVersion": "[variables('sbVersion')]", "name": "[variables('GracePeriodSubscriptionName')]", diff --git a/deploy/azure/az/sql/sqldeploy.json b/deploy/azure/az/sql/sqldeploy.json index 397c94ad6..2bc8eeac3 100644 --- a/deploy/azure/az/sql/sqldeploy.json +++ b/deploy/azure/az/sql/sqldeploy.json @@ -73,22 +73,7 @@ "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]" ] - }, - { - "type": "databases", - "name": "[parameters('sql_server').dbs.marketing]", - "apiVersion": "2014-04-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "edition": "Standard", - "collation": "SQL_Latin1_General_CP1_CI_AS", - "maxSizeBytes": "1073741824", - "requestedServiceObjectiveName": "S1" - }, - "dependsOn": [ - "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]" - ] - }, + }, { "type": "firewallrules", "name": "AllowAllWindowsAzureIps", diff --git a/deploy/azure/az/sql/sqldeploy.parameters.json b/deploy/azure/az/sql/sqldeploy.parameters.json index 982e78f4c..473cf08cd 100644 --- a/deploy/azure/az/sql/sqldeploy.parameters.json +++ b/deploy/azure/az/sql/sqldeploy.parameters.json @@ -8,8 +8,7 @@ "dbs": { "ordering": "orderingdb", "identity": "identitydb", - "catalog": "catalogdb", - "marketing": "marketingdb" + "catalog": "catalogdb" } } }, diff --git a/deploy/azure/az/storage/marketing/deploystorage.json b/deploy/azure/az/storage/marketing/deploystorage.json deleted file mode 100644 index 632e0d09a..000000000 --- a/deploy/azure/az/storage/marketing/deploystorage.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "marketingstorage": { - "type": "string" - }, - "profileName" : { - "type": "string" - }, - "endpointName" : { - "type": "string" - } - }, - "variables": { - "marketingstorage": "[concat(parameters('marketingstorage'), uniqueString(resourceGroup().id))]", - "endpointName": "[concat(parameters('endpointName'), uniqueString(resourceGroup().id))]", - "profileName": "[parameters('profileName')]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('marketingstorage')]", - "apiVersion": "2016-01-01", - "location": "[resourceGroup().location]", - "tags": { - "displayName": "[variables('marketingstorage')]" - }, - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage" - }, - { - "name": "[variables('profileName')]", - "type": "Microsoft.Cdn/profiles", - "location": "[resourceGroup().location]", - "apiVersion": "2016-04-02", - "tags": { - "displayName": "[variables('profileName')]" - }, - "sku": { - "name": "Standard_Verizon" - }, - "resources": [ - { - "apiVersion": "2016-04-02", - "name": "[variables('endpointName')]", - "type": "endpoints", - "dependsOn": [ - "[variables('profileName')]", - "[variables('marketingstorage')]" - ], - "location": "[resourceGroup().location]", - "tags": { - "displayName": "[variables('endpointName')]" - }, - "properties": { - "originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]", - "isHttpAllowed": true, - "isHttpsAllowed": true, - "queryStringCachingBehavior": "IgnoreQueryString", - "contentTypesToCompress": [ - "text/plain", - "text/html", - "text/css", - "application/x-javascript", - "text/javascript" - ], - "isCompressionEnabled": "True", - "origins": [ - { - "name": "origin1", - "properties": { - "hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]" - } - } - ] - } - } - ] - } - ], - "outputs": { - "hostName": { - "type": "string", - "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).hostName]" - }, - "originHostHeader": { - "type": "string", - "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).originHostHeader]" - } - } -} \ No newline at end of file diff --git a/deploy/azure/az/storage/marketing/deploystorage.parameters.json b/deploy/azure/az/storage/marketing/deploystorage.parameters.json deleted file mode 100644 index 40f7b3a1b..000000000 --- a/deploy/azure/az/storage/marketing/deploystorage.parameters.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "marketingstorage": { - "value": "marketing" - }, - "profileName":{ - "value": "eshopmarketing" - }, - "endpointName":{ - "value": "marketing-endpoint" - } - } -} \ No newline at end of file diff --git a/deploy/azure/az/storage/marketing/readme.md b/deploy/azure/az/storage/marketing/readme.md deleted file mode 100644 index c0ec2be7a..000000000 --- a/deploy/azure/az/storage/marketing/readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# Deploying Marketing Storage - -The ARM template `deploystorage.json` and its parameter file (`deploystorage.parameters.json`) are used to deploy following resources: - -1. One Storage Account -2. One CDN profile -3. One Endpoint - -## Editing deploystorage.parameters.json file - -You can edit the `deploystorage.parameters.json` file to set your values, but is not needed. The only parameters that can -be set are: - -1. `marketingstorage` is a string that is used to create the storage account name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value. - -2. `profileName` is a string that is used to create the CDN profile name. - -3. `endpointName` is a string that is used to create the storage endpoint name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value. - -## Deploy the template - -Once parameter file is edited you can deploy it using [create-resources script](../../readme.md). - -i. e. if you are in windows, to deploy a Storage account in a new resourcegroup located in westus, go to `deploy\az` folder and type: - -``` -create-resources.cmd storage\marketing\deploystorage newResourceGroup -c westus -``` - - - - - - - - - diff --git a/deploy/azure/readme.md b/deploy/azure/readme.md index 27b168713..cc35bb001 100644 --- a/deploy/azure/readme.md +++ b/deploy/azure/readme.md @@ -22,8 +22,6 @@ Using `docker-machine` is the recommended way to create a VM with docker install 3. [Deploying Redis Cache](az/redis/readme.md) 4. [Deploying Cosmosdb](az/cosmos/readme.md) 5. [Deploying Catalog Storage](az/storage/catalog/readme.md) -6. [Deploying Marketing Storage](az/storage/marketing/readme.md) -7. [Deploying Marketing Azure functions](az/azurefunctions/readme.md) diff --git a/deploy/k8s/archived/helm/apigwmm/.helmignore b/deploy/k8s/archived/helm/apigwmm/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/archived/helm/apigwmm/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/archived/helm/apigwmm/Chart.yaml b/deploy/k8s/archived/helm/apigwmm/Chart.yaml deleted file mode 100644 index 50b3d07c6..000000000 --- a/deploy/k8s/archived/helm/apigwmm/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: apigwmm -version: 0.1.0 diff --git a/deploy/k8s/archived/helm/apigwmm/envoy.yaml b/deploy/k8s/archived/helm/apigwmm/envoy.yaml deleted file mode 100644 index 54b1afa06..000000000 --- a/deploy/k8s/archived/helm/apigwmm/envoy.yaml +++ /dev/null @@ -1,75 +0,0 @@ -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: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - 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 diff --git a/deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt b/deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt deleted file mode 100644 index 30ef33447..000000000 --- a/deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -eShop API Gateway for Mobile Marketing services installed ----------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl b/deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl deleted file mode 100644 index fd3d89212..000000000 --- a/deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "apigwmm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "apigwmm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apigwmm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/archived/helm/apigwmm/templates/_names.tpl b/deploy/k8s/archived/helm/apigwmm/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/archived/helm/apigwmm/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml b/deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml deleted file mode 100644 index f93706bb9..000000000 --- a/deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -{{- $name := include "apigwmm.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: {{ template "apigwmm.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ $envoycfgname }} - items: - - key: envoy.yaml - path: envoy.yaml - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: IfNotPresent - volumeMounts: - - name: config - mountPath: {{ .Values.envoy.configPath }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - - name: admin - containerPort: 8001 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml b/deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml deleted file mode 100644 index 71728d084..000000000 --- a/deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $name := include "apigwmm.fullname" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "envoy-{{ $name }}" - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} - diff --git a/deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml b/deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml deleted file mode 100644 index 44e9a90fc..000000000 --- a/deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $ingressPath := include "pathBase" . -}} -{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "apigwmm.fullname" . }} - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} - cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} -{{- end }} -{{- if .Values.inf.mesh.enabled }} -{{- with .Values.ingress.mesh.annotations }} -{{ toYaml . | indent 4 }} -{{- end }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $serviceName }} - servicePort: http - {{- end }} -{{- end }} diff --git a/deploy/k8s/archived/helm/apigwmm/templates/service.yaml b/deploy/k8s/archived/helm/apigwmm/templates/service.yaml deleted file mode 100644 index 286277c7d..000000000 --- a/deploy/k8s/archived/helm/apigwmm/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.mobilemarketingapigw }} - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - - port: {{ .Values.service.adminPort }} - targetPort: admin - protocol: TCP - name: admin - selector: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/apigwmm/values.yaml b/deploy/k8s/archived/helm/apigwmm/values.yaml deleted file mode 100644 index 21f12f27a..000000000 --- a/deploy/k8s/archived/helm/apigwmm/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /mobilemarketingapigw - -image: - repository: envoyproxy/envoy - tag: v1.11.1 - -service: - type: ClusterIP - port: 80 - adminPort: 8001 - -ingress: - enabled: true - annotations: - nginx.ingress.kubernetes.io/rewrite-target: "/" - ingress.kubernetes.io/rewrite-target: "/" - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -env: {} - -envoy: - configPath: /etc/envoy - -probes: - liveness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 15 - port: 8001 - readiness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 60 - port: 8001 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwwm/.helmignore b/deploy/k8s/archived/helm/apigwwm/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/archived/helm/apigwwm/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/archived/helm/apigwwm/Chart.yaml b/deploy/k8s/archived/helm/apigwwm/Chart.yaml deleted file mode 100644 index 4c2082969..000000000 --- a/deploy/k8s/archived/helm/apigwwm/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: apigwwm -version: 0.1.0 diff --git a/deploy/k8s/archived/helm/apigwwm/envoy.yaml b/deploy/k8s/archived/helm/apigwwm/envoy.yaml deleted file mode 100644 index c6f3421de..000000000 --- a/deploy/k8s/archived/helm/apigwwm/envoy.yaml +++ /dev/null @@ -1,75 +0,0 @@ -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: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - clusters: - - name: marketing - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: marketing-api - port_value: 80 - - name: locations - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: locations-api - port_value: 80 diff --git a/deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt b/deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt deleted file mode 100644 index 3420c97c8..000000000 --- a/deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -eShop API Gateway for Web Marketing services installed ------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl b/deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl deleted file mode 100644 index 194cf96ca..000000000 --- a/deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "apigwwm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "apigwwm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apigwwm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/archived/helm/apigwwm/templates/_names.tpl b/deploy/k8s/archived/helm/apigwwm/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/archived/helm/apigwwm/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml b/deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml deleted file mode 100644 index 6ceb1fa1b..000000000 --- a/deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -{{- $name := include "apigwwm.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: {{ template "apigwwm.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ $envoycfgname }} - items: - - key: envoy.yaml - path: envoy.yaml - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: IfNotPresent - volumeMounts: - - name: config - mountPath: {{ .Values.envoy.configPath }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - - name: admin - containerPort: 8001 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml b/deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml deleted file mode 100644 index 4d6307e36..000000000 --- a/deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $name := include "apigwwm.fullname" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "envoy-{{ $name }}" - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}} - diff --git a/deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml b/deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml deleted file mode 100644 index 00d54c226..000000000 --- a/deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $ingressPath := include "pathBase" . -}} -{{- $serviceName := .Values.app.svc.webmarketingapigw -}} - -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "apigwwm.fullname" . }} - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} - cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} -{{- end }} -{{- if .Values.inf.mesh.enabled }} -{{- with .Values.ingress.mesh.annotations }} -{{ toYaml . | indent 4 }} -{{- end }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $serviceName }} - servicePort: http - {{- end }} -{{- end }} diff --git a/deploy/k8s/archived/helm/apigwwm/templates/service.yaml b/deploy/k8s/archived/helm/apigwwm/templates/service.yaml deleted file mode 100644 index cb11cc665..000000000 --- a/deploy/k8s/archived/helm/apigwwm/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.webmarketingapigw }} - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - - port: {{ .Values.service.adminPort }} - targetPort: admin - protocol: TCP - name: admin - selector: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/apigwwm/values.yaml b/deploy/k8s/archived/helm/apigwwm/values.yaml deleted file mode 100644 index d866c2d3c..000000000 --- a/deploy/k8s/archived/helm/apigwwm/values.yaml +++ /dev/null @@ -1,46 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /webmarketingapigw - -image: - repository: envoyproxy/envoy - tag: v1.11.1 - -service: - type: ClusterIP - port: 80 - adminPort: 8001 - -ingress: - enabled: true - annotations: - nginx.ingress.kubernetes.io/rewrite-target: "/" - ingress.kubernetes.io/rewrite-target: "/" - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: {} - -envoy: - configPath: /etc/envoy - -probes: - liveness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 15 - port: 8001 - readiness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 60 - port: 8001 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/app.yaml b/deploy/k8s/archived/helm/app.yaml index e83ea2823..acea31ef1 100644 --- a/deploy/k8s/archived/helm/app.yaml +++ b/deploy/k8s/archived/helm/app.yaml @@ -13,14 +13,10 @@ app: # app global settings spa: "" # ingress entry for web spa status: webstatus # ingress entry for web status webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw - webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator payment: payment-api # ingress entry for payment api - locations: locations-api # ingress entry for locations api - marketing: marketing-api # ingress entry for marketing api webhooks: webhooks-api # ingress entry for webhooks api webhooksweb: webhooks-web # ingress entry for webhooks web demo client svc: @@ -34,13 +30,9 @@ app: # app global settings spa: webspa # service name for web spa status: webstatus # service name for web status webshoppingapigw: webshoppingapigw # service name for web shopping Agw - webmarketingapigw: webmarketingapigw # service name for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw webshoppingagg: webshoppingagg # service name for web shopping aggregator mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator payment: payment-api # service name for payment api - locations: locations-api # service name for locations api - marketing: marketing-api # service name for marketing ap webhooks: webhooks-api # service name for webhooks api webhooksweb: webhooks-client # service name for webhooks web diff --git a/deploy/k8s/archived/helm/deploy-all.ps1 b/deploy/k8s/archived/helm/deploy-all.ps1 index 1711c0c2c..51d87e720 100644 --- a/deploy/k8s/archived/helm/deploy-all.ps1 +++ b/deploy/k8s/archived/helm/deploy-all.ps1 @@ -113,7 +113,7 @@ if (-not [string]::IsNullOrEmpty($registry)) { Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green $infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data") -$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") +$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") $gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws") if ($deployInfrastructure) { diff --git a/deploy/k8s/archived/helm/deploy-all.sh b/deploy/k8s/archived/helm/deploy-all.sh index 6f6d868aa..ad76bd54c 100644 --- a/deploy/k8s/archived/helm/deploy-all.sh +++ b/deploy/k8s/archived/helm/deploy-all.sh @@ -142,7 +142,7 @@ fi if [[ $push_images ]]; then echo "#################### Pushing images to the container registry ####################" - services=(basket.api catalog.api identity.api ordering.api marketing.api payment.api locations.api webmvc webspa webstatus) + services=(basket.api catalog.api identity.api ordering.api payment.api webmvc webspa webstatus) if [[ -z "$(docker image ls -q --filter=reference=eshop/$service:$image_tag)" ]]; then image_tag=linux-$image_tag @@ -209,7 +209,7 @@ fi echo "#################### Begin $app_name installation using Helm ####################" infras=(sql-data nosql-data rabbitmq keystore-data basket-data) -charts=(eshop-common apigwmm apigwms apigwwm apigwws basket-api catalog-api identity-api locations-api marketing-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web) +charts=(eshop-common apigwms apigwws basket-api catalog-api identity-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web) if [[ !$skip_infrastructure ]]; then for infra in "${infras[@]}" diff --git a/deploy/k8s/archived/helm/identity-api/templates/configmap.yaml b/deploy/k8s/archived/helm/identity-api/templates/configmap.yaml index 264ceb745..7c670f646 100644 --- a/deploy/k8s/archived/helm/identity-api/templates/configmap.yaml +++ b/deploy/k8s/archived/helm/identity-api/templates/configmap.yaml @@ -2,8 +2,6 @@ {{- $sqlsrv := include "sql-name" . -}} {{- $mvc_url := include "url-of" (list .Values.app.ingress.entries.mvc .) -}} {{- $spa_url := include "url-of" (list .Values.app.ingress.entries.spa .) -}} -{{- $locations_url := include "url-of" (list .Values.app.ingress.entries.locations .) -}} -{{- $marketing_url := include "url-of" (list .Values.app.ingress.entries.marketing .) -}} {{- $basket_url := include "url-of" (list .Values.app.ingress.entries.basket .) -}} {{- $ordering_url := include "url-of" (list .Values.app.ingress.entries.ordering .) -}} {{- $mobileshoppingagg := include "url-of" (list .Values.app.ingress.entries.mobileshoppingagg .) -}} @@ -27,8 +25,6 @@ data: all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" mvc_e: http://{{ $mvc_url }} spa_e: http://{{ $spa_url }} - locations_e: http://{{ $locations_url }} - marketing_e: http://{{ $marketing_url }} basket_e: http://{{ $basket_url }} ordering_e: http://{{ $ordering_url }} mobileshoppingagg_e: http://{{ $mobileshoppingagg }} diff --git a/deploy/k8s/archived/helm/identity-api/values.yaml b/deploy/k8s/archived/helm/identity-api/values.yaml index 7b57dfde1..92fd57283 100644 --- a/deploy/k8s/archived/helm/identity-api/values.yaml +++ b/deploy/k8s/archived/helm/identity-api/values.yaml @@ -40,10 +40,6 @@ env: key: mvc_e - name: SpaClient key: spa_e - - name: LocationApiClient - key: locations_e - - name: MarketingApiClient - key: marketing_e - name: BasketApiClient key: basket_e - name: OrderingApiClient diff --git a/deploy/k8s/archived/helm/inf.yaml b/deploy/k8s/archived/helm/inf.yaml index 938be3d45..e73b37ee8 100644 --- a/deploy/k8s/archived/helm/inf.yaml +++ b/deploy/k8s/archived/helm/inf.yaml @@ -19,16 +19,8 @@ inf: db: OrderingDb # Ordering API SQL db name identity: db: IdentityDb # Ordering API SQL db name - marketing: - db: MarketingDb # Marketing API SQL db name webhooks: db: WebhooksDb # Webhooks DB - mongo: -# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used - locations: - database: LocationsDb - marketing: - database: MarketingDb redis: # inf.redis defines the redis' connection strings basket: svc: basket-data # Name of k8s svc for basket redis diff --git a/deploy/k8s/archived/helm/locations-api/.helmignore b/deploy/k8s/archived/helm/locations-api/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/archived/helm/locations-api/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/archived/helm/locations-api/Chart.yaml b/deploy/k8s/archived/helm/locations-api/Chart.yaml deleted file mode 100644 index 5126fe847..000000000 --- a/deploy/k8s/archived/helm/locations-api/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: locations-api -version: 0.1.0 diff --git a/deploy/k8s/archived/helm/locations-api/templates/NOTES.txt b/deploy/k8s/archived/helm/locations-api/templates/NOTES.txt deleted file mode 100644 index 3b48889bf..000000000 --- a/deploy/k8s/archived/helm/locations-api/templates/NOTES.txt +++ /dev/null @@ -1,9 +0,0 @@ -eShop Locations API installed. ------------------------------- - -This API is not directly exposed outside cluster. If need to access it use: - -export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "locations-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl port-forward $POD_NAME 8080:80 - diff --git a/deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl deleted file mode 100644 index 086a461ba..000000000 --- a/deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "locations-api.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "locations-api.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "locations-api.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/archived/helm/locations-api/templates/_names.tpl b/deploy/k8s/archived/helm/locations-api/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/archived/helm/locations-api/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/locations-api/templates/configmap.yaml b/deploy/k8s/archived/helm/locations-api/templates/configmap.yaml deleted file mode 100644 index c5d752509..000000000 --- a/deploy/k8s/archived/helm/locations-api/templates/configmap.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $name := include "locations-api.fullname" . -}} -{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} -{{- $mongo := include "mongo-name" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cfg-{{ $name }}" - labels: - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" - all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" - all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" - internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} - urls__IdentityUrl: {{ $identity }} - locations__ConnectionString: mongodb://{{ $mongo }} - locations__Database: {{ .Values.inf.mongo.locations.database }} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/locations-api/templates/deployment.yaml b/deploy/k8s/archived/helm/locations-api/templates/deployment.yaml deleted file mode 100644 index 9a5bb608c..000000000 --- a/deploy/k8s/archived/helm/locations-api/templates/deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- $name := include "locations-api.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: {{ template "locations-api.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/archived/helm/locations-api/templates/service.yaml b/deploy/k8s/archived/helm/locations-api/templates/service.yaml deleted file mode 100644 index abd628beb..000000000 --- a/deploy/k8s/archived/helm/locations-api/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.locations }} - labels: - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/locations-api/values.yaml b/deploy/k8s/archived/helm/locations-api/values.yaml deleted file mode 100644 index 4718f2a0b..000000000 --- a/deploy/k8s/archived/helm/locations-api/values.yaml +++ /dev/null @@ -1,66 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /locations-api - -image: - repository: eshop/locations.api - tag: latest - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: - urls: - # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). - configmap: - - name: ApplicationInsights__InstrumentationKey - key: all__InstrumentationKey - - name: EventBusConnection - key: all__EventBusConnection - - name: AzureServiceBusEnabled - key: all__UseAzureServiceBus - - name: UseLoadTest - key: all_EnableLoadTest - - name: IdentityUrl - key: internalurls__IdentityUrl - - name: IdentityUrlExternal - key: urls__IdentityUrl - - name: ConnectionString - key: locations__ConnectionString - - name: Database - key: locations__Database - # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) - values: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: OrchestratorType - value: 'K8S' -probes: - liveness: - path: /liveness - initialDelaySeconds: 10 - periodSeconds: 15 - port: 80 - readiness: - path: /hc - timeoutSeconds: 5 - initialDelaySeconds: 90 - periodSeconds: 60 - port: 80 diff --git a/deploy/k8s/archived/helm/marketing-api/.helmignore b/deploy/k8s/archived/helm/marketing-api/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/archived/helm/marketing-api/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/archived/helm/marketing-api/Chart.yaml b/deploy/k8s/archived/helm/marketing-api/Chart.yaml deleted file mode 100644 index 173f94fd6..000000000 --- a/deploy/k8s/archived/helm/marketing-api/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: marketing-api -version: 0.1.0 diff --git a/deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt b/deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt deleted file mode 100644 index 7fa66ed47..000000000 --- a/deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt +++ /dev/null @@ -1,9 +0,0 @@ -eShop Marketing API installed. ------------------------------- - -This API is not directly exposed outside cluster. If need to access it use: - -export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "marketing-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl port-forward $POD_NAME 8080:80 - diff --git a/deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl deleted file mode 100644 index c252aeeac..000000000 --- a/deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "marketing-api.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "marketing-api.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "marketing-api.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/archived/helm/marketing-api/templates/_names.tpl b/deploy/k8s/archived/helm/marketing-api/templates/_names.tpl deleted file mode 100644 index 605e92e7e..000000000 --- a/deploy/k8s/archived/helm/marketing-api/templates/_names.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} - -{{- define "protocol" -}} -{{- if .Values.inf.tls.enabled -}} -{{- printf "%s" "https" -}} -{{- else -}} -{{- printf "%s" "http" -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml b/deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml deleted file mode 100644 index e6b495a7a..000000000 --- a/deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- $name := include "marketing-api.fullname" . -}} -{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} -{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} -{{- $mongo := include "mongo-name" . -}} -{{- $sqlsrv := include "sql-name" . -}} -{{- $protocol := include "protocol" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cfg-{{ $name }}" - labels: - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" - all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" - all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" - internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} - urls__IdentityUrl: {{ $protocol }}://{{ $identity }} - marketing__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.marketing.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; - marketing__MongoConnectionString: mongodb://{{ $mongo }} - marketing__MongoDatabase: {{ .Values.inf.mongo.marketing.database }} - marketing__PicBaseUrl: {{ $protocol }}://{{ $webshoppingapigw }}/c/api/v1/catalog/items/[0]/pic/ \ No newline at end of file diff --git a/deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml b/deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml deleted file mode 100644 index 60d4cd1a3..000000000 --- a/deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- $name := include "marketing-api.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: {{ template "marketing-api.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/archived/helm/marketing-api/templates/service.yaml b/deploy/k8s/archived/helm/marketing-api/templates/service.yaml deleted file mode 100644 index 0e9bfbea2..000000000 --- a/deploy/k8s/archived/helm/marketing-api/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.marketing }} - labels: - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/marketing-api/values.yaml b/deploy/k8s/archived/helm/marketing-api/values.yaml deleted file mode 100644 index 00bebf27f..000000000 --- a/deploy/k8s/archived/helm/marketing-api/values.yaml +++ /dev/null @@ -1,70 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /marketing-api - -image: - repository: eshop/marketing.api - tag: latest - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: - urls: - # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). - configmap: - - name: ApplicationInsights__InstrumentationKey - key: all__InstrumentationKey - - name: EventBusConnection - key: all__EventBusConnection - - name: AzureServiceBusEnabled - key: all__UseAzureServiceBus - - name: UseLoadTest - key: all_EnableLoadTest - - name: IdentityUrl - key: internalurls__IdentityUrl - - name: IdentityUrlExternal - key: urls__IdentityUrl - - name: ConnectionString - key: marketing__ConnectionString - - name: MongoConnectionString - key: marketing__MongoConnectionString - - name: MongoDatabase - key: marketing__MongoDatabase - - name: PicBaseUrl - key: marketing__PicBaseUrl - # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) - values: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: OrchestratorType - value: 'K8S' -probes: - liveness: - path: /liveness - initialDelaySeconds: 10 - periodSeconds: 15 - port: 80 - readiness: - path: /hc - timeoutSeconds: 5 - initialDelaySeconds: 90 - periodSeconds: 60 - port: 80 diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt b/deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt index 61971f717..e7e5081ea 100644 --- a/deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt @@ -1,4 +1,4 @@ -eShop Mobile Marketing Aggregator is installed +eShop Mobile Shopping Aggregator is installed ---------------------------------------------- This API is not directly exposed outside cluster. If need to access it use: diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml b/deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml index 1ca69509f..6d3eeef4b 100644 --- a/deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml @@ -21,9 +21,7 @@ data: internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc - internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc - internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/values.yaml b/deploy/k8s/archived/helm/mobileshoppingagg/values.yaml index 844a59441..fc7ce7a38 100644 --- a/deploy/k8s/archived/helm/mobileshoppingagg/values.yaml +++ b/deploy/k8s/archived/helm/mobileshoppingagg/values.yaml @@ -49,12 +49,8 @@ env: key: internalurls__identity__hc - name: OrderingUrlHC key: internalurls__ordering__hc - - name: MarketingUrlHC - key: internalurls__marketing__hc - name: PaymentUrlHC key: internalurls__payment__hc - - name: LocationUrlHC - key: internalurls__location__hc - name: urls__grpcBasket key: internalurls__grpcBasket - name: urls__grpcCatalog diff --git a/deploy/k8s/archived/helm/webmvc/templates/configmap.yaml b/deploy/k8s/archived/helm/webmvc/templates/configmap.yaml index 2aa06fc7f..89b9faae0 100644 --- a/deploy/k8s/archived/helm/webmvc/templates/configmap.yaml +++ b/deploy/k8s/archived/helm/webmvc/templates/configmap.yaml @@ -19,7 +19,6 @@ data: all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" webmvc__keystore: {{ .Values.inf.redis.keystore.constr }} internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }} - internalurls__apigwwm: http://{{ .Values.app.svc.webmarketingapigw }} internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }} urls__mvc: {{ $protocol }}://{{ $mvc }} diff --git a/deploy/k8s/archived/helm/webmvc/values.yaml b/deploy/k8s/archived/helm/webmvc/values.yaml index 973f187f5..5db29dd01 100644 --- a/deploy/k8s/archived/helm/webmvc/values.yaml +++ b/deploy/k8s/archived/helm/webmvc/values.yaml @@ -44,8 +44,6 @@ env: key: urls__mvc - name: IdentityUrl key: urls__IdentityUrl - - name: MarketingUrl - key: internalurls__apigwwm - name: IdentityUrlHC key: internalurls__identity__hc - name: SignalrHubUrl diff --git a/deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml b/deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml index d01de8dcd..b1b07ffee 100644 --- a/deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml +++ b/deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml @@ -21,9 +21,7 @@ data: internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc - internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc - internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" diff --git a/deploy/k8s/archived/helm/webshoppingagg/values.yaml b/deploy/k8s/archived/helm/webshoppingagg/values.yaml index 15501c727..602dcf93a 100644 --- a/deploy/k8s/archived/helm/webshoppingagg/values.yaml +++ b/deploy/k8s/archived/helm/webshoppingagg/values.yaml @@ -49,12 +49,8 @@ env: key: internalurls__identity__hc - name: OrderingUrlHC key: internalurls__ordering__hc - - name: MarketingUrlHC - key: internalurls__marketing__hc - name: PaymentUrlHC key: internalurls__payment__hc - - name: LocationUrlHC - key: internalurls__location__hc - name: urls__grpcBasket key: internalurls__grpcBasket - name: urls__grpcCatalog diff --git a/deploy/k8s/archived/helm/webspa/templates/configmap.yaml b/deploy/k8s/archived/helm/webspa/templates/configmap.yaml index ecdbf8b63..353ff638f 100644 --- a/deploy/k8s/archived/helm/webspa/templates/configmap.yaml +++ b/deploy/k8s/archived/helm/webspa/templates/configmap.yaml @@ -1,7 +1,6 @@ {{- $name := include "webspa.fullname" . -}} {{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} {{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} -{{- $webmarketingapigw := include "url-of" (list .Values.app.ingress.entries.webmarketingapigw .) -}} {{- $spa := include "url-of" (list .Values.app.ingress.entries.spa .) -}} {{- $mongo := include "mongo-name" . -}} {{- $protocol := include "protocol" . -}} @@ -23,5 +22,4 @@ data: internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }} urls__spa: {{ $protocol }}://{{ $spa }} - urls__IdentityUrl: {{ $protocol }}://{{ $identity }} - urls__apigwwm: {{ $protocol }}://{{ $webmarketingapigw }} \ No newline at end of file + urls__IdentityUrl: {{ $protocol }}://{{ $identity }} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webspa/values.yaml b/deploy/k8s/archived/helm/webspa/values.yaml index e1547ed39..4a7eea52b 100644 --- a/deploy/k8s/archived/helm/webspa/values.yaml +++ b/deploy/k8s/archived/helm/webspa/values.yaml @@ -42,8 +42,6 @@ env: key: urls__spa - name: IdentityUrl key: urls__IdentityUrl - - name: MarketingUrl - key: urls__apigwwm - name: IdentityUrlHC key: internalurls__identity__hc - name: SignalrHubUrl diff --git a/deploy/k8s/archived/helm/webstatus/templates/configmap.yaml b/deploy/k8s/archived/helm/webstatus/templates/configmap.yaml index bf40d2a7d..b53864602 100644 --- a/deploy/k8s/archived/helm/webstatus/templates/configmap.yaml +++ b/deploy/k8s/archived/helm/webstatus/templates/configmap.yaml @@ -24,12 +24,8 @@ data: internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc name__apigwws__hc: Web Shopping API GW HTTP Check internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}:8001/ready - name__apigwwm__hc: Web Marketing API GW HTTP Check - internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}:8001/ready name__apigwms__hc: Mobile Shopping API GW HTTP Check internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}:8001/ready - name__apigwmm__hc: Mobile Marketing API GW HTTP Check - internalurls__apigwmm__hc: http://{{ .Values.app.svc.mobilemarketingapigw }}:8001/ready name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check @@ -44,10 +40,6 @@ data: internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc name__identity__hc: Identity HTTP Check internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc - name__marketing__hc: Marketing HTTP Check - internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc - name__locations__hc: Locations HTTP Check - internalurls__locations__hc: http://{{ .Values.app.svc.locations }}/hc name__payment__hc: Payment HTTP Check internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc name__signalrhub__hc: Ordering SignalR Hub HTTP Check diff --git a/deploy/k8s/archived/helm/webstatus/values.yaml b/deploy/k8s/archived/helm/webstatus/values.yaml index e5a23ec85..1ce23fec3 100644 --- a/deploy/k8s/archived/helm/webstatus/values.yaml +++ b/deploy/k8s/archived/helm/webstatus/values.yaml @@ -67,24 +67,16 @@ env: - name: HealthChecks-UI__HealthChecks__7__Uri key: internalurls__identity__hc - name: HealthChecks-UI__HealthChecks__8__Name - key: name__marketing__hc - - name: HealthChecks-UI__HealthChecks__8__Uri - key: internalurls__marketing__hc - - name: HealthChecks-UI__HealthChecks__9__Name - key: name__locations__hc - - name: HealthChecks-UI__HealthChecks__9__Uri - key: internalurls__locations__hc - - name: HealthChecks-UI__HealthChecks__10__Name key: name__payment__hc - - name: HealthChecks-UI__HealthChecks__10__Uri + - name: HealthChecks-UI__HealthChecks__8__Uri key: internalurls__payment__hc - - name: HealthChecks-UI__HealthChecks__11__Name + - name: HealthChecks-UI__HealthChecks__9__Name key: name__signalrhub__hc - - name: HealthChecks-UI__HealthChecks__11__Uri + - name: HealthChecks-UI__HealthChecks__9__Uri key: internalurls__signalrhub__hc - - name: HealthChecks-UI__HealthChecks__12__Name + - name: HealthChecks-UI__HealthChecks__10__Name key: name__orderingbackground__hc - - name: HealthChecks-UI__HealthChecks__12__Uri + - name: HealthChecks-UI__HealthChecks__10__Uri key: internalurls__orderingbackground__hc # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) diff --git a/deploy/k8s/helm/app.yaml b/deploy/k8s/helm/app.yaml index e83ea2823..acea31ef1 100644 --- a/deploy/k8s/helm/app.yaml +++ b/deploy/k8s/helm/app.yaml @@ -13,14 +13,10 @@ app: # app global settings spa: "" # ingress entry for web spa status: webstatus # ingress entry for web status webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw - webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator payment: payment-api # ingress entry for payment api - locations: locations-api # ingress entry for locations api - marketing: marketing-api # ingress entry for marketing api webhooks: webhooks-api # ingress entry for webhooks api webhooksweb: webhooks-web # ingress entry for webhooks web demo client svc: @@ -34,13 +30,9 @@ app: # app global settings spa: webspa # service name for web spa status: webstatus # service name for web status webshoppingapigw: webshoppingapigw # service name for web shopping Agw - webmarketingapigw: webmarketingapigw # service name for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw webshoppingagg: webshoppingagg # service name for web shopping aggregator mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator payment: payment-api # service name for payment api - locations: locations-api # service name for locations api - marketing: marketing-api # service name for marketing ap webhooks: webhooks-api # service name for webhooks api webhooksweb: webhooks-client # service name for webhooks web diff --git a/deploy/k8s/helm/deploy-all-mac.ps1 b/deploy/k8s/helm/deploy-all-mac.ps1 index c74b7e05e..3de7dc6c6 100644 --- a/deploy/k8s/helm/deploy-all-mac.ps1 +++ b/deploy/k8s/helm/deploy-all-mac.ps1 @@ -120,8 +120,8 @@ if (-not [string]::IsNullOrEmpty($registry)) { Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green $infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data") -$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") -$gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws") +$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") +$gateways = ("apigwms", "apigwws") if ($deployInfrastructure) { foreach ($infra in $infras) { diff --git a/deploy/k8s/helm/deploy-all.ps1 b/deploy/k8s/helm/deploy-all.ps1 index da0424195..213e60fb7 100644 --- a/deploy/k8s/helm/deploy-all.ps1 +++ b/deploy/k8s/helm/deploy-all.ps1 @@ -119,8 +119,8 @@ if (-not [string]::IsNullOrEmpty($registry)) { Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green $infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data") -$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") -$gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws") +$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") +$gateways = ("apigwms", "apigwws") if ($deployInfrastructure) { foreach ($infra in $infras) { diff --git a/deploy/k8s/helm/deploy-all.sh b/deploy/k8s/helm/deploy-all.sh index bf07105ef..4b4c8eafd 100644 --- a/deploy/k8s/helm/deploy-all.sh +++ b/deploy/k8s/helm/deploy-all.sh @@ -142,7 +142,7 @@ fi if [[ $push_images ]]; then echo "#################### Pushing images to the container registry ####################" - services=(basket.api catalog.api identity.api ordering.api marketing.api payment.api locations.api webmvc webspa webstatus) + services=(basket.api catalog.api identity.api ordering.api payment.api webmvc webspa webstatus) if [[ -z "$(docker image ls -q --filter=reference=eshop/$service:$image_tag)" ]]; then image_tag=linux-$image_tag @@ -209,7 +209,7 @@ fi echo "#################### Begin $app_name installation using Helm ####################" infras=(sql-data nosql-data rabbitmq keystore-data basket-data) -charts=(eshop-common apigwmm apigwms apigwwm apigwws basket-api catalog-api identity-api locations-api marketing-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web) +charts=(eshop-common apigwms apigwws basket-api catalog-api identity-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web) if [[ !$skip_infrastructure ]]; then for infra in "${infras[@]}" diff --git a/deploy/k8s/helm/identity-api/templates/configmap.yaml b/deploy/k8s/helm/identity-api/templates/configmap.yaml index 264ceb745..7c670f646 100644 --- a/deploy/k8s/helm/identity-api/templates/configmap.yaml +++ b/deploy/k8s/helm/identity-api/templates/configmap.yaml @@ -2,8 +2,6 @@ {{- $sqlsrv := include "sql-name" . -}} {{- $mvc_url := include "url-of" (list .Values.app.ingress.entries.mvc .) -}} {{- $spa_url := include "url-of" (list .Values.app.ingress.entries.spa .) -}} -{{- $locations_url := include "url-of" (list .Values.app.ingress.entries.locations .) -}} -{{- $marketing_url := include "url-of" (list .Values.app.ingress.entries.marketing .) -}} {{- $basket_url := include "url-of" (list .Values.app.ingress.entries.basket .) -}} {{- $ordering_url := include "url-of" (list .Values.app.ingress.entries.ordering .) -}} {{- $mobileshoppingagg := include "url-of" (list .Values.app.ingress.entries.mobileshoppingagg .) -}} @@ -27,8 +25,6 @@ data: all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" mvc_e: http://{{ $mvc_url }} spa_e: http://{{ $spa_url }} - locations_e: http://{{ $locations_url }} - marketing_e: http://{{ $marketing_url }} basket_e: http://{{ $basket_url }} ordering_e: http://{{ $ordering_url }} mobileshoppingagg_e: http://{{ $mobileshoppingagg }} diff --git a/deploy/k8s/helm/identity-api/values.yaml b/deploy/k8s/helm/identity-api/values.yaml index 7b57dfde1..92fd57283 100644 --- a/deploy/k8s/helm/identity-api/values.yaml +++ b/deploy/k8s/helm/identity-api/values.yaml @@ -40,10 +40,6 @@ env: key: mvc_e - name: SpaClient key: spa_e - - name: LocationApiClient - key: locations_e - - name: MarketingApiClient - key: marketing_e - name: BasketApiClient key: basket_e - name: OrderingApiClient diff --git a/deploy/k8s/helm/inf.yaml b/deploy/k8s/helm/inf.yaml index 938be3d45..e73b37ee8 100644 --- a/deploy/k8s/helm/inf.yaml +++ b/deploy/k8s/helm/inf.yaml @@ -19,16 +19,8 @@ inf: db: OrderingDb # Ordering API SQL db name identity: db: IdentityDb # Ordering API SQL db name - marketing: - db: MarketingDb # Marketing API SQL db name webhooks: db: WebhooksDb # Webhooks DB - mongo: -# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used - locations: - database: LocationsDb - marketing: - database: MarketingDb redis: # inf.redis defines the redis' connection strings basket: svc: basket-data # Name of k8s svc for basket redis diff --git a/deploy/k8s/helm/mobileshoppingagg/templates/NOTES.txt b/deploy/k8s/helm/mobileshoppingagg/templates/NOTES.txt index 61971f717..e7e5081ea 100644 --- a/deploy/k8s/helm/mobileshoppingagg/templates/NOTES.txt +++ b/deploy/k8s/helm/mobileshoppingagg/templates/NOTES.txt @@ -1,4 +1,4 @@ -eShop Mobile Marketing Aggregator is installed +eShop Mobile Shopping Aggregator is installed ---------------------------------------------- This API is not directly exposed outside cluster. If need to access it use: diff --git a/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml b/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml index 1ca69509f..6d3eeef4b 100644 --- a/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml +++ b/deploy/k8s/helm/mobileshoppingagg/templates/configmap.yaml @@ -21,9 +21,7 @@ data: internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc - internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc - internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" diff --git a/deploy/k8s/helm/mobileshoppingagg/values.yaml b/deploy/k8s/helm/mobileshoppingagg/values.yaml index 844a59441..fc7ce7a38 100644 --- a/deploy/k8s/helm/mobileshoppingagg/values.yaml +++ b/deploy/k8s/helm/mobileshoppingagg/values.yaml @@ -49,12 +49,8 @@ env: key: internalurls__identity__hc - name: OrderingUrlHC key: internalurls__ordering__hc - - name: MarketingUrlHC - key: internalurls__marketing__hc - name: PaymentUrlHC key: internalurls__payment__hc - - name: LocationUrlHC - key: internalurls__location__hc - name: urls__grpcBasket key: internalurls__grpcBasket - name: urls__grpcCatalog diff --git a/deploy/k8s/helm/webmvc/templates/configmap.yaml b/deploy/k8s/helm/webmvc/templates/configmap.yaml index 2aa06fc7f..89b9faae0 100644 --- a/deploy/k8s/helm/webmvc/templates/configmap.yaml +++ b/deploy/k8s/helm/webmvc/templates/configmap.yaml @@ -19,7 +19,6 @@ data: all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" webmvc__keystore: {{ .Values.inf.redis.keystore.constr }} internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }} - internalurls__apigwwm: http://{{ .Values.app.svc.webmarketingapigw }} internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }} urls__mvc: {{ $protocol }}://{{ $mvc }} diff --git a/deploy/k8s/helm/webmvc/values.yaml b/deploy/k8s/helm/webmvc/values.yaml index 973f187f5..5db29dd01 100644 --- a/deploy/k8s/helm/webmvc/values.yaml +++ b/deploy/k8s/helm/webmvc/values.yaml @@ -44,8 +44,6 @@ env: key: urls__mvc - name: IdentityUrl key: urls__IdentityUrl - - name: MarketingUrl - key: internalurls__apigwwm - name: IdentityUrlHC key: internalurls__identity__hc - name: SignalrHubUrl diff --git a/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml b/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml index d01de8dcd..b1b07ffee 100644 --- a/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml +++ b/deploy/k8s/helm/webshoppingagg/templates/configmap.yaml @@ -21,9 +21,7 @@ data: internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc - internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc - internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" diff --git a/deploy/k8s/helm/webshoppingagg/values.yaml b/deploy/k8s/helm/webshoppingagg/values.yaml index 15501c727..602dcf93a 100644 --- a/deploy/k8s/helm/webshoppingagg/values.yaml +++ b/deploy/k8s/helm/webshoppingagg/values.yaml @@ -49,12 +49,8 @@ env: key: internalurls__identity__hc - name: OrderingUrlHC key: internalurls__ordering__hc - - name: MarketingUrlHC - key: internalurls__marketing__hc - name: PaymentUrlHC key: internalurls__payment__hc - - name: LocationUrlHC - key: internalurls__location__hc - name: urls__grpcBasket key: internalurls__grpcBasket - name: urls__grpcCatalog diff --git a/deploy/k8s/helm/webspa/templates/configmap.yaml b/deploy/k8s/helm/webspa/templates/configmap.yaml index ecdbf8b63..353ff638f 100644 --- a/deploy/k8s/helm/webspa/templates/configmap.yaml +++ b/deploy/k8s/helm/webspa/templates/configmap.yaml @@ -1,7 +1,6 @@ {{- $name := include "webspa.fullname" . -}} {{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} {{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} -{{- $webmarketingapigw := include "url-of" (list .Values.app.ingress.entries.webmarketingapigw .) -}} {{- $spa := include "url-of" (list .Values.app.ingress.entries.spa .) -}} {{- $mongo := include "mongo-name" . -}} {{- $protocol := include "protocol" . -}} @@ -23,5 +22,4 @@ data: internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }} urls__spa: {{ $protocol }}://{{ $spa }} - urls__IdentityUrl: {{ $protocol }}://{{ $identity }} - urls__apigwwm: {{ $protocol }}://{{ $webmarketingapigw }} \ No newline at end of file + urls__IdentityUrl: {{ $protocol }}://{{ $identity }} \ No newline at end of file diff --git a/deploy/k8s/helm/webspa/values.yaml b/deploy/k8s/helm/webspa/values.yaml index e1547ed39..4a7eea52b 100644 --- a/deploy/k8s/helm/webspa/values.yaml +++ b/deploy/k8s/helm/webspa/values.yaml @@ -42,8 +42,6 @@ env: key: urls__spa - name: IdentityUrl key: urls__IdentityUrl - - name: MarketingUrl - key: urls__apigwwm - name: IdentityUrlHC key: internalurls__identity__hc - name: SignalrHubUrl diff --git a/deploy/k8s/helm/webstatus/templates/configmap.yaml b/deploy/k8s/helm/webstatus/templates/configmap.yaml index bf40d2a7d..b53864602 100644 --- a/deploy/k8s/helm/webstatus/templates/configmap.yaml +++ b/deploy/k8s/helm/webstatus/templates/configmap.yaml @@ -24,12 +24,8 @@ data: internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc name__apigwws__hc: Web Shopping API GW HTTP Check internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}:8001/ready - name__apigwwm__hc: Web Marketing API GW HTTP Check - internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}:8001/ready name__apigwms__hc: Mobile Shopping API GW HTTP Check internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}:8001/ready - name__apigwmm__hc: Mobile Marketing API GW HTTP Check - internalurls__apigwmm__hc: http://{{ .Values.app.svc.mobilemarketingapigw }}:8001/ready name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check @@ -44,10 +40,6 @@ data: internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc name__identity__hc: Identity HTTP Check internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc - name__marketing__hc: Marketing HTTP Check - internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc - name__locations__hc: Locations HTTP Check - internalurls__locations__hc: http://{{ .Values.app.svc.locations }}/hc name__payment__hc: Payment HTTP Check internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc name__signalrhub__hc: Ordering SignalR Hub HTTP Check diff --git a/deploy/k8s/helm/webstatus/values.yaml b/deploy/k8s/helm/webstatus/values.yaml index e5a23ec85..1ce23fec3 100644 --- a/deploy/k8s/helm/webstatus/values.yaml +++ b/deploy/k8s/helm/webstatus/values.yaml @@ -67,24 +67,16 @@ env: - name: HealthChecks-UI__HealthChecks__7__Uri key: internalurls__identity__hc - name: HealthChecks-UI__HealthChecks__8__Name - key: name__marketing__hc - - name: HealthChecks-UI__HealthChecks__8__Uri - key: internalurls__marketing__hc - - name: HealthChecks-UI__HealthChecks__9__Name - key: name__locations__hc - - name: HealthChecks-UI__HealthChecks__9__Uri - key: internalurls__locations__hc - - name: HealthChecks-UI__HealthChecks__10__Name key: name__payment__hc - - name: HealthChecks-UI__HealthChecks__10__Uri + - name: HealthChecks-UI__HealthChecks__8__Uri key: internalurls__payment__hc - - name: HealthChecks-UI__HealthChecks__11__Name + - name: HealthChecks-UI__HealthChecks__9__Name key: name__signalrhub__hc - - name: HealthChecks-UI__HealthChecks__11__Uri + - name: HealthChecks-UI__HealthChecks__9__Uri key: internalurls__signalrhub__hc - - name: HealthChecks-UI__HealthChecks__12__Name + - name: HealthChecks-UI__HealthChecks__10__Name key: name__orderingbackground__hc - - name: HealthChecks-UI__HealthChecks__12__Uri + - name: HealthChecks-UI__HealthChecks__10__Uri key: internalurls__orderingbackground__hc # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) diff --git a/obsolete/readme/README.ENV.md b/obsolete/readme/README.ENV.md index bdb436a1a..037a01ebc 100644 --- a/obsolete/readme/README.ENV.md +++ b/obsolete/readme/README.ENV.md @@ -16,39 +16,35 @@ To enable the service bus of Azure in eShop solution it is necessary having crea For example: >ESHOP_AZURE_SERVICE_BUS=Endpoint=sb://yourservicebusservice.servicebus.windows.net/;SharedAccessKeyName=Root;SharedAccessKey=yourtopicpolicykey=;EntityPath=eshop_event_bus -Once the service bus service is created, it is necessary to set to true the "AzureServiceBusEnabled" environment variable from `settings.json` file on Catalog.API, Ordering.API, Basket.API, Payment.API, GracePeriodManager, Marketing.API and Locations.API. +Once the service bus service is created, it is necessary to set to true the "AzureServiceBusEnabled" environment variable from `settings.json` file on Catalog.API, Ordering.API, Basket.API, Payment.API and GracePeriodManager. With the steps explained in the next section, you will be able to run the application with Azure Storage Account instead of the local container storage. # Azure Storage Account service -To enable Azure storage of Azure in eShopOnAzure solution it is necessary having created previously the storage service through ARM file or manually through Azure portal. You can use the ARM files find under **deploy/az/storage** folder already created in eShop. Once the storage account is created, it is very important to create a new container(blob kind) and upload the solution catalog pics files before to continue.Later, it is necessary to set to true the "AzureStorageEnabled" environment variable from `settings.json` in Catalog.API and Marketing.API.Finally, it is necessary to get the container endpoint url from information service in the Azure portal, This url must be declared on .env file located in the solution root folder with `ESHOP_AZURE_STORAGE_CATALOG` for the Catalog.API content and `ESHOP_AZURE_STORAGE_MARKETING` for the Marketing.API content. +To enable Azure storage of Azure in eShopOnAzure solution it is necessary having created previously the storage service through ARM file or manually through Azure portal. You can use the ARM files find under **deploy/az/storage** folder already created in eShop. Once the storage account is created, it is very important to create a new container(blob kind) and upload the solution catalog pics files before to continue.Later, it is necessary to set to true the "AzureStorageEnabled" environment variable from `settings.json` in Catalog.API.Finally, it is necessary to get the container endpoint url from information service in the Azure portal, This url must be declared on .env file located in the solution root folder with `ESHOP_AZURE_STORAGE_CATALOG` for the Catalog.API content. Do not forget to put a slash character '/' in the end of the url. For example: >ESHOP_AZURE_STORAGE_CATALOG=https://yourcatalogstorageaccountservice.blob.core.windows.net/yourcontainername/ ->ESHOP_AZURE_STORAGE_MARKETING=https://yourmarketingstorageaccountservice.blob.core.windows.net/yourcontainername/ ## Check status of Azure Storage Account with Health Checks -It is possible to add status check for the Azure Storage Account inside the Catalog Web Status. In case that the status check is enabled, for the Catalog and/or Marketing section in the WebStatus page, Azure Storage will be checked as one of the dependencies for theses APIs. To enable this check add the account name and key to the .env file for your account. +It is possible to add status check for the Azure Storage Account inside the Catalog Web Status. In case that the status check is enabled, for the Catalog section in the WebStatus page, Azure Storage will be checked as one of the dependencies for theses APIs. To enable this check add the account name and key to the .env file for your account. For example: >ESHOP_AZURE_STORAGE_CATALOG_NAME=storageaccountname >ESHOP_AZURE_STORAGE_CATALOG_KEY=storageaccountkey ->ESHOP_AZURE_STORAGE_MARKETING_NAME=storageaccountname ->ESHOP_AZURE_STORAGE_MARKETING_KEY=storageaccountkey With the steps explained in the next section, you will be able to run the application with Azure SQL Database instead of local storage. # Azure SQL Database -To enable Azure SQL Database in eShop is required to have a Azure SQL with the databases for Ordering.API, Identity.API, Catalaog.API and Marketing.API. You can use the [ARM files](deploy/az/sql/readme.md) already created in this project or do it manually. Once the databases are created, it is necessary to get the connection string for each service and set the corresponding variable in the .env file. +To enable Azure SQL Database in eShop is required to have a Azure SQL with the databases for Ordering.API, Identity.API, Catalaog.API. You can use the [ARM files](deploy/az/sql/readme.md) already created in this project or do it manually. Once the databases are created, it is necessary to get the connection string for each service and set the corresponding variable in the .env file. For example: >ESHOP_AZURE_CATALOG_DB=catalogazureconnectionstring >ESHOP_AZURE_IDENTITY_DB=identityazureconnectionstring >ESHOP_AZURE_ORDERING_DB=orderingazureconnectionstring ->ESHOP_AZURE_MARKETING_DB=marketingazureconnectionstring With the steps explained in the next section, you will be able to run the application with Azure Cosmos DB Database instead of local storage. @@ -61,7 +57,5 @@ For example: # Azure Functions To enable the Azure Functions in eShop you can add the URI where the functions have been deployed. You can use the ARM files under **deploy/az/azurefunctions** to create the resources in Azure. Once created and available, it is necessary to add to the .env file the `ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI` variable. -For example: - >ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI=https://marketing-functions.azurewebsites.net/api/MarketingDetailsHttpTrigger?code=AzureFunctioncode See Azure Functions deployment Files and Readme for more details [ARM files](deploy/az/azurefunctions/readme.md) \ No newline at end of file diff --git a/obsolete/readme/readme-docker-compose.md b/obsolete/readme/readme-docker-compose.md index 882630682..c9f48b52c 100644 --- a/obsolete/readme/readme-docker-compose.md +++ b/obsolete/readme/readme-docker-compose.md @@ -27,7 +27,6 @@ When using this file the following environments variables must be set: * `ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP` with the IP or DNS name of the docker host that runs the services (can use `localhost` if needed). * `ESHOP_AZURE_STORAGE_CATALOG` with the URL of the Azure Storage that will host the catalog images -* `ESHOP_AZURE_STORAGE_MARKETING` with the URL of the Azure Storage that will host the marketing campaign images You might wonder why an external image resource (storage) is needed when using `docker-compose.prod.yml` instead of `docker-compose.override.yml`. Answer to this is related to a limitation of Docker Compose file format. This is how we set the environment configuration of Catalog microservice in `docker-compose.override.yml`: diff --git a/src/.dockerignore b/src/.dockerignore index 2cec0e7b0..dc9d4af2c 100644 --- a/src/.dockerignore +++ b/src/.dockerignore @@ -20,5 +20,4 @@ Web/WebSPA/wwwroot/ packages/ test-results/ TestResults/ -Mobile/ -Services/Marketing/Infrastructure/ \ No newline at end of file +Mobile/ \ No newline at end of file diff --git a/src/.env b/src/.env index 96b801650..d65bdbbf6 100644 --- a/src/.env +++ b/src/.env @@ -7,21 +7,17 @@ # Use this values to run the app locally in Windows ESHOP_EXTERNAL_DNS_NAME_OR_IP=host.docker.internal ESHOP_STORAGE_CATALOG_URL=http://host.docker.internal:5202/c/api/v1/catalog/items/[0]/pic/ -ESHOP_STORAGE_MARKETING_URL=http://host.docker.internal:5110/api/v1/campaigns/[0]/pic/ # Use this values to run the app locally in Mac # ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.mac.localhost # ESHOP_STORAGE_CATALOG_URL=http://docker.for.mac.localhost:5202/c/api/v1/catalog/items/[0]/pic/ -# ESHOP_STORAGE_MARKETING_URL=http://docker.for.mac.localhost:5110/api/v1/campaigns/[0]/pic/ # Use this values to run the app locally in Linux # ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.linux.localhost # ESHOP_STORAGE_CATALOG_URL=http://docker.for.linux.localhost:5202/c/api/v1/catalog/items/[0]/pic/ -# ESHOP_STORAGE_MARKETING_URL=http://docker.for.linux.localhost:5110/api/v1/campaigns/[0]/pic/ # Configure this values to the cloud storage locations # ESHOP_STORAGE_CATALOG_URL= -# ESHOP_STORAGE_MARKETING_URL= ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.162 @@ -31,12 +27,9 @@ ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.162 #ESHOP_AZURE_CATALOG_DB= #ESHOP_AZURE_IDENTITY_DB= #ESHOP_AZURE_ORDERING_DB= -#ESHOP_AZURE_MARKETING_DB= #ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI= #ESHOP_AZURE_STORAGE_CATALOG_NAME= #ESHOP_AZURE_STORAGE_CATALOG_KEY= -#ESHOP_AZURE_STORAGE_MARKETING_NAME= -#ESHOP_AZURE_STORAGE_MARKETING_KEY= #ESHOP_SERVICE_BUS_USERNAME= #ESHOP_SERVICE_BUS_PASSWORD= #INSTRUMENTATION_KEY= diff --git a/src/DockerfileSolutionRestore.txt b/src/DockerfileSolutionRestore.txt index 006f664d87e72d6ca8af9e919471f54cbb415ce1..040bf761ec79bfb95f559c13baa31f518c2a399f 100644 GIT binary patch delta 40 tcmez4HpOlOkKp8cq9Kz7B&{aT5H*;5k4tItJFylpf0dZrW&?2_9soq74wC=? delta 520 zcmbPY_s4AmkD#p&Lq07Lne@w$Dq%EE>g^($Kc2iz~G4~H~FHZA;l(0Prk>c zq>OGW7I#b*("MvcClient")); clientUrls.Add("Spa", configuration.GetValue("SpaClient")); clientUrls.Add("Xamarin", configuration.GetValue("XamarinCallback")); - clientUrls.Add("LocationsApi", configuration.GetValue("LocationApiClient")); - clientUrls.Add("MarketingApi", configuration.GetValue("MarketingApiClient")); clientUrls.Add("BasketApi", configuration.GetValue("BasketApiClient")); clientUrls.Add("OrderingApi", configuration.GetValue("OrderingApiClient")); clientUrls.Add("MobileShoppingAgg", configuration.GetValue("MobileShoppingAggClient")); diff --git a/src/Services/Location/Locations.API/Controllers/HomeController.cs b/src/Services/Location/Locations.API/Controllers/HomeController.cs deleted file mode 100644 index 15cb07404..000000000 --- a/src/Services/Location/Locations.API/Controllers/HomeController.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -// For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 - -namespace Microsoft.eShopOnContainers.Services.Locations.API.Controllers -{ - public class HomeController : Controller - { - // GET: // - public IActionResult Index() - { - return new RedirectResult("~/swagger"); - } - } -} diff --git a/src/Services/Location/Locations.API/Controllers/LocationsController.cs b/src/Services/Location/Locations.API/Controllers/LocationsController.cs deleted file mode 100644 index a9cbae1c2..000000000 --- a/src/Services/Location/Locations.API/Controllers/LocationsController.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services; -using Microsoft.eShopOnContainers.Services.Locations.API.Model; -using Microsoft.eShopOnContainers.Services.Locations.API.ViewModel; -using System; -using System.Collections.Generic; -using System.Net; -using System.Threading.Tasks; - -namespace Locations.API.Controllers -{ - [Route("api/v1/[controller]")] - [Authorize] - [ApiController] - public class LocationsController : ControllerBase - { - private readonly ILocationsService _locationsService; - private readonly IIdentityService _identityService; - - public LocationsController(ILocationsService locationsService, IIdentityService identityService) - { - _locationsService = locationsService ?? throw new ArgumentNullException(nameof(locationsService)); - _identityService = identityService ?? throw new ArgumentNullException(nameof(identityService)); - } - - //GET api/v1/[controller]/user/1 - [Route("user/{userId:guid}")] - [HttpGet] - [ProducesResponseType(typeof(UserLocation), (int)HttpStatusCode.OK)] - public async Task> GetUserLocationAsync(Guid userId) - { - return await _locationsService.GetUserLocationAsync(userId.ToString()); - } - - //GET api/v1/[controller]/ - [Route("")] - [HttpGet] - [ProducesResponseType(typeof(List), (int)HttpStatusCode.OK)] - public async Task>> GetAllLocationsAsync() - { - return await _locationsService.GetAllLocationAsync(); - } - - //GET api/v1/[controller]/1 - [Route("{locationId}")] - [HttpGet] - [ProducesResponseType(typeof(Microsoft.eShopOnContainers.Services.Locations.API.Model.Locations), (int)HttpStatusCode.OK)] - public async Task> GetLocationAsync(int locationId) - { - return await _locationsService.GetLocationAsync(locationId); - } - - //POST api/v1/[controller]/ - [Route("")] - [HttpPost] - [ProducesResponseType((int)HttpStatusCode.OK)] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - public async Task CreateOrUpdateUserLocationAsync([FromBody]LocationRequest newLocReq) - { - var userId = _identityService.GetUserIdentity(); - var result = await _locationsService.AddOrUpdateUserLocationAsync(userId, newLocReq); - - if (!result) - { - return BadRequest(); - } - - return Ok(); - } - } -} diff --git a/src/Services/Location/Locations.API/Dockerfile b/src/Services/Location/Locations.API/Dockerfile deleted file mode 100644 index 0c5fabfe4..000000000 --- a/src/Services/Location/Locations.API/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base -WORKDIR /app -EXPOSE 80 - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build -WORKDIR /src - -# It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles -# to take advantage of Docker's build cache, to speed up local container builds -COPY "eShopOnContainers-ServicesAndWebApps.sln" "eShopOnContainers-ServicesAndWebApps.sln" - -COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj" "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj" -COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" -COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" -COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" -COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" -COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" -COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" -COPY "BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj" "BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj" -COPY "Services/Basket/Basket.API/Basket.API.csproj" "Services/Basket/Basket.API/Basket.API.csproj" -COPY "Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj" "Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj" -COPY "Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj" "Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj" -COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog.API/Catalog.API.csproj" -COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" -COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" -COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" -COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" -COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" -COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" -COPY "Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj" "Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj" -COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" -COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" -COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" -COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" -COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" -COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" -COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" -COPY "Web/WebMVC/WebMVC.csproj" "Web/WebMVC/WebMVC.csproj" -COPY "Web/WebSPA/WebSPA.csproj" "Web/WebSPA/WebSPA.csproj" -COPY "Web/WebStatus/WebStatus.csproj" "Web/WebStatus/WebStatus.csproj" - -COPY "docker-compose.dcproj" "docker-compose.dcproj" - -COPY "NuGet.config" "NuGet.config" - -RUN dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" - -COPY . . -WORKDIR /src/Services/Location/Locations.API -RUN dotnet publish --no-restore -c Release -o /app - -FROM build as functionaltest -WORKDIR /src/Services/Location/Locations.FunctionalTests - -FROM build AS publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app . -ENTRYPOINT ["dotnet", "Locations.API.dll"] diff --git a/src/Services/Location/Locations.API/Dockerfile.develop b/src/Services/Location/Locations.API/Dockerfile.develop deleted file mode 100644 index ab1f7bfb8..000000000 --- a/src/Services/Location/Locations.API/Dockerfile.develop +++ /dev/null @@ -1,17 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster -ARG BUILD_CONFIGURATION=Debug -ENV ASPNETCORE_ENVIRONMENT=Development -ENV DOTNET_USE_POLLING_FILE_WATCHER=true -EXPOSE 80 - -WORKDIR /src -COPY ["Services/Location/Locations.API/Locations.API.csproj", "Services/Location/Locations.API/"] -COPY ["BuildingBlocks/EventBus/EventBus/EventBus.csproj", "BuildingBlocks/EventBus/EventBus/"] -COPY ["BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "BuildingBlocks/EventBus/EventBusRabbitMQ/"] -COPY ["BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "BuildingBlocks/EventBus/EventBusServiceBus/"] -RUN dotnet restore Services/Location/Locations.API/Locations.API.csproj -nowarn:msb3202,nu1503 -COPY . . -WORKDIR "/src/Services/Location/Locations.API" -RUN dotnet build --no-restore -c $BUILD_CONFIGURATION - -ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] diff --git a/src/Services/Location/Locations.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs b/src/Services/Location/Locations.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs deleted file mode 100644 index 772129da9..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; - -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.ActionResults -{ - public class InternalServerErrorObjectResult : ObjectResult - { - public InternalServerErrorObjectResult(object error) - : base(error) - { - StatusCode = StatusCodes.Status500InternalServerError; - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Exceptions/LocationDomainException.cs b/src/Services/Location/Locations.API/Infrastructure/Exceptions/LocationDomainException.cs deleted file mode 100644 index 53016fcb2..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Exceptions/LocationDomainException.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Exceptions -{ - using System; - - /// - /// Exception type for app exceptions - /// - public class LocationDomainException : Exception - { - public LocationDomainException() - { } - - public LocationDomainException(string message) - : base(message) - { } - - public LocationDomainException(string message, Exception innerException) - : base(message, innerException) - { } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs b/src/Services/Location/Locations.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs deleted file mode 100644 index e2d4c9aed..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs +++ /dev/null @@ -1,37 +0,0 @@ - -using Microsoft.AspNetCore.Authorization; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Filters -{ - internal class AuthorizeCheckOperationFilter : IOperationFilter - { - public void Apply(OpenApiOperation operation, OperationFilterContext context) - { - // Check for authorize attribute - var hasAuthorize = context.MethodInfo.DeclaringType.GetCustomAttributes(true).OfType().Any() || - context.MethodInfo.GetCustomAttributes(true).OfType().Any(); - - if (!hasAuthorize) return; - - operation.Responses.TryAdd("401", new OpenApiResponse() { Description = "Unauthorized" }); - operation.Responses.TryAdd("403", new OpenApiResponse() { Description = "Forbidden" }); - - var oAuthScheme = new OpenApiSecurityScheme - { - Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "oauth2" } - }; - - operation.Security = new List - { - new OpenApiSecurityRequirement - { - [ oAuthScheme ] = new [] { "locationsapi" } - } - }; - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs b/src/Services/Location/Locations.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs deleted file mode 100644 index 12cffe878..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Filters -{ - using AspNetCore.Mvc; - using Microsoft.AspNetCore.Hosting; - using Microsoft.AspNetCore.Mvc.Filters; - using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.ActionResults; - using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Exceptions; - using Microsoft.Extensions.Hosting; - using Microsoft.Extensions.Logging; - using System.Net; - - public class HttpGlobalExceptionFilter : IExceptionFilter - { - private readonly IHostEnvironment env; - private readonly ILogger logger; - - public HttpGlobalExceptionFilter(IHostEnvironment env, ILogger logger) - { - this.env = env; - this.logger = logger; - } - - public void OnException(ExceptionContext context) - { - logger.LogError(new EventId(context.Exception.HResult), - context.Exception, - context.Exception.Message); - - if (context.Exception.GetType() == typeof(LocationDomainException)) - { - var json = new JsonErrorResponse - { - Messages = new[] { context.Exception.Message } - }; - - // Result asigned to a result object but in destiny the response is empty. This is a known bug of .net core 1.1 - //It will be fixed in .net core 1.1.2. See https://github.com/aspnet/Mvc/issues/5594 for more information - context.Result = new BadRequestObjectResult(json); - context.HttpContext.Response.StatusCode = (int)HttpStatusCode.BadRequest; - } - else - { - var json = new JsonErrorResponse - { - Messages = new[] { "An error occur.Try it again." } - }; - - if (env.IsDevelopment()) - { - json.DeveloperMessage = context.Exception; - } - - // Result asigned to a result object but in destiny the response is empty. This is a known bug of .net core 1.1 - // It will be fixed in .net core 1.1.2. See https://github.com/aspnet/Mvc/issues/5594 for more information - context.Result = new InternalServerErrorObjectResult(json); - context.HttpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError; - } - context.ExceptionHandled = true; - } - - private class JsonErrorResponse - { - public string[] Messages { get; set; } - - public object DeveloperMessage { get; set; } - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/LocationsContext.cs b/src/Services/Location/Locations.API/Infrastructure/LocationsContext.cs deleted file mode 100644 index 4289ffe68..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/LocationsContext.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure -{ - using Microsoft.eShopOnContainers.Services.Locations.API.Model; - using Microsoft.Extensions.Options; - using MongoDB.Driver; - - public class LocationsContext - { - private readonly IMongoDatabase _database = null; - - public LocationsContext(IOptions settings) - { - var client = new MongoClient(settings.Value.ConnectionString); - if (client != null) - _database = client.GetDatabase(settings.Value.Database); - } - - public IMongoCollection UserLocation - { - get - { - return _database.GetCollection("UserLocation"); - } - } - - public IMongoCollection Locations - { - get - { - return _database.GetCollection("Locations"); - } - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/LocationsContextSeed.cs b/src/Services/Location/Locations.API/Infrastructure/LocationsContextSeed.cs deleted file mode 100644 index 91d00a4f3..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/LocationsContextSeed.cs +++ /dev/null @@ -1,354 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure -{ - using Microsoft.AspNetCore.Builder; - using Microsoft.eShopOnContainers.Services.Locations.API.Model; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Options; - using MongoDB.Driver; - using MongoDB.Driver.GeoJsonObjectModel; - using System.Collections.Generic; - using System.Threading.Tasks; - - public class LocationsContextSeed - { - private static LocationsContext ctx; - public static async Task SeedAsync(IApplicationBuilder applicationBuilder, ILoggerFactory loggerFactory) - { - var config = applicationBuilder - .ApplicationServices.GetRequiredService>(); - - ctx = new LocationsContext(config); - - if (!ctx.Locations.Database.GetCollection(nameof(Locations)).AsQueryable().Any()) - { - await SetIndexes(); - await SetNorthAmerica(); - await SetSouthAmerica(); - await SetAfrica(); - await SetEurope(); - await SetAsia(); - await SetAustralia(); - await SetBarcelonaLocations(); - } - } - - static async Task SetNorthAmerica() - { - var us = new Locations() - { - Code = "NA", - Description = "North America", - LocationId = 1 - }; - us.SetLocation(-103.219329, 48.803281); - us.SetArea(GetNorthAmericaPoligon()); - await ctx.Locations.InsertOneAsync(us); - await SetUSLocations(us.Id); - } - - static async Task SetUSLocations(string parentId) - { - var us = new Locations() - { - Parent_Id = parentId, - Code = "US", - Description = "United States", - LocationId = 2 - }; - us.SetLocation(-101.357386, 41.650455); - us.SetArea(GetUSPoligon()); - await ctx.Locations.InsertOneAsync(us); - await SetWashingtonLocations(us.Id); - } - - static async Task SetWashingtonLocations(string parentId) - { - var wht = new Locations() - { - Parent_Id = parentId, - Code = "WHT", - Description = "Washington", - LocationId = 3 - }; - wht.SetLocation(-119.542781, 47.223652); - wht.SetArea(GetWashingtonPoligon()); - await ctx.Locations.InsertOneAsync(wht); - await SetSeattleLocations(wht.Id); - await SetRedmondLocations(wht.Id); - } - - static async Task SetSeattleLocations(string parentId) - { - var stl = new Locations() - { - Parent_Id = parentId, - Code = "SEAT", - Description = "Seattle", - LocationId = 4 - }; - stl.SetArea(GetSeattlePoligon()); - stl.SetLocation(-122.330747, 47.603111); - await ctx.Locations.InsertOneAsync(stl); - } - - static async Task SetRedmondLocations(string parentId) - { - var rdm = new Locations() - { - Parent_Id = parentId, - Code = "REDM", - Description = "Redmond", - LocationId = 5 - }; - rdm.SetLocation(-122.122887, 47.674961); - rdm.SetArea(GetRedmondPoligon()); - await ctx.Locations.InsertOneAsync(rdm); - } - - static async Task SetBarcelonaLocations() - { - var bcn = new Locations() - { - Code = "BCN", - Description = "Barcelona", - LocationId = 6 - }; - bcn.SetLocation(2.156453, 41.395226); - bcn.SetArea(GetBarcelonaPoligon()); - await ctx.Locations.InsertOneAsync(bcn); - } - - static async Task SetSouthAmerica() - { - var sa = new Locations() - { - Code = "SA", - Description = "South America", - LocationId = 7 - }; - sa.SetLocation(-60.328704, -16.809748); - sa.SetArea(GetSouthAmericaPoligon()); - await ctx.Locations.InsertOneAsync(sa); - } - - static async Task SetAfrica() - { - var afc = new Locations() - { - Code = "AFC", - Description = "Africa", - LocationId = 8 - }; - afc.SetLocation(19.475383, 13.063667); - afc.SetArea(GetAfricaPoligon()); - await ctx.Locations.InsertOneAsync(afc); - } - - static async Task SetEurope() - { - var eu = new Locations() - { - Code = "EU", - Description = "Europe", - LocationId = 9 - }; - eu.SetLocation(13.147258, 49.947844); - eu.SetArea(GetEuropePoligon()); - await ctx.Locations.InsertOneAsync(eu); - } - - static async Task SetAsia() - { - var asa = new Locations() - { - Code = "AS", - Description = "Asia", - LocationId = 10 - }; - asa.SetLocation(97.522257, 56.069107); - asa.SetArea(GetAsiaPoligon()); - await ctx.Locations.InsertOneAsync(asa); - } - - static async Task SetAustralia() - { - var aus = new Locations() - { - Code = "AUS", - Description = "Australia", - LocationId = 11 - }; - aus.SetLocation(133.733195, -25.010726); - aus.SetArea(GetAustraliaPoligon()); - await ctx.Locations.InsertOneAsync(aus); - } - - static async Task SetIndexes() - { - // Set location indexes - var builder = Builders.IndexKeys; - var keys = builder.Geo2DSphere(prop => prop.Location); - await ctx.Locations.Indexes.CreateOneAsync(keys); - } - - static List GetNorthAmericaPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-168.07786, 68.80277), - new GeoJson2DGeographicCoordinates(-119.60378, 32.7561), - new GeoJson2DGeographicCoordinates(-116.01966, 28.94642), - new GeoJson2DGeographicCoordinates(-98.52265, 14.49378), - new GeoJson2DGeographicCoordinates(-71.18188, 34.96278), - new GeoJson2DGeographicCoordinates(-51.97606, 48.24377), - new GeoJson2DGeographicCoordinates(-75.39806, 72.93141), - new GeoJson2DGeographicCoordinates(-168.07786, 68.80277) - }; - } - - static List GetSouthAmericaPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-91.43724, 13.29007), - new GeoJson2DGeographicCoordinates(-87.96315, -27.15081), - new GeoJson2DGeographicCoordinates(-78.75404, -50.71852), - new GeoJson2DGeographicCoordinates(-59.14765, -58.50773), - new GeoJson2DGeographicCoordinates(-50.08813, -42.22419), - new GeoJson2DGeographicCoordinates(-37.21044, -22.56725), - new GeoJson2DGeographicCoordinates(-36.61675, -0.38594), - new GeoJson2DGeographicCoordinates(-44.46056, -16.6746), - new GeoJson2DGeographicCoordinates(-91.43724, 13.29007), - }; - } - - static List GetAfricaPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-12.68724, 34.05892), - new GeoJson2DGeographicCoordinates(-18.33301, 20.77313), - new GeoJson2DGeographicCoordinates(-14.13503, 6.21292), - new GeoJson2DGeographicCoordinates(1.40221, -14.23693), - new GeoJson2DGeographicCoordinates(22.41485, -35.55408), - new GeoJson2DGeographicCoordinates(51.86499, -25.39831), - new GeoJson2DGeographicCoordinates(53.49269, 4.59405), - new GeoJson2DGeographicCoordinates(35.102, 26.14685), - new GeoJson2DGeographicCoordinates(21.63319, 33.75767), - new GeoJson2DGeographicCoordinates(6.58235, 37.05665), - new GeoJson2DGeographicCoordinates(-12.68724, 34.05892), - }; - } - - static List GetEuropePoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-11.73143, 35.27646), - new GeoJson2DGeographicCoordinates(-10.84462, 35.25123), - new GeoJson2DGeographicCoordinates(-10.09927, 35.26833), - new GeoJson2DGeographicCoordinates(49.00838, 36.56984), - new GeoJson2DGeographicCoordinates(36.63837, 71.69807), - new GeoJson2DGeographicCoordinates(-10.88788, 61.13851), - new GeoJson2DGeographicCoordinates(-11.73143, 35.27646), - }; - } - - static List GetAsiaPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(31.1592, 45.91629), - new GeoJson2DGeographicCoordinates(32.046, 45.89479), - new GeoJson2DGeographicCoordinates(62.32261, -4.45013), - new GeoJson2DGeographicCoordinates(154.47713, 35.14525), - new GeoJson2DGeographicCoordinates(-166.70788, 68.62211), - new GeoJson2DGeographicCoordinates(70.38837, 75.89335), - new GeoJson2DGeographicCoordinates(32.00274, 67.23428), - new GeoJson2DGeographicCoordinates(31.1592, 45.91629), - }; - } - - static List GetAustraliaPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(100.76857, -45.74117), - new GeoJson2DGeographicCoordinates(101.65538, -45.76273), - new GeoJson2DGeographicCoordinates(167.08823, -50.66317), - new GeoJson2DGeographicCoordinates(174.16463, -34.62579), - new GeoJson2DGeographicCoordinates(160.94837, -5.01004), - new GeoJson2DGeographicCoordinates(139.29462, -7.86376), - new GeoJson2DGeographicCoordinates(101.61212, -11.44654), - new GeoJson2DGeographicCoordinates(100.76857, -45.74117), - }; - } - - static List GetUSPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-62.88205, 48.7985), - new GeoJson2DGeographicCoordinates(-129.3132, 48.76513), - new GeoJson2DGeographicCoordinates(-120.9496, 30.12256), - new GeoJson2DGeographicCoordinates(-111.3944, 30.87114), - new GeoJson2DGeographicCoordinates(-78.11975, 24.24979), - new GeoJson2DGeographicCoordinates(-62.88205, 48.7985) - }; - } - - static List GetSeattlePoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-122.36238,47.82929), - new GeoJson2DGeographicCoordinates(-122.42091,47.6337), - new GeoJson2DGeographicCoordinates(-122.37371,47.45224), - new GeoJson2DGeographicCoordinates(-122.20788,47.50259), - new GeoJson2DGeographicCoordinates(-122.26934,47.73644), - new GeoJson2DGeographicCoordinates(-122.36238,47.82929) - }; - } - - static List GetRedmondPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-122.15432, 47.73148), - new GeoJson2DGeographicCoordinates(-122.17673, 47.72559), - new GeoJson2DGeographicCoordinates(-122.16904, 47.67851), - new GeoJson2DGeographicCoordinates(-122.16136, 47.65036), - new GeoJson2DGeographicCoordinates(-122.15604, 47.62746), - new GeoJson2DGeographicCoordinates(-122.01562, 47.63463), - new GeoJson2DGeographicCoordinates(-122.04961, 47.74244), - new GeoJson2DGeographicCoordinates(-122.15432, 47.73148) - }; - } - - static List GetWashingtonPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(-124.68633, 48.8943), - new GeoJson2DGeographicCoordinates(-124.32962, 45.66613), - new GeoJson2DGeographicCoordinates(-116.73824, 45.93384), - new GeoJson2DGeographicCoordinates(-116.96912, 49.04282), - new GeoJson2DGeographicCoordinates(-124.68633, 48.8943) - }; - } - - static List GetBarcelonaPoligon() - { - return new List() - { - new GeoJson2DGeographicCoordinates(2.033879, 41.383858), - new GeoJson2DGeographicCoordinates(2.113741, 41.419068), - new GeoJson2DGeographicCoordinates(2.188778, 41.451153), - new GeoJson2DGeographicCoordinates(2.235266, 41.418033), - new GeoJson2DGeographicCoordinates(2.137101, 41.299536), - new GeoJson2DGeographicCoordinates(2.033879, 41.383858) - }; - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs deleted file mode 100644 index e6b43d109..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ /dev/null @@ -1,79 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Primitives; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Middlewares -{ - class ByPassAuthMiddleware - { - private readonly RequestDelegate _next; - private string _currentUserId; - public ByPassAuthMiddleware(RequestDelegate next) - { - _next = next; - _currentUserId = null; - } - - - public async Task Invoke(HttpContext context) - { - var path = context.Request.Path; - if (path == "/noauth") - { - var userid = context.Request.Query["userid"]; - if (!string.IsNullOrEmpty(userid)) - { - _currentUserId = userid; - } - context.Response.StatusCode = 200; - context.Response.ContentType = "text/string"; - await context.Response.WriteAsync($"User set to {_currentUserId}"); - } - - else if (path == "/noauth/reset") - { - _currentUserId = null; - context.Response.StatusCode = 200; - context.Response.ContentType = "text/string"; - await context.Response.WriteAsync($"User set to none. Token required for protected endpoints."); - } - else - { - var currentUserId = _currentUserId; - - var authHeader = context.Request.Headers["Authorization"]; - if (authHeader != StringValues.Empty) - { - var header = authHeader.FirstOrDefault(); - if (!string.IsNullOrEmpty(header) && header.StartsWith("Email ") && header.Length > "Email ".Length) - { - currentUserId = header.Substring("Email ".Length); - } - } - - - if (!string.IsNullOrEmpty(currentUserId)) - { - var user = new ClaimsIdentity(new[] { - new Claim("emails", currentUserId), - new Claim("name", "Test user"), - new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), - new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("sub", currentUserId), - new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), - new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} - , "ByPassAuth"); - - context.User = new ClaimsPrincipal(user); - } - - await _next.Invoke(context); - } - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Repositories/ILocationsRepository.cs b/src/Services/Location/Locations.API/Infrastructure/Repositories/ILocationsRepository.cs deleted file mode 100644 index cd50fa987..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Repositories/ILocationsRepository.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Repositories -{ - using Microsoft.eShopOnContainers.Services.Locations.API.Model; - using System.Collections.Generic; - using System.Threading.Tasks; - using ViewModel; - - public interface ILocationsRepository - { - Task GetAsync(int locationId); - - Task> GetLocationListAsync(); - - Task GetUserLocationAsync(string userId); - - Task> GetCurrentUserRegionsListAsync(LocationRequest currentPosition); - - Task AddUserLocationAsync(UserLocation location); - - Task UpdateUserLocationAsync(UserLocation userLocation); - - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs b/src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs deleted file mode 100644 index 9f8d42ad4..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs +++ /dev/null @@ -1,65 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Repositories -{ - using Microsoft.eShopOnContainers.Services.Locations.API.Model; - using Microsoft.Extensions.Options; - using MongoDB.Bson; - using MongoDB.Driver; - using MongoDB.Driver.GeoJsonObjectModel; - using System.Collections.Generic; - using System.Threading.Tasks; - using ViewModel; - - public class LocationsRepository - : ILocationsRepository - { - private readonly LocationsContext _context; - - public LocationsRepository(IOptions settings) - { - _context = new LocationsContext(settings); - } - - public async Task GetAsync(int locationId) - { - var filter = Builders.Filter.Eq("LocationId", locationId); - return await _context.Locations - .Find(filter) - .FirstOrDefaultAsync(); - } - - public async Task GetUserLocationAsync(string userId) - { - var filter = Builders.Filter.Eq("UserId", userId); - return await _context.UserLocation - .Find(filter) - .FirstOrDefaultAsync(); - } - - public async Task> GetLocationListAsync() - { - return await _context.Locations.Find(new BsonDocument()).ToListAsync(); - } - - public async Task> GetCurrentUserRegionsListAsync(LocationRequest currentPosition) - { - var point = GeoJson.Point(GeoJson.Geographic(currentPosition.Longitude, currentPosition.Latitude)); - var orderByDistanceQuery = new FilterDefinitionBuilder().Near(x => x.Location, point); - var withinAreaQuery = new FilterDefinitionBuilder().GeoIntersects("Polygon", point); - var filter = Builders.Filter.And(orderByDistanceQuery, withinAreaQuery); - return await _context.Locations.Find(filter).ToListAsync(); - } - - public async Task AddUserLocationAsync(UserLocation location) - { - await _context.UserLocation.InsertOneAsync(location); - } - - public async Task UpdateUserLocationAsync(UserLocation userLocation) - { - await _context.UserLocation.ReplaceOneAsync( - doc => doc.UserId == userLocation.UserId, - userLocation, - new UpdateOptions { IsUpsert = true }); - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs b/src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs deleted file mode 100644 index a2b79d8d1..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services -{ - public interface IIdentityService - { - string GetUserIdentity(); - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Services/ILocationsService.cs b/src/Services/Location/Locations.API/Infrastructure/Services/ILocationsService.cs deleted file mode 100644 index 11459492a..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Services/ILocationsService.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services -{ - using Microsoft.eShopOnContainers.Services.Locations.API.Model; - using Microsoft.eShopOnContainers.Services.Locations.API.ViewModel; - using System.Collections.Generic; - using System.Threading.Tasks; - - public interface ILocationsService - { - Task GetLocationAsync(int locationId); - - Task GetUserLocationAsync(string id); - - Task> GetAllLocationAsync(); - - Task AddOrUpdateUserLocationAsync(string userId, LocationRequest locRequest); - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs b/src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs deleted file mode 100644 index d06b44a4f..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Microsoft.AspNetCore.Http; -using System; - -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services -{ - public class IdentityService : IIdentityService - { - private readonly IHttpContextAccessor _context; - - public IdentityService(IHttpContextAccessor context) - { - _context = context ?? throw new ArgumentNullException(nameof(context)); - } - - public string GetUserIdentity() - { - return _context.HttpContext.User.FindFirst("sub").Value; - } - } -} diff --git a/src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs b/src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs deleted file mode 100644 index f6b9ed708..000000000 --- a/src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs +++ /dev/null @@ -1,97 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services -{ - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; - using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Exceptions; - using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Repositories; - using Microsoft.eShopOnContainers.Services.Locations.API.IntegrationEvents.Events; - using Microsoft.eShopOnContainers.Services.Locations.API.Model; - using Microsoft.eShopOnContainers.Services.Locations.API.ViewModel; - using Microsoft.Extensions.Logging; - using System; - using System.Collections.Generic; - using System.Threading.Tasks; - - public class LocationsService : ILocationsService - { - private readonly ILocationsRepository _locationsRepository; - private readonly IEventBus _eventBus; - private readonly ILogger _logger; - - public LocationsService( - ILocationsRepository locationsRepository, - IEventBus eventBus, - ILogger logger) - { - _locationsRepository = locationsRepository ?? throw new ArgumentNullException(nameof(locationsRepository)); - _eventBus = eventBus ?? throw new ArgumentNullException(nameof(eventBus)); - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - } - - public async Task GetLocationAsync(int locationId) - { - return await _locationsRepository.GetAsync(locationId); - } - - public async Task GetUserLocationAsync(string userId) - { - return await _locationsRepository.GetUserLocationAsync(userId); - } - - public async Task> GetAllLocationAsync() - { - return await _locationsRepository.GetLocationListAsync(); - } - - public async Task AddOrUpdateUserLocationAsync(string userId, LocationRequest currentPosition) - { - // Get the list of ordered regions the user currently is within - var currentUserAreaLocationList = await _locationsRepository.GetCurrentUserRegionsListAsync(currentPosition); - - if (currentUserAreaLocationList is null) - { - throw new LocationDomainException("User current area not found"); - } - - // If current area found, then update user location - var locationAncestors = new List(); - var userLocation = await _locationsRepository.GetUserLocationAsync(userId); - userLocation = userLocation ?? new UserLocation(); - userLocation.UserId = userId; - userLocation.LocationId = currentUserAreaLocationList[0].LocationId; - userLocation.UpdateDate = DateTime.UtcNow; - await _locationsRepository.UpdateUserLocationAsync(userLocation); - - // Publish integration event to update marketing read data model - // with the new locations updated - PublishNewUserLocationPositionIntegrationEvent(userId, currentUserAreaLocationList); - - return true; - } - - private void PublishNewUserLocationPositionIntegrationEvent(string userId, List newLocations) - { - var newUserLocations = MapUserLocationDetails(newLocations); - var @event = new UserLocationUpdatedIntegrationEvent(userId, newUserLocations); - - _logger.LogInformation("----- Publishing integration event: {IntegrationEventId} from {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event); - - _eventBus.Publish(@event); - } - - private List MapUserLocationDetails(List newLocations) - { - var result = new List(); - newLocations.ForEach(location => - { - result.Add(new UserLocationDetails() - { - LocationId = location.LocationId, - Code = location.Code, - Description = location.Description - }); - }); - - return result; - } - } -} diff --git a/src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs b/src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs deleted file mode 100644 index 7c3e72769..000000000 --- a/src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.IntegrationEvents.Events -{ - using Locations.API.Model; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; - using System.Collections.Generic; - - public class UserLocationUpdatedIntegrationEvent : IntegrationEvent - { - public string UserId { get; set; } - public List LocationList { get; set; } - - public UserLocationUpdatedIntegrationEvent(string userId, List locationList) - { - UserId = userId; - LocationList = locationList; - } - } -} diff --git a/src/Services/Location/Locations.API/LocationSettings.cs b/src/Services/Location/Locations.API/LocationSettings.cs deleted file mode 100644 index b3972239c..000000000 --- a/src/Services/Location/Locations.API/LocationSettings.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Locations.API -{ - public class LocationSettings - { - public string ExternalCatalogBaseUrl { get; set; } - public string EventBusConnection { get; set; } - public string ConnectionString { get; set; } - public string Database { get; set; } - } -} diff --git a/src/Services/Location/Locations.API/Locations.API.csproj b/src/Services/Location/Locations.API/Locations.API.csproj deleted file mode 100644 index d4899becb..000000000 --- a/src/Services/Location/Locations.API/Locations.API.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - netcoreapp3.1 - ..\..\..\..\docker-compose.dcproj - aspnet-Locations.API-20161122013619 - false - true - preview - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Services/Location/Locations.API/Model/Core/LocationPoint.cs b/src/Services/Location/Locations.API/Model/Core/LocationPoint.cs deleted file mode 100644 index 48b6e32a7..000000000 --- a/src/Services/Location/Locations.API/Model/Core/LocationPoint.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Locations.API.Model.Core -{ - public class LocationPoint - { - public LocationPoint() - { - } - - public LocationPoint(double longitude, double latitude) - { - this.coordinates.Add(longitude); - this.coordinates.Add(latitude); - } - - public string type { get; private set; } = "Point"; - - public List coordinates { get; private set; } = new List(); - } -} diff --git a/src/Services/Location/Locations.API/Model/Core/LocationPolygon.cs b/src/Services/Location/Locations.API/Model/Core/LocationPolygon.cs deleted file mode 100644 index 18380cc79..000000000 --- a/src/Services/Location/Locations.API/Model/Core/LocationPolygon.cs +++ /dev/null @@ -1,25 +0,0 @@ -using MongoDB.Driver.GeoJsonObjectModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Locations.API.Model.Core -{ - public class LocationPolygon - { - public LocationPolygon() - { - } - - public LocationPolygon(List coordinatesList) - { - var coordinatesMapped = coordinatesList.Select(x => new List() { x.Longitude, x.Latitude }).ToList(); - this.coordinates.Add(coordinatesMapped); - } - - public string type { get; private set; } = "Polygon"; - - public List>> coordinates { get; private set; } = new List>>(); - } -} diff --git a/src/Services/Location/Locations.API/Model/Locations.cs b/src/Services/Location/Locations.API/Model/Locations.cs deleted file mode 100644 index ba3dbe62c..000000000 --- a/src/Services/Location/Locations.API/Model/Locations.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Model -{ - using global::Locations.API.Model.Core; - using MongoDB.Bson; - using MongoDB.Bson.Serialization.Attributes; - using MongoDB.Driver.GeoJsonObjectModel; - using System.Collections.Generic; - - public class Locations - { - [BsonId] - [BsonRepresentation(BsonType.ObjectId)] - public string Id { get; set; } - public int LocationId { get; set; } - public string Code { get; set; } - [BsonRepresentation(BsonType.ObjectId)] - public string Parent_Id { get; set; } - public string Description { get; set; } - public double Latitude { get; set; } - public double Longitude { get; set; } - public LocationPoint Location { get; private set; } - public LocationPolygon Polygon { get; private set; } - - // Temporal commented in previewVersion7 of netcore and 2.9.0-beta2 of Mongo packages, review in next versions - // public GeoJsonPoint Location { get; private set; } - // public GeoJsonPolygon Polygon { get; private set; } - public void SetLocation(double lon, double lat) => SetPosition(lon, lat); - public void SetArea(List coordinatesList) => SetPolygon(coordinatesList); - - private void SetPosition(double lon, double lat) - { - Latitude = lat; - Longitude = lon; - Location = new LocationPoint(lon, lat); - } - - private void SetPolygon(List coordinatesList) - { - Polygon = new LocationPolygon(coordinatesList); - } - } -} diff --git a/src/Services/Location/Locations.API/Model/UserLocation.cs b/src/Services/Location/Locations.API/Model/UserLocation.cs deleted file mode 100644 index 4686bd006..000000000 --- a/src/Services/Location/Locations.API/Model/UserLocation.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Model -{ - using MongoDB.Bson; - using MongoDB.Bson.Serialization.Attributes; - using System; - - public class UserLocation - { - [BsonIgnoreIfDefault] - [BsonRepresentation(BsonType.ObjectId)] - public string Id { get; set; } - public string UserId { get; set; } - public int LocationId { get; set; } - public DateTime UpdateDate { get; set; } - } -} diff --git a/src/Services/Location/Locations.API/Model/UserLocationDetails.cs b/src/Services/Location/Locations.API/Model/UserLocationDetails.cs deleted file mode 100644 index 7983e8e59..000000000 --- a/src/Services/Location/Locations.API/Model/UserLocationDetails.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.Model -{ - public class UserLocationDetails - { - public int LocationId { get; set; } - public string Code { get; set; } - public string Description { get; set; } - } -} \ No newline at end of file diff --git a/src/Services/Location/Locations.API/Program.cs b/src/Services/Location/Locations.API/Program.cs deleted file mode 100644 index f9e21a8a4..000000000 --- a/src/Services/Location/Locations.API/Program.cs +++ /dev/null @@ -1,88 +0,0 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using Serilog; -using System; -using System.IO; - -namespace Microsoft.eShopOnContainers.Services.Locations.API -{ - public class Program - { - public static readonly string Namespace = typeof(Program).Namespace; - public static readonly string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1); - - public static int Main(string[] args) - { - var configuration = GetConfiguration(); - - Log.Logger = CreateSerilogLogger(configuration); - - try - { - Log.Information("Configuring web host ({ApplicationContext})...", AppName); - var host = BuildWebHost(configuration, args); - - Log.Information("Starting web host ({ApplicationContext})...", AppName); - host.Run(); - - return 0; - } - catch (Exception ex) - { - Log.Fatal(ex, "Program terminated unexpectedly ({ApplicationContext})!", AppName); - return 1; - } - finally - { - Log.CloseAndFlush(); - } - } - - private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) => - WebHost.CreateDefaultBuilder(args) - .CaptureStartupErrors(false) - .ConfigureAppConfiguration(x => x.AddConfiguration(configuration)) - .UseStartup() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseSerilog() - .Build(); - - private static Serilog.ILogger CreateSerilogLogger(IConfiguration configuration) - { - var seqServerUrl = configuration["Serilog:SeqServerUrl"]; - var logstashUrl = configuration["Serilog:LogstashgUrl"]; - return new LoggerConfiguration() - .MinimumLevel.Verbose() - .Enrich.WithProperty("ApplicationContext", AppName) - .Enrich.FromLogContext() - .WriteTo.Console() - .WriteTo.Seq(string.IsNullOrWhiteSpace(seqServerUrl) ? "http://seq" : seqServerUrl) - .WriteTo.Http(string.IsNullOrWhiteSpace(logstashUrl) ? "http://logstash:8080" : logstashUrl) - .ReadFrom.Configuration(configuration) - .CreateLogger(); - } - - private static IConfiguration GetConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) - .AddEnvironmentVariables(); - - var config = builder.Build(); - - if (config.GetValue("UseVault", false)) - { - builder.AddAzureKeyVault( - $"https://{config["Vault:Name"]}.vault.azure.net/", - config["Vault:ClientId"], - config["Vault:ClientSecret"]); - } - - return builder.Build(); - } - } -} \ No newline at end of file diff --git a/src/Services/Location/Locations.API/Properties/launchSettings.json b/src/Services/Location/Locations.API/Properties/launchSettings.json deleted file mode 100644 index 1c86a33b1..000000000 --- a/src/Services/Location/Locations.API/Properties/launchSettings.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:54020/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "api/values", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Locations.API": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "api/values", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:3279" - } - } -} \ No newline at end of file diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs deleted file mode 100644 index ca6a57e6e..000000000 --- a/src/Services/Location/Locations.API/Startup.cs +++ /dev/null @@ -1,312 +0,0 @@ -using Autofac; -using Autofac.Extensions.DependencyInjection; -using HealthChecks.UI.Client; -using Locations.API.Controllers; -using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Diagnostics.HealthChecks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; -using Microsoft.Azure.ServiceBus; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; -using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure; -using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Filters; -using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Middlewares; -using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Repositories; -using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Diagnostics.HealthChecks; -using Microsoft.Extensions.Logging; -using Microsoft.OpenApi.Models; -using RabbitMQ.Client; -using System; -using System.Collections.Generic; -using System.IdentityModel.Tokens.Jwt; - -namespace Microsoft.eShopOnContainers.Services.Locations.API -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - public virtual IServiceProvider ConfigureServices(IServiceCollection services) - { - RegisterAppInsights(services); - - services.AddCustomHealthCheck(Configuration); - - services.AddControllers(options => - { - options.Filters.Add(typeof(HttpGlobalExceptionFilter)); - }) - // Added for functional tests - .AddApplicationPart(typeof(LocationsController).Assembly) - .AddNewtonsoftJson(); - - ConfigureAuthService(services); - - services.Configure(Configuration); - - if (Configuration.GetValue("AzureServiceBusEnabled")) - { - services.AddSingleton(sp => - { - var logger = sp.GetRequiredService>(); - - var serviceBusConnectionString = Configuration["EventBusConnection"]; - var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString); - - return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger); - }); - } - else - { - services.AddSingleton(sp => - { - var logger = sp.GetRequiredService>(); - - var factory = new ConnectionFactory() - { - HostName = Configuration["EventBusConnection"], - DispatchConsumersAsync = true - }; - - if (!string.IsNullOrEmpty(Configuration["EventBusUserName"])) - { - factory.UserName = Configuration["EventBusUserName"]; - } - - if (!string.IsNullOrEmpty(Configuration["EventBusPassword"])) - { - factory.Password = Configuration["EventBusPassword"]; - } - - var retryCount = 5; - if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) - { - retryCount = int.Parse(Configuration["EventBusRetryCount"]); - } - - return new DefaultRabbitMQPersistentConnection(factory, logger, retryCount); - }); - } - - RegisterEventBus(services); - - // Add framework services. - services.AddSwaggerGen(options => - { - options.DescribeAllEnumsAsStrings(); - options.SwaggerDoc("v1", new OpenApiInfo - { - Title = "eShopOnContainers - Location HTTP API", - Version = "v1", - Description = "The Location Microservice HTTP API. This is a Data-Driven/CRUD microservice sample", - }); - - options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme - { - Type = SecuritySchemeType.OAuth2, - Flows = new OpenApiOAuthFlows() - { - Implicit = new OpenApiOAuthFlow() - { - AuthorizationUrl = new Uri($"{Configuration.GetValue("IdentityUrlExternal")}/connect/authorize"), - TokenUrl = new Uri($"{Configuration.GetValue("IdentityUrlExternal")}/connect/token"), - Scopes = new Dictionary() - { - { "locations", "Locations API" } - } - } - } - }); - - options.OperationFilter(); - - }); - - services.AddCors(options => - { - options.AddPolicy("CorsPolicy", - builder => builder - .SetIsOriginAllowed((host) => true) - .AllowAnyMethod() - .AllowAnyHeader() - .AllowCredentials()); - }); - - services.AddSingleton(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - - //configure autofac - var container = new ContainerBuilder(); - container.Populate(services); - - return new AutofacServiceProvider(container.Build()); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) - { - //loggerFactory.AddAzureWebAppDiagnostics(); - //loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); - - var pathBase = Configuration["PATH_BASE"]; - if (!string.IsNullOrEmpty(pathBase)) - { - app.UsePathBase(pathBase); - } - - app.UseRouting(); - app.UseCors("CorsPolicy"); - ConfigureAuth(app); - - app.UseEndpoints(endpoints => - { - endpoints.MapDefaultControllerRoute(); - endpoints.MapControllers(); - endpoints.MapHealthChecks("/hc", new HealthCheckOptions() - { - Predicate = _ => true, - ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse - }); - endpoints.MapHealthChecks("/liveness", new HealthCheckOptions - { - Predicate = r => r.Name.Contains("self") - }); - }); - - app.UseSwagger() - .UseSwaggerUI(c => - { - c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Locations.API V1"); - c.OAuthClientId("locationsswaggerui"); - c.OAuthAppName("Locations Swagger UI"); - }); - - LocationsContextSeed.SeedAsync(app, loggerFactory) - .Wait(); - } - - private void RegisterAppInsights(IServiceCollection services) - { - services.AddApplicationInsightsTelemetry(Configuration); - services.AddApplicationInsightsKubernetesEnricher(); - } - - private void ConfigureAuthService(IServiceCollection services) - { - // prevent from mapping "sub" claim to nameidentifier. - JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); - - services.AddAuthentication(options => - { - options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; - }) - .AddJwtBearer(options => - { - options.Authority = Configuration.GetValue("IdentityUrl"); - options.Audience = "locations"; - options.RequireHttpsMetadata = false; - }); - } - - protected virtual void ConfigureAuth(IApplicationBuilder app) - { - if (Configuration.GetValue("UseLoadTest")) - { - app.UseMiddleware(); - } - - app.UseAuthentication(); - app.UseAuthorization(); - } - - private void RegisterEventBus(IServiceCollection services) - { - var subscriptionClientName = Configuration["SubscriptionClientName"]; - - if (Configuration.GetValue("AzureServiceBusEnabled")) - { - services.AddSingleton(sp => - { - var serviceBusPersisterConnection = sp.GetRequiredService(); - var iLifetimeScope = sp.GetRequiredService(); - var logger = sp.GetRequiredService>(); - var eventBusSubcriptionsManager = sp.GetRequiredService(); - - return new EventBusServiceBus(serviceBusPersisterConnection, logger, - eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope); - }); - } - else - { - services.AddSingleton(sp => - { - var rabbitMQPersistentConnection = sp.GetRequiredService(); - var iLifetimeScope = sp.GetRequiredService(); - var logger = sp.GetRequiredService>(); - var eventBusSubcriptionsManager = sp.GetRequiredService(); - - var retryCount = 5; - if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) - { - retryCount = int.Parse(Configuration["EventBusRetryCount"]); - } - - return new EventBusRabbitMQ(rabbitMQPersistentConnection, logger, iLifetimeScope, eventBusSubcriptionsManager, subscriptionClientName, retryCount); - }); - } - - services.AddSingleton(); - } - } - - public static class CustomExtensionMethods - { - public static IServiceCollection AddCustomHealthCheck(this IServiceCollection services, IConfiguration configuration) - { - var hcBuilder = services.AddHealthChecks(); - - hcBuilder.AddCheck("self", () => HealthCheckResult.Healthy()); - - hcBuilder - .AddMongoDb( - configuration["ConnectionString"], - name: "locations-mongodb-check", - tags: new string[] { "mongodb" }); - - if (configuration.GetValue("AzureServiceBusEnabled")) - { - hcBuilder - .AddAzureServiceBusTopic( - configuration["EventBusConnection"], - topicName: "eshop_event_bus", - name: "locations-servicebus-check", - tags: new string[] { "servicebus" }); - } - else - { - hcBuilder - .AddRabbitMQ( - $"amqp://{configuration["EventBusConnection"]}", - name: "locations-rabbitmqbus-check", - tags: new string[] { "rabbitmqbus" }); - } - - return services; - } - } -} diff --git a/src/Services/Location/Locations.API/ViewModel/LocationRequest.cs b/src/Services/Location/Locations.API/ViewModel/LocationRequest.cs deleted file mode 100644 index 5301cee87..000000000 --- a/src/Services/Location/Locations.API/ViewModel/LocationRequest.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Locations.API.ViewModel -{ - public class LocationRequest - { - public double Longitude { get; set; } - public double Latitude { get; set; } - } -} diff --git a/src/Services/Location/Locations.API/appsettings.json b/src/Services/Location/Locations.API/appsettings.json deleted file mode 100644 index 3ee24b242..000000000 --- a/src/Services/Location/Locations.API/appsettings.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "ConnectionString": "mongodb://nosql.data", - "Database": "LocationsDb", - "IdentityUrl": "http://localhost:5105", - "Serilog": { - "SeqServerUrl": null, - "LogstashgUrl": null, - "MinimumLevel": { - "Default": "Information", - "Override": { - "Microsoft": "Warning", - "Microsoft.eShopOnContainers": "Information", - "System": "Warning" - } - } - }, - "AzureServiceBusEnabled": false, - "SubscriptionClientName": "Locations", - "ApplicationInsights": { - "InstrumentationKey": "" - }, - "EventBusRetryCount": 5, - "UseVault": false, - "Vault": { - "Name": "eshop", - "ClientId": "your-client-id", - "ClientSecret": "your-client-secret" - } -} diff --git a/src/Services/Location/Locations.API/azds.yaml b/src/Services/Location/Locations.API/azds.yaml deleted file mode 100644 index e86a09927..000000000 --- a/src/Services/Location/Locations.API/azds.yaml +++ /dev/null @@ -1,56 +0,0 @@ -kind: helm-release -apiVersion: 1.1 -build: - context: ..\..\..\.. - dockerfile: Dockerfile -install: - chart: ../../../../k8s/helm/locations-api - 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: 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} diff --git a/src/Services/Location/Locations.API/values.dev.yaml b/src/Services/Location/Locations.API/values.dev.yaml deleted file mode 100644 index eaed45149..000000000 --- a/src/Services/Location/Locations.API/values.dev.yaml +++ /dev/null @@ -1,3 +0,0 @@ -ingress: - enabled: true - tls: [] \ No newline at end of file diff --git a/src/Services/Location/Locations.FunctionalTests/LocationTestsStartup.cs b/src/Services/Location/Locations.FunctionalTests/LocationTestsStartup.cs deleted file mode 100644 index 08bf2ffa5..000000000 --- a/src/Services/Location/Locations.FunctionalTests/LocationTestsStartup.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Routing; -using Microsoft.eShopOnContainers.Services.Locations.API; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Security.Claims; -using System.Threading.Tasks; - -namespace Locations.FunctionalTests -{ - public class LocationsTestsStartup : Startup - { - public LocationsTestsStartup(IConfiguration env) : base(env) - { - } - - public override IServiceProvider ConfigureServices(IServiceCollection services) - { - // Added to avoid the Authorize data annotation in test environment. - // Property "SuppressCheckForUnhandledSecurityMetadata" in appsettings.json - services.Configure(Configuration); - return base.ConfigureServices(services); - } - protected override void ConfigureAuth(IApplicationBuilder app) - { - if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) - { - app.UseMiddleware(); - } - else - { - base.ConfigureAuth(app); - } - } - - class LocationAuthorizeMiddleware - { - private readonly RequestDelegate _next; - public LocationAuthorizeMiddleware(RequestDelegate rd) - { - _next = rd; - } - - public async Task Invoke(HttpContext httpContext) - { - var identity = new ClaimsIdentity("cookies"); - identity.AddClaim(new Claim("sub", "4611ce3f-380d-4db5-8d76-87a8689058ed")); - httpContext.User.AddIdentity(identity); - await _next.Invoke(httpContext); - } - } - } -} diff --git a/src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj b/src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj deleted file mode 100644 index 0b6f4f1fa..000000000 --- a/src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - netcoreapp3.1 - false - false - - - - - - - - - Always - - - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - diff --git a/src/Services/Location/Locations.FunctionalTests/LocationsScenarioBase.cs b/src/Services/Location/Locations.FunctionalTests/LocationsScenarioBase.cs deleted file mode 100644 index 8c68fa3f6..000000000 --- a/src/Services/Location/Locations.FunctionalTests/LocationsScenarioBase.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.TestHost; -using Microsoft.Extensions.Configuration; -using System.IO; -using System.Reflection; - -namespace Locations.FunctionalTests -{ - public class LocationsScenarioBase - { - public TestServer CreateServer() - { - var path = Assembly.GetAssembly(typeof(LocationsScenarioBase)) - .Location; - - var hostBuilder = new WebHostBuilder() - .UseContentRoot(Path.GetDirectoryName(path)) - .ConfigureAppConfiguration(cb => - { - cb.AddJsonFile("appsettings.json", optional: false) - .AddEnvironmentVariables(); - }).UseStartup(); - - return new TestServer(hostBuilder); - } - - public static class Get - { - public static string Locations = "api/v1/locations"; - - public static string LocationBy(int id) - { - return $"api/v1/locations/{id}"; - } - - public static string UserLocationBy(string id) - { - return $"api/v1/locations/user/{id}"; - } - } - - public static class Post - { - public static string AddNewLocation = "api/v1/locations/"; - } - } -} diff --git a/src/Services/Location/Locations.FunctionalTests/LocationsScenarios.cs b/src/Services/Location/Locations.FunctionalTests/LocationsScenarios.cs deleted file mode 100644 index 5f8c90dfd..000000000 --- a/src/Services/Location/Locations.FunctionalTests/LocationsScenarios.cs +++ /dev/null @@ -1,140 +0,0 @@ -using Microsoft.eShopOnContainers.Services.Locations.API.Model; -using Microsoft.eShopOnContainers.Services.Locations.API.ViewModel; -using Newtonsoft.Json; -using System.Collections.Generic; -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; -using Xunit; - -namespace Locations.FunctionalTests -{ - public class LocationsScenarios - : LocationsScenarioBase - { - [Fact] - public async Task Set_new_user_seattle_location_response_ok_status_code() - { - using (var server = CreateServer()) - { - var userId = "4611ce3f-380d-4db5-8d76-87a8689058ed"; - var content = new StringContent(BuildLocationsRequest(-122.315752, 47.604610), UTF8Encoding.UTF8, "application/json"); - - // Expected result - var expectedLocation = "SEAT"; - - // Act - var response = await server.CreateClient() - .PostAsync(Post.AddNewLocation, content); - - var userLocationResponse = await server.CreateClient() - .GetAsync(Get.UserLocationBy(userId)); - - var responseBody = await userLocationResponse.Content.ReadAsStringAsync(); - var userLocation = JsonConvert.DeserializeObject(responseBody); - - var locationResponse = await server.CreateClient() - .GetAsync(Get.LocationBy(userLocation.LocationId)); - - responseBody = await locationResponse.Content.ReadAsStringAsync(); - var location = JsonConvert.DeserializeObject(responseBody); - - // Assert - Assert.Equal(expectedLocation, location.Code); - } - } - - [Fact] - public async Task Set_new_user_readmond_location_response_ok_status_code() - { - using (var server = CreateServer()) - { - var userId = "4611ce3f-380d-4db5-8d76-87a8689058ed"; - var content = new StringContent(BuildLocationsRequest(-122.119998, 47.690876), UTF8Encoding.UTF8, "application/json"); - - var client = server.CreateClient(); - - // Expected result - var expectedLocation = "REDM"; - - // Act - - var response = await client.PostAsync(Post.AddNewLocation, content); - - var userLocationResponse = await client.GetAsync(Get.UserLocationBy(userId)); - userLocationResponse.EnsureSuccessStatusCode(); - - var responseBody = await userLocationResponse.Content.ReadAsStringAsync(); - var userLocation = JsonConvert.DeserializeObject(responseBody); - - Assert.NotNull(userLocation); - - var locationResponse = await client.GetAsync(Get.LocationBy(userLocation.LocationId)); - - responseBody = await locationResponse.Content.ReadAsStringAsync(); - var location = JsonConvert.DeserializeObject(responseBody); - - // Assert - Assert.Equal(expectedLocation, location.Code); - } - } - - [Fact] - public async Task Set_new_user_Washington_location_response_ok_status_code() - { - using (var server = CreateServer()) - { - var userId = "4611ce3f-380d-4db5-8d76-87a8689058ed"; - var content = new StringContent(BuildLocationsRequest(-121.040360, 48.091631), UTF8Encoding.UTF8, "application/json"); - - // Expected result - var expectedLocation = "WHT"; - - // Act - var response = await server.CreateClient() - .PostAsync(Post.AddNewLocation, content); - - var userLocationResponse = await server.CreateClient() - .GetAsync(Get.UserLocationBy(userId)); - - var responseBody = await userLocationResponse.Content.ReadAsStringAsync(); - var userLocation = JsonConvert.DeserializeObject(responseBody); - - var locationResponse = await server.CreateClient() - .GetAsync(Get.LocationBy(userLocation.LocationId)); - - responseBody = await locationResponse.Content.ReadAsStringAsync(); - var location = JsonConvert.DeserializeObject(responseBody); - - // Assert - Assert.Equal(expectedLocation, location.Code); - } - } - - [Fact] - public async Task Get_all_locations_response_ok_status_code() - { - using (var server = CreateServer()) - { - var response = await server.CreateClient() - .GetAsync(Get.Locations); - - var responseBody = await response.Content.ReadAsStringAsync(); - var locations = JsonConvert.DeserializeObject>(responseBody); - - // Assert - Assert.NotEmpty(locations); - } - } - - string BuildLocationsRequest(double lon, double lat) - { - var location = new LocationRequest() - { - Longitude = lon, - Latitude = lat - }; - return JsonConvert.SerializeObject(location); - } - } -} diff --git a/src/Services/Location/Locations.FunctionalTests/appsettings.json b/src/Services/Location/Locations.FunctionalTests/appsettings.json deleted file mode 100644 index 6880b2ee1..000000000 --- a/src/Services/Location/Locations.FunctionalTests/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ConnectionString": "mongodb://localhost:27017", - "Database": "LocationsDb", - "ExternalCatalogBaseUrl": "http://localhost:5101", - "IdentityUrl": "http://localhost:5105", - "isTest": "true", - "EventBusConnection": "localhost", - "SubscriptionClientName": "Locations", - "SuppressCheckForUnhandledSecurityMetadata":true -} diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/function.json b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/function.json deleted file mode 100644 index 70b31994a..000000000 --- a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/function.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "bindings": [ - { - "authLevel": "function", - "name": "req", - "type": "httpTrigger", - "direction": "in" - }, - { - "name": "$return", - "type": "http", - "direction": "out" - } - ], - "disabled": false -} \ No newline at end of file diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/project.json b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/project.json deleted file mode 100644 index 97c3bba09..000000000 --- a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/project.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - - "frameworks": { - - "net46":{ - - "dependencies": { - - "Dapper": "1.50.2", - - "System.Data.SqlClient":"4.1.0", - - "Microsoft.WindowsAzure.ConfigurationManager":"3.2.1" - - } - - } - - } - -} \ No newline at end of file diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/run.csx b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/run.csx deleted file mode 100644 index 9ca9b5a3b..000000000 --- a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/run.csx +++ /dev/null @@ -1,91 +0,0 @@ -using System.Net; -using System.Net.Http.Headers; -using System.Configuration; -using Dapper; -using System.Data.SqlClient; - -public static async Task Run(HttpRequestMessage req, TraceWriter log) -{ - log.Info($"Campaign HTTP trigger function processed a request. RequestUri={req.RequestUri}"); - - string htmlResponse = string.Empty; - - // parse query parameter - string campaignId = req.GetQueryNameValuePairs() - .FirstOrDefault(q => string.Compare(q.Key, "campaignId", true) == 0) - .Value; - - string userId = req.GetQueryNameValuePairs() - .FirstOrDefault(q => string.Compare(q.Key, "userId", true) == 0) - .Value; - - var cnnString = ConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString; - - using (var conn = new SqlConnection(cnnString)) - { - await conn.OpenAsync(); - var sql = "SELECT * FROM [dbo].[Campaign] WHERE Id = @CampaignId;"; - var campaign = (await conn.QueryAsync(sql, new { CampaignId = campaignId })).FirstOrDefault(); - htmlResponse = BuildHtmlResponse(campaign); - } - - var response = new HttpResponseMessage(HttpStatusCode.OK); - response.Content = new ByteArrayContent(System.Text.Encoding.UTF8.GetBytes(htmlResponse)); - response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html"); - - return response; -} - -private static string BuildHtmlResponse(Campaign campaign) -{ - var marketingStorageUri = ConfigurationManager.AppSettings["MarketingStorageUri"]; - - return string.Format(@" - - - - -
- Campaign Details -
- -
-
-
-
- Card image cap -
-

{1}

-

{2}

- -
-
-
-
- - ", - $"{marketingStorageUri}{campaign.PictureName}", - campaign.Name, - campaign.Description, - campaign.From.ToString("MMMM dd, yyyy"), - campaign.From.ToString("MMMM dd, yyyy")); -} - -public class Campaign -{ - public int Id { get; set; } - - public string Name { get; set; } - - public string Description { get; set; } - - public DateTime From { get; set; } - - public DateTime To { get; set; } - - public string PictureUri { get; set; } - - public string PictureName { get; set; } -} diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/host.json b/src/Services/Marketing/Infrastructure/AzureFunctions/host.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/Services/Marketing/Infrastructure/AzureFunctions/host.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/local.settings.json b/src/Services/Marketing/Infrastructure/AzureFunctions/local.settings.json deleted file mode 100644 index 92d59f7e2..000000000 --- a/src/Services/Marketing/Infrastructure/AzureFunctions/local.settings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "IsEncrypted": false, - "Value": { - "APPSETTING_FUNCTIONS_EXTENSION_VERSION": "~1", - "APPSETTING_ScmType": "None", - "APPSETTING_WEBSITE_AUTH_ENABLED": "False", - "APPSETTING_REMOTEDEBUGGINGVERSION": "11.0.611103.400", - "APPSETTING_AzureWebJobsDashboard": "", - "APPSETTING_MarketingStorageUri": "", - "APPSETTING_WEBSITE_NODE_DEFAULT_VERSION": "6.5.0", - "APPSETTING_WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "", - "APPSETTING_WEBSITE_CONTENTSHARE": "", - "APPSETTING_WEBSITE_SLOT_NAME": "", - "APPSETTING_AzureWebJobsStorage": "", - "APPSETTING_WEBSITE_SITE_NAME": "" - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/marketing-functions.csproj b/src/Services/Marketing/Infrastructure/AzureFunctions/marketing-functions.csproj deleted file mode 100644 index 33e93b625..000000000 --- a/src/Services/Marketing/Infrastructure/AzureFunctions/marketing-functions.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - net461 - - - - - - - - - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - diff --git a/src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs b/src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs deleted file mode 100644 index 67ac1bca5..000000000 --- a/src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs +++ /dev/null @@ -1,232 +0,0 @@ -using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Services; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Controllers -{ - using System; - using System.Linq; - using System.Collections.Generic; - using Infrastructure.Repositories; - using AspNetCore.Mvc; - using Infrastructure; - using System.Threading.Tasks; - using Model; - using EntityFrameworkCore; - using Dto; - using AspNetCore.Authorization; - using Extensions.Options; - using Microsoft.eShopOnContainers.Services.Marketing.API.ViewModel; - using Microsoft.AspNetCore.Http; - using System.Net; - - [Route("api/v1/[controller]")] - [Authorize] - [ApiController] - public class CampaignsController : ControllerBase - { - private readonly MarketingContext _context; - private readonly MarketingSettings _settings; - private readonly IMarketingDataRepository _marketingDataRepository; - private readonly IIdentityService _identityService; - - public CampaignsController(MarketingContext context, - IMarketingDataRepository marketingDataRepository, - IOptionsSnapshot settings, - IIdentityService identityService) - { - _context = context; - _marketingDataRepository = marketingDataRepository; - _settings = settings.Value; - _identityService = identityService; - } - - [HttpGet] - [ProducesResponseType(typeof(List), (int)HttpStatusCode.OK)] - public async Task>> GetAllCampaignsAsync() - { - var campaignList = await _context.Campaigns.ToListAsync(); - - if (campaignList is null) - { - return Ok(); - } - - return MapCampaignModelListToDtoList(campaignList); - } - - [HttpGet("{id:int}")] - [ProducesResponseType(typeof(CampaignDTO), (int)HttpStatusCode.OK)] - [ProducesResponseType((int)HttpStatusCode.NotFound)] - public async Task> GetCampaignByIdAsync(int id) - { - var campaign = await _context.Campaigns.SingleOrDefaultAsync(c => c.Id == id); - - if (campaign is null) - { - return NotFound(); - } - - return MapCampaignModelToDto(campaign); - } - - [HttpPost] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - [ProducesResponseType((int)HttpStatusCode.Created)] - public async Task CreateCampaignAsync([FromBody] CampaignDTO campaignDto) - { - if (campaignDto is null) - { - return BadRequest(); - } - - var campaign = MapCampaignDtoToModel(campaignDto); - - await _context.Campaigns.AddAsync(campaign); - await _context.SaveChangesAsync(); - - return CreatedAtAction(nameof(GetCampaignByIdAsync), new { id = campaign.Id }, null); - } - - [HttpPut("{id:int}")] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - [ProducesResponseType((int)HttpStatusCode.NotFound)] - [ProducesResponseType((int)HttpStatusCode.Created)] - public async Task UpdateCampaignAsync(int id, [FromBody] CampaignDTO campaignDto) - { - if (id < 1 || campaignDto is null) - { - return BadRequest(); - } - - var campaignToUpdate = await _context.Campaigns.FindAsync(id); - if (campaignToUpdate is null) - { - return NotFound(); - } - - campaignToUpdate.Name = campaignDto.Name; - campaignToUpdate.Description = campaignDto.Description; - campaignToUpdate.From = campaignDto.From; - campaignToUpdate.To = campaignDto.To; - campaignToUpdate.PictureUri = campaignDto.PictureUri; - - await _context.SaveChangesAsync(); - - return CreatedAtAction(nameof(GetCampaignByIdAsync), new { id = campaignToUpdate.Id }, null); - } - - [HttpDelete("{id:int}")] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - [ProducesResponseType((int)HttpStatusCode.NotFound)] - [ProducesResponseType((int)HttpStatusCode.NoContent)] - public async Task DeleteCampaignByIdAsync(int id) - { - if (id < 1) - { - return BadRequest(); - } - - var campaignToDelete = await _context.Campaigns.FindAsync(id); - - if (campaignToDelete is null) - { - return NotFound(); - } - - _context.Campaigns.Remove(campaignToDelete); - await _context.SaveChangesAsync(); - - return NoContent(); - } - - [HttpGet("user")] - [ProducesResponseType(typeof(PaginatedItemsViewModel), (int)HttpStatusCode.OK)] - public async Task>> GetCampaignsByUserIdAsync( int pageSize = 10, int pageIndex = 0) - { - var userId = _identityService.GetUserIdentity(); - - var marketingData = await _marketingDataRepository.GetAsync(userId.ToString()); - - var campaignDtoList = new List(); - - if (marketingData != null) - { - var locationIdCandidateList = marketingData.Locations.Select(x => x.LocationId); - var userCampaignList = await _context.Rules - .OfType() - .Include(c => c.Campaign) - .Where(c => c.Campaign.From <= DateTime.Now - && c.Campaign.To >= DateTime.Now - && locationIdCandidateList.Contains(c.LocationId)) - .Select(c => c.Campaign) - .ToListAsync(); - - if (userCampaignList != null && userCampaignList.Any()) - { - var userCampaignDtoList = MapCampaignModelListToDtoList(userCampaignList); - campaignDtoList.AddRange(userCampaignDtoList); - } - } - - var totalItems = campaignDtoList.Count(); - - campaignDtoList = campaignDtoList - .Skip(pageSize * pageIndex) - .Take(pageSize).ToList(); - - return new PaginatedItemsViewModel(pageIndex, pageSize, totalItems, campaignDtoList); - } - - private List MapCampaignModelListToDtoList(List campaignList) - { - var campaignDtoList = new List(); - - campaignList.ForEach(campaign => campaignDtoList - .Add(MapCampaignModelToDto(campaign))); - - return campaignDtoList; - } - - private CampaignDTO MapCampaignModelToDto(Campaign campaign) - { - var userId = _identityService.GetUserIdentity(); - var dto = new CampaignDTO - { - Id = campaign.Id, - Name = campaign.Name, - Description = campaign.Description, - From = campaign.From, - To = campaign.To, - PictureUri = GetUriPlaceholder(campaign), - }; - - if (!string.IsNullOrEmpty(_settings.CampaignDetailFunctionUri)) - { - dto.DetailsUri = $"{_settings.CampaignDetailFunctionUri}&campaignId={campaign.Id}&userId={userId}"; - } - - return dto; - } - - private Campaign MapCampaignDtoToModel(CampaignDTO campaignDto) - { - return new Campaign - { - Id = campaignDto.Id, - Name = campaignDto.Name, - Description = campaignDto.Description, - From = campaignDto.From, - To = campaignDto.To, - PictureUri = campaignDto.PictureUri - }; - } - - private string GetUriPlaceholder(Campaign campaign) - { - var baseUri = _settings.PicBaseUrl; - - return _settings.AzureStorageEnabled - ? baseUri + campaign.PictureName - : baseUri.Replace("[0]", campaign.Id.ToString()); - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Controllers/HomeController.cs b/src/Services/Marketing/Marketing.API/Controllers/HomeController.cs deleted file mode 100644 index d37386b9a..000000000 --- a/src/Services/Marketing/Marketing.API/Controllers/HomeController.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Controllers -{ - using Microsoft.AspNetCore.Mvc; - - // GET: // - public class HomeController : Controller - { - public IActionResult Index() - { - return new RedirectResult("~/swagger"); - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Controllers/LocationsController.cs b/src/Services/Marketing/Marketing.API/Controllers/LocationsController.cs deleted file mode 100644 index 7d5959cb5..000000000 --- a/src/Services/Marketing/Marketing.API/Controllers/LocationsController.cs +++ /dev/null @@ -1,151 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Controllers -{ - using Microsoft.AspNetCore.Authorization; - using Microsoft.AspNetCore.Mvc; - using Microsoft.eShopOnContainers.Services.Marketing.API.Dto; - using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure; - using Microsoft.eShopOnContainers.Services.Marketing.API.Model; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Threading.Tasks; - - [Authorize] - [ApiController] - public class LocationsController : ControllerBase - { - private readonly MarketingContext _context; - - public LocationsController(MarketingContext context) - { - _context = context; - } - - [HttpGet] - [Route("api/v1/campaigns/{campaignId:int}/locations/{userLocationRuleId:int}")] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - [ProducesResponseType((int)HttpStatusCode.NotFound)] - [ProducesResponseType(typeof(UserLocationRuleDTO),(int)HttpStatusCode.OK)] - public ActionResult GetLocationByCampaignAndLocationRuleId(int campaignId, - int userLocationRuleId) - { - if (campaignId < 1 || userLocationRuleId < 1) - { - return BadRequest(); - } - - var location = _context.Rules - .OfType() - .SingleOrDefault(c => c.CampaignId == campaignId && c.Id == userLocationRuleId); - - if (location is null) - { - return NotFound(); - } - - return MapUserLocationRuleModelToDto(location); - } - - [HttpGet] - [Route("api/v1/campaigns/{campaignId:int}/locations")] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - [ProducesResponseType((int)HttpStatusCode.OK)] - [ProducesResponseType(typeof(List), (int)HttpStatusCode.OK)] - public ActionResult> GetAllLocationsByCampaignId(int campaignId) - { - if (campaignId < 1) - { - return BadRequest(); - } - - var locationList = _context.Rules - .OfType() - .Where(c => c.CampaignId == campaignId) - .ToList(); - - if(locationList is null) - { - return Ok(); - } - - return MapUserLocationRuleModelListToDtoList(locationList); - } - - [HttpPost] - [Route("api/v1/campaigns/{campaignId:int}/locations")] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - [ProducesResponseType((int)HttpStatusCode.Created)] - public async Task CreateLocationAsync(int campaignId, [FromBody] UserLocationRuleDTO locationRuleDto) - { - if (campaignId < 1 || locationRuleDto is null) - { - return BadRequest(); - } - - var locationRule = MapUserLocationRuleDtoToModel(locationRuleDto); - locationRule.CampaignId = campaignId; - - await _context.Rules.AddAsync(locationRule); - await _context.SaveChangesAsync(); - - return CreatedAtAction(nameof(GetLocationByCampaignAndLocationRuleId), - new { campaignId = campaignId, userLocationRuleId = locationRule.Id }, null); - } - - [HttpDelete] - [Route("api/v1/campaigns/{campaignId:int}/locations/{userLocationRuleId:int}")] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - [ProducesResponseType((int)HttpStatusCode.NotFound)] - public async Task DeleteLocationByIdAsync(int campaignId, int userLocationRuleId) - { - if (campaignId < 1 || userLocationRuleId < 1) - { - return BadRequest(); - } - - var locationToDelete = _context.Rules - .OfType() - .SingleOrDefault(c => c.CampaignId == campaignId && c.Id == userLocationRuleId); - - if (locationToDelete is null) - { - return NotFound(); - } - - _context.Rules.Remove(locationToDelete); - await _context.SaveChangesAsync(); - - return NoContent(); - } - - private List MapUserLocationRuleModelListToDtoList(List userLocationRuleList) - { - var userLocationRuleDtoList = new List(); - - userLocationRuleList.ForEach(userLocationRule => userLocationRuleDtoList - .Add(MapUserLocationRuleModelToDto(userLocationRule))); - - return userLocationRuleDtoList; - } - - private UserLocationRuleDTO MapUserLocationRuleModelToDto(UserLocationRule userLocationRule) - { - return new UserLocationRuleDTO - { - Id = userLocationRule.Id, - Description = userLocationRule.Description, - LocationId = userLocationRule.LocationId - }; - } - - private UserLocationRule MapUserLocationRuleDtoToModel(UserLocationRuleDTO userLocationRuleDto) - { - return new UserLocationRule - { - Id = userLocationRuleDto.Id, - Description = userLocationRuleDto.Description, - LocationId = userLocationRuleDto.LocationId - }; - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Controllers/PicController.cs b/src/Services/Marketing/Marketing.API/Controllers/PicController.cs deleted file mode 100644 index 740f4975b..000000000 --- a/src/Services/Marketing/Marketing.API/Controllers/PicController.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Controllers -{ - using Microsoft.AspNetCore.Hosting; - using Microsoft.AspNetCore.Mvc; - using System.IO; - - [ApiController] - public class PicController : ControllerBase - { - private readonly IWebHostEnvironment _env; - public PicController(IWebHostEnvironment env) - { - _env = env; - } - - [HttpGet] - [Route("api/v1/campaigns/{campaignId:int}/pic")] - public ActionResult GetImage(int campaignId) - { - var webRoot = _env.WebRootPath; - var path = Path.Combine(webRoot, campaignId + ".png"); - - var buffer = System.IO.File.ReadAllBytes(path); - - return File(buffer, "image/png"); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Dockerfile b/src/Services/Marketing/Marketing.API/Dockerfile deleted file mode 100644 index e7a3f120b..000000000 --- a/src/Services/Marketing/Marketing.API/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base -WORKDIR /app -EXPOSE 80 - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build -WORKDIR /src - -# It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles -# to take advantage of Docker's build cache, to speed up local container builds -COPY "eShopOnContainers-ServicesAndWebApps.sln" "eShopOnContainers-ServicesAndWebApps.sln" - -COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj" "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj" -COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" -COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" -COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" -COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" -COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" -COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" -COPY "BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj" "BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj" -COPY "Services/Basket/Basket.API/Basket.API.csproj" "Services/Basket/Basket.API/Basket.API.csproj" -COPY "Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj" "Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj" -COPY "Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj" "Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj" -COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog.API/Catalog.API.csproj" -COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" -COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" -COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" -COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj" -COPY "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" "Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj" -COPY "Services/Marketing/Marketing.API/Marketing.API.csproj" "Services/Marketing/Marketing.API/Marketing.API.csproj" -COPY "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" "Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj" -COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" -COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" -COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" -COPY "Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj" "Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj" -COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" -COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" -COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" -COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" -COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" -COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" -COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" -COPY "Web/WebMVC/WebMVC.csproj" "Web/WebMVC/WebMVC.csproj" -COPY "Web/WebSPA/WebSPA.csproj" "Web/WebSPA/WebSPA.csproj" -COPY "Web/WebStatus/WebStatus.csproj" "Web/WebStatus/WebStatus.csproj" - -COPY "docker-compose.dcproj" "docker-compose.dcproj" - -COPY "NuGet.config" "NuGet.config" - -RUN dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" - -COPY . . -WORKDIR /src/Services/Marketing/Marketing.API -RUN dotnet publish --no-restore -c Release -o /app - -FROM build as functionaltest -WORKDIR /src/Services/Marketing/Marketing.FunctionalTests - -FROM build AS publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app . -ENTRYPOINT ["dotnet", "Marketing.API.dll"] diff --git a/src/Services/Marketing/Marketing.API/Dockerfile.develop b/src/Services/Marketing/Marketing.API/Dockerfile.develop deleted file mode 100644 index 8425f47c1..000000000 --- a/src/Services/Marketing/Marketing.API/Dockerfile.develop +++ /dev/null @@ -1,18 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster -ARG BUILD_CONFIGURATION=Debug -ENV ASPNETCORE_ENVIRONMENT=Development -ENV DOTNET_USE_POLLING_FILE_WATCHER=true -EXPOSE 80 - -WORKDIR /src -COPY [Services/Marketing/Marketing.API/Marketing.API.csproj", "Services/Marketing/Marketing.API/"] -COPY [BuildingBlocks/EventBus/EventBus/EventBus.csproj", "BuildingBlocks/EventBus/EventBus/"] -COPY [BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "BuildingBlocks/EventBus/EventBusRabbitMQ/"] -COPY [BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "BuildingBlocks/EventBus/EventBusServiceBus/"] -COPY [BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "BuildingBlocks/WebHostCustomization/WebHost.Customization/"] -RUN dotnet restore Services/Marketing/Marketing.API/Marketing.API.csproj -nowarn:msb3202,nu1503 -COPY . . -WORKDIR "/src/Services/Marketing/Marketing.API" -RUN dotnet build --no-restore -c $BUILD_CONFIGURATION - -ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] diff --git a/src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs b/src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs deleted file mode 100644 index 3c409c8a9..000000000 --- a/src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Dto -{ - using System; - - public class CampaignDTO - { - public int Id { get; set; } - - public string Name { get; set; } - - public string Description { get; set; } - - public DateTime From { get; set; } - - public DateTime To { get; set; } - - public string PictureUri { get; set; } - public string DetailsUri { get; set; } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs b/src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs deleted file mode 100644 index 3400b0dda..000000000 --- a/src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Dto -{ - public class UserLocationDTO - { - public string Id { get; set; } - public Guid UserId { get; set; } - public int LocationId { get; set; } - public DateTime UpdateDate { get; set; } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Dto/UserLocationRuleDTO.cs b/src/Services/Marketing/Marketing.API/Dto/UserLocationRuleDTO.cs deleted file mode 100644 index a76eb90a0..000000000 --- a/src/Services/Marketing/Marketing.API/Dto/UserLocationRuleDTO.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Dto -{ - public class UserLocationRuleDTO - { - public int Id { get; set; } - - public int LocationId { get; set; } - - public string Description { get; set; } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/ActionResult/InternalServerErrorObjectResult.cs b/src/Services/Marketing/Marketing.API/Infrastructure/ActionResult/InternalServerErrorObjectResult.cs deleted file mode 100644 index 5975d92af..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/ActionResult/InternalServerErrorObjectResult.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.ActionResults -{ - using AspNetCore.Http; - using Microsoft.AspNetCore.Mvc; - - public class InternalServerErrorObjectResult : ObjectResult - { - public InternalServerErrorObjectResult(object error) - : base(error) - { - StatusCode = StatusCodes.Status500InternalServerError; - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/CampaignEntityTypeConfiguration.cs b/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/CampaignEntityTypeConfiguration.cs deleted file mode 100644 index 22292e53f..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/CampaignEntityTypeConfiguration.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.eShopOnContainers.Services.Marketing.API.Model; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.EntityConfigurations -{ - class CampaignEntityTypeConfiguration - : IEntityTypeConfiguration - { - public void Configure(EntityTypeBuilder builder) - { - builder.ToTable("Campaign"); - - builder.HasKey(m => m.Id); - - builder.Property(m => m.Id) - .UseHiLo("campaign_hilo") - .IsRequired(); - - builder.Property(m => m.Name) - .HasColumnName("Name") - .IsRequired(); - - builder.Property(m => m.From) - .HasColumnName("From") - .IsRequired(); - - builder.Property(m => m.To) - .HasColumnName("To") - .IsRequired(); - - builder.Property(m => m.Description) - .HasColumnName("Description") - .IsRequired(); - - builder.Property(m => m.PictureUri) - .HasColumnName("PictureUri") - .IsRequired(); - - builder.HasMany(m => m.Rules) - .WithOne(r => r.Campaign) - .HasForeignKey(r => r.CampaignId) - .IsRequired(); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/RuleEntityTypeConfiguration.cs b/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/RuleEntityTypeConfiguration.cs deleted file mode 100644 index ebf1d1b3a..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/RuleEntityTypeConfiguration.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.eShopOnContainers.Services.Marketing.API.Model; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.EntityConfigurations -{ - class RuleEntityTypeConfiguration - : IEntityTypeConfiguration - { - public void Configure(EntityTypeBuilder builder) - { - builder.ToTable("Rule"); - - builder.HasKey(r => r.Id); - - builder.Property(r => r.Id) - .UseHiLo("rule_hilo") - .IsRequired(); - - builder.HasDiscriminator("RuleTypeId") - .HasValue(RuleType.UserProfileRule.Id) - .HasValue(RuleType.PurchaseHistoryRule.Id) - .HasValue(RuleType.UserLocationRule.Id); - - builder.Property(r => r.Description) - .HasColumnName("Description") - .IsRequired(); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/UserLocationRuleEntityTypeConfiguration.cs b/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/UserLocationRuleEntityTypeConfiguration.cs deleted file mode 100644 index 84840d3a5..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/EntityConfigurations/UserLocationRuleEntityTypeConfiguration.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.eShopOnContainers.Services.Marketing.API.Model; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.EntityConfigurations -{ - class UserLocationRuleEntityTypeConfiguration - : IEntityTypeConfiguration - { - public void Configure(EntityTypeBuilder builder) - { - builder.Property(r => r.LocationId) - .HasColumnName("LocationId") - .IsRequired(); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Exceptions/MarketingDomainException.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Exceptions/MarketingDomainException.cs deleted file mode 100644 index 68ccd9e52..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Exceptions/MarketingDomainException.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Exceptions -{ - using System; - - /// - /// Exception type for app exceptions - /// - public class MarketingDomainException : Exception - { - public MarketingDomainException() - { } - - public MarketingDomainException(string message) - : base(message) - { } - - public MarketingDomainException(string message, Exception innerException) - : base(message, innerException) - { } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs deleted file mode 100644 index d013597d9..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filters -{ - public class AuthorizeCheckOperationFilter : IOperationFilter - { - public void Apply(OpenApiOperation operation, OperationFilterContext context) - { - // Check for authorize attribute - var hasAuthorize = context.MethodInfo.DeclaringType.GetCustomAttributes(true).OfType().Any() || - context.MethodInfo.GetCustomAttributes(true).OfType().Any(); - - if (!hasAuthorize) return; - - operation.Responses.TryAdd("401", new OpenApiResponse { Description = "Unauthorized" }); - operation.Responses.TryAdd("403", new OpenApiResponse { Description = "Forbidden" }); - - var oAuthScheme = new OpenApiSecurityScheme - { - Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "oauth2" } - }; - - operation.Security = new List - { - new OpenApiSecurityRequirement - { - [ oAuthScheme ] = new [] { "marketingapi" } - } - }; - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs deleted file mode 100644 index 19c5ab038..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filters -{ - using AspNetCore.Mvc; - using global::Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Exceptions; - using Microsoft.AspNetCore.Hosting; - using Microsoft.AspNetCore.Mvc.Filters; - using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.ActionResults; - using Microsoft.Extensions.Hosting; - using Microsoft.Extensions.Logging; - using System.Net; - - public class HttpGlobalExceptionFilter : IExceptionFilter - { - private readonly IWebHostEnvironment env; - private readonly ILogger logger; - - public HttpGlobalExceptionFilter(IWebHostEnvironment env, ILogger logger) - { - this.env = env; - this.logger = logger; - } - - public void OnException(ExceptionContext context) - { - logger.LogError(new EventId(context.Exception.HResult), - context.Exception, - context.Exception.Message); - - if (context.Exception.GetType() == typeof(MarketingDomainException)) - { - var json = new JsonErrorResponse - { - Messages = new[] { context.Exception.Message } - }; - - // Result asigned to a result object but in destiny the response is empty. This is a known bug of .net core 1.1 - //It will be fixed in .net core 1.1.2. See https://github.com/aspnet/Mvc/issues/5594 for more information - context.Result = new BadRequestObjectResult(json); - context.HttpContext.Response.StatusCode = (int)HttpStatusCode.BadRequest; - } - else - { - var json = new JsonErrorResponse - { - Messages = new[] { "An error occur.Try it again." } - }; - - if (env.IsDevelopment()) - { - json.DeveloperMessage = context.Exception; - } - - // Result asigned to a result object but in destiny the response is empty. This is a known bug of .net core 1.1 - // It will be fixed in .net core 1.1.2. See https://github.com/aspnet/Mvc/issues/5594 for more information - context.Result = new InternalServerErrorObjectResult(json); - context.HttpContext.Response.StatusCode = (int)HttpStatusCode.InternalServerError; - } - context.ExceptionHandled = true; - } - - private class JsonErrorResponse - { - public string[] Messages { get; set; } - - public object DeveloperMessage { get; set; } - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContext.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContext.cs deleted file mode 100644 index e06106b5e..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContext.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure -{ - using System; - using System.IO; - using EntityConfigurations; - using Microsoft.EntityFrameworkCore; - using Microsoft.EntityFrameworkCore.Design; - using Microsoft.eShopOnContainers.Services.Marketing.API.Model; - using Microsoft.Extensions.Configuration; - - public class MarketingContext : DbContext - { - public MarketingContext(DbContextOptions options) : base(options) - { - } - - public DbSet Campaigns { get; set; } - - public DbSet Rules { get; set; } - - protected override void OnModelCreating(ModelBuilder builder) - { - builder.ApplyConfiguration(new CampaignEntityTypeConfiguration()); - builder.ApplyConfiguration(new RuleEntityTypeConfiguration()); - builder.ApplyConfiguration(new UserLocationRuleEntityTypeConfiguration()); - } - } - - public class MarketingContextDesignFactory : IDesignTimeDbContextFactory - { - public MarketingContext CreateDbContext(string[] args) - { - IConfigurationRoot configuration = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) - .AddEnvironmentVariables() - .Build(); - - var connectionString = configuration["ConnectionString"]; - var optionsBuilder = new DbContextOptionsBuilder() - .UseSqlServer(connectionString); - return new MarketingContext(optionsBuilder.Options); - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs deleted file mode 100644 index ac800909e..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs +++ /dev/null @@ -1,85 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure -{ - using Microsoft.eShopOnContainers.Services.Marketing.API.Model; - using Microsoft.Extensions.Logging; - using Polly; - using Polly.Retry; - using System; - using System.Collections.Generic; - using System.Data.SqlClient; - using System.Linq; - using System.Threading.Tasks; - - public class MarketingContextSeed - { - public async Task SeedAsync(MarketingContext context,ILogger logger,int retries = 3) - { - var policy = CreatePolicy(retries, logger, nameof(MarketingContextSeed)); - - await policy.ExecuteAsync(async () => - { - if (!context.Campaigns.Any()) - { - await context.Campaigns.AddRangeAsync( - GetPreconfiguredMarketings()); - - await context.SaveChangesAsync(); - } - }); - } - - private List GetPreconfiguredMarketings() - { - return new List - { - new Campaign - { - Name = ".NET Bot Black Hoodie 50% OFF", - Description = "Campaign Description 1", - From = DateTime.Now, - To = DateTime.Now.AddDays(7), - PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/campaigns/1/pic", - PictureName = "1.png", - Rules = new List - { - new UserLocationRule - { - Description = "Campaign is only for United States users.", - LocationId = 1 - } - } - }, - new Campaign - { - Name = "Roslyn Red T-Shirt 3x2", - Description = "Campaign Description 2", - From = DateTime.Now.AddDays(-7), - To = DateTime.Now.AddDays(14), - PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/campaigns/2/pic", - PictureName = "2.png", - Rules = new List - { - new UserLocationRule - { - Description = "Campaign is only for Seattle users.", - LocationId = 3 - } - } - } - }; - } - - private AsyncRetryPolicy CreatePolicy(int retries, ILogger logger, string prefix) - { - return Policy.Handle(). - WaitAndRetryAsync( - retryCount: retries, - sleepDurationProvider: retry => TimeSpan.FromSeconds(5), - onRetry: (exception, timeSpan, retry, ctx) => - { - logger.LogWarning(exception, "[{prefix}] Exception {ExceptionType} with message {Message} detected on attempt {retry} of {retries}", prefix, exception.GetType().Name, exception.Message, retry, retries); - } - ); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.Designer.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.Designer.cs deleted file mode 100644 index b4696a8f3..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.Designer.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations -{ - [DbContext(typeof(MarketingContext))] - [Migration("20170615163431_Init")] - partial class Init - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { - modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") - .HasAnnotation("SqlServer:Sequence:.campaign_hilo", "'campaign_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:Sequence:.rule_hilo", "'rule_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasAnnotation("SqlServer:HiLoSequenceName", "campaign_hilo") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); - - b.Property("Description") - .IsRequired() - .HasColumnName("Description"); - - b.Property("From") - .HasColumnName("From"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name"); - - b.Property("PictureUri") - .IsRequired() - .HasColumnName("PictureUri"); - - b.Property("To") - .HasColumnName("To"); - - b.HasKey("Id"); - - b.ToTable("Campaign"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasAnnotation("SqlServer:HiLoSequenceName", "rule_hilo") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); - - b.Property("CampaignId"); - - b.Property("Description") - .IsRequired() - .HasColumnName("Description"); - - b.Property("RuleTypeId"); - - b.HasKey("Id"); - - b.HasIndex("CampaignId"); - - b.ToTable("Rule"); - - b.HasDiscriminator("RuleTypeId"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.PurchaseHistoryRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - - b.ToTable("PurchaseHistoryRule"); - - b.HasDiscriminator().HasValue(2); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserLocationRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - b.Property("LocationId") - .HasColumnName("LocationId"); - - b.ToTable("UserLocationRule"); - - b.HasDiscriminator().HasValue(3); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserProfileRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - - b.ToTable("UserProfileRule"); - - b.HasDiscriminator().HasValue(1); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b => - { - b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", "Campaign") - .WithMany("Rules") - .HasForeignKey("CampaignId") - .OnDelete(DeleteBehavior.Cascade); - }); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs deleted file mode 100644 index 92398f1a8..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations -{ - public partial class Init : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateSequence( - name: "campaign_hilo", - incrementBy: 10); - - migrationBuilder.CreateSequence( - name: "rule_hilo", - incrementBy: 10); - - migrationBuilder.CreateTable( - name: "Campaign", - columns: table => new - { - Id = table.Column(nullable: false), - Description = table.Column(nullable: false), - From = table.Column(nullable: false), - Name = table.Column(nullable: false), - PictureUri = table.Column(nullable: false), - To = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Campaign", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Rule", - columns: table => new - { - Id = table.Column(nullable: false), - CampaignId = table.Column(nullable: false), - Description = table.Column(nullable: false), - RuleTypeId = table.Column(nullable: false), - LocationId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Rule", x => x.Id); - table.ForeignKey( - name: "FK_Rule_Campaign_CampaignId", - column: x => x.CampaignId, - principalTable: "Campaign", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Rule_CampaignId", - table: "Rule", - column: "CampaignId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Rule"); - - migrationBuilder.DropTable( - name: "Campaign"); - - migrationBuilder.DropSequence( - name: "campaign_hilo"); - - migrationBuilder.DropSequence( - name: "rule_hilo"); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.Designer.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.Designer.cs deleted file mode 100644 index 342d1d02f..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.Designer.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations -{ - [DbContext(typeof(MarketingContext))] - [Migration("20170629102516_added-campaign-details")] - partial class addedcampaigndetails - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { - modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") - .HasAnnotation("SqlServer:Sequence:.campaign_hilo", "'campaign_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:Sequence:.rule_hilo", "'rule_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasAnnotation("SqlServer:HiLoSequenceName", "campaign_hilo") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); - - b.Property("Description") - .IsRequired() - .HasColumnName("Description"); - - b.Property("DetailsUri"); - - b.Property("From") - .HasColumnName("From"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name"); - - b.Property("PictureName"); - - b.Property("PictureUri") - .IsRequired() - .HasColumnName("PictureUri"); - - b.Property("To") - .HasColumnName("To"); - - b.HasKey("Id"); - - b.ToTable("Campaign"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasAnnotation("SqlServer:HiLoSequenceName", "rule_hilo") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); - - b.Property("CampaignId"); - - b.Property("Description") - .IsRequired() - .HasColumnName("Description"); - - b.Property("RuleTypeId"); - - b.HasKey("Id"); - - b.HasIndex("CampaignId"); - - b.ToTable("Rule"); - - b.HasDiscriminator("RuleTypeId"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.PurchaseHistoryRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - - b.ToTable("PurchaseHistoryRule"); - - b.HasDiscriminator().HasValue(2); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserLocationRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - b.Property("LocationId") - .HasColumnName("LocationId"); - - b.ToTable("UserLocationRule"); - - b.HasDiscriminator().HasValue(3); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserProfileRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - - b.ToTable("UserProfileRule"); - - b.HasDiscriminator().HasValue(1); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b => - { - b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", "Campaign") - .WithMany("Rules") - .HasForeignKey("CampaignId") - .OnDelete(DeleteBehavior.Cascade); - }); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs deleted file mode 100644 index 5b7c7ef6c..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations -{ - public partial class addedcampaigndetails : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "DetailsUri", - table: "Campaign", - nullable: true); - - migrationBuilder.AddColumn( - name: "PictureName", - table: "Campaign", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "DetailsUri", - table: "Campaign"); - - migrationBuilder.DropColumn( - name: "PictureName", - table: "Campaign"); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs deleted file mode 100644 index a79055954..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations -{ - [DbContext(typeof(MarketingContext))] - partial class MarketingContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { - modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") - .HasAnnotation("SqlServer:Sequence:.campaign_hilo", "'campaign_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:Sequence:.rule_hilo", "'rule_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasAnnotation("SqlServer:HiLoSequenceName", "campaign_hilo") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); - - b.Property("Description") - .IsRequired() - .HasColumnName("Description"); - - b.Property("DetailsUri"); - - b.Property("From") - .HasColumnName("From"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name"); - - b.Property("PictureName"); - - b.Property("PictureUri") - .IsRequired() - .HasColumnName("PictureUri"); - - b.Property("To") - .HasColumnName("To"); - - b.HasKey("Id"); - - b.ToTable("Campaign"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasAnnotation("SqlServer:HiLoSequenceName", "rule_hilo") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); - - b.Property("CampaignId"); - - b.Property("Description") - .IsRequired() - .HasColumnName("Description"); - - b.Property("RuleTypeId"); - - b.HasKey("Id"); - - b.HasIndex("CampaignId"); - - b.ToTable("Rule"); - - b.HasDiscriminator("RuleTypeId"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.PurchaseHistoryRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - - b.ToTable("PurchaseHistoryRule"); - - b.HasDiscriminator().HasValue(2); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserLocationRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - b.Property("LocationId") - .HasColumnName("LocationId"); - - b.ToTable("UserLocationRule"); - - b.HasDiscriminator().HasValue(3); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserProfileRule", b => - { - b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule"); - - - b.ToTable("UserProfileRule"); - - b.HasDiscriminator().HasValue(1); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b => - { - b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", "Campaign") - .WithMany("Rules") - .HasForeignKey("CampaignId") - .OnDelete(DeleteBehavior.Cascade); - }); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingReadDataContext.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingReadDataContext.cs deleted file mode 100644 index b16968617..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingReadDataContext.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure -{ - using Microsoft.eShopOnContainers.Services.Marketing.API.Model; - using Microsoft.Extensions.Options; - using MongoDB.Driver; - - public class MarketingReadDataContext - { - private readonly IMongoDatabase _database = null; - - public MarketingReadDataContext(IOptions settings) - { - var client = new MongoClient(settings.Value.MongoConnectionString); - - if (client != null) - { - _database = client.GetDatabase(settings.Value.MongoDatabase); - } - } - - public IMongoCollection MarketingData - { - get - { - return _database.GetCollection("MarketingReadDataModel"); - } - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs deleted file mode 100644 index 6f4ff16e2..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ /dev/null @@ -1,78 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Primitives; -using System; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Middlewares -{ - class ByPassAuthMiddleware - { - private readonly RequestDelegate _next; - private string _currentUserId; - public ByPassAuthMiddleware(RequestDelegate next) - { - _next = next; - _currentUserId = null; - } - - - public async Task Invoke(HttpContext context) - { - var path = context.Request.Path; - if (path == "/noauth") - { - var userid = context.Request.Query["userid"]; - if (!string.IsNullOrEmpty(userid)) - { - _currentUserId = userid; - } - context.Response.StatusCode = 200; - context.Response.ContentType = "text/string"; - await context.Response.WriteAsync($"User set to {_currentUserId}"); - } - - else if (path == "/noauth/reset") - { - _currentUserId = null; - context.Response.StatusCode = 200; - context.Response.ContentType = "text/string"; - await context.Response.WriteAsync($"User set to none. Token required for protected endpoints."); - } - else - { - var currentUserId = _currentUserId; - - var authHeader = context.Request.Headers["Authorization"]; - if (authHeader != StringValues.Empty) - { - var header = authHeader.FirstOrDefault(); - if (!string.IsNullOrEmpty(header) && header.StartsWith("Email ") && header.Length > "Email ".Length) - { - currentUserId = header.Substring("Email ".Length); - } - } - - - if (!string.IsNullOrEmpty(currentUserId)) - { - var user = new ClaimsIdentity(new[] { - new Claim("emails", currentUserId), - new Claim("name", "Test user"), - new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), - new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("sub", currentUserId), - new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), - new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} - , "ByPassAuth"); - - context.User = new ClaimsPrincipal(user); - } - - await _next.Invoke(context); - } - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/IMarketingDataRepository.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/IMarketingDataRepository.cs deleted file mode 100644 index 12a4bf2f8..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/IMarketingDataRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Repositories -{ - using Model; - using System.Threading.Tasks; - - public interface IMarketingDataRepository - { - Task GetAsync(string userId); - Task UpdateLocationAsync(MarketingData marketingData); - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs deleted file mode 100644 index 4e531a84c..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.eShopOnContainers.Services.Marketing.API.Model; -using Microsoft.Extensions.Options; -using MongoDB.Driver; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Repositories -{ - public class MarketingDataRepository - : IMarketingDataRepository - { - private readonly MarketingReadDataContext _context; - - public MarketingDataRepository(IOptions settings) - { - _context = new MarketingReadDataContext(settings); - } - - public async Task GetAsync(string userId) - { - var filter = Builders.Filter.Eq("UserId", userId); - return await _context.MarketingData - .Find(filter) - .FirstOrDefaultAsync(); - } - - public async Task UpdateLocationAsync(MarketingData marketingData) - { - var filter = Builders.Filter.Eq("UserId", marketingData.UserId); - var update = Builders.Update - .Set("Locations", marketingData.Locations) - .CurrentDate("UpdateDate"); - - await _context.MarketingData - .UpdateOneAsync(filter, update, new UpdateOptions { IsUpsert = true }); - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Services/IIdentityService.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Services/IIdentityService.cs deleted file mode 100644 index 42df49ebc..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Services/IIdentityService.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Services -{ - public interface IIdentityService - { - string GetUserIdentity(); - } -} diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Services/IdentityService.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Services/IdentityService.cs deleted file mode 100644 index 82ce214be..000000000 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Services/IdentityService.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Services -{ - using AspNetCore.Http; - using System; - - public class IdentityService : IIdentityService - { - private IHttpContextAccessor _context; - - public IdentityService(IHttpContextAccessor context) - { - _context = context ?? throw new ArgumentNullException(nameof(context)); - } - - public string GetUserIdentity() - { - return _context.HttpContext.User.FindFirst("sub").Value; - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs b/src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs deleted file mode 100644 index b73e7b659..000000000 --- a/src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.IntegrationEvents.Events -{ - using Marketing.API.Model; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; - using System.Collections.Generic; - - public class UserLocationUpdatedIntegrationEvent : IntegrationEvent - { - public string UserId { get; set; } - - public List LocationList { get; set; } - - public UserLocationUpdatedIntegrationEvent(string userId, List locationList) - { - UserId = userId; - LocationList = locationList; - } - } -} diff --git a/src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs b/src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs deleted file mode 100644 index 3d5e62e45..000000000 --- a/src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.IntegrationEvents.Handlers -{ - using Marketing.API.IntegrationEvents.Events; - using Marketing.API.Model; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; - using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Repositories; - using Microsoft.Extensions.Logging; - using Serilog.Context; - using System; - using System.Collections.Generic; - using System.Threading.Tasks; - - public class UserLocationUpdatedIntegrationEventHandler - : IIntegrationEventHandler - { - private readonly IMarketingDataRepository _marketingDataRepository; - private readonly ILogger _logger; - - public UserLocationUpdatedIntegrationEventHandler( - IMarketingDataRepository repository, - ILogger logger) - { - _marketingDataRepository = repository ?? throw new ArgumentNullException(nameof(repository)); - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - } - - public async Task Handle(UserLocationUpdatedIntegrationEvent @event) - { - using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}")) - { - _logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event); - - var userMarketingData = await _marketingDataRepository.GetAsync(@event.UserId); - userMarketingData = userMarketingData ?? - new MarketingData() { UserId = @event.UserId }; - - userMarketingData.Locations = MapUpdatedUserLocations(@event.LocationList); - await _marketingDataRepository.UpdateLocationAsync(userMarketingData); - } - } - - private List MapUpdatedUserLocations(List newUserLocations) - { - var result = new List(); - newUserLocations.ForEach(location => { - result.Add(new Location() - { - LocationId = location.LocationId, - Code = location.Code, - Description = location.Description - }); - }); - - return result; - } - } -} diff --git a/src/Services/Marketing/Marketing.API/Marketing.API.csproj b/src/Services/Marketing/Marketing.API/Marketing.API.csproj deleted file mode 100644 index bc3116fc3..000000000 --- a/src/Services/Marketing/Marketing.API/Marketing.API.csproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - netcoreapp3.1 - ..\..\..\..\docker-compose.dcproj - Microsoft.eShopOnContainers.Services.Marketing.API - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - false - true - aspnet-Marketing.API-20161122013619 - - /subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights - /subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights - preview - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - - diff --git a/src/Services/Marketing/Marketing.API/MarketingSettings.cs b/src/Services/Marketing/Marketing.API/MarketingSettings.cs deleted file mode 100644 index 20e5d9c44..000000000 --- a/src/Services/Marketing/Marketing.API/MarketingSettings.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API -{ - public class MarketingSettings - { - public string ConnectionString { get; set; } - public string MongoConnectionString { get; set; } - public string MongoDatabase { get; set; } - public string ExternalCatalogBaseUrl { get; set; } - public string CampaignDetailFunctionUri { get; set; } - public string PicBaseUrl { get; set; } - public bool AzureStorageEnabled { get; set; } - } -} diff --git a/src/Services/Marketing/Marketing.API/Model/Campaign.cs b/src/Services/Marketing/Marketing.API/Model/Campaign.cs deleted file mode 100644 index 841580427..000000000 --- a/src/Services/Marketing/Marketing.API/Model/Campaign.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model -{ - using System; - using System.Collections.Generic; - - public class Campaign - { - public int Id { get; set; } - - public string Name { get; set; } - - public string Description { get; set; } - - public DateTime From { get; set; } - - public DateTime To { get; set; } - - public string PictureName { get; set; } - - public string PictureUri { get; set; } - - public string DetailsUri { get; set; } - - public List Rules { get; set; } - - - public Campaign() - { - Rules = new List(); - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Model/Location.cs b/src/Services/Marketing/Marketing.API/Model/Location.cs deleted file mode 100644 index 6738e1dcf..000000000 --- a/src/Services/Marketing/Marketing.API/Model/Location.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model -{ - public class Location - { - public int LocationId { get; set; } - public string Code { get; set; } - public string Description { get; set; } - } -} diff --git a/src/Services/Marketing/Marketing.API/Model/MarketingData.cs b/src/Services/Marketing/Marketing.API/Model/MarketingData.cs deleted file mode 100644 index 638bffac6..000000000 --- a/src/Services/Marketing/Marketing.API/Model/MarketingData.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MongoDB.Bson; -using MongoDB.Bson.Serialization.Attributes; -using System; -using System.Collections.Generic; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model -{ - public class MarketingData - { - [BsonIgnoreIfDefault] - [BsonRepresentation(BsonType.ObjectId)] - public string Id { get; set; } - public string UserId { get; set; } - public List Locations { get; set; } - public DateTime UpdateDate { get; set; } - } -} diff --git a/src/Services/Marketing/Marketing.API/Model/Rule.cs b/src/Services/Marketing/Marketing.API/Model/Rule.cs deleted file mode 100644 index 6f9f23ef5..000000000 --- a/src/Services/Marketing/Marketing.API/Model/Rule.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model -{ - public abstract class Rule - { - public int Id { get; set; } - - public int CampaignId { get; set; } - - public Campaign Campaign { get; set; } - - public string Description { get; set; } - } - - - public class UserProfileRule : Rule - { - } - - public class PurchaseHistoryRule : Rule - { - } - - public class UserLocationRule : Rule - { - public int LocationId { get; set; } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Model/RuleType.cs b/src/Services/Marketing/Marketing.API/Model/RuleType.cs deleted file mode 100644 index 1fa569cbb..000000000 --- a/src/Services/Marketing/Marketing.API/Model/RuleType.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model -{ - using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Exceptions; - using System; - using System.Collections.Generic; - using System.Linq; - - public sealed class RuleType - { - public static readonly RuleType UserProfileRule = new RuleType(1, nameof(UserProfileRule)); - public static readonly RuleType PurchaseHistoryRule = new RuleType(2, nameof(UserProfileRule)); - public static readonly RuleType UserLocationRule = new RuleType(3, nameof(UserProfileRule)); - - public readonly int Id; - public readonly string Name; - - private RuleType(int id, string name) - { - Id = id; - Name = name; - } - - public static IEnumerable List() => - new[] { UserProfileRule, PurchaseHistoryRule, UserLocationRule }; - - public static RuleType FromName(string name) - { - var state = List() - .SingleOrDefault(s => String.Equals(s.Name, name, StringComparison.CurrentCultureIgnoreCase)); - - if (state == null) - { - throw new MarketingDomainException($"Possible values for RuleType: {String.Join(",", List().Select(s => s.Name))}"); - } - - return state; - } - - public static RuleType From(int id) - { - var state = List().SingleOrDefault(s => s.Id == id); - - if (state == null) - { - throw new MarketingDomainException($"Possible values for RuleType: {String.Join(",", List().Select(s => s.Name))}"); - } - - return state; - } - } -} \ No newline at end of file diff --git a/src/Services/Marketing/Marketing.API/Model/UserLocationDetails.cs b/src/Services/Marketing/Marketing.API/Model/UserLocationDetails.cs deleted file mode 100644 index e6d7fe305..000000000 --- a/src/Services/Marketing/Marketing.API/Model/UserLocationDetails.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model -{ - public class UserLocationDetails - { - public int LocationId { get; set; } - public string Code { get; set; } - public string Description { get; set; } - } -} diff --git a/src/Services/Marketing/Marketing.API/Pics/1.png b/src/Services/Marketing/Marketing.API/Pics/1.png deleted file mode 100644 index 22a6a946f8e8ba387c041bab215e4a842d897a10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139617 zcmV(?K-a&CP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf|D{PpK~#8N#p_Hgf|H6l67B86B?wB>J-MDe1&9v5LP2JIE<^AUMo9&J}d}?j>oH=dk zjyu|onVEL|>eY7n%9S=}_MEn0;es}2&fIn_=dRzl-e%98Q*~#}6oc=vqHn=ix=C?oLR77LA!qKTDzJ4l$z1+^|U{GcJ-(Jjl7(n zo9{(;UN>jb_VpX-XKuT6=~A7%ey!J2*5R|)HSOQX7&G1*>EHM+T)5DdOi#B(ix#)J z8Ox3Ic@a&yK6`3*o0^*H9fj6v?`HZ>Uq_D}sp~GGdv?aTblG&faQ=K-vUECqU2Rvd zUTaGhFK(AFUu?&Z9xHyIzi_@Sn_gD5%t<@*=g+Tk;`>zEEB>Xgg$oy^{?+2+h0tSs zc#dcDBZJwq=hkQa7|-m;=KA$(Z7So`-b}{nI=-Pf#7BmgGv=u_ci#Mr@j}tFXwjnZ z6MlZ;AXQupk+b7|*N zTe)II>5ubW$0M8kkv0C8ZOmeWxlV@q2_L4y8|U$1YR*(UdE#VfpVJnTN7_Zx9g*ji zt5=FH_Bngr+#2(h*el+W3Ed$3d7+zLqcP+~e%(&kEX|DHXeV@_MWc1>hFuk_Jj9NNYw?Hd2p&`EFLN!es{x^N)n>5b3mB0n#>hDY^c zkI|tysdqDDLLWZek?$%Eyi!&>UT}llwXZ+=I+Heyq08!8(dF}0bTn-6HAlzBb7#+1 zJ^a@0^_S^Ls40q)nCq|#i4!5LP5KcccE*aGBZK|NvIB>urQ3SwnHD_^j*IMc;)id zHh;nVGT5tEu9ndd3gs)M<>b-^B^ZW5FpHNgDMk|(Iw;wKv{UT3ajgtu<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