From fa892ef83253af3f0781d9dfee3b7a9c5838be7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sat, 23 Oct 2021 21:46:03 +0300 Subject: [PATCH 01/38] removed consul --- etc/k8s/eshoponabp/charts/consul/Chart.yaml | 6 ----- .../consul/templates/consul-service.yaml | 17 ------------- .../charts/consul/templates/consul.yaml | 24 ------------------- etc/k8s/eshoponabp/charts/consul/values.yaml | 0 etc/k8s/eshoponabp/templates/_helpers.tpl | 6 ++--- etc/k8s/eshoponabp/values.yaml | 6 ++--- .../appsettings.json | 5 ---- 7 files changed, 5 insertions(+), 59 deletions(-) delete mode 100644 etc/k8s/eshoponabp/charts/consul/Chart.yaml delete mode 100644 etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml delete mode 100644 etc/k8s/eshoponabp/charts/consul/templates/consul.yaml delete mode 100644 etc/k8s/eshoponabp/charts/consul/values.yaml diff --git a/etc/k8s/eshoponabp/charts/consul/Chart.yaml b/etc/k8s/eshoponabp/charts/consul/Chart.yaml deleted file mode 100644 index ae174a63..00000000 --- a/etc/k8s/eshoponabp/charts/consul/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: consul -appVersion: "1.0" -description: Runs Consul instance -version: 1.0.0 -type: application diff --git a/etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml b/etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml deleted file mode 100644 index 1af77696..00000000 --- a/etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - name: {{ .Release.Name }}-{{ .Chart.Name }} - name: {{ .Release.Name }}-{{ .Chart.Name }} -spec: - type: ClusterIP - ports: - - name: consul-1 - protocol: TCP - port: 8500 - - name: consul-2 - protocol: TCP - port: 8600 - selector: - app: {{ .Release.Name }}-{{ .Chart.Name }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/consul/templates/consul.yaml b/etc/k8s/eshoponabp/charts/consul/templates/consul.yaml deleted file mode 100644 index cb1cc9e1..00000000 --- a/etc/k8s/eshoponabp/charts/consul/templates/consul.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-{{ .Chart.Name }} -spec: - replicas: 1 - selector: - matchLabels: - app: {{ .Release.Name }}-{{ .Chart.Name }} - template: - metadata: - labels: - app: {{ .Release.Name }}-{{ .Chart.Name }} - spec: - containers: - - image: consul - name: {{ .Release.Name }}-{{ .Chart.Name }} - ports: - - name: consul-1 - protocol: TCP - containerPort: 8500 - - name: consul-2 - protocol: TCP - containerPort: 8600 \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/consul/values.yaml b/etc/k8s/eshoponabp/charts/consul/values.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/etc/k8s/eshoponabp/templates/_helpers.tpl b/etc/k8s/eshoponabp/templates/_helpers.tpl index c9dd2693..140c753f 100644 --- a/etc/k8s/eshoponabp/templates/_helpers.tpl +++ b/etc/k8s/eshoponabp/templates/_helpers.tpl @@ -64,8 +64,6 @@ Create the name of the service account to use {{- define "eshoponabp.global.env" -}} - name: "DOTNET_ENVIRONMENT" value: "{{ .Values.global.dotnetEnvironment }}" -- name: "AppUrls__ApiInternal" - value: "{{ .Values.global.apiUrlInternal }}" - name: "Redis__Configuration" value: "{{ .Values.global.redisConfiguration }}" - name: "AuthServer__Authority" @@ -76,6 +74,6 @@ Create the name of the service account to use value: "{{ .Values.global.stringEncryptionDefaultPassPhrase }}" - name: "RabbitMQ__Connections__Default__HostName" value: "{{ .Values.global.rabbitMqHostName }}" -- name: "Consul__Host" - value: "{{ .Values.global.consulHostname }}" +- name: "ElasticSearch__Url" + value: "{{ .Values.global.elasticSearchUrl }}" {{- end }} diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 16d8a212..487c707e 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -10,8 +10,8 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "" -administration: - env: +# administration: + # env: # - name: "ADMIN_SPECIFIC_ENV_NAME" # value: "ADMIN_SPECIFIC_ENV_VALUE" @@ -120,7 +120,7 @@ global: containerImage: "eshoponabp/gateway-publicweb" redisConfiguration: "eshoponabp-redis" rabbitMqHostName: "eshoponabp-rabbitmq" - consulHostname: "http://eshoponabp-consul" + elasticSearchUrl: "" nginxProxyBufferSize: "32k" nginxProxyBuffersNumber: "8" internalAuthServerAuthority: "http://eshoponabp-authserver" diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json index ba5d742b..0bb09d1e 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json @@ -55,10 +55,5 @@ }, "ElasticSearch": { "Url": "http://localhost:9200" - }, - "Consul": { - "Enabled": true, - "Host": "http://localhost:8500", - "Service": "Administration Service" } } From a7661a1dd28e12f7fc89e820be713f63be9681b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sat, 23 Oct 2021 21:46:09 +0300 Subject: [PATCH 02/38] added administration values --- etc/k8s/eshoponabp/charts/administration/values.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/etc/k8s/eshoponabp/charts/administration/values.yaml b/etc/k8s/eshoponabp/charts/administration/values.yaml index e69de29b..d34ebbdc 100644 --- a/etc/k8s/eshoponabp/charts/administration/values.yaml +++ b/etc/k8s/eshoponabp/charts/administration/values.yaml @@ -0,0 +1,12 @@ + env: + - name: "App__SelfUrl" + value: "https://eshoponabp-administration" + - name: "App__CorsOrigins" + value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" + - name: "AuthServer__Authority" + value: "https://eshoponabp-authserver" + - name: "RemoteServices__Default__BaseUrl" + value: "https://eshoponabp-gateway-internal/" + - name: "IdentityClients__IdentityClients__Authority" + value: "https://eshoponabp-authserver" + \ No newline at end of file From 44374fb983d2a3bf5cfe552348f1cf383740b419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sat, 23 Oct 2021 21:51:27 +0300 Subject: [PATCH 03/38] added public web values --- etc/k8s/eshoponabp/charts/public-web/values.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/k8s/eshoponabp/charts/public-web/values.yaml b/etc/k8s/eshoponabp/charts/public-web/values.yaml index e69de29b..f57d8644 100644 --- a/etc/k8s/eshoponabp/charts/public-web/values.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/values.yaml @@ -0,0 +1,6 @@ + env: + - name: "App__SelfUrl" + value: "https://eshoponabp-public-web" + - name: "RemoteServices__Default__BaseUrl" + value: "https://eshoponabp-public-webgateway/" + \ No newline at end of file From 1665f835e61d207a6f06031bf6782bbd52fd63e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sat, 23 Oct 2021 21:51:43 +0300 Subject: [PATCH 04/38] removed local authority from administration service --- etc/k8s/eshoponabp/charts/administration/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/administration/values.yaml b/etc/k8s/eshoponabp/charts/administration/values.yaml index d34ebbdc..0fea8169 100644 --- a/etc/k8s/eshoponabp/charts/administration/values.yaml +++ b/etc/k8s/eshoponabp/charts/administration/values.yaml @@ -3,8 +3,6 @@ value: "https://eshoponabp-administration" - name: "App__CorsOrigins" value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" - - name: "AuthServer__Authority" - value: "https://eshoponabp-authserver" - name: "RemoteServices__Default__BaseUrl" value: "https://eshoponabp-gateway-internal/" - name: "IdentityClients__IdentityClients__Authority" From c8b8b4fa269792974ff3c137bd96c86c6814c9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sat, 23 Oct 2021 22:20:59 +0300 Subject: [PATCH 05/38] added public-webgateway and configmap --- .../public-webgateway-configmap.yaml | 76 +++++++++++++++++++ .../charts/public-webgateway/values.yaml | 5 ++ 2 files changed, 81 insertions(+) create mode 100644 etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml new file mode 100644 index 00000000..4a579d92 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml @@ -0,0 +1,76 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + name: {{ .Release.Name }}-{{ .Chart.Name }} + name: {{ .Release.Name }}-{{ .Chart.Name }} +data: + appsettings.json: |- + { + "Routes": [ + { + "ServiceKey": "Identity Service", + "DownstreamPathTemplate": "/api/account/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-identity", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/account/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/abp/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/abp/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Catalog Service", + "DownstreamPathTemplate": "/api/catalog/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-catalog", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/catalog/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Basket Service", + "DownstreamPathTemplate": "/api/basket/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-basket", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/basket/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Ordering Service", + "DownstreamPathTemplate": "/api/ordering/{everything}", + "DownstreamScheme": "htt", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-ordering", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/ordering/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }] + } \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml index e69de29b..bb2a1161 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml @@ -0,0 +1,5 @@ + env: + - name: "App__SelfUrl" + value: "https://eshoponabp-public-webgateway" + - name: "Routes__DownstreamHostAndPorts__Host" + value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" \ No newline at end of file From c2cb1be9b248ebc775c36b334eac65ff6a6e3ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sat, 23 Oct 2021 22:55:01 +0300 Subject: [PATCH 06/38] updated configmap --- .../templates/public-webgateway-configmap.yaml | 4 +--- .../public-webgateway/templates/public-webgateway.yaml | 7 +++++++ .../web-public/src/EShopOnAbp.WebPublicGateway/Program.cs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml index 4a579d92..895fefac 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml @@ -1,9 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - labels: - name: {{ .Release.Name }}-{{ .Chart.Name }} - name: {{ .Release.Name }}-{{ .Chart.Name }} + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap data: appsettings.json: |- { diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml index 470e520d..8965e966 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml @@ -20,5 +20,12 @@ spec: containerPort: 80 - name: https containerPort: 443 + volumeMounts: + - name: config-volume + mountPath: /app/config env: {{ include "eshoponabp.global.env" . | indent 8 }} + volumes: + - name: config-volume + configMap: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap \ No newline at end of file diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs index cd7274fa..7e4b70f7 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs @@ -37,7 +37,7 @@ namespace EShopOnAbp.WebPublicGateway Host.CreateDefaultBuilder(args) .ConfigureAppConfiguration(build => { - build.AddJsonFile("appsettings.secrets.json", optional: true); + build.AddJsonFile("appsettings.secrets.json", optional: true, reloadOnChange:true); }) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }) .UseAutofac() From f347b5ab0653cc961e62e35acfe483ff2e7d9234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sun, 24 Oct 2021 02:28:20 +0300 Subject: [PATCH 07/38] fixed web gateway and public web --- .../charts/public-web/templates/public-web.yaml | 5 ++++- .../templates/public-webgateway-configmap.yaml | 2 +- .../templates/public-webgateway.yaml | 3 +++ .../charts/public-webgateway/values.yaml | 16 ++++++++++++++-- etc/k8s/eshoponabp/values.yaml | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml index 8e688a21..c289f731 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml @@ -23,4 +23,7 @@ spec: env: {{ include "eshoponabp.global.env" . | indent 8 }} - name: "RemoteServices__Default__BaseUrl" - value: {{ .Values.global.publicWeb.remoteServiceUrl }} \ No newline at end of file + value: {{ .Values.global.publicWeb.remoteServiceUrl }} + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml index 895fefac..43e3a92e 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml @@ -61,7 +61,7 @@ data: { "ServiceKey": "Ordering Service", "DownstreamPathTemplate": "/api/ordering/{everything}", - "DownstreamScheme": "htt", + "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "eshoponabp-ordering", diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml index 8965e966..c883ed07 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml @@ -25,6 +25,9 @@ spec: mountPath: /app/config env: {{ include "eshoponabp.global.env" . | indent 8 }} + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} volumes: - name: config-volume configMap: diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml index bb2a1161..ec2ae333 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml @@ -1,5 +1,17 @@ env: - name: "App__SelfUrl" value: "https://eshoponabp-public-webgateway" - - name: "Routes__DownstreamHostAndPorts__Host" - value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" \ No newline at end of file + - name: "GlobalConfiguration__BaseUrl" + value: "https://eshoponabp-public-webgateway" + - name: "Routes__0__DownstreamScheme" + value: "http" + - name: "Routes__0__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-identity" + - name: "Routes__0__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__1__DownstreamScheme" + value: "http" + - name: "Routes__1__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-administration" + - name: "Routes__1__DownstreamHostAndPorts__0__Port" + value: "80" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 487c707e..47bded3a 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -116,7 +116,7 @@ global: connString: "Server=eshoponabp-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" publicWebGateway: domain: eshoponabp-public-webgateway - url: https://eshoponabp-public-webgateway + url: http://eshoponabp-public-webgateway containerImage: "eshoponabp/gateway-publicweb" redisConfiguration: "eshoponabp-redis" rabbitMqHostName: "eshoponabp-rabbitmq" From 2e618f8044924a67d69dde9431a6ca8b966667d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sun, 24 Oct 2021 02:28:24 +0300 Subject: [PATCH 08/38] Update README.md --- etc/k8s/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/k8s/README.md b/etc/k8s/README.md index e34481e5..4bf12383 100644 --- a/etc/k8s/README.md +++ b/etc/k8s/README.md @@ -4,7 +4,7 @@ * Install [NGINX ingress](https://kubernetes.github.io/ingress-nginx/deploy/) for k8s OR * Install NGINX ingress using helm -``` +```powershell helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update @@ -17,7 +17,7 @@ helm install ingress-nginx ingress-nginx/ingress-nginx * Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`): -```` +````powershell 127.0.0.1 eshoponabp-public-web 127.0.0.1 eshoponabp-authserver 127.0.0.1 eshoponabp-identity From aa2f503c60e0d8ca9a7029fe03e1ba7fda252469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sun, 24 Oct 2021 02:28:56 +0300 Subject: [PATCH 09/38] Update EShopOnAbpPublicWebModule.cs --- .../src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs index 7da26e01..9d469c72 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs @@ -55,6 +55,7 @@ namespace EShopOnAbp.PublicWeb public override void ConfigureServices(ServiceConfigurationContext context) { + Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true; var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); From 10b4b2fe87f6c7bcf81e10769e7e910a1900b17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sun, 24 Oct 2021 03:08:02 +0300 Subject: [PATCH 10/38] public-web fixed gateway http request --- etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml | 2 -- etc/k8s/eshoponabp/charts/public-web/values.yaml | 2 +- etc/k8s/eshoponabp/charts/public-webgateway/values.yaml | 2 +- etc/k8s/eshoponabp/values.yaml | 3 +-- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml index c289f731..0f39e988 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml @@ -22,8 +22,6 @@ spec: containerPort: 443 env: {{ include "eshoponabp.global.env" . | indent 8 }} - - name: "RemoteServices__Default__BaseUrl" - value: {{ .Values.global.publicWeb.remoteServiceUrl }} {{- if .Values.env }} {{ toYaml .Values.env | indent 8 }} {{- end }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/public-web/values.yaml b/etc/k8s/eshoponabp/charts/public-web/values.yaml index f57d8644..4ba89c78 100644 --- a/etc/k8s/eshoponabp/charts/public-web/values.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/values.yaml @@ -2,5 +2,5 @@ - name: "App__SelfUrl" value: "https://eshoponabp-public-web" - name: "RemoteServices__Default__BaseUrl" - value: "https://eshoponabp-public-webgateway/" + value: "http://eshoponabp-public-webgateway/" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml index ec2ae333..9fe11c70 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml @@ -2,7 +2,7 @@ - name: "App__SelfUrl" value: "https://eshoponabp-public-webgateway" - name: "GlobalConfiguration__BaseUrl" - value: "https://eshoponabp-public-webgateway" + value: "http://eshoponabp-public-webgateway" - name: "Routes__0__DownstreamScheme" value: "http" - name: "Routes__0__DownstreamHostAndPorts__0__Host" diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 47bded3a..936ec146 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -94,7 +94,6 @@ global: domain: eshoponabp-public-web url: https://eshoponabp-public-web containerImage: "eshoponabp/app-publicweb" - remoteServiceUrl: http://eshoponabp-public-webgateway authServer: domain: eshoponabp-authserver url: https://eshoponabp-authserver @@ -116,7 +115,7 @@ global: connString: "Server=eshoponabp-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" publicWebGateway: domain: eshoponabp-public-webgateway - url: http://eshoponabp-public-webgateway + url: https://eshoponabp-public-webgateway containerImage: "eshoponabp/gateway-publicweb" redisConfiguration: "eshoponabp-redis" rabbitMqHostName: "eshoponabp-rabbitmq" From 3a5c6a872ca3927f2537d6e341069861e8b09d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sun, 24 Oct 2021 04:12:46 +0300 Subject: [PATCH 11/38] Update Authserver --- .../EShopOnAbp.AuthServer.csproj | 7 +++++++ .../EShopOnAbpAuthServerModule.cs | 15 ++++++++++++--- .../EShopOnAbp.PublicWeb.csproj | 5 ++++- etc/k8s/eshoponabp/charts/authserver/values.yaml | 8 ++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj index 7a386146..9a5e2b10 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj @@ -30,4 +30,11 @@ + + + + + + + diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs index 726fcc96..be1b010d 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs @@ -12,6 +12,8 @@ using StackExchange.Redis; using System; using System.IO; using System.Linq; +using IdentityServer4.Extensions; +using Microsoft.Extensions.Configuration; using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.Account.Web; @@ -47,6 +49,7 @@ namespace EShopOnAbp.AuthServer { public override void ConfigureServices(ServiceConfigurationContext context) { + Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true; var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); @@ -114,10 +117,16 @@ namespace EShopOnAbp.AuthServer var app = context.GetApplicationBuilder(); var env = context.GetEnvironment(); - app.Use((ctx, next) => + var configuration = context.ServiceProvider.GetRequiredService(); + + app.Use(async (ctx, next) => { - ctx.Request.Scheme = "https"; - return next(); + if (ctx.Request.Headers.ContainsKey("from-ingress")) + { + ctx.SetIdentityServerOrigin(configuration["App:SelfUrl"]); + } + + await next(); }); if (env.IsDevelopment()) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj index e73523ba..82cbb4b6 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj @@ -43,7 +43,10 @@ - <_ContentIncludedByDefault Remove="Pages\Products\Index.cshtml" /> + + + + diff --git a/etc/k8s/eshoponabp/charts/authserver/values.yaml b/etc/k8s/eshoponabp/charts/authserver/values.yaml index e69de29b..a674c028 100644 --- a/etc/k8s/eshoponabp/charts/authserver/values.yaml +++ b/etc/k8s/eshoponabp/charts/authserver/values.yaml @@ -0,0 +1,8 @@ + env: + - name: "App__SelfUrl" + value: "https://eshoponabp-authserver" + - name: "App__CorsOrigins" + value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" + - name: "App__RedirectAllowedUrls" + value: "http://localhost:4200,https://localhost:44307" + \ No newline at end of file From f899f996186ebe075f9ceb4b2949e639d72b1481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Mon, 25 Oct 2021 17:37:39 +0300 Subject: [PATCH 12/38] added pfx and authserver module update --- .../EShopOnAbp.AuthServer.csproj | 4 ++ .../EShopOnAbpAuthServerModule.cs | 37 ++++++++++++++++++ .../eshoponabp-authserver.pfx | Bin 0 -> 3701 bytes 3 files changed, 41 insertions(+) create mode 100644 apps/auth-server/src/EShopOnAbp.AuthServer/eshoponabp-authserver.pfx diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj index 9a5e2b10..7d9b3906 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj @@ -35,6 +35,10 @@ + + + Always + diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs index be1b010d..93f5256c 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs @@ -12,7 +12,9 @@ using StackExchange.Redis; using System; using System.IO; using System.Linq; +using System.Security.Cryptography.X509Certificates; using IdentityServer4.Extensions; +using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Volo.Abp; using Volo.Abp.Account; @@ -25,6 +27,7 @@ using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.Emailing; using Volo.Abp.EventBus.RabbitMq; +using Volo.Abp.IdentityServer; using Volo.Abp.Modularity; using Volo.Abp.MultiTenancy; using Volo.Abp.UI.Navigation.Urls; @@ -47,6 +50,40 @@ namespace EShopOnAbp.AuthServer )] public class EShopOnAbpAuthServerModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + var hostingEnvironment = context.Services.GetHostingEnvironment(); + + if (!hostingEnvironment.IsDevelopment()) + { + var configuration = context.Services.GetConfiguration(); + + PreConfigure(options => + { + options.AddDeveloperSigningCredential = false; + }); + + PreConfigure(builder => + { + builder.AddSigningCredential(GetSigningCertificate(hostingEnvironment, configuration)); + }); + } + } + + private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration) + { + var fileName = "eshoponabp-authserver.pfx"; + var passPhrase = "780F3C11-0A96-40DE-B335-9848BE88C77D"; + var file = Path.Combine(hostingEnv.ContentRootPath, fileName); + + if (!File.Exists(file)) + { + throw new FileNotFoundException($"Signing Certificate couldn't found: {file}"); + } + + return new X509Certificate2(file, passPhrase); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true; diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/eshoponabp-authserver.pfx b/apps/auth-server/src/EShopOnAbp.AuthServer/eshoponabp-authserver.pfx new file mode 100644 index 0000000000000000000000000000000000000000..3b0c5860fb4fdcc35fd0bc3ec30547089ee517bf GIT binary patch literal 3701 zcmV-*4vO(Gf(~&40Ru3C4mSn~Duzgg_YDCD0ic2oCm+#!xn>pfW6ncUMf+!CkhPAmCw~7iE z`bq_ib+$_y=TX0YqGP^)_%y$*Nnx-zjUK1Am$g%%u6c81;D04CX?;0~=#vUHCs7Y_ z#3F?Xg)bJ}9TQYicxlYcGFhJXdgtcSVn_N`h{8GYO7!gI8acL2VKid69nn~6;q}jt zlpTc{R_fBFjHedDIeo(Y-}f3aUA(=jbT)F^5M}OM}Km z$mwcY+XxEHYT~lAsWb*=b|;oAe{0{fhXnqUWKEa!RG#h?F)KnzxtdsQ=BFFIUGbRmey zuDp6t8Zbrgu7K+Qit-Z@BWUN<5$N<=9OU#8FPJ@n3J`vYF&&UwB)y@Pk8**2244D7 z|40l<>J3eXORct@kJ&++t z%>DpiJNRBBi-*3<5F+w#Nlqk>D5>%TKBjo=@WGG{y>neG-kwgkZ zO-8vU&xszCT+V|RKm7wr121#EpU_O*z&-FZlWo}szbnqvj3w)3&(Pm#0oX1TKDG+W zUI37tjn)YODiVIPo#5ikUl%WgjpFytA|Mrf$gm;R6b5)mn4>O&aD~djy1QXRuSQ+6 z7<-FD1${k|r#EQr`k*!r0!1Kr0`lKNsR^JSOtV*^Q*9c*d%% z*I)$qy9s3B1wsNNJt-j%*I%q*uxaEoh+j4zK$5Y5fByVO9yOjl9G%F=7=B1tB9)u> z4I*pBvcD;^U9$sr3FWy!Ke?Vg6;5?rFEr5^)YH1QTYJA5FWA5OSVhmt4W$EE#kton zzrc|9FmP+_0n)eX*)-`uWzW^2u5?w4mLwgSY173GOgbe@s=cSZ0qyu+jTSee0Lq9R z9Cs8L4V(i4&X9A3)kdSPQ-|6Y$1)Y2sy%V=f(IB4dw&)5jaR#)h+NUG+!rehrZLd= zfr&M2XbLkZQ~)eAj`epVe%DY$OFo$$VrVqn?mwX2OunxDhmEC8vFfubk5%DR^%`+$ z6ZdyC0D}oNJ=%GGM+Zixo{?0(&yRv(J#XX=n&t4JExoP)__=vy2@^!k0!Z;nic7nHzRm$iuOpZX}3 zOH@y=)>EcP!Wm3dUGa1Rb2zVm#q7C2uHplEU`^YfQpQC$LCrjsP_g%RL6Euvn{=>U zJJEwVS~~dG6i8|~vR5gJd*Y-{(VN@MMqNuGHK50L@F1@dfXgC%J}gsIs>>%aSJzAW zJzCXw=UGyQIFq=zxo?qszT7b~5)5Vg<@s8aO-521z4!k8U-D}49VtB3q`$~Pi}9rh zoH*(*O8Q$;Omv&IxG`=VrqD(8|ql&O6CRTl&g}CEODN0I@%Ql%Raz%?ctQf zacpb#a6gOoJFu56<2c#Tx(C+??Q*w5mSZVx%Jlq)XO?s;5&>Spq@4O7T@kYeQ(hGR zUpgliB`uf}^o-bPX$&DSBV;F|*7Ysyx0e5-Pliu=%vSf}BDAQF-Cpoy_I|FYT$dlx zaqfr?vI1Yy#P>EFIPTE26Hdce?KYrp1#42DnGSupM%3#0)o~?6JgU{HL;N|slwz$t zDAS6tN?lW~&*FAr_Jf(&>NTU4k?s1^F+9?tgTJT2s*j=0DJLoJG1ha)#)YoNAVQr$JJ#YtJi&)wo|9&*=DxFhX>@Yj1pzVQq%Z2Lu@oauW|_f0WN~ZX#vKA&K%yE znu9BM0RW;E1)QLp6Eb;Uhl6Je0g;WEZ;&+Vp{Qi?5x_j^r<)oS?!i05msEGQokQqu zDv!6aYQm|Q&y;Pkp&zJhr#A z+ASeJVqIruMXXI5cvPFVqvkg!qY7&LNQUTy?)lL=AF z5M#IZNk<~Cz^dgM*1EH$1UXb>d~4{w`fF9GKH@h}>hPx@b+tgZjWH<*GvnPthJHAa z8636GX+k1oz2~pCCJXro&4R9eXU<*JJYsaKW@!*GXC%d%a^?S5e)qR#WM)>37+Z}f zypnp*O*+JFMi* znpCa}k%lB3IPKMm_8%!18^!~$-03=#rOBLoxz!q*?F&0rX% zw@CN+*RXdhtQ~lERF9=dGLgGVmJ!m?vz%0140X3XmB21J}rqv(=LLEb{CiFj| z48_~&c=P&hZ&nJnW={xxl_u3tUE~@dzN5+K>wV{CdYQyZEmfAx##IUny>3V?PHEHc z|JYb7l7%L zIY4!TYnnzWTRMDgXZUH%nXP*EN*Wb|M|(7;@cDqaa2HS{yd+508e@d44Z}?&q5^1+ zooy8{B}M_S;X|f3o}j&{ z;LBQUT(`4OZ;r+u$2Bha=qZ&>ifnY&xDoCK9dhPq-c}pD}#^opd za)e|tCMJTXnwYE3+7txGcZ+!mx%C|ditq;7UJ{O*Ak$pRg=KCS%C2y3yyWAU5fcuw zk$u6y#W(IF3{vdr>+`1kB$s=;bj34ULyU}_;t=4!#PnCLD2>C^bN#kmuJ!jNb^^O(0@mkm&xVzggmCr|wRao8j{B&e+SV6=K=BD470qt87GF?8M#e|8_g|*d4 zY&_F7X@>aH;t3``NJIv35)zIn^RuKgY`VfUjy?10VmJ7|bFtnf*=rRRpIVabBy>Ni z->6~e*7P{uf~6&AJaNe1;UD7Gk9gz(4&3OFbE>{|gY+MvLSCz0oFiw+m+u`#1XwX8Fe3&DDuzgg_YDCF6)_eB6f&id zTEzd|7BqSK)}*-PQG#iNvoJ9*AutIB1uG5%0vZJX1QdJ0`yzTV5>zMr3NIX9zJq&p TUP}ZB1LC*>s0dYc0s;sCPBz(G literal 0 HcmV?d00001 From a5a050a0b5f7d26af6f3e2354005ef8e31f40883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Mon, 25 Oct 2021 18:21:50 +0300 Subject: [PATCH 13/38] removed consul configuration --- .../EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json index f6ddc93a..00acbfa9 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json @@ -42,11 +42,6 @@ "ElasticSearch": { "Url": "http://localhost:9200" }, - "Consul": { - "Enabled": true, - "Host": "http://localhost:8500", - "Service": "Identity Service" - }, "IdentityServerClients": { "EShopOnAbp_Angular": { "RootUrl": "http://localhost:4200" From 1a9224f6535d9c0b57c72e75c88cec8bf16157c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Mon, 25 Oct 2021 18:22:05 +0300 Subject: [PATCH 14/38] updated identity service values --- .../charts/identity/templates/identity.yaml | 4 +++- etc/k8s/eshoponabp/charts/identity/values.yaml | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/etc/k8s/eshoponabp/charts/identity/templates/identity.yaml b/etc/k8s/eshoponabp/charts/identity/templates/identity.yaml index 89128bd8..a34773ed 100644 --- a/etc/k8s/eshoponabp/charts/identity/templates/identity.yaml +++ b/etc/k8s/eshoponabp/charts/identity/templates/identity.yaml @@ -28,4 +28,6 @@ spec: value: {{ .Values.global.administrationService.connString }} - name: "ConnectionStrings__SaasService" value: {{ .Values.global.saasService.connString }} - + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} diff --git a/etc/k8s/eshoponabp/charts/identity/values.yaml b/etc/k8s/eshoponabp/charts/identity/values.yaml index e69de29b..84a33212 100644 --- a/etc/k8s/eshoponabp/charts/identity/values.yaml +++ b/etc/k8s/eshoponabp/charts/identity/values.yaml @@ -0,0 +1,15 @@ + env: + - name: "App__SelfUrl" + value: "https://eshoponabp-identity" + - name: "App__CorsOrigins" + value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" + - name: "IdentityServerClients__EShopOnAbp_Angular__RootUrl" + value: "https://eshoponabp-web/" + - name: "IdentityServerClients__EShopOnAbp_PublicWeb__RootUrl" + value: "https://eshoponabp-public-web/" + - name: "IdentityServerClients__IdentityService__RootUrl" + value: "https://eshoponabp-identity/" + - name: "IdentityServerClients__SaasService__RootUrl" + value: "https://eshoponabp-saas/" + - name: "IdentityServerClients__AdministrationService__RootUrl" + value: "https://eshoponabp-administration/" \ No newline at end of file From 46a47c5ebe1d152672ae2c272b60bdd3e80a6bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Mon, 25 Oct 2021 18:47:22 +0300 Subject: [PATCH 15/38] Fixed data protection key --- .../src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs index 9d469c72..46b4c4b6 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs @@ -105,7 +105,7 @@ namespace EShopOnAbp.PublicWeb var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); context.Services .AddDataProtection() - .PersistKeysToStackExchangeRedis(redis, "MyProjectName-Protection-Keys"); + .PersistKeysToStackExchangeRedis(redis, "EShopOnAbp-Protection-Keys"); Configure(options => { From e65051799dd1facaf86ae144d67e7573a6f4e153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Mon, 25 Oct 2021 19:05:56 +0300 Subject: [PATCH 16/38] Added IssuerUri --- .../src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs index 93f5256c..fa2e0756 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs @@ -13,6 +13,7 @@ using System; using System.IO; using System.Linq; using System.Security.Cryptography.X509Certificates; +using IdentityServer4.Configuration; using IdentityServer4.Extensions; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; @@ -89,6 +90,11 @@ namespace EShopOnAbp.AuthServer Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true; var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); + + Configure(options => + { + options.IssuerUri = configuration["App:SelfUrl"]; + }); Configure(options => { From e0c99e353e842eb4871aecf5a46ac70b90e822da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Mon, 25 Oct 2021 19:58:26 +0300 Subject: [PATCH 17/38] added application name to data protection persistency --- .../src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs | 3 ++- .../src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs index fa2e0756..71678fff 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs @@ -120,7 +120,8 @@ namespace EShopOnAbp.AuthServer var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); context.Services .AddDataProtection() - .PersistKeysToStackExchangeRedis(redis, "EShopOnAbp-Protection-Keys"); + .PersistKeysToStackExchangeRedis(redis, "EShopOnAbp-Protection-Keys") + .SetApplicationName("eShopOnAbp-AuthServer"); context.Services.AddCors(options => { diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs index 46b4c4b6..663505e7 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs @@ -105,7 +105,8 @@ namespace EShopOnAbp.PublicWeb var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); context.Services .AddDataProtection() - .PersistKeysToStackExchangeRedis(redis, "EShopOnAbp-Protection-Keys"); + .PersistKeysToStackExchangeRedis(redis, "EShopOnAbp-Protection-Keys") + .SetApplicationName("eShopOnAbp-PublicWeb"); Configure(options => { From c2749aefc4fc2a3523f68e9a7952c33df3408eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Mon, 25 Oct 2021 19:59:01 +0300 Subject: [PATCH 18/38] fixed authserver deployment --- .../eshoponabp/charts/authserver/templates/authserver.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml b/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml index e59d1c5a..80c14085 100644 --- a/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml +++ b/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml @@ -27,4 +27,8 @@ spec: - name: "ConnectionStrings__AdministrationService" value: {{ .Values.global.administrationService.connString }} - name: "ConnectionStrings__SaasService" - value: {{ .Values.global.saasService.connString }} \ No newline at end of file + value: {{ .Values.global.saasService.connString }} + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} + \ No newline at end of file From f9a84c3c226afda1f18d3d81ccdf17eba35a158d Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Wed, 27 Oct 2021 09:42:35 +0300 Subject: [PATCH 19/38] fixes saas ingress --- etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml b/etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml index 3e8002eb..7dcfc3ec 100644 --- a/etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml @@ -12,10 +12,10 @@ metadata: spec: tls: - hosts: - - {{ .Values.global.identityService.domain }} + - {{ .Values.global.saasService.domain }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: - - host: "{{ .Values.global.identityService.domain }}" + - host: "{{ .Values.global.saasService.domain }}" http: paths: - path: / From 188858c7600f0640fea48044b4a41dbf5c7fd7c6 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Thu, 28 Oct 2021 17:49:09 +0300 Subject: [PATCH 20/38] added internal gateway helm chart template --- .../charts/gateway-internal/Chart.yaml | 6 + .../templates/gateway-internal-configmap.yaml | 113 ++++++++++++++++++ .../templates/gateway-internal-ingress.yaml | 37 ++++++ .../templates/gateway-internal-service.yaml | 14 +++ .../templates/gateway-internal.yaml | 34 ++++++ .../charts/gateway-internal/values.yaml | 35 ++++++ 6 files changed, 239 insertions(+) create mode 100644 etc/k8s/eshoponabp/charts/gateway-internal/Chart.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-service.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-internal/values.yaml diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/Chart.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/Chart.yaml new file mode 100644 index 00000000..473c97b8 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-internal/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: gateway-internal +appVersion: "1.0" +description: eShopOnAbp Internal Web Gateway Application +version: 1.0.0 +type: application diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml new file mode 100644 index 00000000..85684259 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml @@ -0,0 +1,113 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap +data: + appsettings.json: |- + { + "Routes": [ + { + "ServiceKey": "Identity Service", + "DownstreamPathTemplate": "/api/identity/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-identity", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/identity/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Identity Service", + "DownstreamPathTemplate": "/api/account/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-identity", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/account/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Saas Service", + "DownstreamPathTemplate": "/api/saas/{everything}", + "DownstreamScheme": "https", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-saas", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/saas/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/abp/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/abp/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/feature-management/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/feature-management/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/permission-management/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/permission-management/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/setting-management/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/setting-management/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Payment Service", + "DownstreamPathTemplate": "/api/payment/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-payment", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/payment/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }] + } \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml new file mode 100644 index 00000000..fec05bd5 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml @@ -0,0 +1,37 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}" + nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}" +{{- if eq .Release.Name "eh-az" }} + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" +{{- end }} + cert-manager.io/cluster-issuer: letsencrypt +spec: + tls: + - hosts: + - {{ .Values.global.gatewayInternal.domain }} +{{- if eq .Release.Name "eh-az" }} + - {{ print "www." .Values.global.gatewayInternal.domain }} +{{- end }} + secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls + rules: +{{- if eq .Release.Name "eh-az" }} + - host: "{{ print "www." .Values.global.gatewayInternal.domain }}" +{{- else }} + - host: "{{ .Values.global.gatewayInternal.domain }}" +{{- end }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }}-{{ .Chart.Name }} + port: + number: 80 \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-service.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-service.yaml new file mode 100644 index 00000000..ee157c01 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + name: {{ .Release.Name }}-{{ .Chart.Name }} + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + ports: + - name: "80" + port: 80 + - name: "443" + port: 443 + selector: + app: {{ .Release.Name }}-{{ .Chart.Name }} diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal.yaml new file mode 100644 index 00000000..9e81e9a9 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + selector: + matchLabels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + template: + metadata: + labels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + spec: + containers: + - image: {{ .Values.global.gatewayInternal.containerImage }}:{{ .Values.global.eshoponabpImageVersion }} + imagePullPolicy: {{ .Values.global.imagePullPolicy }} + name: {{ .Release.Name }}-{{ .Chart.Name }} + ports: + - name: http + containerPort: 80 + - name: https + containerPort: 443 + volumeMounts: + - name: config-volume + mountPath: /app/config + env: +{{ include "eshoponabp.global.env" . | indent 8 }} + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} + volumes: + - name: config-volume + configMap: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/values.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/values.yaml new file mode 100644 index 00000000..f5d557a8 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-internal/values.yaml @@ -0,0 +1,35 @@ + env: + - name: "App__SelfUrl" + value: "https://eshoponabp-gateway-internal" + - name: "GlobalConfiguration__BaseUrl" + value: "http://eshoponabp-gateway-internal" + - name: "Routes__0__DownstreamScheme" + value: "http" + - name: "Routes__0__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-identity" + - name: "Routes__0__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__1__DownstreamScheme" + value: "http" + - name: "Routes__1__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-identity" + - name: "Routes__1__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__2__DownstreamScheme" + value: "http" + - name: "Routes__2__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-saas" + - name: "Routes__2__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__3__DownstreamScheme" + value: "http" + - name: "Routes__3__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-administration" + - name: "Routes__3__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__4__DownstreamScheme" + value: "http" + - name: "Routes__4__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-administration" + - name: "Routes__4__DownstreamHostAndPorts__0__Port" + value: "80" \ No newline at end of file From fc0a0121032da9e0f2e269fa59c605a9df28a748 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Thu, 28 Oct 2021 17:49:36 +0300 Subject: [PATCH 21/38] added web gateway helm chart template --- .../eshoponabp/charts/gateway-web/Chart.yaml | 6 ++ .../templates/gateway-web-configmap.yaml | 100 ++++++++++++++++++ .../templates/gateway-web-ingress.yaml | 37 +++++++ .../templates/gateway-web-service.yaml | 14 +++ .../gateway-web/templates/gateway-web.yaml | 34 ++++++ .../eshoponabp/charts/gateway-web/values.yaml | 37 +++++++ 6 files changed, 228 insertions(+) create mode 100644 etc/k8s/eshoponabp/charts/gateway-web/Chart.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-service.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml create mode 100644 etc/k8s/eshoponabp/charts/gateway-web/values.yaml diff --git a/etc/k8s/eshoponabp/charts/gateway-web/Chart.yaml b/etc/k8s/eshoponabp/charts/gateway-web/Chart.yaml new file mode 100644 index 00000000..d251efb7 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-web/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: gateway-web +appVersion: "1.0" +description: eShopOnAbp Web Gateway Application +version: 1.0.0 +type: application diff --git a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml new file mode 100644 index 00000000..37a0be4f --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml @@ -0,0 +1,100 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap +data: + appsettings.json: |- + { + "Routes": [ + { + "ServiceKey": "Identity Service", + "DownstreamPathTemplate": "/api/identity/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-identity", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/identity/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Identity Service", + "DownstreamPathTemplate": "/api/account/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-identity", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/account/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Saas Service", + "DownstreamPathTemplate": "/api/saas/{everything}", + "DownstreamScheme": "https", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-saas", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/saas/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/abp/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/abp/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/feature-management/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/feature-management/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/permission-management/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/permission-management/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }, + { + "ServiceKey": "Administration Service", + "DownstreamPathTemplate": "/api/setting-management/{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "eshoponabp-administration", + "Port": 80 + } + ], + "UpstreamPathTemplate": "/api/setting-management/{everything}", + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + }] + } \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml new file mode 100644 index 00000000..7290f419 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml @@ -0,0 +1,37 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}" + nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}" +{{- if eq .Release.Name "eh-az" }} + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" +{{- end }} + cert-manager.io/cluster-issuer: letsencrypt +spec: + tls: + - hosts: + - {{ .Values.global.gatewayWeb.domain }} +{{- if eq .Release.Name "eh-az" }} + - {{ print "www." .Values.global.gatewayWeb.domain }} +{{- end }} + secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls + rules: +{{- if eq .Release.Name "eh-az" }} + - host: "{{ print "www." .Values.global.gatewayWeb.domain }}" +{{- else }} + - host: "{{ .Values.global.gatewayWeb.domain }}" +{{- end }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }}-{{ .Chart.Name }} + port: + number: 80 \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-service.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-service.yaml new file mode 100644 index 00000000..ee157c01 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + name: {{ .Release.Name }}-{{ .Chart.Name }} + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + ports: + - name: "80" + port: 80 + - name: "443" + port: 443 + selector: + app: {{ .Release.Name }}-{{ .Chart.Name }} diff --git a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml new file mode 100644 index 00000000..47d90710 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + selector: + matchLabels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + template: + metadata: + labels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + spec: + containers: + - image: {{ .Values.global.gatewayWeb.containerImage }}:{{ .Values.global.eshoponabpImageVersion }} + imagePullPolicy: {{ .Values.global.imagePullPolicy }} + name: {{ .Release.Name }}-{{ .Chart.Name }} + ports: + - name: http + containerPort: 80 + - name: https + containerPort: 443 + volumeMounts: + - name: config-volume + mountPath: /app/config + env: +{{ include "eshoponabp.global.env" . | indent 8 }} + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} + volumes: + - name: config-volume + configMap: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-web/values.yaml b/etc/k8s/eshoponabp/charts/gateway-web/values.yaml new file mode 100644 index 00000000..32d6e6e1 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/gateway-web/values.yaml @@ -0,0 +1,37 @@ + env: + - name: "App__SelfUrl" + value: "https://eshoponabp-gateway-web" + - name: "App__CorsOrigins" + value: "https://eshoponabp-web" + - name: "GlobalConfiguration__BaseUrl" + value: "http://eshoponabp-gateway-web" + - name: "Routes__0__DownstreamScheme" + value: "http" + - name: "Routes__0__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-identity" + - name: "Routes__0__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__1__DownstreamScheme" + value: "http" + - name: "Routes__1__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-identity" + - name: "Routes__1__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__2__DownstreamScheme" + value: "http" + - name: "Routes__2__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-saas" + - name: "Routes__2__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__3__DownstreamScheme" + value: "http" + - name: "Routes__3__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-administration" + - name: "Routes__3__DownstreamHostAndPorts__0__Port" + value: "80" + - name: "Routes__4__DownstreamScheme" + value: "http" + - name: "Routes__4__DownstreamHostAndPorts__0__Host" + value: "eshoponabp-administration" + - name: "Routes__4__DownstreamHostAndPorts__0__Port" + value: "80" \ No newline at end of file From 07dc7a3dc0847b8901b0699726b3e080553d6793 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Thu, 28 Oct 2021 17:49:54 +0300 Subject: [PATCH 22/38] updated public-web gateway template --- .../Chart.yaml | 4 ++-- .../templates/gateway-public-web-configmap.yaml} | 0 .../templates/gateway-public-web-ingress.yaml} | 8 ++++---- .../templates/gateway-public-web-service.yaml} | 0 .../templates/gateway-public-web.yaml} | 2 +- .../values.yaml | 3 ++- etc/k8s/eshoponabp/values.yaml | 14 +++++++++++--- 7 files changed, 20 insertions(+), 11 deletions(-) rename etc/k8s/eshoponabp/charts/{public-webgateway => gateway-public-web}/Chart.yaml (70%) rename etc/k8s/eshoponabp/charts/{public-webgateway/templates/public-webgateway-configmap.yaml => gateway-public-web/templates/gateway-public-web-configmap.yaml} (100%) rename etc/k8s/eshoponabp/charts/{public-webgateway/templates/public-webgateway-ingress.yaml => gateway-public-web/templates/gateway-public-web-ingress.yaml} (79%) rename etc/k8s/eshoponabp/charts/{public-webgateway/templates/public-webgateway-service.yaml => gateway-public-web/templates/gateway-public-web-service.yaml} (100%) rename etc/k8s/eshoponabp/charts/{public-webgateway/templates/public-webgateway.yaml => gateway-public-web/templates/gateway-public-web.yaml} (87%) rename etc/k8s/eshoponabp/charts/{public-webgateway => gateway-public-web}/values.yaml (96%) diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/Chart.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/Chart.yaml similarity index 70% rename from etc/k8s/eshoponabp/charts/public-webgateway/Chart.yaml rename to etc/k8s/eshoponabp/charts/gateway-public-web/Chart.yaml index b2cd0e01..e80e736d 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/Chart.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: public-webgateway +name: gateway-public-web appVersion: "1.0" description: eShopOnAbp Public Web Gateway Application version: 1.0.0 -type: application \ No newline at end of file +type: application diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-configmap.yaml similarity index 100% rename from etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml rename to etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-configmap.yaml diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml similarity index 79% rename from etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-ingress.yaml rename to etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml index 0a24b78c..bc53288f 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml @@ -15,16 +15,16 @@ metadata: spec: tls: - hosts: - - {{ .Values.global.publicWebGateway.domain }} + - {{ .Values.global.gatewayPublicWeb.domain }} {{- if eq .Release.Name "eh-az" }} - - {{ print "www." .Values.global.publicWebGateway.domain }} + - {{ print "www." .Values.global.gatewayPublicWeb.domain }} {{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: {{- if eq .Release.Name "eh-az" }} - - host: "{{ print "www." .Values.global.publicWebGateway.domain }}" + - host: "{{ print "www." .Values.global.gatewayPublicWeb.domain }}" {{- else }} - - host: "{{ .Values.global.publicWebGateway.domain }}" + - host: "{{ .Values.global.gatewayPublicWeb.domain }}" {{- end }} http: paths: diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-service.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-service.yaml similarity index 100% rename from etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-service.yaml rename to etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-service.yaml diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web.yaml similarity index 87% rename from etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml rename to etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web.yaml index c883ed07..9b465971 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web.yaml @@ -12,7 +12,7 @@ spec: app: {{ .Release.Name }}-{{ .Chart.Name }} spec: containers: - - image: {{ .Values.global.publicWebGateway.containerImage }}:{{ .Values.global.eshoponabpImageVersion }} + - image: {{ .Values.global.gatewayPublicWeb.containerImage }}:{{ .Values.global.eshoponabpImageVersion }} imagePullPolicy: {{ .Values.global.imagePullPolicy }} name: {{ .Release.Name }}-{{ .Chart.Name }} ports: diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml similarity index 96% rename from etc/k8s/eshoponabp/charts/public-webgateway/values.yaml rename to etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml index 9fe11c70..b891235d 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/values.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml @@ -14,4 +14,5 @@ - name: "Routes__1__DownstreamHostAndPorts__0__Host" value: "eshoponabp-administration" - name: "Routes__1__DownstreamHostAndPorts__0__Port" - value: "80" \ No newline at end of file + value: "80" + \ No newline at end of file diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 936ec146..081415c7 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -113,10 +113,18 @@ global: url: https://eshoponabp-saas containerImage: "eshoponabp/service-saas" connString: "Server=eshoponabp-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" - publicWebGateway: - domain: eshoponabp-public-webgateway - url: https://eshoponabp-public-webgateway + gatewayWeb: + domain: eshoponabp-gateway-web + url: https://eshoponabp-gateway-web + containerImage: "eshoponabp/gateway-web" + gatewayPublicWeb: + domain: eshoponabp-gateway-public-web + url: https://eshoponabp-gateway-public-web containerImage: "eshoponabp/gateway-publicweb" + gatewayInternal: + domain: eshoponabp-gateway-internal + url: https://eshoponabp-gateway-internal + containerImage: "eshoponabp/gateway-internal" redisConfiguration: "eshoponabp-redis" rabbitMqHostName: "eshoponabp-rabbitmq" elasticSearchUrl: "" From 2fb1e577dc2d24cceec7d1915c6e52d5b99d5642 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Thu, 28 Oct 2021 17:54:15 +0300 Subject: [PATCH 23/38] domain name fix --- etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml | 4 ++-- etc/k8s/eshoponabp/charts/public-web/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml index b891235d..0f186d25 100644 --- a/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml @@ -1,8 +1,8 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-public-webgateway" + value: "https://eshoponabp-gateway-public-web" - name: "GlobalConfiguration__BaseUrl" - value: "http://eshoponabp-public-webgateway" + value: "http://eshoponabp-gateway-public-web" - name: "Routes__0__DownstreamScheme" value: "http" - name: "Routes__0__DownstreamHostAndPorts__0__Host" diff --git a/etc/k8s/eshoponabp/charts/public-web/values.yaml b/etc/k8s/eshoponabp/charts/public-web/values.yaml index 4ba89c78..7b0a2ed9 100644 --- a/etc/k8s/eshoponabp/charts/public-web/values.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/values.yaml @@ -2,5 +2,5 @@ - name: "App__SelfUrl" value: "https://eshoponabp-public-web" - name: "RemoteServices__Default__BaseUrl" - value: "http://eshoponabp-public-webgateway/" + value: "http://eshoponabp-gateway-public-web/" \ No newline at end of file From 57c4f94970c2434ae0d20e824c9830ac784463fd Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Thu, 28 Oct 2021 19:49:23 +0300 Subject: [PATCH 24/38] changed namespace: eshoponabp->es-st --- etc/k8s/deploy-staging.ps1 | 2 +- .../charts/administration/values.yaml | 8 ++-- .../eshoponabp/charts/authserver/values.yaml | 6 +-- .../templates/gateway-internal-configmap.yaml | 16 +++---- .../templates/gateway-internal-ingress.yaml | 6 +-- .../charts/gateway-internal/values.yaml | 14 +++--- .../gateway-public-web-configmap.yaml | 10 ++--- .../templates/gateway-public-web-ingress.yaml | 6 +-- .../charts/gateway-public-web/values.yaml | 8 ++-- .../templates/gateway-web-configmap.yaml | 14 +++--- .../templates/gateway-web-ingress.yaml | 6 +-- .../eshoponabp/charts/gateway-web/values.yaml | 16 +++---- .../eshoponabp/charts/identity/values.yaml | 14 +++--- .../eshoponabp/charts/public-web/values.yaml | 4 +- .../charts/sqlserver/templates/sqlserver.yaml | 4 +- etc/k8s/eshoponabp/values.yaml | 44 +++++++++---------- 16 files changed, 89 insertions(+), 89 deletions(-) diff --git a/etc/k8s/deploy-staging.ps1 b/etc/k8s/deploy-staging.ps1 index ad6e28ce..cbdda161 100644 --- a/etc/k8s/deploy-staging.ps1 +++ b/etc/k8s/deploy-staging.ps1 @@ -1,3 +1,3 @@ param ($version='latest') -helm upgrade --install eshoponabp eshoponabp --namespace eshop --create-namespace --set global.eshoponabpImageVersion=$version \ No newline at end of file +helm upgrade --install es-st eshoponabp --namespace eshop --create-namespace --set global.eshoponabpImageVersion=$version \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/administration/values.yaml b/etc/k8s/eshoponabp/charts/administration/values.yaml index 0fea8169..7f7eb7c5 100644 --- a/etc/k8s/eshoponabp/charts/administration/values.yaml +++ b/etc/k8s/eshoponabp/charts/administration/values.yaml @@ -1,10 +1,10 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-administration" + value: "https://eshop-st-administration" - name: "App__CorsOrigins" - value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" + value: "https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal" - name: "RemoteServices__Default__BaseUrl" - value: "https://eshoponabp-gateway-internal/" + value: "https://eshop-st-gateway-internal/" - name: "IdentityClients__IdentityClients__Authority" - value: "https://eshoponabp-authserver" + value: "https://eshop-st-authserver" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/authserver/values.yaml b/etc/k8s/eshoponabp/charts/authserver/values.yaml index a674c028..1f7d9b61 100644 --- a/etc/k8s/eshoponabp/charts/authserver/values.yaml +++ b/etc/k8s/eshoponabp/charts/authserver/values.yaml @@ -1,8 +1,8 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-authserver" + value: "https://eshop-st-authserver" - name: "App__CorsOrigins" - value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" + value: "https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-saas" - name: "App__RedirectAllowedUrls" - value: "http://localhost:4200,https://localhost:44307" + value: "http://localhost:4200" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml index 85684259..815bb151 100644 --- a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml @@ -12,7 +12,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-identity", + "Host": "eshop-st-identity", "Port": 80 } ], @@ -25,7 +25,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-identity", + "Host": "eshop-st-identity", "Port": 80 } ], @@ -38,7 +38,7 @@ data: "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-saas", + "Host": "eshop-st-saas", "Port": 80 } ], @@ -51,7 +51,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -64,7 +64,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -77,7 +77,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -90,7 +90,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -103,7 +103,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-payment", + "Host": "eshop-st-payment", "Port": 80 } ], diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml index fec05bd5..b084df3b 100644 --- a/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml @@ -8,7 +8,7 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}" nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}" -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} nginx.ingress.kubernetes.io/from-to-www-redirect: "true" {{- end }} cert-manager.io/cluster-issuer: letsencrypt @@ -16,12 +16,12 @@ spec: tls: - hosts: - {{ .Values.global.gatewayInternal.domain }} -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} - {{ print "www." .Values.global.gatewayInternal.domain }} {{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} - host: "{{ print "www." .Values.global.gatewayInternal.domain }}" {{- else }} - host: "{{ .Values.global.gatewayInternal.domain }}" diff --git a/etc/k8s/eshoponabp/charts/gateway-internal/values.yaml b/etc/k8s/eshoponabp/charts/gateway-internal/values.yaml index f5d557a8..343d766e 100644 --- a/etc/k8s/eshoponabp/charts/gateway-internal/values.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-internal/values.yaml @@ -1,35 +1,35 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-gateway-internal" + value: "https://eshop-st-gateway-internal" - name: "GlobalConfiguration__BaseUrl" - value: "http://eshoponabp-gateway-internal" + value: "http://eshop-st-gateway-internal" - name: "Routes__0__DownstreamScheme" value: "http" - name: "Routes__0__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-identity" + value: "eshop-st-identity" - name: "Routes__0__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__1__DownstreamScheme" value: "http" - name: "Routes__1__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-identity" + value: "eshop-st-identity" - name: "Routes__1__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__2__DownstreamScheme" value: "http" - name: "Routes__2__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-saas" + value: "eshop-st-saas" - name: "Routes__2__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__3__DownstreamScheme" value: "http" - name: "Routes__3__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-administration" + value: "eshop-st-administration" - name: "Routes__3__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__4__DownstreamScheme" value: "http" - name: "Routes__4__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-administration" + value: "eshop-st-administration" - name: "Routes__4__DownstreamHostAndPorts__0__Port" value: "80" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-configmap.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-configmap.yaml index 43e3a92e..fe62f397 100644 --- a/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-configmap.yaml @@ -12,7 +12,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-identity", + "Host": "eshop-st-identity", "Port": 80 } ], @@ -25,7 +25,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -38,7 +38,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-catalog", + "Host": "eshop-st-catalog", "Port": 80 } ], @@ -51,7 +51,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-basket", + "Host": "eshop-st-basket", "Port": 80 } ], @@ -64,7 +64,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-ordering", + "Host": "eshop-st-ordering", "Port": 80 } ], diff --git a/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml index bc53288f..b67aa230 100644 --- a/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml @@ -8,7 +8,7 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}" nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}" -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} nginx.ingress.kubernetes.io/from-to-www-redirect: "true" {{- end }} cert-manager.io/cluster-issuer: letsencrypt @@ -16,12 +16,12 @@ spec: tls: - hosts: - {{ .Values.global.gatewayPublicWeb.domain }} -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} - {{ print "www." .Values.global.gatewayPublicWeb.domain }} {{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} - host: "{{ print "www." .Values.global.gatewayPublicWeb.domain }}" {{- else }} - host: "{{ .Values.global.gatewayPublicWeb.domain }}" diff --git a/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml b/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml index 0f186d25..20d3d7bb 100644 --- a/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml @@ -1,18 +1,18 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-gateway-public-web" + value: "https://eshop-st-gateway-public-web" - name: "GlobalConfiguration__BaseUrl" - value: "http://eshoponabp-gateway-public-web" + value: "http://eshop-st-gateway-public-web" - name: "Routes__0__DownstreamScheme" value: "http" - name: "Routes__0__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-identity" + value: "eshop-st-identity" - name: "Routes__0__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__1__DownstreamScheme" value: "http" - name: "Routes__1__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-administration" + value: "eshop-st-administration" - name: "Routes__1__DownstreamHostAndPorts__0__Port" value: "80" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml index 37a0be4f..48931b6c 100644 --- a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml @@ -12,7 +12,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-identity", + "Host": "eshop-st-identity", "Port": 80 } ], @@ -25,7 +25,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-identity", + "Host": "eshop-st-identity", "Port": 80 } ], @@ -38,7 +38,7 @@ data: "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-saas", + "Host": "eshop-st-saas", "Port": 80 } ], @@ -51,7 +51,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -64,7 +64,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -77,7 +77,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], @@ -90,7 +90,7 @@ data: "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { - "Host": "eshoponabp-administration", + "Host": "eshop-st-administration", "Port": 80 } ], diff --git a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml index 7290f419..e1d4b1a4 100644 --- a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml @@ -8,7 +8,7 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}" nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}" -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} nginx.ingress.kubernetes.io/from-to-www-redirect: "true" {{- end }} cert-manager.io/cluster-issuer: letsencrypt @@ -16,12 +16,12 @@ spec: tls: - hosts: - {{ .Values.global.gatewayWeb.domain }} -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} - {{ print "www." .Values.global.gatewayWeb.domain }} {{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} - host: "{{ print "www." .Values.global.gatewayWeb.domain }}" {{- else }} - host: "{{ .Values.global.gatewayWeb.domain }}" diff --git a/etc/k8s/eshoponabp/charts/gateway-web/values.yaml b/etc/k8s/eshoponabp/charts/gateway-web/values.yaml index 32d6e6e1..d9e1898b 100644 --- a/etc/k8s/eshoponabp/charts/gateway-web/values.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-web/values.yaml @@ -1,37 +1,37 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-gateway-web" + value: "https://eshop-st-gateway-web" - name: "App__CorsOrigins" - value: "https://eshoponabp-web" + value: "https://eshop-st-web" - name: "GlobalConfiguration__BaseUrl" - value: "http://eshoponabp-gateway-web" + value: "http://eshop-st-gateway-web" - name: "Routes__0__DownstreamScheme" value: "http" - name: "Routes__0__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-identity" + value: "eshop-st-identity" - name: "Routes__0__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__1__DownstreamScheme" value: "http" - name: "Routes__1__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-identity" + value: "eshop-st-identity" - name: "Routes__1__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__2__DownstreamScheme" value: "http" - name: "Routes__2__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-saas" + value: "eshop-st-saas" - name: "Routes__2__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__3__DownstreamScheme" value: "http" - name: "Routes__3__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-administration" + value: "eshop-st-administration" - name: "Routes__3__DownstreamHostAndPorts__0__Port" value: "80" - name: "Routes__4__DownstreamScheme" value: "http" - name: "Routes__4__DownstreamHostAndPorts__0__Host" - value: "eshoponabp-administration" + value: "eshop-st-administration" - name: "Routes__4__DownstreamHostAndPorts__0__Port" value: "80" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/identity/values.yaml b/etc/k8s/eshoponabp/charts/identity/values.yaml index 84a33212..ef8e1b6f 100644 --- a/etc/k8s/eshoponabp/charts/identity/values.yaml +++ b/etc/k8s/eshoponabp/charts/identity/values.yaml @@ -1,15 +1,15 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-identity" + value: "https://eshop-st-identity" - name: "App__CorsOrigins" - value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway" + value: "https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal" - name: "IdentityServerClients__EShopOnAbp_Angular__RootUrl" - value: "https://eshoponabp-web/" + value: "https://eshop-st-web/" - name: "IdentityServerClients__EShopOnAbp_PublicWeb__RootUrl" - value: "https://eshoponabp-public-web/" + value: "https://eshop-st-public-web/" - name: "IdentityServerClients__IdentityService__RootUrl" - value: "https://eshoponabp-identity/" + value: "https://eshop-st-identity/" - name: "IdentityServerClients__SaasService__RootUrl" - value: "https://eshoponabp-saas/" + value: "https://eshop-st-saas/" - name: "IdentityServerClients__AdministrationService__RootUrl" - value: "https://eshoponabp-administration/" \ No newline at end of file + value: "https://eshop-st-administration/" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/public-web/values.yaml b/etc/k8s/eshoponabp/charts/public-web/values.yaml index 7b0a2ed9..4c7f7c88 100644 --- a/etc/k8s/eshoponabp/charts/public-web/values.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/values.yaml @@ -1,6 +1,6 @@ env: - name: "App__SelfUrl" - value: "https://eshoponabp-public-web" + value: "https://eshop-st-public-web" - name: "RemoteServices__Default__BaseUrl" - value: "http://eshoponabp-gateway-public-web/" + value: "http://eshop-st-gateway-public-web/" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml b/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml index 57a5bcac..dfe41eb8 100644 --- a/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml +++ b/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml @@ -16,7 +16,7 @@ spec: containers: - image: mcr.microsoft.com/mssql/server name: {{ .Release.Name }}-{{ .Chart.Name }} -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} volumeMounts: - mountPath: "/var/opt/mssql" name: {{ .Release.Name }}-{{ .Chart.Name }}-database-volume @@ -30,7 +30,7 @@ spec: value: "myPassw@rd" - name: ACCEPT_EULA value: "Y" -{{- if eq .Release.Name "eh-az" }} +{{- if eq .Release.Name "es-az" }} volumeClaimTemplates: - metadata: name: {{ .Release.Name }}-{{ .Chart.Name }}-database-volume diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 081415c7..517b3a70 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -91,45 +91,45 @@ global: imagePullPolicy: Never eshoponabpImageVersion: latest publicWeb: - domain: eshoponabp-public-web - url: https://eshoponabp-public-web + domain: eshop-st-public-web + url: https://eshop-st-public-web containerImage: "eshoponabp/app-publicweb" authServer: - domain: eshoponabp-authserver - url: https://eshoponabp-authserver + domain: eshop-st-authserver + url: https://eshop-st-authserver containerImage: "eshoponabp/app-authserver" identityService: - domain: eshoponabp-identity - url: https://eshoponabp-identity + domain: eshop-st-identity + url: https://eshop-st-identity containerImage: "eshoponabp/service-identity" - connString: "Server=eshoponabp-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" + connString: "Server=es-st-sqldb-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" administrationService: - domain: eshoponabp-administration - url: https://eshoponabp-administration + domain: eshop-st-administration + url: https://eshop-st-administration containerImage: "eshoponabp/service-administration" - connString: "Server=eshoponabp-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" + connString: "Server=es-st-sqldb-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" saasService: - domain: eshoponabp-saas - url: https://eshoponabp-saas + domain: eshop-st-saas + url: https://eshop-st-saas containerImage: "eshoponabp/service-saas" - connString: "Server=eshoponabp-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" + connString: "Server=es-st-sqldb-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" gatewayWeb: - domain: eshoponabp-gateway-web - url: https://eshoponabp-gateway-web + domain: eshop-st-gateway-web + url: https://eshop-st-gateway-web containerImage: "eshoponabp/gateway-web" gatewayPublicWeb: - domain: eshoponabp-gateway-public-web - url: https://eshoponabp-gateway-public-web + domain: eshop-st-gateway-public-web + url: https://eshop-st-gateway-public-web containerImage: "eshoponabp/gateway-publicweb" gatewayInternal: - domain: eshoponabp-gateway-internal - url: https://eshoponabp-gateway-internal + domain: eshop-st-gateway-internal + url: https://eshop-st-gateway-internal containerImage: "eshoponabp/gateway-internal" - redisConfiguration: "eshoponabp-redis" - rabbitMqHostName: "eshoponabp-rabbitmq" + redisConfiguration: "es-st-redis" + rabbitMqHostName: "es-st-rabbitmq" elasticSearchUrl: "" nginxProxyBufferSize: "32k" nginxProxyBuffersNumber: "8" - internalAuthServerAuthority: "http://eshoponabp-authserver" + internalAuthServerAuthority: "http://eshop-st-authserver" internalAuthServerRequireHttpsMetadata: "false" stringEncryptionDefaultPassPhrase: "gsKnGZ041HLL4IM8" \ No newline at end of file From 65299de839196be61a3c4736633170f2958baaa6 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Mon, 1 Nov 2021 20:35:35 +0300 Subject: [PATCH 25/38] db connection string fix --- etc/k8s/eshoponabp/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 517b3a70..4b7327d4 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -102,17 +102,17 @@ global: domain: eshop-st-identity url: https://eshop-st-identity containerImage: "eshoponabp/service-identity" - connString: "Server=es-st-sqldb-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" + connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" administrationService: domain: eshop-st-administration url: https://eshop-st-administration containerImage: "eshoponabp/service-administration" - connString: "Server=es-st-sqldb-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" + connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" saasService: domain: eshop-st-saas url: https://eshop-st-saas containerImage: "eshoponabp/service-saas" - connString: "Server=es-st-sqldb-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" + connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" gatewayWeb: domain: eshop-st-gateway-web url: https://eshop-st-gateway-web From 2ead0d9a50dc0ac931929169e8f629c5fcf34c31 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Mon, 1 Nov 2021 20:35:43 +0300 Subject: [PATCH 26/38] readme update --- etc/k8s/README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/etc/k8s/README.md b/etc/k8s/README.md index 4bf12383..96bc32bf 100644 --- a/etc/k8s/README.md +++ b/etc/k8s/README.md @@ -18,12 +18,15 @@ helm install ingress-nginx ingress-nginx/ingress-nginx * Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`): ````powershell -127.0.0.1 eshoponabp-public-web -127.0.0.1 eshoponabp-authserver -127.0.0.1 eshoponabp-identity -127.0.0.1 eshoponabp-administration -127.0.0.1 eshoponabp-saas -127.0.0.1 eshoponabp-public-webgateway +127.0.0.1 eshop-st-web +127.0.0.1 eshop-st-public-web +127.0.0.1 eshop-st-authserver +127.0.0.1 eshop-st-identity +127.0.0.1 eshop-st-administration +127.0.0.1 eshop-st-saas +127.0.0.1 eshop-st-gateway-web +127.0.0.1 eshop-st-gateway-public-web +127.0.0.1 eshop-st-gateway-internal ```` * Run `build-images.ps1` in the `scripts` directory. From 3e9411d60c285c3ae43746c9e8c870a63ce4a933 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Mon, 1 Nov 2021 23:11:15 +0300 Subject: [PATCH 27/38] build image update - removed ng requirement --- etc/scripts/build-images.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/scripts/build-images.ps1 b/etc/scripts/build-images.ps1 index 4e5b07f6..60d603c5 100644 --- a/etc/scripts/build-images.ps1 +++ b/etc/scripts/build-images.ps1 @@ -18,7 +18,8 @@ $saasServiceFolder = Join-Path $slnFolder "services/saas/src/EShopOnAbp.SaasServ Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green Set-Location $webAppFolder yarn -ng build --prod +# ng build --prod +npm run build --configuration=prod docker build -t eshoponabp/app-web:$version . ### AUTH-SERVER From 60846bf1884b829c20c7b2bae181f88c61d19df7 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Mon, 1 Nov 2021 23:30:00 +0300 Subject: [PATCH 28/38] added web app template --- etc/k8s/eshoponabp/charts/web/Chart.yaml | 6 +++ .../charts/web/templates/web-ingress.yaml | 37 +++++++++++++++++++ .../charts/web/templates/web-service.yaml | 14 +++++++ .../eshoponabp/charts/web/templates/web.yaml | 27 ++++++++++++++ etc/k8s/eshoponabp/charts/web/values.yaml | 2 + etc/k8s/eshoponabp/values.yaml | 4 ++ 6 files changed, 90 insertions(+) create mode 100644 etc/k8s/eshoponabp/charts/web/Chart.yaml create mode 100644 etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml create mode 100644 etc/k8s/eshoponabp/charts/web/templates/web-service.yaml create mode 100644 etc/k8s/eshoponabp/charts/web/templates/web.yaml create mode 100644 etc/k8s/eshoponabp/charts/web/values.yaml diff --git a/etc/k8s/eshoponabp/charts/web/Chart.yaml b/etc/k8s/eshoponabp/charts/web/Chart.yaml new file mode 100644 index 00000000..3a66440f --- /dev/null +++ b/etc/k8s/eshoponabp/charts/web/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: web +appVersion: "1.0" +description: eShopOnAbp BackOffice Web Application +version: 1.0.0 +type: application \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml new file mode 100644 index 00000000..59748ad2 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml @@ -0,0 +1,37 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}" + nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}" +{{- if eq .Release.Name "eh-az" }} + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" +{{- end }} + cert-manager.io/cluster-issuer: letsencrypt +spec: + tls: + - hosts: + - {{ .Values.global.web.domain }} +{{- if eq .Release.Name "eh-az" }} + - {{ print "www." .Values.global.web.domain }} +{{- end }} + secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls + rules: +{{- if eq .Release.Name "eh-az" }} + - host: "{{ print "www." .Values.global.web.domain }}" +{{- else }} + - host: "{{ .Values.global.web.domain }}" +{{- end }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }}-{{ .Chart.Name }} + port: + number: 80 \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-service.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-service.yaml new file mode 100644 index 00000000..ee157c01 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/web/templates/web-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + name: {{ .Release.Name }}-{{ .Chart.Name }} + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + ports: + - name: "80" + port: 80 + - name: "443" + port: 443 + selector: + app: {{ .Release.Name }}-{{ .Chart.Name }} diff --git a/etc/k8s/eshoponabp/charts/web/templates/web.yaml b/etc/k8s/eshoponabp/charts/web/templates/web.yaml new file mode 100644 index 00000000..da0d1103 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/web/templates/web.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + selector: + matchLabels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + template: + metadata: + labels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + spec: + containers: + - image: {{ .Values.global.web.containerImage }}:{{ .Values.global.eshoponabpImageVersion }} + imagePullPolicy: {{ .Values.global.imagePullPolicy }} + name: {{ .Release.Name }}-{{ .Chart.Name }} + ports: + - name: http + containerPort: 80 + - name: https + containerPort: 443 + env: +{{ include "eshoponabp.global.env" . | indent 8 }} + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/web/values.yaml b/etc/k8s/eshoponabp/charts/web/values.yaml new file mode 100644 index 00000000..b0dac656 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/web/values.yaml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 4b7327d4..23160090 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -90,6 +90,10 @@ global: dotnetEnvironment: "Staging" imagePullPolicy: Never eshoponabpImageVersion: latest + web: + domain: eshop-st-web + url: https://eshop-st-web + containerImage: "eshoponabp/app-web" publicWeb: domain: eshop-st-public-web url: https://eshop-st-public-web From 855d6d7993212679f85c904602f52586c983f2fd Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:14:54 +0300 Subject: [PATCH 29/38] removed consul config from saas appsettings --- .../src/EShopOnAbp.SaasService.HttpApi.Host/appsettings.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/appsettings.json b/services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/appsettings.json index e0acb96a..869f9537 100644 --- a/services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/appsettings.json +++ b/services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/appsettings.json @@ -40,10 +40,5 @@ }, "ElasticSearch": { "Url": "http://localhost:9200" - }, - "Consul": { - "Enabled": true, - "Host": "http://localhost:8500", - "Service": "Saas Service" } } From cf6aa5ff7a24146f46cec0ccf127592652ff5af6 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:19:00 +0300 Subject: [PATCH 30/38] updated web gateway with QoS and non-dev environment swagger config --- .../EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs | 4 ++++ gateways/web/src/EShopOnAbp.WebGateway/appsettings.json | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs b/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs index 119ed7b5..977948c6 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs +++ b/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs @@ -48,6 +48,10 @@ namespace EShopOnAbp.WebGateway { var url = $"{config.DownstreamScheme}://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}:{config.DownstreamHostAndPorts.FirstOrDefault()?.Port}"; + if (!env.IsDevelopment()) + { + url = $"https://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}"; + } options.SwaggerEndpoint($"{url}/swagger/v1/swagger.json", $"{config.ServiceKey} API"); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); diff --git a/gateways/web/src/EShopOnAbp.WebGateway/appsettings.json b/gateways/web/src/EShopOnAbp.WebGateway/appsettings.json index 13fb37e6..e7b9ea22 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/appsettings.json +++ b/gateways/web/src/EShopOnAbp.WebGateway/appsettings.json @@ -68,7 +68,12 @@ } ], "UpstreamPathTemplate": "/api/abp/{everything}", - "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ], + "QoSOptions": { + "ExceptionsAllowedBeforeBreaking": 3, + "DurationOfBreak": 5000, + "TimeoutValue": 2500 + } }, { "ServiceKey": "Administration Service", From 287abee355201f6a3ae758d8dc8ec110b5abd46a Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:19:07 +0300 Subject: [PATCH 31/38] updated web-public gateway with QoS and non-dev environment swagger config --- .../EShopOnAbpWebPublicGatewayModule.cs | 4 ++++ .../src/EShopOnAbp.WebPublicGateway/appsettings.json | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs index cf71cce0..ec322373 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs @@ -45,6 +45,10 @@ namespace EShopOnAbp.WebPublicGateway { var url = $"{config.DownstreamScheme}://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}:{config.DownstreamHostAndPorts.FirstOrDefault()?.Port}"; + if (!env.IsDevelopment()) + { + url = $"https://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}"; + } options.SwaggerEndpoint($"{url}/swagger/v1/swagger.json", $"{config.ServiceKey} API"); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json index 312cbe61..fceda57f 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json @@ -42,7 +42,12 @@ } ], "UpstreamPathTemplate": "/api/abp/{everything}", - "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ], + "QoSOptions": { + "ExceptionsAllowedBeforeBreaking": 3, + "DurationOfBreak": 3000, + "TimeoutValue": 2500 + } }, { "ServiceKey": "Catalog Service", From d1b36c984d0146e5ffead3a1618de40cd3a42b18 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:19:38 +0300 Subject: [PATCH 32/38] updated internal gateway with QoS and non-dev environment swagger config --- .../EShopOnAbpInternalGatewayModule.cs | 4 ++++ .../src/EShopOnAbp.InternalGateway/appsettings.json | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gateways/internal/src/EShopOnAbp.InternalGateway/EShopOnAbpInternalGatewayModule.cs b/gateways/internal/src/EShopOnAbp.InternalGateway/EShopOnAbpInternalGatewayModule.cs index d1d65f16..5dfd16b0 100644 --- a/gateways/internal/src/EShopOnAbp.InternalGateway/EShopOnAbpInternalGatewayModule.cs +++ b/gateways/internal/src/EShopOnAbp.InternalGateway/EShopOnAbpInternalGatewayModule.cs @@ -45,6 +45,10 @@ namespace EShopOnAbp.InternalGateway { var url = $"{config.DownstreamScheme}://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}:{config.DownstreamHostAndPorts.FirstOrDefault()?.Port}"; + if (!env.IsDevelopment()) + { + url = $"https://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}"; + } options.SwaggerEndpoint($"{url}/swagger/v1/swagger.json", $"{config.ServiceKey} API"); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); diff --git a/gateways/internal/src/EShopOnAbp.InternalGateway/appsettings.json b/gateways/internal/src/EShopOnAbp.InternalGateway/appsettings.json index 8c6acb10..fe44a29e 100644 --- a/gateways/internal/src/EShopOnAbp.InternalGateway/appsettings.json +++ b/gateways/internal/src/EShopOnAbp.InternalGateway/appsettings.json @@ -61,7 +61,12 @@ } ], "UpstreamPathTemplate": "/api/abp/{everything}", - "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ], + "QoSOptions": { + "ExceptionsAllowedBeforeBreaking": 5, + "DurationOfBreak": 3000, + "TimeoutValue": 2500 + } }, { "ServiceKey": "Administration Service", From 375451ef3f6b1c46b2a79fa5f1bc572f1f7bc5bb Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:19:46 +0300 Subject: [PATCH 33/38] angular image build update --- etc/scripts/build-images.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/scripts/build-images.ps1 b/etc/scripts/build-images.ps1 index 60d603c5..2118c03c 100644 --- a/etc/scripts/build-images.ps1 +++ b/etc/scripts/build-images.ps1 @@ -19,7 +19,7 @@ Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green Set-Location $webAppFolder yarn # ng build --prod -npm run build --configuration=prod +npm run build:prod docker build -t eshoponabp/app-web:$version . ### AUTH-SERVER From 734fba49904f500d6b2cfc7f5f4e04fe53d869fc Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:20:32 +0300 Subject: [PATCH 34/38] angular dockerfile and nginx update --- apps/angular/Dockerfile | 4 ++- apps/angular/dynamic-env.json | 21 +++++++++++++ apps/angular/nginx.conf | 30 +++++++++++++++++++ .../src/environments/environment.prod.ts | 6 +++- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 apps/angular/dynamic-env.json create mode 100644 apps/angular/nginx.conf diff --git a/apps/angular/Dockerfile b/apps/angular/Dockerfile index 6912e62c..5f83f0de 100644 --- a/apps/angular/Dockerfile +++ b/apps/angular/Dockerfile @@ -1,3 +1,5 @@ FROM nginx:alpine WORKDIR /app -COPY dist/EShopOnAbp /usr/share/nginx/html \ No newline at end of file +COPY dist/EShopOnAbp /usr/share/nginx/html +COPY dynamic-env.json /usr/share/nginx/html +COPY /nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/apps/angular/dynamic-env.json b/apps/angular/dynamic-env.json new file mode 100644 index 00000000..1a1ff42a --- /dev/null +++ b/apps/angular/dynamic-env.json @@ -0,0 +1,21 @@ +{ + "production": true, + "application": { + "baseUrl":"https://eshop-st-web", + "name": "EShopOnAbp", + "logoUrl": "" + }, + "oAuthConfig": { + "issuer": "https://eshop-st-authserver", + "redirectUri": "https://eshop-st-web", + "clientId": "EShopOnAbp_App", + "responseType": "code", + "scope": "offline_access openid profile email phone IdentityService AdministrationService SaasService" + }, + "apis": { + "default": { + "url": "https://eshop-st-gateway-web", + "rootNamespace": "EShopOnAbp" + } + } +} \ No newline at end of file diff --git a/apps/angular/nginx.conf b/apps/angular/nginx.conf new file mode 100644 index 00000000..11f9847a --- /dev/null +++ b/apps/angular/nginx.conf @@ -0,0 +1,30 @@ +server { + listen 80; + listen [::]:80; + server_name _; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html =404; + } + + location /getEnvConfig { + default_type 'application/json'; + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always; + add_header 'Content-Type' 'application/json'; + try_files $uri /dynamic-env.json; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} \ No newline at end of file diff --git a/apps/angular/src/environments/environment.prod.ts b/apps/angular/src/environments/environment.prod.ts index b5ede0c0..934f1283 100644 --- a/apps/angular/src/environments/environment.prod.ts +++ b/apps/angular/src/environments/environment.prod.ts @@ -14,7 +14,7 @@ export const environment = { redirectUri: baseUrl, clientId: 'EShopOnAbp_App', responseType: 'code', - scope: 'offline_access EShopOnAbp', + scope: 'offline_access openid profile email phone IdentityService AdministrationService SaasService', }, apis: { default: { @@ -22,4 +22,8 @@ export const environment = { rootNamespace: 'EShopOnAbp', }, }, + remoteEnv:{ + url: "/getEnvConfig", + mergeStrategy:'deepmerge' + } } as Environment; From fe6ee021a552a959fdb34bb4f43d1da3e21640e3 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:20:53 +0300 Subject: [PATCH 35/38] saas chart value fix --- etc/k8s/eshoponabp/charts/saas/templates/saas.yaml | 5 ++++- etc/k8s/eshoponabp/charts/saas/values.yaml | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/etc/k8s/eshoponabp/charts/saas/templates/saas.yaml b/etc/k8s/eshoponabp/charts/saas/templates/saas.yaml index 58845209..0ee5dd34 100644 --- a/etc/k8s/eshoponabp/charts/saas/templates/saas.yaml +++ b/etc/k8s/eshoponabp/charts/saas/templates/saas.yaml @@ -25,5 +25,8 @@ spec: - name: "ConnectionStrings__AdministrationService" value: {{ .Values.global.administrationService.connString }} - name: "ConnectionStrings__SaasService" - value: {{ .Values.global.saasService.connString }} + value: {{ .Values.global.saasService.connString }} + {{- if .Values.env }} +{{ toYaml .Values.env | indent 8 }} + {{- end }} diff --git a/etc/k8s/eshoponabp/charts/saas/values.yaml b/etc/k8s/eshoponabp/charts/saas/values.yaml index e69de29b..94682c50 100644 --- a/etc/k8s/eshoponabp/charts/saas/values.yaml +++ b/etc/k8s/eshoponabp/charts/saas/values.yaml @@ -0,0 +1,6 @@ + env: + - name: "App__SelfUrl" + value: "https://eshop-st-saas" + - name: "App__CorsOrigins" + value: "https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal" + \ No newline at end of file From 1ae604866d43a76a7e0f8b7c122dcc419e5dcbaf Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:36:13 +0300 Subject: [PATCH 36/38] Updated identityserver clients and template values --- etc/k8s/eshoponabp/charts/identity/values.yaml | 13 ++++++++++--- etc/k8s/eshoponabp/charts/web/values.yaml | 5 +++-- .../appsettings.json | 13 +++++++++++-- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/identity/values.yaml b/etc/k8s/eshoponabp/charts/identity/values.yaml index ef8e1b6f..168e1bc5 100644 --- a/etc/k8s/eshoponabp/charts/identity/values.yaml +++ b/etc/k8s/eshoponabp/charts/identity/values.yaml @@ -3,13 +3,20 @@ value: "https://eshop-st-identity" - name: "App__CorsOrigins" value: "https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal" - - name: "IdentityServerClients__EShopOnAbp_Angular__RootUrl" + - name: "IdentityServerClients__Web__RootUrl" value: "https://eshop-st-web/" - - name: "IdentityServerClients__EShopOnAbp_PublicWeb__RootUrl" + - name: "IdentityServerClients__PublicWeb__RootUrl" value: "https://eshop-st-public-web/" - name: "IdentityServerClients__IdentityService__RootUrl" value: "https://eshop-st-identity/" - name: "IdentityServerClients__SaasService__RootUrl" value: "https://eshop-st-saas/" - name: "IdentityServerClients__AdministrationService__RootUrl" - value: "https://eshop-st-administration/" \ No newline at end of file + value: "https://eshop-st-administration/" + - name: "IdentityServerClients__InternalGateway__RootUrl" + value: "https://eshop-st-gateway-internal/" + - name: "IdentityServerClients__PublicWebGateway__RootUrl" + value: "https://eshop-st-gateway-public-web/" + - name: "IdentityServerClients__WebGateway__RootUrl" + value: "https://eshop-st-gateway-web/" + \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/web/values.yaml b/etc/k8s/eshoponabp/charts/web/values.yaml index b0dac656..d09efec5 100644 --- a/etc/k8s/eshoponabp/charts/web/values.yaml +++ b/etc/k8s/eshoponabp/charts/web/values.yaml @@ -1,2 +1,3 @@ - - \ No newline at end of file + env: + - name: "BASE_URL" + value: "https://eshop-st-web" \ No newline at end of file diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json index 00acbfa9..7d0a81b5 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json @@ -43,12 +43,21 @@ "Url": "http://localhost:9200" }, "IdentityServerClients": { - "EShopOnAbp_Angular": { + "Web": { "RootUrl": "http://localhost:4200" }, - "EShopOnAbp_PublicWeb": { + "PublicWeb": { "RootUrl": "https://localhost:44335/" }, + "InternalGateway": { + "RootUrl": "https://localhost:44371" + }, + "WebGateway": { + "RootUrl": "https://localhost:44372" + }, + "PublicWebGateway": { + "RootUrl": "https://localhost:44373" + }, "IdentityService": { "RootUrl": "https://localhost:44351" }, From 07c233562e76e00cdc9c7cb8ae3170aa6f14fb59 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Wed, 3 Nov 2021 09:52:09 +0300 Subject: [PATCH 37/38] Client name update --- apps/angular/src/environments/environment.prod.ts | 2 +- apps/angular/src/environments/environment.ts | 2 +- apps/public-web/src/EShopOnAbp.PublicWeb/appsettings.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/angular/src/environments/environment.prod.ts b/apps/angular/src/environments/environment.prod.ts index 934f1283..20653898 100644 --- a/apps/angular/src/environments/environment.prod.ts +++ b/apps/angular/src/environments/environment.prod.ts @@ -12,7 +12,7 @@ export const environment = { oAuthConfig: { issuer: 'https://localhost:44394', redirectUri: baseUrl, - clientId: 'EShopOnAbp_App', + clientId: 'Web', responseType: 'code', scope: 'offline_access openid profile email phone IdentityService AdministrationService SaasService', }, diff --git a/apps/angular/src/environments/environment.ts b/apps/angular/src/environments/environment.ts index 0e9fa789..d79f4a8e 100644 --- a/apps/angular/src/environments/environment.ts +++ b/apps/angular/src/environments/environment.ts @@ -11,7 +11,7 @@ export const environment = { oAuthConfig: { issuer: 'https://localhost:44330', redirectUri: baseUrl, - clientId: 'EShopOnAbp_Angular', + clientId: 'Web', responseType: 'code', scope: 'offline_access openid profile email phone IdentityService AdministrationService SaasService', diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/appsettings.json b/apps/public-web/src/EShopOnAbp.PublicWeb/appsettings.json index bbc66d71..9d2fea29 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/appsettings.json +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/appsettings.json @@ -38,7 +38,7 @@ "AuthServer": { "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", - "ClientId": "EShopOnAbp_PublicWeb", + "ClientId": "PublicWeb", "ClientSecret": "1q2w3e*" } } \ No newline at end of file From e6a40fb0aebfcec7eb9b549a42cfbb2f43f5bcd0 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Wed, 3 Nov 2021 10:03:06 +0300 Subject: [PATCH 38/38] Updated data seeder --- .../DbMigrations/IdentityServerDataSeeder.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs index 504be8b6..98b4cb84 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs @@ -215,10 +215,10 @@ namespace EShopOnAbp.IdentityService.DbMigrations }; //Public Web Client - var publicWebClientRootUrl = _configuration["IdentityServerClients:EShopOnAbp_PublicWeb:RootUrl"] + var publicWebClientRootUrl = _configuration["IdentityServerClients:PublicWeb:RootUrl"] .EnsureEndsWith('/'); await CreateClientAsync( - name: "EShopOnAbp_PublicWeb", + name: "PublicWeb", scopes: commonScopes.Union(new[] { "AdministrationService" @@ -233,9 +233,9 @@ namespace EShopOnAbp.IdentityService.DbMigrations //Angular Client var angularClientRootUrl = - _configuration["IdentityServerClients:EShopOnAbp_Angular:RootUrl"].TrimEnd('/'); + _configuration["IdentityServerClients:Web:RootUrl"].TrimEnd('/'); await CreateClientAsync( - name: "EShopOnAbp_Angular", + name: "Web", scopes: commonScopes.Union(new[] { "IdentityService",