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 new file mode 100755 index 00000000..85237331 --- /dev/null +++ b/build/build-images-locally.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +export IMAGE_TAG="1.0.0" +export total=11 +cd ../ +export currentFolder=`pwd` +cd build/ + + +echo "*** BUILDING WEB (WWW) 1/${total} ****************" +cd ${currentFolder}/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 ${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 ${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 ${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 ${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 ${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 ${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 ${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 ${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 ${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 ${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}" . + +echo "ALL COMPLETED" \ No newline at end of file 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 new file mode 100755 index 00000000..79b96680 --- /dev/null +++ b/build/build-images.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +export IMAGE_TAG="1.0.0" +export total=11 +cd ../ +export currentFolder=`pwd` +cd build/ + +echo "*** BUILDING WEB (WWW) 1/${total} ****************" +cd ${currentFolder}/apps/angular +docker build --force-rm -t "eshoponabp/app-web:${IMAGE_TAG}" . + + +echo "*** BUILDING AUTH-SERVER 2/$total ****************" +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 ${currentFolder}/apps/public-web/src/EShopOnAbp.PublicWeb +docker build --force-rm -t "eshoponabp/app-publicweb:${IMAGE_TAG}" . + + +echo "*** BUILDING WEB-GATEWAY 4/$total ****************" +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 ${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 ${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 ${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 ${currentFolder}/services/basket/src/EShopOnAbp.BasketService +docker build --force-rm -t "eshoponabp/service-basket:${IMAGE_TAG}" . + + +echo "**************** BUILDING CATALOG-SERVICE 9/$total ****************" +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 ${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 ${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/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 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/azure/scripts/push-images.ps1 b/etc/k8s/azure/scripts/push-images.ps1 index 49bb9945..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 @@ -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..7d7764ea --- /dev/null +++ b/etc/k8s/azure/scripts/push-images.sh @@ -0,0 +1,36 @@ +export version="1.0.4" + +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 100755 index 00000000..07748627 --- /dev/null +++ b/etc/k8s/deploy-staging.sh @@ -0,0 +1 @@ +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 ccba5219..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 @@ -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/gateway-web/templates/gateway-web-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml index ccba5219..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 @@ -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/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..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 @@ -7,25 +7,23 @@ 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 +# {{- 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 }} 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: / @@ -34,4 +32,4 @@ spec: service: name: {{ .Release.Name }}-{{ .Chart.Name }} port: - number: 80 \ No newline at end of file + number: 80 diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml index bdcbe997..4963f4d4 100644 --- a/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml @@ -14,10 +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" + "scope": "offline_access openid profile email phone AccountService IdentityService AdministrationService CatalogService OrderingService", + "strictDiscoveryDocumentValidation": {{ .Values.config.authServer.strictDiscoveryDocumentValidation }}, + "skipIssuerCheck": {{ .Values.config.authServer.skipIssuerCheck }} }, "apis": { "default": { 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 5dddcc35..cc894bde 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 @@ -19,28 +19,30 @@ authserver: tlsSecret: eshop-wildcard-tls image: repository: "volocr.azurecr.io/eshoponabp/app-authserver" - tag: latest + tag: 1.0.4 # web sub-chart override 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" + 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.4 # 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" @@ -53,13 +55,13 @@ public-web: host: eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-publicweb" - tag: latest + tag: 1.0.4 # identity-service sub-chart override 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 +76,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 @@ -88,13 +90,13 @@ identity: host: identity.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-identity" - tag: latest + tag: 1.0.4 # administration sub-chart override 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: @@ -115,12 +117,12 @@ administration: host: administration.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-administration" - tag: latest + tag: 1.0.4 # 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: @@ -136,7 +138,7 @@ gateway-web: host: gateway.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/gateway-web" - tag: latest + tag: 1.0.4 reRoutes: accountService: url: http://eshop-az-authserver @@ -152,7 +154,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" @@ -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.4 reRoutes: accountService: url: http://eshop-az-authserver @@ -187,7 +189,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: @@ -206,13 +208,13 @@ basket: host: basket.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-basket" - tag: latest + tag: 1.0.4 # catalog-service sub-chart override 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" @@ -234,13 +236,13 @@ catalog: host: catalog.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-catalog" - tag: latest + tag: 1.0.4 # ordering-service sub-chart override 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" @@ -257,13 +259,13 @@ ordering: host: order.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-ordering" - tag: latest + tag: 1.0.4 # payment-service sub-chart override 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" @@ -280,7 +282,7 @@ payment: host: payment.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/service-payment" - tag: latest + tag: 1.0.4 # 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 2b85511a..33d64c41 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: http://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" @@ -16,24 +19,31 @@ authserver: tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-authserver" - tag: latest + tag: 1.0.0 # web sub-chart override web: config: selfUrl: https://eshop-st-web - gatewayUrl: "https://eshop-st-gateway-web/" + gatewayUrl: https://eshop-st-gateway-web + authServer: + authority: http://eshop-st-authserver + 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: config: selfUrl: https://eshop-st-public-web - gatewayUrl: http://eshop-st-gateway-web-public + gatewayUrl: http://eshop-st-gateway-web-public/ authServer: authority: http://eshop-st-authserver requireHttpsMetadata: "false" @@ -43,9 +53,10 @@ public-web: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-public-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-publicweb" - tag: latest + tag: 1.0.0 # identity-service sub-chart override identity: @@ -78,9 +89,10 @@ identity: paymentServiceRootUrl: https://eshop-st-payment/ ingress: host: eshop-st-identity + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-identity" - tag: latest + tag: 1.0.0 # administration sub-chart override administration: @@ -105,9 +117,10 @@ administration: authority: https://eshop-st-authserver ingress: host: eshop-st-administration + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-administration" - tag: latest + tag: 1.0.0 # gateway-web sub-chart override gateway-web: @@ -126,9 +139,10 @@ gateway-web: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-gateway-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/gateway-web" - tag: latest + tag: 1.0.0 reRoutes: accountService: url: http://eshop-st-authserver @@ -136,6 +150,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: @@ -152,9 +170,10 @@ 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 + tag: 1.0.0 reRoutes: accountService: url: http://eshop-st-authserver @@ -188,13 +207,14 @@ 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 + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-basket" - tag: latest + tag: 1.0.0 # catalog-service sub-chart override catalog: @@ -220,9 +240,10 @@ catalog: grpcProtocols: Http2 ingress: host: eshop-st-catalog + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-catalog" - tag: latest + tag: 1.0.0 # ordering-service sub-chart override ordering: @@ -243,9 +264,10 @@ ordering: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-ordering + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-ordering" - tag: latest + tag: 1.0.0 # payment-service sub-chart override payment: @@ -266,9 +288,10 @@ payment: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-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.