diff --git a/build/build-images-locally.sh b/build/build-images-locally.sh index 85237331..35ad460f 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="latest" export total=11 cd ../ export currentFolder=`pwd` diff --git a/etc/README.md b/etc/README.md index 7aef9b19..f1978493 100644 --- a/etc/README.md +++ b/etc/README.md @@ -32,6 +32,18 @@ helm upgrade --install --version=4.0.19 ingress-nginx ingress-nginx/ingress-ngin 127.0.0.1 eshop-st-gateway-web 127.0.0.1 eshop-st-gateway-web-public ```` +Once Helm is set up properly, add the repo as follows: + +```console +helm repo add eshoponabp https://abpframework.github.io/abp-charts/ +``` +You can then run `helm search repo eshoponabp` to see the charts. + +```console + helm install eshop-st eshoponabp/eshoponabp +``` + +OR * 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. diff --git a/etc/k8s/azure/scripts/push-images-ghcr.sh b/etc/k8s/azure/scripts/push-images-ghcr.sh index c28e8629..5881246f 100755 --- a/etc/k8s/azure/scripts/push-images-ghcr.sh +++ b/etc/k8s/azure/scripts/push-images-ghcr.sh @@ -1,4 +1,4 @@ -export version="1.0.0" +export version="latest" az acr login --name volocr @@ -30,7 +30,7 @@ docker tag eshoponabp/service-catalog:"${version}" ghcr.io/volosoft/eshoponabp/s docker push ghcr.io/volosoft/eshoponabp/service-catalog:"${version}" docker tag eshoponabp/service-ordering:"${version}" ghcr.io/volosoft/eshoponabp/service-ordering:"${version}" -docker push ghcr.io/volosoft/eshoponabp/service-ordering:"1.0.1" +docker push ghcr.io/volosoft/eshoponabp/service-ordering:"${version}" docker tag eshoponabp/service-payment:"${version}" ghcr.io/volosoft/eshoponabp/service-payment:"${version}" docker push ghcr.io/volosoft/eshoponabp/service-payment:"${version}" \ No newline at end of file diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/azure/values.azure.yaml similarity index 79% rename from etc/k8s/eshoponabp/values.azure.yaml rename to etc/k8s/azure/values.azure.yaml index f57d5fb9..e84afde4 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/azure/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://cmskit.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 @@ -14,12 +14,14 @@ authserver: redisHost: eshop-az-redis rabbitmqHost: eshop-az-rabbitmq elasticsearchHost: eshop-az-elasticsearch + nodeSelector: + agentpool: demopool ingress: host: auth.eshoponabp.com tlsSecret: eshop-wildcard-tls image: - repository: "volocr.azurecr.io/eshoponabp/app-authserver" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/app-authserver" + tag: 1.0.0 # web sub-chart override web: @@ -32,11 +34,13 @@ web: responseType: "code" strictDiscoveryDocumentValidation: false skipIssuerCheck: true + nodeSelector: + agentpool: demopool ingress: host: admin.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/app-web" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/app-web" + tag: 1.0.0 # public-web sub-chart override public-web: @@ -52,12 +56,13 @@ public-web: redisHost: eshop-az-redis rabbitmqHost: eshop-az-rabbitmq elasticsearchHost: eshop-az-elasticsearch - + nodeSelector: + agentpool: demopool ingress: host: eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/app-publicweb" - tag: 1.0.6 + repository: "ghcr.io/volosoft/eshoponabp/app-publicweb" + tag: 1.0.0 # identity-service sub-chart override identity: @@ -87,12 +92,15 @@ identity: basketServiceRootUrl: https://basket.eshoponabp.com/ catalogServiceRootUrl: https://catalog.eshoponabp.com orderingServiceRootUrl: https://order.eshoponabp.com + cmskitServiceRootUrl: https://cmskit.eshoponabp.com paymentServiceRootUrl: https://payment.eshoponabp.com + nodeSelector: + agentpool: demopool ingress: host: identity.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/service-identity" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/service-identity" + tag: 1.0.0 # administration sub-chart override administration: @@ -114,12 +122,14 @@ administration: rabbitmqHost: eshop-az-rabbitmq elasticsearchHost: eshop-az-elasticsearch synchedCommunication: # Used for server-to-server (client-credentials) communication with identityService for user permissions - authority: https://auth.eshoponabp.com + authority: https://auth.eshoponabp.com + nodeSelector: + agentpool: demopool ingress: host: administration.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/service-administration" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/service-administration" + tag: 1.0.0 # gateway-web sub-chart override gateway-web: @@ -136,11 +146,13 @@ gateway-web: redisHost: eshop-az-redis rabbitmqHost: eshop-az-rabbitmq elasticsearchHost: eshop-az-elasticsearch + nodeSelector: + agentpool: demopool ingress: host: gateway.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/gateway-web" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/gateway-web" + tag: 1.0.0 reRoutes: accountService: url: http://eshop-az-authserver @@ -152,6 +164,8 @@ gateway-web: url: http://eshop-az-catalog orderingService: url: http://eshop-az-ordering + cmskitService: + url: http://eshop-az-cmskit # gateway-web-public sub-chart override gateway-web-public: @@ -166,11 +180,13 @@ gateway-web-public: redisHost: eshop-az-redis rabbitmqHost: eshop-az-rabbitmq elasticsearchHost: eshop-az-elasticsearch + nodeSelector: + agentpool: demopool ingress: host: gateway-public.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/gateway-web-public" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/gateway-web-public" + tag: 1.0.0 reRoutes: accountService: url: http://eshop-az-authserver @@ -184,6 +200,8 @@ gateway-web-public: url: http://eshop-az-basket orderingService: url: http://eshop-az-ordering + cmskitService: + url: http://eshop-az-cmskit paymentService: url: http://eshop-az-payment @@ -206,11 +224,13 @@ basket: remoteServices: catalogBaseUrl: http://eshop-az-catalog:80 catalogGrpcUrl: http://eshop-az-catalog:81 + nodeSelector: + agentpool: demopool ingress: host: basket.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/service-basket" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/service-basket" + tag: 1.0.0 # catalog-service sub-chart override catalog: @@ -237,8 +257,8 @@ catalog: ingress: host: catalog.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/service-catalog" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/service-catalog" + tag: 1.0.0 # ordering-service sub-chart override ordering: @@ -257,12 +277,43 @@ ordering: redisHost: eshop-az-redis rabbitmqHost: eshop-az-rabbitmq elasticsearchHost: eshop-az-elasticsearch + nodeSelector: + agentpool: demopool ingress: host: order.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/service-ordering" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/service-ordering" + tag: 1.0.1 +# cmskit-service sub-chart override +# cmskit: +# config: +# selfUrl: https://cmskit.eshoponabp.com +# corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com +# connectionStrings: +# cmskitService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Cmskit;User ID=postgres;password=myPassw0rd;Pooling=false" +# administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" +# authServer: +# authority: http://eshop-az-authserver +# requireHttpsMetadata: "false" +# swaggerClientId: WebGateway_Swagger +# swaggerClientSecret: "1q2w3e*" +# remoteServices: +# abpIdentityBaseUrl: https://identity.eshoponabp.com +# dotnetEnv: Production +# redisHost: eshop-az-redis +# rabbitmqHost: eshop-az-rabbitmq +# elasticsearchHost: eshop-az-elasticsearch +# synchedCommunication: # Used for server-to-server (client-credentials) communication with identityService for user permissions +# authority: https://auth.eshoponabp.com +# nodeSelector: +# agentpool: demopool +# ingress: +# host: cmskit.eshoponabp.com +# image: +# repository: "ghcr.io/volosoft/eshoponabp/service-cmskit" +# tag: 1.0.1 + # payment-service sub-chart override payment: config: @@ -280,11 +331,13 @@ payment: redisHost: eshop-az-redis rabbitmqHost: eshop-az-rabbitmq elasticsearchHost: eshop-az-elasticsearch + nodeSelector: + agentpool: demopool ingress: host: payment.eshoponabp.com image: - repository: "volocr.azurecr.io/eshoponabp/service-payment" - tag: 1.0.5 + repository: "ghcr.io/volosoft/eshoponabp/service-payment" + tag: 1.0.0 # Default values for eshoponabp. # This is a YAML-formatted file. @@ -363,7 +416,8 @@ autoscaling: targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 -nodeSelector: {} +nodeSelector: + agentpool: demopool tolerations: [] diff --git a/etc/k8s/deploy-staging.ps1 b/etc/k8s/deploy-staging.ps1 index 342aab96..d129a082 100644 --- a/etc/k8s/deploy-staging.ps1 +++ b/etc/k8s/deploy-staging.ps1 @@ -1 +1,3 @@ -helm upgrade --install eshop-st eshoponabp --namespace eshop --create-namespace \ No newline at end of file +helm upgrade --install eshop-st eshoponabp --namespace eshop --create-namespace + +helm upgrade --install eshop-az eshoponabp -f ./azure/values.azure.yaml --namespace eshop \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/mongodb/templates/mongodb-deployment.yaml b/etc/k8s/eshoponabp/charts/mongodb/templates/mongodb-deployment.yaml index fc01540b..3be57fd2 100644 --- a/etc/k8s/eshoponabp/charts/mongodb/templates/mongodb-deployment.yaml +++ b/etc/k8s/eshoponabp/charts/mongodb/templates/mongodb-deployment.yaml @@ -31,8 +31,8 @@ spec: name: {{ .Release.Name }}-{{ .Chart.Name }}-database-volume spec: accessModes: [ "ReadWriteOnce" ] - storageClassName: "managed-premium-retain" + storageClassName: "managed-csi" resources: requests: - storage: 32Gi + storage: 16Gi {{- end }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/mongodb/values.yaml b/etc/k8s/eshoponabp/charts/mongodb/values.yaml index e69de29b..5e6dfe48 100644 --- a/etc/k8s/eshoponabp/charts/mongodb/values.yaml +++ b/etc/k8s/eshoponabp/charts/mongodb/values.yaml @@ -0,0 +1,2 @@ +nodeSelector: + agentpool: demopool \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/postgres/templates/postgres-deployment.yaml b/etc/k8s/eshoponabp/charts/postgres/templates/postgres-deployment.yaml index 50c455a6..a86da72b 100644 --- a/etc/k8s/eshoponabp/charts/postgres/templates/postgres-deployment.yaml +++ b/etc/k8s/eshoponabp/charts/postgres/templates/postgres-deployment.yaml @@ -34,8 +34,8 @@ spec: name: {{ .Release.Name }}-{{ .Chart.Name }}-database-volume spec: accessModes: [ "ReadWriteOnce" ] - storageClassName: "managed-premium-retain" + storageClassName: "managed-csi" resources: requests: - storage: 32Gi + storage: 16Gi {{- end }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/postgres/values.yaml b/etc/k8s/eshoponabp/charts/postgres/values.yaml index e69de29b..5e6dfe48 100644 --- a/etc/k8s/eshoponabp/charts/postgres/values.yaml +++ b/etc/k8s/eshoponabp/charts/postgres/values.yaml @@ -0,0 +1,2 @@ +nodeSelector: + agentpool: demopool \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/rabbitmq/values.yaml b/etc/k8s/eshoponabp/charts/rabbitmq/values.yaml index e69de29b..5e6dfe48 100644 --- a/etc/k8s/eshoponabp/charts/rabbitmq/values.yaml +++ b/etc/k8s/eshoponabp/charts/rabbitmq/values.yaml @@ -0,0 +1,2 @@ +nodeSelector: + agentpool: demopool \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/redis/values.yaml b/etc/k8s/eshoponabp/charts/redis/values.yaml index e69de29b..5e6dfe48 100644 --- a/etc/k8s/eshoponabp/charts/redis/values.yaml +++ b/etc/k8s/eshoponabp/charts/redis/values.yaml @@ -0,0 +1,2 @@ +nodeSelector: + agentpool: demopool \ No newline at end of file diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 329b9abd..3ffbec52 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -19,7 +19,7 @@ authserver: tlsSecret: eshop-wildcard-tls image: repository: "ghcr.io/volosoft/eshoponabp/app-authserver" - tag: 1.0.0 + tag: latest # web sub-chart override web: @@ -36,7 +36,7 @@ web: host: eshop-st-web tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/app-web" + repository: "eshoponabp/app-web" tag: 1.0.0 # public-web sub-chart override @@ -57,7 +57,7 @@ public-web: host: eshop-st-public-web tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/app-publicweb" + repository: "eshoponabp/app-publicweb" tag: 1.0.0 # identity-service sub-chart override @@ -93,7 +93,7 @@ identity: host: eshop-st-identity tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/service-identity" + repository: "eshoponabp/service-identity" tag: 1.0.0 # administration sub-chart override @@ -121,7 +121,7 @@ administration: host: eshop-st-administration tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/service-administration" + repository: "eshoponabp/service-administration" tag: 1.0.0 # gateway-web sub-chart override @@ -143,7 +143,7 @@ gateway-web: host: eshop-st-gateway-web tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/gateway-web" + repository: "eshoponabp/gateway-web" tag: 1.0.0 reRoutes: accountService: @@ -174,7 +174,7 @@ gateway-web-public: host: eshop-st-gateway-web-public tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/gateway-web-public" + repository: "eshoponabp/gateway-web-public" tag: 1.0.0 reRoutes: accountService: @@ -215,7 +215,7 @@ basket: host: eshop-st-basket tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/service-basket" + repository: "eshoponabp/service-basket" tag: 1.0.0 # catalog-service sub-chart override @@ -244,7 +244,7 @@ catalog: host: eshop-st-catalog tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/service-catalog" + repository: "eshoponabp/service-catalog" tag: 1.0.0 # ordering-service sub-chart override @@ -268,8 +268,8 @@ ordering: host: eshop-st-ordering tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/service-ordering" - tag: 1.0.1 + repository: "eshoponabp/service-ordering" + tag: 1.0.0 # payment-service sub-chart override payment: @@ -292,7 +292,7 @@ payment: host: eshop-st-payment tlsSecret: eshop-wildcard-tls image: - repository: "ghcr.io/volosoft/eshoponabp/service-payment" + repository: "eshoponabp/service-payment" tag: 1.0.0 # Default values for eshoponabp.