From c38b902cad5c6b67ea66257c3aaf8eca07a1a283 Mon Sep 17 00:00:00 2001 From: selmankoc Date: Wed, 8 Jun 2022 17:09:53 +0300 Subject: [PATCH 01/13] added build images file for linux and macos --- build/build-images-locally.sh | 74 +++++++++++++++++++++++++++++++++++ build/build-images.sh | 61 +++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100755 build/build-images-locally.sh create mode 100755 build/build-images.sh diff --git a/build/build-images-locally.sh b/build/build-images-locally.sh new file mode 100755 index 00000000..448a81ac --- /dev/null +++ b/build/build-images-locally.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +export IMAGE_TAG="latest" +export total=11 + + +echo "*** BUILDING WEB (WWW) 1/${total} ****************" +cd ../apps/angular +yarn +# ng build --prod +npm run build:prod +docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-web:${IMAGE_TAG}" . + + +echo "*** BUILDING AUTH-SERVER 2/$total ****************" +cd ../auth-server/src/EShopOnAbp.AuthServer +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-authserver:${IMAGE_TAG}" . + + +echo "*** BUILDING WEB-PUBLIC 3/$total ****************" +cd ../../../public-web/src/EShopOnAbp.PublicWeb +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-publicweb:${IMAGE_TAG}" . + + +echo "*** BUILDING WEB-GATEWAY 4/$total ****************" +cd ../../../../gateways/web/src/EShopOnAbp.WebGateway +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/gateway-web:${IMAGE_TAG}" . + + +echo "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" +cd ../../../web-public/src/EShopOnAbp.WebPublicGateway +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/gateway-web-public:${IMAGE_TAG}" . + + +echo "*** BUILDING IDENTITY-SERVICE 6/$total ****************" +cd ../../../../services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-identity:${IMAGE_TAG}" . + + +echo "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" +cd ../../../administration/src/EShopOnAbp.AdministrationService.HttpApi.Host +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-administration:${IMAGE_TAG}" . + + +echo "**************** BUILDING BASKET-SERVICE 8/$total ****************" +cd ../../../basket/src/EShopOnAbp.BasketService +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-basket:${IMAGE_TAG}" . + + +echo "**************** BUILDING CATALOG-SERVICE 9/$total ****************" +cd ../../../catalog/src/EShopOnAbp.CatalogService.HttpApi.Host +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-catalog:${IMAGE_TAG}" . + + +echo "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" +cd ../../../payment/src/EShopOnAbp.PaymentService.HttpApi.Host +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-payment:${IMAGE_TAG}" . + + +echo "**************** BUILDING ORDERING-SERVICE 11/$total ****************" +cd ../../../ordering/src/EShopOnAbp.OrderingService.HttpApi.Host +dotnet publish -c Release +docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-ordering:${IMAGE_TAG}" . + +echo "ALL COMPLETED" \ No newline at end of file diff --git a/build/build-images.sh b/build/build-images.sh new file mode 100755 index 00000000..7c060614 --- /dev/null +++ b/build/build-images.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +export IMAGE_TAG="latest" +export total=11 +#export currentFolder=`pwd` + +echo "*** BUILDING WEB (WWW) 1/${total} ****************" +cd ../apps/angular +docker build --force-rm -t "eshoponabp/app-web:${IMAGE_TAG}" . + + +echo "*** BUILDING AUTH-SERVER 2/$total ****************" +cd ../auth-server/src/EShopOnAbp.AuthServer +docker build --force-rm -t "eshoponabp/app-authserver:${IMAGE_TAG}" . + + +echo "*** BUILDING WEB-PUBLIC 3/$total ****************" +cd ../../../public-web/src/EShopOnAbp.PublicWeb +docker build --force-rm -t "eshoponabp/app-publicweb:${IMAGE_TAG}" . + + +echo "*** BUILDING WEB-GATEWAY 4/$total ****************" +cd ../../../../gateways/web/src/EShopOnAbp.WebGateway +docker build --force-rm -t "eshoponabp/gateway-web:${IMAGE_TAG}" . + + +echo "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" +cd ../../../web-public/src/EShopOnAbp.WebPublicGateway +docker build --force-rm -t "eshoponabp/gateway-web-public:${IMAGE_TAG}" . + + +echo "*** BUILDING IDENTITY-SERVICE 6/$total ****************" +cd ../../../../services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host +docker build --force-rm -t "eshoponabp/service-identity:${IMAGE_TAG}" . + + +echo "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" +cd ../../../administration/src/EShopOnAbp.AdministrationService.HttpApi.Host +docker build --force-rm -t "eshoponabp/service-administration:${IMAGE_TAG}" . + + +echo "**************** BUILDING BASKET-SERVICE 8/$total ****************" +cd ../../../basket/src/EShopOnAbp.BasketService +docker build --force-rm -t "eshoponabp/service-basket:${IMAGE_TAG}" . + + +echo "**************** BUILDING CATALOG-SERVICE 9/$total ****************" +cd ../../../catalog/src/EShopOnAbp.CatalogService.HttpApi.Host +docker build --force-rm -t "eshoponabp/service-catalog:${IMAGE_TAG}" . + + +echo "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" +cd ../../../payment/src/EShopOnAbp.PaymentService.HttpApi.Host +docker build --force-rm -t "eshoponabp/service-payment:${IMAGE_TAG}" . + + +echo "**************** BUILDING ORDERING-SERVICE 11/$total ****************" +cd ../../../ordering/src/EShopOnAbp.OrderingService.HttpApi.Host +docker build --force-rm -t "eshoponabp/service-ordering:${IMAGE_TAG}" . + +echo "ALL COMPLETED" \ No newline at end of file From 7db6ccf26f5eb1b9e7d1f779db8820fce4c33314 Mon Sep 17 00:00:00 2001 From: selmankoc Date: Wed, 8 Jun 2022 18:06:28 +0300 Subject: [PATCH 02/13] create and fix deploy script files --- etc/k8s/azure/scripts/push-images.ps1 | 2 +- etc/k8s/azure/scripts/push-images.sh | 36 +++++++++++++++++++++++++++ etc/k8s/deploy-staging.sh | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 etc/k8s/azure/scripts/push-images.sh create mode 100644 etc/k8s/deploy-staging.sh diff --git a/etc/k8s/azure/scripts/push-images.ps1 b/etc/k8s/azure/scripts/push-images.ps1 index 49bb9945..6b11caf2 100644 --- a/etc/k8s/azure/scripts/push-images.ps1 +++ b/etc/k8s/azure/scripts/push-images.ps1 @@ -12,7 +12,7 @@ docker tag eshoponabp/app-publicweb:$version volocr.azurecr.io/eshoponabp/app-pu docker push volocr.azurecr.io/eshoponabp/app-publicweb:$version docker tag eshoponabp/gateway-web:$version volocr.azurecr.io/eshoponabp/gateway-web:$version -docker push volocr.azurecr.io/c:$version +docker push volocr.azurecr.io/eshoponabp/gateway-web:$version docker tag eshoponabp/gateway-web-public:$version volocr.azurecr.io/eshoponabp/gateway-web-public:$version docker push volocr.azurecr.io/eshoponabp/gateway-web-public:$version diff --git a/etc/k8s/azure/scripts/push-images.sh b/etc/k8s/azure/scripts/push-images.sh new file mode 100755 index 00000000..dd187468 --- /dev/null +++ b/etc/k8s/azure/scripts/push-images.sh @@ -0,0 +1,36 @@ +export version="latest" + +az acr login --name volocr + +docker tag eshoponabp/app-web:"${version}" volocr.azurecr.io/eshoponabp/app-web:"${version}" +docker push volocr.azurecr.io/eshoponabp/app-web:"${version}" + +docker tag eshoponabp/app-authserver:"${version}" volocr.azurecr.io/eshoponabp/app-authserver:"${version}" +docker push volocr.azurecr.io/eshoponabp/app-authserver:"${version}" + +docker tag eshoponabp/app-publicweb:"${version}" volocr.azurecr.io/eshoponabp/app-publicweb:"${version}" +docker push volocr.azurecr.io/eshoponabp/app-publicweb:"${version}" + +docker tag eshoponabp/gateway-web:"${version}" volocr.azurecr.io/eshoponabp/gateway-web:"${version}" +docker push volocr.azurecr.io/eshoponabp/gateway-web:"${version}" + +docker tag eshoponabp/gateway-web-public:"${version}" volocr.azurecr.io/eshoponabp/gateway-web-public:"${version}" +docker push volocr.azurecr.io/eshoponabp/gateway-web-public:"${version}" + +docker tag eshoponabp/service-identity:"${version}" volocr.azurecr.io/eshoponabp/service-identity:"${version}" +docker push volocr.azurecr.io/eshoponabp/service-identity:"${version}" + +docker tag eshoponabp/service-administration:"${version}" volocr.azurecr.io/eshoponabp/service-administration:"${version}" +docker push volocr.azurecr.io/eshoponabp/service-administration:"${version}" + +docker tag eshoponabp/service-basket:"${version}" volocr.azurecr.io/eshoponabp/service-basket:"${version}" +docker push volocr.azurecr.io/eshoponabp/service-basket:"${version}" + +docker tag eshoponabp/service-catalog:"${version}" volocr.azurecr.io/eshoponabp/service-catalog:"${version}" +docker push volocr.azurecr.io/eshoponabp/service-catalog:"${version}" + +docker tag eshoponabp/service-ordering:"${version}" volocr.azurecr.io/eshoponabp/service-ordering:"${version}" +docker push volocr.azurecr.io/eshoponabp/service-ordering:"${version}" + +docker tag eshoponabp/service-payment:"${version}" volocr.azurecr.io/eshoponabp/service-payment:"${version}" +docker push volocr.azurecr.io/eshoponabp/service-payment:"${version}" \ No newline at end of file diff --git a/etc/k8s/deploy-staging.sh b/etc/k8s/deploy-staging.sh new file mode 100644 index 00000000..342aab96 --- /dev/null +++ b/etc/k8s/deploy-staging.sh @@ -0,0 +1 @@ +helm upgrade --install eshop-st eshoponabp --namespace eshop --create-namespace \ No newline at end of file From 9f3ac582000a5ed4a65d5c982b2928146775062e Mon Sep 17 00:00:00 2001 From: selmankoc Date: Thu, 9 Jun 2022 15:24:52 +0300 Subject: [PATCH 03/13] fix ingress and values files for local k8s --- etc/README.md | 6 ++-- .../templates/gateway-web-public-ingress.yaml | 10 ------- .../templates/gateway-web-ingress.yaml | 10 ------- .../templates/public-web-ingress.yaml | 10 ------- etc/k8s/eshoponabp/values.azure.yaml | 30 +++++++++---------- etc/k8s/eshoponabp/values.yaml | 22 ++++++++++---- 6 files changed, 34 insertions(+), 54 deletions(-) diff --git a/etc/README.md b/etc/README.md index 794a7e4d..7aef9b19 100644 --- a/etc/README.md +++ b/etc/README.md @@ -17,7 +17,7 @@ helm upgrade --install --version=4.0.19 ingress-nginx ingress-nginx/ingress-ngin # How to run? -* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`): +* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`, in linux and macos: `/etc/hosts` ): ````powershell 127.0.0.1 eshop-st-web @@ -33,8 +33,8 @@ helm upgrade --install --version=4.0.19 ingress-nginx ingress-nginx/ingress-ngin 127.0.0.1 eshop-st-gateway-web-public ```` -* Run `build-images.ps1` in the `build` directory. -* Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eshop` namespace. +* Run `build-images.ps1` or `build-images.sh` in the `build` directory. +* Run `deploy-staging.ps1` or `deploy-staging.sh` in the `helm-chart` directory. It is deployed with the `eshop` namespace. * *You may wait ~30 seconds on first run for preparing the database*. * Browse https://eshop-st-public-web for public and https://eshop-st-web for web application * Username: `admin`, password: `1q2w3E*`. diff --git a/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml index ccba5219..8482c393 100644 --- a/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml @@ -7,25 +7,15 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" -{{- if eq .Release.Name "eshop-az" }} - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" -{{- end }} cert-manager.io/cluster-issuer: letsencrypt spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} -{{- if eq .Release.Name "eshop-az" }} - - {{ print "www." .Values.ingress.host }} -{{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: -{{- if eq .Release.Name "eshop-az" }} - - host: "{{ print "www." .Values.ingress.host }}" -{{- else }} - host: "{{ .Values.ingress.host }}" -{{- end }} http: paths: - path: / 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 ccba5219..8482c393 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 @@ -7,25 +7,15 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" -{{- if eq .Release.Name "eshop-az" }} - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" -{{- end }} cert-manager.io/cluster-issuer: letsencrypt spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} -{{- if eq .Release.Name "eshop-az" }} - - {{ print "www." .Values.ingress.host }} -{{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: -{{- if eq .Release.Name "eshop-az" }} - - host: "{{ print "www." .Values.ingress.host }}" -{{- else }} - host: "{{ .Values.ingress.host }}" -{{- end }} http: paths: - path: / diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml index ccba5219..8482c393 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml @@ -7,25 +7,15 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" -{{- if eq .Release.Name "eshop-az" }} - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" -{{- end }} cert-manager.io/cluster-issuer: letsencrypt spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} -{{- if eq .Release.Name "eshop-az" }} - - {{ print "www." .Values.ingress.host }} -{{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: -{{- if eq .Release.Name "eshop-az" }} - - host: "{{ print "www." .Values.ingress.host }}" -{{- else }} - host: "{{ .Values.ingress.host }}" -{{- end }} http: paths: - path: / diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index 5dddcc35..85563992 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -2,7 +2,7 @@ authserver: config: selfUrl: https://auth.eshoponabp.com - corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://eshoponabp.com allowedRedirectUrls: https://admin.eshoponabp.com authServer: authority: https://auth.eshoponabp.com @@ -25,7 +25,7 @@ authserver: web: config: selfUrl: https://admin.eshoponabp.com - gatewayUrl: https://www.gateway.eshoponabp.com + gatewayUrl: https://gateway.eshoponabp.com authServer: authority: https://auth.eshoponabp.com requireHttpsMetadata: "false" @@ -39,8 +39,8 @@ web: # public-web sub-chart override public-web: config: - selfUrl: https://www.eshoponabp.com - gatewayUrl: https://www.gateway-public.eshoponabp.com/ + selfUrl: https://eshoponabp.com + gatewayUrl: https://gateway-public.eshoponabp.com/ authServer: authority: https://auth.eshoponabp.com requireHttpsMetadata: "false" @@ -59,7 +59,7 @@ public-web: identity: config: selfUrl: https://identity.eshoponabp.com - corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com connectionStrings: identityService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" @@ -74,9 +74,9 @@ identity: elasticsearchHost: eshop-az-elasticsearch identityServerClients: # Seeded Clients webRootUrl: https://admin.eshoponabp.com/ - publicWebRootUrl: https://www.eshoponabp.com/ - webGatewayRootUrl: https://www.gateway.eshoponabp.com/ - publicWebGatewayRootUrl: https://www.gateway-public.eshoponabp.com/ + publicWebRootUrl: https://eshoponabp.com/ + webGatewayRootUrl: https://gateway.eshoponabp.com/ + publicWebGatewayRootUrl: https://gateway-public.eshoponabp.com/ identityServiceRootUrl: https://identity.eshoponabp.com/ administrationServiceRootUrl: https://administration.eshoponabp.com/ accountServiceRootUrl: https://auth.eshoponabp.com @@ -94,7 +94,7 @@ identity: administration: config: selfUrl: https://administration.eshoponabp.com - corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com,https://eshop-az-gateway-internal + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshop-az-gateway-internal connectionStrings: administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" authServer: @@ -120,7 +120,7 @@ administration: # gateway-web sub-chart override gateway-web: config: - selfUrl: https://www.gateway.eshoponabp.com + selfUrl: https://gateway.eshoponabp.com corsOrigins: https://admin.eshoponabp.com globalConfigurationBaseUrl: http://eshop-az-gateway-public authServer: @@ -152,7 +152,7 @@ gateway-web: # gateway-web-public sub-chart override gateway-web-public: config: - selfUrl: https://www.gateway-public.eshoponabp.com + selfUrl: https://gateway-public.eshoponabp.com authServer: authority: http://eshop-az-authserver requireHttpsMetadata: "false" @@ -187,7 +187,7 @@ gateway-web-public: basket: config: selfUrl: https://basket.eshoponabp.com - corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com,https://www.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com connectionStrings: administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" authServer: @@ -212,7 +212,7 @@ basket: catalog: config: selfUrl: https://catalog.eshoponabp.com - corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com,https://www.eshoponabp.com,https://admin.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com,https://admin.eshoponabp.com connectionStrings: catalogService: "mongodb://eshop-az-mongodb/EShopOnAbp_Catalog" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" @@ -240,7 +240,7 @@ catalog: ordering: config: selfUrl: https://order.eshoponabp.com - corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com connectionStrings: orderingService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Ordering;User ID=postgres;password=myPassw0rd;Pooling=false" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" @@ -263,7 +263,7 @@ ordering: payment: config: selfUrl: https://payment.eshoponabp.com - corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com connectionStrings: paymentService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Payment;User ID=postgres;password=myPassw0rd;Pooling=false" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 2b85511a..cf42b3e1 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -2,8 +2,11 @@ authserver: config: selfUrl: https://eshop-st-authserver - corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-basket,https://eshop-st-catalog,https://eshop-st-ordering,https://eshop-st-payment + corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-basket,https://eshop-st-catalog,https://eshop-st-ordering,https://eshop-st-payment,https://eshop-st-web,https://eshop-st-public-web allowedRedirectUrls: https://eshop-st-web + authServer: + authority: https://eshop-st-authserver + requireHttpsMetadata: "false" connectionStrings: administrationService: "Host=eshop-st-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" identityService: "Host=eshop-st-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false" @@ -22,7 +25,10 @@ authserver: web: config: selfUrl: https://eshop-st-web - gatewayUrl: "https://eshop-st-gateway-web/" + gatewayUrl: https://eshop-st-gateway-web + authServer: + authority: https://eshop-st-authserver + requireHttpsMetadata: "false" ingress: host: eshop-st-web image: @@ -33,9 +39,9 @@ web: public-web: config: selfUrl: https://eshop-st-public-web - gatewayUrl: http://eshop-st-gateway-web-public + gatewayUrl: https://eshop-st-gateway-web-public authServer: - authority: http://eshop-st-authserver + authority: https://eshop-st-authserver requireHttpsMetadata: "false" dotnetEnv: Staging redisHost: eshop-st-redis @@ -136,6 +142,10 @@ gateway-web: url: http://eshop-st-identity administrationService: url: http://eshop-st-administration + catalogService: + url: http://eshop-st-catalog + orderingService: + url: http://eshop-st-ordering # gateway-web-public sub-chart override gateway-web-public: @@ -188,8 +198,8 @@ basket: rabbitmqHost: eshop-st-rabbitmq elasticsearchHost: eshop-st-elasticsearch remoteServices: - catalogBaseUrl: http://eshop-st-catalog - catalogGrpcUrl: http://eshop-st-catalog + catalogBaseUrl: http://eshop-st-catalog:80 + catalogGrpcUrl: http://eshop-st-catalog:81 ingress: host: eshop-st-basket image: From ac7006f33ccf55a662127be9e5e58687b8d8012f Mon Sep 17 00:00:00 2001 From: selmankoc Date: Thu, 9 Jun 2022 16:16:30 +0300 Subject: [PATCH 04/13] rollback public-web ingress hostname --- .../public-web/templates/public-web-ingress.yaml | 10 ++++++++++ etc/k8s/eshoponabp/values.azure.yaml | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml index 8482c393..ccba5219 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml @@ -7,15 +7,25 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" +{{- if eq .Release.Name "eshop-az" }} + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" +{{- end }} cert-manager.io/cluster-issuer: letsencrypt spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} + - {{ print "www." .Values.ingress.host }} +{{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: +{{- if eq .Release.Name "eshop-az" }} + - host: "{{ print "www." .Values.ingress.host }}" +{{- else }} - host: "{{ .Values.ingress.host }}" +{{- end }} http: paths: - path: / diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index 85563992..e33b861d 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -2,7 +2,7 @@ authserver: config: selfUrl: https://auth.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://www.eshoponabp.com allowedRedirectUrls: https://admin.eshoponabp.com authServer: authority: https://auth.eshoponabp.com @@ -39,7 +39,7 @@ web: # public-web sub-chart override public-web: config: - selfUrl: https://eshoponabp.com + selfUrl: https://www.eshoponabp.com gatewayUrl: https://gateway-public.eshoponabp.com/ authServer: authority: https://auth.eshoponabp.com @@ -74,7 +74,7 @@ identity: elasticsearchHost: eshop-az-elasticsearch identityServerClients: # Seeded Clients webRootUrl: https://admin.eshoponabp.com/ - publicWebRootUrl: https://eshoponabp.com/ + publicWebRootUrl: https://www.eshoponabp.com/ webGatewayRootUrl: https://gateway.eshoponabp.com/ publicWebGatewayRootUrl: https://gateway-public.eshoponabp.com/ identityServiceRootUrl: https://identity.eshoponabp.com/ @@ -187,7 +187,7 @@ gateway-web-public: basket: config: selfUrl: https://basket.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://www.eshoponabp.com connectionStrings: administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" authServer: @@ -212,7 +212,7 @@ basket: catalog: config: selfUrl: https://catalog.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com,https://admin.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://www.eshoponabp.com,https://admin.eshoponabp.com connectionStrings: catalogService: "mongodb://eshop-az-mongodb/EShopOnAbp_Catalog" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" From 72cc76827307849bb9955b17a1a9123b242cc3dc Mon Sep 17 00:00:00 2001 From: selmankoc Date: Fri, 10 Jun 2022 14:56:11 +0300 Subject: [PATCH 05/13] changed ingress tls secret --- etc/k8s/deploy-staging.sh | 2 +- .../templates/administration-ingress.yaml | 5 +++++ .../authserver/templates/authserver-ingress.yaml | 7 +++++-- .../charts/basket/templates/basket-ingress.yaml | 5 +++++ .../charts/catalog/templates/catalog-ingress.yaml | 5 +++++ .../templates/gateway-web-public-ingress.yaml | 5 +++++ .../gateway-web/templates/gateway-web-ingress.yaml | 5 +++++ .../charts/identity/templates/identity-ingress.yaml | 5 +++++ .../charts/ordering/templates/ordering-ingress.yaml | 5 +++++ .../charts/payment/templates/payment-ingress.yaml | 5 +++++ .../public-web/templates/public-web-ingress.yaml | 13 ++++--------- .../charts/web/templates/web-ingress.yaml | 5 +++++ etc/k8s/eshoponabp/values.azure.yaml | 2 +- etc/k8s/eshoponabp/values.yaml | 10 ++++++++++ 14 files changed, 66 insertions(+), 13 deletions(-) mode change 100644 => 100755 etc/k8s/deploy-staging.sh diff --git a/etc/k8s/deploy-staging.sh b/etc/k8s/deploy-staging.sh old mode 100644 new mode 100755 index 342aab96..07748627 --- a/etc/k8s/deploy-staging.sh +++ b/etc/k8s/deploy-staging.sh @@ -1 +1 @@ -helm upgrade --install eshop-st eshoponabp --namespace eshop --create-namespace \ No newline at end of file +helm upgrade --install eshop-st eshoponabp -f ./eshoponabp/values.yaml --namespace eshop --create-namespace \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml b/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml b/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml index 03fcc9e8..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml @@ -8,19 +8,22 @@ metadata: nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" cert-manager.io/cluster-issuer: letsencrypt - nginx.ingress.kubernetes.io/configuration-snippet: | - more_set_input_headers "from-ingress: true"; spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml b/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml b/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: 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 8482c393..ab2b6312 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 @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml b/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml b/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml b/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml index ccba5219..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml @@ -7,9 +7,6 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" -{{- if eq .Release.Name "eshop-az" }} - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" -{{- end }} cert-manager.io/cluster-issuer: letsencrypt spec: ingressClassName: nginx @@ -17,18 +14,16 @@ spec: - hosts: - {{ .Values.ingress.host }} {{- if eq .Release.Name "eshop-az" }} - - {{ print "www." .Values.ingress.host }} -{{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls - rules: -{{- if eq .Release.Name "eshop-az" }} - - host: "{{ print "www." .Values.ingress.host }}" {{- else }} - - host: "{{ .Values.ingress.host }}" + secretName: {{ .Values.ingress.tlsSecret }} {{- end }} + rules: + - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index e33b861d..d013446a 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -50,7 +50,7 @@ public-web: elasticsearchHost: eshop-az-elasticsearch ingress: - host: eshoponabp.com + host: www.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-publicweb" tag: latest diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index cf42b3e1..d017e45f 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -31,6 +31,7 @@ web: requireHttpsMetadata: "false" ingress: host: eshop-st-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-web" tag: latest @@ -49,6 +50,7 @@ public-web: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-public-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-publicweb" tag: latest @@ -84,6 +86,7 @@ identity: paymentServiceRootUrl: https://eshop-st-payment/ ingress: host: eshop-st-identity + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-identity" tag: latest @@ -111,6 +114,7 @@ administration: authority: https://eshop-st-authserver ingress: host: eshop-st-administration + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-administration" tag: latest @@ -132,6 +136,7 @@ gateway-web: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-gateway-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/gateway-web" tag: latest @@ -162,6 +167,7 @@ gateway-web-public: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-gateway-web-public + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/gateway-web-public" tag: latest @@ -202,6 +208,7 @@ basket: catalogGrpcUrl: http://eshop-st-catalog:81 ingress: host: eshop-st-basket + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-basket" tag: latest @@ -230,6 +237,7 @@ catalog: grpcProtocols: Http2 ingress: host: eshop-st-catalog + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-catalog" tag: latest @@ -253,6 +261,7 @@ ordering: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-ordering + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-ordering" tag: latest @@ -276,6 +285,7 @@ payment: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-payment + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-payment" tag: latest From ec9ba6c62b1b1f459f030d90e9d54bbd145894ba Mon Sep 17 00:00:00 2001 From: selmankoc Date: Mon, 13 Jun 2022 14:38:38 +0300 Subject: [PATCH 06/13] fix https to http --- .../eshoponabp/charts/web/templates/web-configmap.yaml | 3 ++- etc/k8s/eshoponabp/values.yaml | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml index bdcbe997..a28695f1 100644 --- a/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml @@ -17,7 +17,8 @@ data: "requireHttps": "{{ .Values.config.authServer.requireHttpsMetadata }}", "clientId": "Web", "responseType": "{{ .Values.config.authServer.responseType }}", - "scope": "offline_access openid profile email phone AccountService IdentityService AdministrationService CatalogService OrderingService" + "scope": "offline_access openid profile email phone AccountService IdentityService AdministrationService CatalogService OrderingService", + "strictDiscoveryDocumentValidation": "false" }, "apis": { "default": { diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index d017e45f..93f5d346 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -5,7 +5,7 @@ authserver: corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-basket,https://eshop-st-catalog,https://eshop-st-ordering,https://eshop-st-payment,https://eshop-st-web,https://eshop-st-public-web allowedRedirectUrls: https://eshop-st-web authServer: - authority: https://eshop-st-authserver + authority: http://eshop-st-authserver requireHttpsMetadata: "false" connectionStrings: administrationService: "Host=eshop-st-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" @@ -27,8 +27,9 @@ web: selfUrl: https://eshop-st-web gatewayUrl: https://eshop-st-gateway-web authServer: - authority: https://eshop-st-authserver + authority: http://eshop-st-authserver requireHttpsMetadata: "false" + responseType: "code" ingress: host: eshop-st-web tlsSecret: eshop-wildcard-tls @@ -40,9 +41,9 @@ web: public-web: config: selfUrl: https://eshop-st-public-web - gatewayUrl: https://eshop-st-gateway-web-public + gatewayUrl: http://eshop-st-gateway-web-public/ authServer: - authority: https://eshop-st-authserver + authority: http://eshop-st-authserver requireHttpsMetadata: "false" dotnetEnv: Staging redisHost: eshop-st-redis From 8a09419bc48f80c06abe3a95947a184ee29adaa2 Mon Sep 17 00:00:00 2001 From: selmankoc Date: Thu, 16 Jun 2022 11:00:14 +0300 Subject: [PATCH 07/13] fix images tag and path --- build/build-images-locally.ps1 | 2 +- build/build-images-locally.sh | 27 ++++++++++++++------------ build/build-images.ps1 | 2 +- build/build-images.sh | 28 ++++++++++++++------------- etc/k8s/azure/scripts/push-images.ps1 | 2 +- etc/k8s/azure/scripts/push-images.sh | 2 +- etc/k8s/eshoponabp/values.azure.yaml | 26 +++++++++++++------------ etc/k8s/eshoponabp/values.yaml | 26 +++++++++++++------------ 8 files changed, 62 insertions(+), 53 deletions(-) diff --git a/build/build-images-locally.ps1 b/build/build-images-locally.ps1 index a7075bad..82fde285 100644 --- a/build/build-images-locally.ps1 +++ b/build/build-images-locally.ps1 @@ -1,4 +1,4 @@ -param ($version='latest') +param ($version='1.0.0') $currentFolder = $PSScriptRoot $slnFolder = Join-Path $currentFolder "../" diff --git a/build/build-images-locally.sh b/build/build-images-locally.sh index 448a81ac..85237331 100755 --- a/build/build-images-locally.sh +++ b/build/build-images-locally.sh @@ -1,11 +1,14 @@ #!/bin/bash -export IMAGE_TAG="latest" +export IMAGE_TAG="1.0.0" export total=11 +cd ../ +export currentFolder=`pwd` +cd build/ echo "*** BUILDING WEB (WWW) 1/${total} ****************" -cd ../apps/angular +cd ${currentFolder}/apps/angular yarn # ng build --prod npm run build:prod @@ -13,61 +16,61 @@ docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-web:${IMAGE_TAG}" echo "*** BUILDING AUTH-SERVER 2/$total ****************" -cd ../auth-server/src/EShopOnAbp.AuthServer +cd ${currentFolder}/apps/auth-server/src/EShopOnAbp.AuthServer dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-authserver:${IMAGE_TAG}" . echo "*** BUILDING WEB-PUBLIC 3/$total ****************" -cd ../../../public-web/src/EShopOnAbp.PublicWeb +cd ${currentFolder}/apps/public-web/src/EShopOnAbp.PublicWeb dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-publicweb:${IMAGE_TAG}" . echo "*** BUILDING WEB-GATEWAY 4/$total ****************" -cd ../../../../gateways/web/src/EShopOnAbp.WebGateway +cd ${currentFolder}/gateways/web/src/EShopOnAbp.WebGateway dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/gateway-web:${IMAGE_TAG}" . echo "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" -cd ../../../web-public/src/EShopOnAbp.WebPublicGateway +cd ${currentFolder}/gateways/web-public/src/EShopOnAbp.WebPublicGateway dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/gateway-web-public:${IMAGE_TAG}" . echo "*** BUILDING IDENTITY-SERVICE 6/$total ****************" -cd ../../../../services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host +cd ${currentFolder}/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-identity:${IMAGE_TAG}" . echo "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" -cd ../../../administration/src/EShopOnAbp.AdministrationService.HttpApi.Host +cd ${currentFolder}/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-administration:${IMAGE_TAG}" . echo "**************** BUILDING BASKET-SERVICE 8/$total ****************" -cd ../../../basket/src/EShopOnAbp.BasketService +cd ${currentFolder}/services/basket/src/EShopOnAbp.BasketService dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-basket:${IMAGE_TAG}" . echo "**************** BUILDING CATALOG-SERVICE 9/$total ****************" -cd ../../../catalog/src/EShopOnAbp.CatalogService.HttpApi.Host +cd ${currentFolder}/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-catalog:${IMAGE_TAG}" . echo "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" -cd ../../../payment/src/EShopOnAbp.PaymentService.HttpApi.Host +cd ${currentFolder}/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-payment:${IMAGE_TAG}" . echo "**************** BUILDING ORDERING-SERVICE 11/$total ****************" -cd ../../../ordering/src/EShopOnAbp.OrderingService.HttpApi.Host +cd ${currentFolder}/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host dotnet publish -c Release docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-ordering:${IMAGE_TAG}" . diff --git a/build/build-images.ps1 b/build/build-images.ps1 index 4cf1ecf6..eef11c86 100644 --- a/build/build-images.ps1 +++ b/build/build-images.ps1 @@ -1,4 +1,4 @@ -param ($version='latest') +param ($version='1.0.0') $currentFolder = $PSScriptRoot $slnFolder = Join-Path $currentFolder "../" diff --git a/build/build-images.sh b/build/build-images.sh index 7c060614..79b96680 100755 --- a/build/build-images.sh +++ b/build/build-images.sh @@ -1,61 +1,63 @@ #!/bin/bash -export IMAGE_TAG="latest" +export IMAGE_TAG="1.0.0" export total=11 -#export currentFolder=`pwd` +cd ../ +export currentFolder=`pwd` +cd build/ echo "*** BUILDING WEB (WWW) 1/${total} ****************" -cd ../apps/angular +cd ${currentFolder}/apps/angular docker build --force-rm -t "eshoponabp/app-web:${IMAGE_TAG}" . echo "*** BUILDING AUTH-SERVER 2/$total ****************" -cd ../auth-server/src/EShopOnAbp.AuthServer +cd ${currentFolder}/apps/auth-server/src/EShopOnAbp.AuthServer docker build --force-rm -t "eshoponabp/app-authserver:${IMAGE_TAG}" . echo "*** BUILDING WEB-PUBLIC 3/$total ****************" -cd ../../../public-web/src/EShopOnAbp.PublicWeb +cd ${currentFolder}/apps/public-web/src/EShopOnAbp.PublicWeb docker build --force-rm -t "eshoponabp/app-publicweb:${IMAGE_TAG}" . echo "*** BUILDING WEB-GATEWAY 4/$total ****************" -cd ../../../../gateways/web/src/EShopOnAbp.WebGateway +cd ${currentFolder}/gateways/web/src/EShopOnAbp.WebGateway docker build --force-rm -t "eshoponabp/gateway-web:${IMAGE_TAG}" . echo "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" -cd ../../../web-public/src/EShopOnAbp.WebPublicGateway +cd ${currentFolder}/gateways/web-public/src/EShopOnAbp.WebPublicGateway docker build --force-rm -t "eshoponabp/gateway-web-public:${IMAGE_TAG}" . echo "*** BUILDING IDENTITY-SERVICE 6/$total ****************" -cd ../../../../services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host +cd ${currentFolder}/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host docker build --force-rm -t "eshoponabp/service-identity:${IMAGE_TAG}" . echo "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" -cd ../../../administration/src/EShopOnAbp.AdministrationService.HttpApi.Host +cd ${currentFolder}/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host docker build --force-rm -t "eshoponabp/service-administration:${IMAGE_TAG}" . echo "**************** BUILDING BASKET-SERVICE 8/$total ****************" -cd ../../../basket/src/EShopOnAbp.BasketService +cd ${currentFolder}/services/basket/src/EShopOnAbp.BasketService docker build --force-rm -t "eshoponabp/service-basket:${IMAGE_TAG}" . echo "**************** BUILDING CATALOG-SERVICE 9/$total ****************" -cd ../../../catalog/src/EShopOnAbp.CatalogService.HttpApi.Host +cd ${currentFolder}/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host docker build --force-rm -t "eshoponabp/service-catalog:${IMAGE_TAG}" . echo "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" -cd ../../../payment/src/EShopOnAbp.PaymentService.HttpApi.Host +cd ${currentFolder}/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host docker build --force-rm -t "eshoponabp/service-payment:${IMAGE_TAG}" . echo "**************** BUILDING ORDERING-SERVICE 11/$total ****************" -cd ../../../ordering/src/EShopOnAbp.OrderingService.HttpApi.Host +cd ${currentFolder}/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host docker build --force-rm -t "eshoponabp/service-ordering:${IMAGE_TAG}" . echo "ALL COMPLETED" \ No newline at end of file diff --git a/etc/k8s/azure/scripts/push-images.ps1 b/etc/k8s/azure/scripts/push-images.ps1 index 6b11caf2..3b1ac6fb 100644 --- a/etc/k8s/azure/scripts/push-images.ps1 +++ b/etc/k8s/azure/scripts/push-images.ps1 @@ -1,4 +1,4 @@ -param ($version='latest') +param ($version='1.0.0') az acr login --name volocr diff --git a/etc/k8s/azure/scripts/push-images.sh b/etc/k8s/azure/scripts/push-images.sh index dd187468..21a6d6a0 100755 --- a/etc/k8s/azure/scripts/push-images.sh +++ b/etc/k8s/azure/scripts/push-images.sh @@ -1,4 +1,4 @@ -export version="latest" +export version="1.0.0" az acr login --name volocr diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index d013446a..41040b9f 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -19,7 +19,7 @@ authserver: tlsSecret: eshop-wildcard-tls image: repository: "volocr.azurecr.io/eshoponabp/app-authserver" - tag: latest + tag: 1.0.0 # web sub-chart override web: @@ -28,13 +28,15 @@ web: gatewayUrl: https://gateway.eshoponabp.com authServer: authority: https://auth.eshoponabp.com - requireHttpsMetadata: "false" + requireHttpsMetadata: false responseType: "code" + strictDiscoveryDocumentValidation: false + skipIssuerCheck: true ingress: host: admin.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-web" - tag: latest + tag: 1.0.0 # public-web sub-chart override public-web: @@ -53,7 +55,7 @@ public-web: host: www.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-publicweb" - tag: latest + tag: 1.0.0 # identity-service sub-chart override identity: @@ -88,7 +90,7 @@ identity: host: identity.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-identity" - tag: latest + tag: 1.0.0 # administration sub-chart override administration: @@ -115,7 +117,7 @@ administration: host: administration.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-administration" - tag: latest + tag: 1.0.0 # gateway-web sub-chart override gateway-web: @@ -136,7 +138,7 @@ gateway-web: host: gateway.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/gateway-web" - tag: latest + tag: 1.0.0 reRoutes: accountService: url: http://eshop-az-authserver @@ -166,7 +168,7 @@ gateway-web-public: host: gateway-public.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/gateway-web-public" - tag: latest + tag: 1.0.0 reRoutes: accountService: url: http://eshop-az-authserver @@ -206,7 +208,7 @@ basket: host: basket.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-basket" - tag: latest + tag: 1.0.0 # catalog-service sub-chart override catalog: @@ -234,7 +236,7 @@ catalog: host: catalog.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-catalog" - tag: latest + tag: 1.0.0 # ordering-service sub-chart override ordering: @@ -257,7 +259,7 @@ ordering: host: order.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-ordering" - tag: latest + tag: 1.0.0 # payment-service sub-chart override payment: @@ -280,7 +282,7 @@ payment: host: payment.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-payment" - tag: latest + tag: 1.0.0 # Default values for eshoponabp. # This is a YAML-formatted file. diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 93f5d346..33d64c41 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -19,7 +19,7 @@ authserver: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-authserver" - tag: latest + tag: 1.0.0 # web sub-chart override web: @@ -28,14 +28,16 @@ web: gatewayUrl: https://eshop-st-gateway-web authServer: authority: http://eshop-st-authserver - requireHttpsMetadata: "false" + requireHttpsMetadata: false responseType: "code" + strictDiscoveryDocumentValidation: false + skipIssuerCheck: true ingress: host: eshop-st-web tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-web" - tag: latest + tag: 1.0.0 # public-web sub-chart override public-web: @@ -54,7 +56,7 @@ public-web: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-publicweb" - tag: latest + tag: 1.0.0 # identity-service sub-chart override identity: @@ -90,7 +92,7 @@ identity: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-identity" - tag: latest + tag: 1.0.0 # administration sub-chart override administration: @@ -118,7 +120,7 @@ administration: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-administration" - tag: latest + tag: 1.0.0 # gateway-web sub-chart override gateway-web: @@ -140,7 +142,7 @@ gateway-web: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/gateway-web" - tag: latest + tag: 1.0.0 reRoutes: accountService: url: http://eshop-st-authserver @@ -171,7 +173,7 @@ gateway-web-public: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/gateway-web-public" - tag: latest + tag: 1.0.0 reRoutes: accountService: url: http://eshop-st-authserver @@ -212,7 +214,7 @@ basket: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-basket" - tag: latest + tag: 1.0.0 # catalog-service sub-chart override catalog: @@ -241,7 +243,7 @@ catalog: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-catalog" - tag: latest + tag: 1.0.0 # ordering-service sub-chart override ordering: @@ -265,7 +267,7 @@ ordering: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-ordering" - tag: latest + tag: 1.0.0 # payment-service sub-chart override payment: @@ -289,7 +291,7 @@ payment: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-payment" - tag: latest + tag: 1.0.0 # Default values for eshoponabp. # This is a YAML-formatted file. From 751194c5b43aa3961266831bd15635c1e0a3d1cf Mon Sep 17 00:00:00 2001 From: selmankoc Date: Thu, 16 Jun 2022 11:01:33 +0300 Subject: [PATCH 08/13] added issuercheck and fix boolean --- etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml index a28695f1..4963f4d4 100644 --- a/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml @@ -14,11 +14,12 @@ data: "oAuthConfig": { "issuer": "{{ .Values.config.authServer.authority }}", "redirectUri": "{{ .Values.config.selfUrl }}", - "requireHttps": "{{ .Values.config.authServer.requireHttpsMetadata }}", + "requireHttps": {{ .Values.config.authServer.requireHttpsMetadata }}, "clientId": "Web", "responseType": "{{ .Values.config.authServer.responseType }}", "scope": "offline_access openid profile email phone AccountService IdentityService AdministrationService CatalogService OrderingService", - "strictDiscoveryDocumentValidation": "false" + "strictDiscoveryDocumentValidation": {{ .Values.config.authServer.strictDiscoveryDocumentValidation }}, + "skipIssuerCheck": {{ .Values.config.authServer.skipIssuerCheck }} }, "apis": { "default": { From 887720066b2d4c3b63d51d1ce3351669c3faafca Mon Sep 17 00:00:00 2001 From: selmankoc Date: Fri, 17 Jun 2022 13:10:14 +0300 Subject: [PATCH 09/13] fix host name www --- .../public-web/templates/public-web-ingress.yaml | 13 +++++++++++-- etc/k8s/eshoponabp/values.azure.yaml | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml index ab2b6312..b02a0004 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml @@ -8,25 +8,34 @@ metadata: nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" cert-manager.io/cluster-issuer: letsencrypt +{{- if eq .Release.Name "eshop-az" }} + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" +{{- end }} spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} + - {{ print "www." .Values.ingress.host }} +{{- end }} {{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls {{- else }} secretName: {{ .Values.ingress.tlsSecret }} {{- end }} rules: +{{- if eq .Release.Name "eshop-az" }} + - host: "{{ print "www." .Values.ingress.host }}" +{{- else }} - host: "{{ .Values.ingress.host }}" +{{- end }} http: paths: - path: / - pathType: Prefix backend: service: name: {{ .Release.Name }}-{{ .Chart.Name }} port: - number: 80 \ No newline at end of file + number: 80 diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index 41040b9f..481bf0c4 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -52,7 +52,7 @@ public-web: elasticsearchHost: eshop-az-elasticsearch ingress: - host: www.eshoponabp.com + host: eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-publicweb" tag: 1.0.0 From ffc3e280fb93351c8690cf65904283702e44cc51 Mon Sep 17 00:00:00 2001 From: selmankoc Date: Fri, 17 Jun 2022 18:24:28 +0300 Subject: [PATCH 10/13] fix domain name www --- .../public-web/templates/public-web-ingress.yaml | 14 ++++---------- etc/k8s/eshoponabp/values.azure.yaml | 12 ++++++------ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml index b02a0004..947f96cf 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml @@ -8,28 +8,22 @@ metadata: nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" cert-manager.io/cluster-issuer: letsencrypt -{{- if eq .Release.Name "eshop-az" }} - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" -{{- end }} +# {{- if eq .Release.Name "eshop-az" }} +# nginx.ingress.kubernetes.io/from-to-www-redirect: "true" +# {{- end }} spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} -{{- if eq .Release.Name "eshop-az" }} - - {{ print "www." .Values.ingress.host }} -{{- end }} + {{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls {{- else }} secretName: {{ .Values.ingress.tlsSecret }} {{- end }} rules: -{{- if eq .Release.Name "eshop-az" }} - - host: "{{ print "www." .Values.ingress.host }}" -{{- else }} - host: "{{ .Values.ingress.host }}" -{{- end }} http: paths: - path: / diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index 481bf0c4..83bdfb91 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -2,7 +2,7 @@ authserver: config: selfUrl: https://auth.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://www.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://eshoponabp.com allowedRedirectUrls: https://admin.eshoponabp.com authServer: authority: https://auth.eshoponabp.com @@ -41,7 +41,7 @@ web: # public-web sub-chart override public-web: config: - selfUrl: https://www.eshoponabp.com + selfUrl: https://eshoponabp.com gatewayUrl: https://gateway-public.eshoponabp.com/ authServer: authority: https://auth.eshoponabp.com @@ -55,7 +55,7 @@ public-web: host: eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-publicweb" - tag: 1.0.0 + tag: 1.0.3 # identity-service sub-chart override identity: @@ -76,7 +76,7 @@ identity: elasticsearchHost: eshop-az-elasticsearch identityServerClients: # Seeded Clients webRootUrl: https://admin.eshoponabp.com/ - publicWebRootUrl: https://www.eshoponabp.com/ + publicWebRootUrl: https://eshoponabp.com/ webGatewayRootUrl: https://gateway.eshoponabp.com/ publicWebGatewayRootUrl: https://gateway-public.eshoponabp.com/ identityServiceRootUrl: https://identity.eshoponabp.com/ @@ -189,7 +189,7 @@ gateway-web-public: basket: config: selfUrl: https://basket.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://www.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com connectionStrings: administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" authServer: @@ -214,7 +214,7 @@ basket: catalog: config: selfUrl: https://catalog.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://www.eshoponabp.com,https://admin.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com,https://admin.eshoponabp.com connectionStrings: catalogService: "mongodb://eshop-az-mongodb/EShopOnAbp_Catalog" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" From eb48fa9d8fac39cb6eb167542e0c8cdd4b3989ca Mon Sep 17 00:00:00 2001 From: selmankoc Date: Sat, 18 Jun 2022 11:17:33 +0300 Subject: [PATCH 11/13] fix to deploy aks --- build/build-images-locally.sh | 2 +- etc/k8s/azure/scripts/push-images.sh | 2 +- etc/k8s/eshoponabp/values.azure.yaml | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/build-images-locally.sh b/build/build-images-locally.sh index 85237331..2c3b8d93 100755 --- a/build/build-images-locally.sh +++ b/build/build-images-locally.sh @@ -1,6 +1,6 @@ #!/bin/bash -export IMAGE_TAG="1.0.0" +export IMAGE_TAG="1.0.4" export total=11 cd ../ export currentFolder=`pwd` diff --git a/etc/k8s/azure/scripts/push-images.sh b/etc/k8s/azure/scripts/push-images.sh index 21a6d6a0..7d7764ea 100755 --- a/etc/k8s/azure/scripts/push-images.sh +++ b/etc/k8s/azure/scripts/push-images.sh @@ -1,4 +1,4 @@ -export version="1.0.0" +export version="1.0.4" az acr login --name volocr diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index 83bdfb91..cc894bde 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -19,7 +19,7 @@ authserver: tlsSecret: eshop-wildcard-tls image: repository: "volocr.azurecr.io/eshoponabp/app-authserver" - tag: 1.0.0 + tag: 1.0.4 # web sub-chart override web: @@ -36,7 +36,7 @@ web: host: admin.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-web" - tag: 1.0.0 + tag: 1.0.4 # public-web sub-chart override public-web: @@ -55,7 +55,7 @@ public-web: host: eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-publicweb" - tag: 1.0.3 + tag: 1.0.4 # identity-service sub-chart override identity: @@ -90,7 +90,7 @@ identity: host: identity.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-identity" - tag: 1.0.0 + tag: 1.0.4 # administration sub-chart override administration: @@ -117,7 +117,7 @@ administration: host: administration.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-administration" - tag: 1.0.0 + tag: 1.0.4 # gateway-web sub-chart override gateway-web: @@ -138,7 +138,7 @@ gateway-web: host: gateway.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/gateway-web" - tag: 1.0.0 + tag: 1.0.4 reRoutes: accountService: url: http://eshop-az-authserver @@ -168,7 +168,7 @@ gateway-web-public: host: gateway-public.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/gateway-web-public" - tag: 1.0.0 + tag: 1.0.4 reRoutes: accountService: url: http://eshop-az-authserver @@ -208,7 +208,7 @@ basket: host: basket.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-basket" - tag: 1.0.0 + tag: 1.0.4 # catalog-service sub-chart override catalog: @@ -236,7 +236,7 @@ catalog: host: catalog.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-catalog" - tag: 1.0.0 + tag: 1.0.4 # ordering-service sub-chart override ordering: @@ -259,7 +259,7 @@ ordering: host: order.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-ordering" - tag: 1.0.0 + tag: 1.0.4 # payment-service sub-chart override payment: @@ -282,7 +282,7 @@ payment: host: payment.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-payment" - tag: 1.0.0 + tag: 1.0.4 # Default values for eshoponabp. # This is a YAML-formatted file. From 5479adddb7cb88dff357b81fa2b9cf8c1ce468be Mon Sep 17 00:00:00 2001 From: selmankoc Date: Mon, 1 Aug 2022 16:01:48 +0300 Subject: [PATCH 12/13] Create publish-locally.ps1 --- build/publish-locally.ps1 | 91 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 build/publish-locally.ps1 diff --git a/build/publish-locally.ps1 b/build/publish-locally.ps1 new file mode 100644 index 00000000..ab7641ea --- /dev/null +++ b/build/publish-locally.ps1 @@ -0,0 +1,91 @@ +param ($version='1.0.0') + +$currentFolder = $PSScriptRoot +$slnFolder = Join-Path $currentFolder "../" +# Apps +$webAppFolder = Join-Path $slnFolder "apps/angular" +$authserverFolder = Join-Path $slnFolder "apps/auth-server/src/EShopOnAbp.AuthServer" +$publicWebFolder = Join-Path $slnFolder "apps/public-web/src/EShopOnAbp.PublicWeb" +# Gateways +$webGatewayFolder = Join-Path $slnFolder "gateways/web/src/EShopOnAbp.WebGateway" +$webPublicGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnAbp.WebPublicGateway" +# Microservices +$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host" +$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host" +$basketServiceFolder = Join-Path $slnFolder "services/basket/src/EShopOnAbp.BasketService" +$catalogServiceFolder = Join-Path $slnFolder "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host" +$paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host" +$orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host" + +$total = 11 + +### Angular WEB App(WWW) +Write-Host "*** BUILDING WEB (WWW) 1/$total ****************" -ForegroundColor Green +Set-Location $webAppFolder +yarn +# ng build --prod +npm run build:prod + + +### AUTH-SERVER +Write-Host "*** BUILDING AUTH-SERVER 2/$total ****************" -ForegroundColor Green +Set-Location $authserverFolder +dotnet publish -c Release + + +### PUBLIC-WEB +Write-Host "*** BUILDING WEB-PUBLIC 3/$total ****************" -ForegroundColor Green +Set-Location $publicWebFolder +dotnet publish -c Release + +### WEB-GATEWAY +Write-Host "*** BUILDING WEB-GATEWAY 4/$total ****************" -ForegroundColor Green +Set-Location $webGatewayFolder +dotnet publish -c Release + + +### PUBLICWEB-GATEWAY +Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" -ForegroundColor Green +Set-Location $webPublicGatewayFolder +dotnet publish -c Release + + +### IDENTITY-SERVICE +Write-Host "*** BUILDING IDENTITY-SERVICE 6/$total ****************" -ForegroundColor Green +Set-Location $identityServiceFolder +dotnet publish -c Release + + +### ADMINISTRATION-SERVICE +Write-Host "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" -ForegroundColor Green +Set-Location $administrationServiceFolder +dotnet publish -c Release + + +### BASKET-SERVICE +Write-Host "**************** BUILDING BASKET-SERVICE 8/$total ****************" -ForegroundColor Green +Set-Location $basketServiceFolder +dotnet publish -c Release + + +### CATALOG-SERVICE +Write-Host "**************** BUILDING CATALOG-SERVICE 9/$total ****************" -ForegroundColor Green +Set-Location $catalogServiceFolder +dotnet publish -c Release + + +### PAYMENT-SERVICE +Write-Host "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" -ForegroundColor Green +Set-Location $paymentServiceFolder +dotnet publish -c Release + + +### ORDERING-SERVICE +Write-Host "**************** BUILDING ORDERING-SERVICE 11/$total ****************" -ForegroundColor Green +Set-Location $orderingServiceFolder +dotnet publish -c Release + + +### ALL COMPLETED +Write-Host "ALL COMPLETED" -ForegroundColor Green +Set-Location $currentFolder \ No newline at end of file From 988b782eec7a096110f77550993dbf95ae032055 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Mon, 8 Aug 2022 11:40:17 +0300 Subject: [PATCH 13/13] image tags set to 1.0.0 --- build/build-images-locally.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build-images-locally.sh b/build/build-images-locally.sh index 2c3b8d93..85237331 100755 --- a/build/build-images-locally.sh +++ b/build/build-images-locally.sh @@ -1,6 +1,6 @@ #!/bin/bash -export IMAGE_TAG="1.0.4" +export IMAGE_TAG="1.0.0" export total=11 cd ../ export currentFolder=`pwd`