From 09b5bb62b5592fe3f22dfdbeef2f52cfaf49cb5f Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Mon, 28 Aug 2023 17:45:35 -0400 Subject: [PATCH] Updated yarp configurations --- .../appsettings.Docker.json | 52 ++++---- .../appsettings.Staging.json | 113 ------------------ .../src/EShopOnAbp.WebPublicGateway/yarp.json | 44 +++---- .../appsettings.Docker.json | 64 ++++++---- .../web/src/EShopOnAbp.WebGateway/yarp.json | 65 ++++------ 5 files changed, 117 insertions(+), 221 deletions(-) delete mode 100644 gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json index 6c082207..9e679b7e 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json @@ -1,50 +1,62 @@ { "ReverseProxy": { "Routes": { - "Account Service": { - "ClusterId": "accountCluster", + "AbpApi": { + "ClusterId": "Administration", "Match": { - "Path": "/api/account/{**everything}" + "Path": "/api/abp/{**catch-all}" } }, - "Administration Service": { - "ClusterId": "administrationCluster", + "Account Service": { + "ClusterId": "Account", "Match": { - "Path": "/api/abp/{**everything}" + "Path": "/api/account/{**everything}" } }, "Catalog Service": { - "ClusterId": "catalogCluster", + "ClusterId": "Catalog", "Match": { "Path": "/api/catalog/{**everything}" } }, "Basket Service": { - "ClusterId": "basketCluster", + "ClusterId": "Basket", "Match": { "Path": "/api/basket/{**everything}" } }, "Ordering Service": { - "ClusterId": "orderingCluster", + "ClusterId": "Ordering", "Match": { "Path": "/api/ordering/{**everything}" } }, "Payment Service": { - "ClusterId": "paymentCluster", + "ClusterId": "Payment", "Match": { "Path": "/api/payment/{**everything}" } }, "Cmskit Service": { - "ClusterId": "cmskitCluster", + "ClusterId": "CmsKit", "Match": { "Path": "/api/cmskit/{**everything}" } }, + "Cmskit Public Service": { + "ClusterId": "CmsKit", + "Match": { + "Path": "/api/cms-kit-public/{**everything}" + } + }, + "Cmskit Admin Service": { + "ClusterId": "CmsKit", + "Match": { + "Path": "/api/cms-kit-admin/{**everything}" + } + }, "product-picture-route": { - "ClusterId": "productPictureCluster", + "ClusterId": "ProductPictures", "Match": { "Path": "/product-images/{**everything}", "Methods": [ "GET" ] @@ -52,56 +64,56 @@ } }, "Clusters": { - "accountCluster": { + "Account": { "Destinations": { "destination1": { "Address": "http://app-authserver" } } }, - "administrationCluster": { + "Administration": { "Destinations": { "destination1": { "Address": "http://administration-service" } } }, - "catalogCluster": { + "Catalog": { "Destinations": { "destination1": { "Address": "http://catalog-service" } } }, - "basketCluster": { + "Basket": { "Destinations": { "destination1": { "Address": "http://basket-service" } } }, - "orderingCluster": { + "Ordering": { "Destinations": { "destination1": { "Address": "http://ordering-service" } } }, - "paymentCluster": { + "Payment": { "Destinations": { "destination1": { "Address": "http://payment-service" } } }, - "cmskitCluster": { + "CmsKit": { "Destinations": { "destination1": { "Address": "http://cmskit-service" } } }, - "productPictureCluster": { + "ProductPictures": { "Destinations": { "destination1": { "Address": "http://catalog-service" diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json deleted file mode 100644 index 4aa66c8b..00000000 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "ReverseProxy": { - "Routes": { - "Account Service": { - "ClusterId": "accountCluster", - "Match": { - "Path": "/api/account/{**everything}" - } - }, - "Administration Service": { - "ClusterId": "administrationCluster", - "Match": { - "Path": "/api/abp/{**everything}" - } - }, - "Catalog Service": { - "ClusterId": "catalogCluster", - "Match": { - "Path": "/api/catalog/{**everything}" - } - }, - "Basket Service": { - "ClusterId": "basketCluster", - "Match": { - "Path": "/api/basket/{**everything}" - } - }, - "Ordering Service": { - "ClusterId": "orderingCluster", - "Match": { - "Path": "/api/ordering/{**everything}" - } - }, - "Payment Service": { - "ClusterId": "paymentCluster", - "Match": { - "Path": "/api/payment/{**everything}" - } - }, - "Cmskit Service": { - "ClusterId": "cmskitCluster", - "Match": { - "Path": "/api/cmskit/{**everything}" - } - }, - "product-picture-route": { - "ClusterId": "productPictureCluster", - "Match": { - "Path": "/product-images/{**everything}", - "Methods": [ "GET" ] - } - } - }, - "Clusters": { - "accountCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-authserver" - } - } - }, - "administrationCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-administration" - } - } - }, - "catalogCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-catalog" - } - } - }, - "basketCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-basket" - } - } - }, - "orderingCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-ordering" - } - } - }, - "paymentCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-payment" - } - } - }, - "cmskitCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-cmskit" - } - } - }, - "productPictureCluster": { - "Destinations": { - "destination1": { - "Address": "http://eshop-st-catalog" - } - } - } - } - } -} diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json index ea1b357f..42816325 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json @@ -1,62 +1,62 @@ { "ReverseProxy": { "Routes": { - "Account Service": { - "ClusterId": "accountCluster", + "AbpApi": { + "ClusterId": "Administration", "Match": { - "Path": "/api/account/{**everything}" + "Path": "/api/abp/{**catch-all}" } }, - "Administration Service": { - "ClusterId": "administrationCluster", + "Account Service": { + "ClusterId": "Account", "Match": { - "Path": "/api/abp/{**everything}" + "Path": "/api/account/{**everything}" } }, "Catalog Service": { - "ClusterId": "catalogCluster", + "ClusterId": "Catalog", "Match": { "Path": "/api/catalog/{**everything}" } }, "Basket Service": { - "ClusterId": "basketCluster", + "ClusterId": "Basket", "Match": { "Path": "/api/basket/{**everything}" } }, "Ordering Service": { - "ClusterId": "orderingCluster", + "ClusterId": "Ordering", "Match": { "Path": "/api/ordering/{**everything}" } }, "Payment Service": { - "ClusterId": "paymentCluster", + "ClusterId": "Payment", "Match": { "Path": "/api/payment/{**everything}" } }, "Cmskit Service": { - "ClusterId": "cmskitCluster", + "ClusterId": "CmsKit", "Match": { "Path": "/api/cmskit/{**everything}" } }, "Cmskit Public Service": { - "ClusterId": "cmskitCluster", + "ClusterId": "CmsKit", "Match": { "Path": "/api/cms-kit-public/{**everything}" } }, "Cmskit Admin Service": { - "ClusterId": "cmskitCluster", + "ClusterId": "CmsKit", "Match": { "Path": "/api/cms-kit-admin/{**everything}" } }, "product-picture-route": { - "ClusterId": "productPictureCluster", + "ClusterId": "ProductPictures", "Match": { "Path": "/product-images/{**everything}", "Methods": [ "GET" ] @@ -64,56 +64,56 @@ } }, "Clusters": { - "accountCluster": { + "Account": { "Destinations": { "destination1": { "Address": "https://localhost:44330" } } }, - "administrationCluster": { + "Administration": { "Destinations": { "destination1": { "Address": "https://localhost:44353" } } }, - "catalogCluster": { + "Catalog": { "Destinations": { "destination1": { "Address": "https://localhost:44354" } } }, - "basketCluster": { + "Basket": { "Destinations": { "destination1": { "Address": "https://localhost:44355" } } }, - "orderingCluster": { + "Ordering": { "Destinations": { "destination1": { "Address": "https://localhost:44356" } } }, - "paymentCluster": { + "Payment": { "Destinations": { "destination1": { "Address": "https://localhost:44357" } } }, - "cmskitCluster": { + "CmsKit": { "Destinations": { "destination1": { "Address": "https://localhost:44358" } } }, - "productPictureCluster": { + "ProductPictures": { "Destinations": { "destination1": { "Address": "https://localhost:44354" diff --git a/gateways/web/src/EShopOnAbp.WebGateway/appsettings.Docker.json b/gateways/web/src/EShopOnAbp.WebGateway/appsettings.Docker.json index db306048..9c4fd9fe 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/appsettings.Docker.json +++ b/gateways/web/src/EShopOnAbp.WebGateway/appsettings.Docker.json @@ -1,6 +1,12 @@ { "ReverseProxy": { "Routes": { + "AbpApi": { + "ClusterId": "Administration", + "Match": { + "Path": "/api/abp/{**catch-all}" + } + }, "Account Service": { "ClusterId": "accountCluster", "Match": { @@ -8,79 +14,91 @@ } }, "Identity Service": { - "ClusterId": "identityCluster", + "ClusterId": "Identity", "Match": { "Path": "/api/identity/{**everything}" } }, - "Administration Service": { - "ClusterId": "administrationCluster", - "Match": { - "Path": "/api/abp/{**everything}" - } - }, - "feature-management-route": { - "ClusterId": "featureManagementCluster", + "FeatureManagement": { + "ClusterId": "Administration", "Match": { "Path": "/api/feature-management/{**everything}" } }, - "permission-management-route": { - "ClusterId": "permissionManagementCluster", + "PermissionManagement": { + "ClusterId": "Administration", "Match": { "Path": "/api/permission-management/{**everything}" } }, - "setting-management-route": { - "ClusterId": "settingManagementCluster", + "SettingManagement": { + "ClusterId": "Administration", "Match": { "Path": "/api/setting-management/{**everything}" } + }, + "Catalog Service": { + "ClusterId": "Catalog", + "Match": { + "Path": "/api/catalog/{**everything}" + } + }, + "Ordering Service": { + "ClusterId": "Ordering", + "Match": { + "Path": "/api/ordering/{**everything}" + } + }, + "Cmskit Service": { + "ClusterId": "CmsKit", + "Match": { + "Path": "/api/cmskit/{**everything}" + } } }, "Clusters": { - "accountCluster": { + "Account": { "Destinations": { "destination1": { "Address": "http://app-authserver" } } }, - "identityCluster": { + "Identity": { "Destinations": { "destination1": { "Address": "http://identity-service" } } }, - "administrationCluster": { + "Administration": { "Destinations": { "destination1": { "Address": "http://administration-service" } } }, - "featureManagementCluster": { + "Catalog": { "Destinations": { "destination1": { - "Address": "http://administration-service" + "Address": "http://catalog-service" } } }, - "permissionManagementCluster": { + "Ordering": { "Destinations": { "destination1": { - "Address": "http://administration-service" + "Address": "http://ordering-service" } } }, - "settingManagementCluster": { + "CmsKit": { "Destinations": { "destination1": { - "Address": "http://administration-service" + "Address": "http://cmskit-service" } } - } + }, } } } diff --git a/gateways/web/src/EShopOnAbp.WebGateway/yarp.json b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json index 14e6e5a8..e4212330 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/yarp.json +++ b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json @@ -1,6 +1,12 @@ { "ReverseProxy": { "Routes": { + "AbpApi": { + "ClusterId": "Administration", + "Match": { + "Path": "/api/abp/{**catch-all}" + } + }, "Account Service": { "ClusterId": "accountCluster", "Match": { @@ -8,112 +14,85 @@ } }, "Identity Service": { - "ClusterId": "identityCluster", + "ClusterId": "Identity", "Match": { "Path": "/api/identity/{**everything}" } }, - "Administration Service": { - "ClusterId": "administrationCluster", - "Match": { - "Path": "/api/abp/{**everything}" - } - }, - "feature-management-route": { - "ClusterId": "feature-management-cluster", + "FeatureManagement": { + "ClusterId": "Administration", "Match": { "Path": "/api/feature-management/{**everything}" } }, - "permission-management-route": { - "ClusterId": "permission-management-cluster", + "PermissionManagement": { + "ClusterId": "Administration", "Match": { "Path": "/api/permission-management/{**everything}" } }, - "setting-management-route": { - "ClusterId": "setting-management-cluster", + "SettingManagement": { + "ClusterId": "Administration", "Match": { "Path": "/api/setting-management/{**everything}" } }, "Catalog Service": { - "ClusterId": "catalogCluster", + "ClusterId": "Catalog", "Match": { "Path": "/api/catalog/{**everything}" } }, "Ordering Service": { - "ClusterId": "orderingCluster", + "ClusterId": "Ordering", "Match": { "Path": "/api/ordering/{**everything}" } }, "Cmskit Service": { - "ClusterId": "cmskitCluster", + "ClusterId": "CmsKit", "Match": { "Path": "/api/cmskit/{**everything}" } } }, "Clusters": { - "accountCluster": { + "Account": { "Destinations": { "destination1": { "Address": "https://localhost:44330" } } }, - "identityCluster": { + "Identity": { "Destinations": { "destination1": { "Address": "https://localhost:44351" } } }, - "administrationCluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44353" - } - } - }, - "feature-management-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44353" - } - } - }, - "permission-management-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44353" - } - } - }, - "setting-management-cluster": { + "Administration": { "Destinations": { "destination1": { "Address": "https://localhost:44353" } } }, - "catalogCluster": { + "Catalog": { "Destinations": { "destination1": { "Address": "https://localhost:44354" } } }, - "orderingCluster": { + "Ordering": { "Destinations": { "destination1": { "Address": "https://localhost:44356" } } }, - "cmskitCluster": { + "CmsKit": { "Destinations": { "destination1": { "Address": "https://localhost:44358"