Browse Source

Merge branch 'main' into gterdem/webApp_deployment_updates

pull/31/head
Galip Tolga Erdem 4 years ago
parent
commit
fbf4baaaaa
  1. 16
      build/build-images-locally.ps1
  2. 14
      build/build-images.ps1
  3. 4
      etc/k8s/eshoponabp/charts/authserver/templates/authserver-deployment.yaml
  4. 7
      etc/k8s/eshoponabp/charts/authserver/values.yaml
  5. 4
      etc/k8s/eshoponabp/charts/postgres/Chart.yaml
  6. 16
      etc/k8s/eshoponabp/charts/postgres/templates/postgres-deployment.yaml
  7. 4
      etc/k8s/eshoponabp/charts/postgres/templates/postgres-service.yaml
  8. 0
      etc/k8s/eshoponabp/charts/postgres/values.yaml
  9. 13
      etc/k8s/eshoponabp/values.yaml

16
build/build-images-locally.ps1

@ -13,45 +13,45 @@ $identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.
$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host"
### Angular WEB App(WWW)
Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB (WWW) 1/7 ****************" -ForegroundColor Green
Set-Location $webAppFolder
yarn
# ng build --prod
npm run build:prod
docker build -t eshoponabp/app-web:$version .
docker build -f Dockerfile.local -t eshoponabp/app-web:$version .
### AUTH-SERVER
Write-Host "*** BUILDING AUTH-SERVER ****************" -ForegroundColor Green
Write-Host "*** BUILDING AUTH-SERVER 2/7 ****************" -ForegroundColor Green
Set-Location $authserverFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/app-authserver:$version .
### PUBLIC-WEB
Write-Host "*** BUILDING WEB-PUBLIC ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-PUBLIC 3/7 ****************" -ForegroundColor Green
Set-Location $publicWebFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/app-publicweb:$version .
### WEB-GATEWAY
Write-Host "*** BUILDING WEB-GATEWAY ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-GATEWAY 4/7 ****************" -ForegroundColor Green
Set-Location $webGatewayFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 5/7 ****************" -ForegroundColor Green
Set-Location $webPublicGatewayFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/gateway-web-public:$version .
### IDENTITY-SERVICE
Write-Host "*** BUILDING IDENTITY-SERVICE ****************" -ForegroundColor Green
Write-Host "*** BUILDING IDENTITY-SERVICE 6/7 ****************" -ForegroundColor Green
Set-Location $identityServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE
Write-Host "*** BUILDING ADMINISTRATION-SERVICE ****************" -ForegroundColor Green
Write-Host "*** BUILDING ADMINISTRATION-SERVICE 7/7 ****************" -ForegroundColor Green
Set-Location $administrationServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-administration:$version .

14
build/build-images.ps1

@ -15,41 +15,41 @@ $administrationServiceFolder = Join-Path $slnFolder "services/administration/src
Write-Host "===== BUILDING APPLICATIONS =====" -ForegroundColor Yellow
### Angular WEB App
Write-Host "*** BUILDING ANGULAR WEB APPLICATION ***" -ForegroundColor Green
Write-Host "*** BUILDING ANGULAR WEB APPLICATION 1/7 ***" -ForegroundColor Green
Set-Location $webAppFolder
docker build -f "$webAppFolder/Dockerfile" -t eshoponabp/app-web:$version .
### AUTH-SERVER
Write-Host "**************** BUILDING AUTH-SERVER ****************" -ForegroundColor Green
Write-Host "**************** BUILDING AUTH-SERVER 2/7 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$authserverFolder/Dockerfile" -t eshoponabp/app-authserver:$version .
### PUBLIC-WEB
Write-Host "**************** BUILDING WEB-PUBLIC ****************" -ForegroundColor Green
Write-Host "**************** BUILDING WEB-PUBLIC 3/7 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$publicWebFolder/Dockerfile" -t eshoponabp/app-publicweb:$version .
Write-Host "===== BUILDING GATEWAYS =====" -ForegroundColor Yellow
### WEB-GATEWAY
Write-Host "**************** BUILDING WEB-GATEWAY ****************" -ForegroundColor Green
Write-Host "**************** BUILDING WEB-GATEWAY 4/7 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$webGatewayFolder/Dockerfile" -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY
Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY ****************" -ForegroundColor Green
Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY 5/7 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$webPublicGatewayFolder/Dockerfile" -t eshoponabp/gateway-web-public:$version .
Write-Host "===== BUILDING MICROSERVICES =====" -ForegroundColor Yellow
### IDENTITY-SERVICE
Write-Host "**************** BUILDING IDENTITY-SERVICE ****************" -ForegroundColor Green
Write-Host "**************** BUILDING IDENTITY-SERVICE 6/7 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$identityServiceFolder/Dockerfile" -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE
Write-Host "**************** BUILDING ADMINISTRATION-SERVICE ****************" -ForegroundColor Green
Write-Host "**************** BUILDING ADMINISTRATION-SERVICE 7/7 ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$administrationServiceFolder/Dockerfile" -t eshoponabp/service-administration:$version .

4
etc/k8s/eshoponabp/charts/authserver/templates/authserver-deployment.yaml

@ -28,9 +28,9 @@ spec:
- name: App__RedirectAllowedUrls
value: "{{ .Values.config.allowedRedirectUrls }}"
- name: "ConnectionStrings__IdentityService"
value: "{{ .Values.config.identityService.connString }}"
value: "{{ .Values.config.connectionStrings.identityService }}"
- name: "ConnectionStrings__AdministrationService"
value: "{{ .Values.config.administrationService.connString }}"
value: "{{ .Values.config.connectionStrings.administrationService }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"

7
etc/k8s/eshoponabp/charts/authserver/values.yaml

@ -2,10 +2,9 @@ config:
selfUrl: # https://eshop-st-authserver
corsOrigins: # https://eshop-st-identity,https://eshop-st-administration
allowedRedirectUrls: https://eshop-st-web
identityService:
connString: #
administrationService:
connString: #
connectionStrings:
administrationService: #
identityService: #
dotnetEnv: #
redisHost: #
rabbitmqHost: #

4
etc/k8s/eshoponabp/charts/sqlserver/Chart.yaml → etc/k8s/eshoponabp/charts/postgres/Chart.yaml

@ -1,6 +1,6 @@
apiVersion: v2
name: sqldb
name: postgresdb
appVersion: "1.0"
description: Runs SQL Server Instance
description: Runs Postgres DB Instance
version: 1.0.0
type: application

16
etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml → etc/k8s/eshoponabp/charts/postgres/templates/postgres-deployment.yaml

@ -14,22 +14,20 @@ spec:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: mcr.microsoft.com/mssql/server
- image: postgres
name: {{ .Release.Name }}-{{ .Chart.Name }}
{{- if eq .Release.Name "es-az" }}
volumeMounts:
- mountPath: "/var/opt/mssql"
- mountPath: "/var/opt/postgres"
name: {{ .Release.Name }}-{{ .Chart.Name }}-database-volume
subPath: sqlserver-data
subPath: postgres-data
{{- end }}
ports:
- name: sqlserver
containerPort: 1433
- name: postgres
containerPort: 5432
env:
- name: SA_PASSWORD
value: "myPassw@rd"
- name: ACCEPT_EULA
value: "Y"
- name: POSTGRES_PASSWORD
value: "myPassw0rd"
{{- if eq .Release.Name "es-az" }}
volumeClaimTemplates:
- metadata:

4
etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver-service.yaml → etc/k8s/eshoponabp/charts/postgres/templates/postgres-service.yaml

@ -7,8 +7,8 @@ metadata:
spec:
type: ClusterIP
ports:
- name: sqlserver
port: 1433
- name: postgres
port: 5432
selector:
app: {{ .Release.Name }}-{{ .Chart.Name }}

0
etc/k8s/eshoponabp/charts/sqlserver/values.yaml → etc/k8s/eshoponabp/charts/postgres/values.yaml

13
etc/k8s/eshoponabp/values.yaml

@ -4,10 +4,9 @@ authserver:
selfUrl: https://eshop-st-authserver
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-gateway-internal
allowedRedirectUrls: https://eshop-st-web
identityService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
connectionStrings:
administrationService: "Host=es-st-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
identityService: "Host=es-st-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
@ -53,8 +52,8 @@ identity:
selfUrl: https://eshop-st-identity
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public
connectionStrings:
identityService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
identityService: "Host=es-st-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false"
administrationService: "Host=es-st-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
@ -82,7 +81,7 @@ administration:
gatewayUrl: https://eshop-st-gateway-internal/
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-gateway-internal
connectionStrings:
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService: "Host=es-st-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"

Loading…
Cancel
Save