diff --git a/build/acr-build/queue-all.ps1 b/build/acr-build/queue-all.ps1 index aacffea95..60a39d92c 100644 --- a/build/acr-build/queue-all.ps1 +++ b/build/acr-build/queue-all.ps1 @@ -13,7 +13,6 @@ $services = @( @{ Name="eshopcatalog"; Image="eshop/catalog.api"; File="src/Services/Catalog/Catalog.API/Dockerfile" }, @{ Name="eshopidentity"; Image="eshop/identity.api"; File="src/Services/Identity/Identity.API/Dockerfile" }, @{ Name="eshopordering"; Image="eshop/ordering.api"; File="src/Services/Ordering/Ordering.API/Dockerfile" }, - @{ Name="eshoporderingbg"; Image="eshop/ordering.backgroundtasks"; File="src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile" }, @{ Name="eshopmarketing"; Image="eshop/marketing.api"; File="src/Services/Marketing/Marketing.API/Dockerfile" }, @{ Name="eshopwebspa"; Image="eshop/webspa"; File="src/Web/WebSPA/Dockerfile" }, @{ Name="eshopwebmvc"; Image="eshop/webmvc"; File="src/Web/WebMVC/Dockerfile" }, diff --git a/build/multiarch-manifests/create-manifests.ps1 b/build/multiarch-manifests/create-manifests.ps1 index cc7f05194..0bc6a4c7c 100644 --- a/build/multiarch-manifests/create-manifests.ps1 +++ b/build/multiarch-manifests/create-manifests.ps1 @@ -12,7 +12,7 @@ Write-Host "Tags used are linux-master, win-master, linux-dev, win-dev, linux-la Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow -$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "marketing.api", "payment.api", "locations.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client" +$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "marketing.api", "payment.api", "locations.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client" foreach ($svc in $services) { Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev" diff --git a/docker-compose-windows.prod.yml b/docker-compose-windows.prod.yml index ead977f29..638c98d69 100644 --- a/docker-compose-windows.prod.yml +++ b/docker-compose-windows.prod.yml @@ -69,17 +69,6 @@ services: ports: - "5102:80" - ordering.backgroundtasks: - environment: - - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - UseCustomizationData=True - - AzureServiceBusEnabled=False - ports: - - "5111:80" - webspa: environment: - ASPNETCORE_ENVIRONMENT=Production diff --git a/docker-compose.override.windows.yml b/docker-compose.override.windows.yml index dcaac7c45..0f1e66efe 100644 --- a/docker-compose.override.windows.yml +++ b/docker-compose.override.windows.yml @@ -37,11 +37,6 @@ services: - EventBusUserName=admin - EventBusPassword=password - ordering.backgroundtasks: - environment: - - EventBusUserName=admin - - EventBusPassword=password - payment.api: environment: - EventBusUserName=admin diff --git a/docker-compose.override.yml b/docker-compose.override.yml index e4ee76650..bd04fa997 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -115,26 +115,6 @@ services: ports: - "5102:80" - - ordering.backgroundtasks: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} - - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - - UseCustomizationData=True - - AzureServiceBusEnabled=False - - CheckUpdateTime=30000 - - GracePeriodTime=1 - - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - - OrchestratorType=${ORCHESTRATOR_TYPE} - - UseLoadTest=${USE_LOADTEST:-False} - - Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ=Verbose - ports: - - "5111:80" - marketing.api: environment: - ASPNETCORE_ENVIRONMENT=Development @@ -343,8 +323,6 @@ services: - HealthChecks-UI__HealthChecks__7__Uri=http://webmarketingapigw/hc - HealthChecks-UI__HealthChecks__8__Name=Ordering HTTP Check - HealthChecks-UI__HealthChecks__8__Uri=http://ordering.api/hc - - HealthChecks-UI__HealthChecks__9__Name=Ordering HTTP Background Check - - HealthChecks-UI__HealthChecks__9__Uri=http://ordering.backgroundtasks/hc - HealthChecks-UI__HealthChecks__10__Name=Basket HTTP Check - HealthChecks-UI__HealthChecks__10__Uri=http://basket.api/hc - HealthChecks-UI__HealthChecks__11__Name=Catalog HTTP Check @@ -359,7 +337,6 @@ services: - HealthChecks-UI__HealthChecks__15__Uri=http://payment.api/hc - HealthChecks-UI__HealthChecks__16__Name=Ordering SignalRHub HTTP Check - HealthChecks-UI__HealthChecks__16__Uri=http://ordering.signalrhub/hc - - OrderingBackgroundTasksUrl=http://ordering.backgroundtasks/hc - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - OrchestratorType=${ORCHESTRATOR_TYPE} ports: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 4bf465565..e1825a8c4 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -91,25 +91,6 @@ services: ports: - "80" # The API Gateway redirects and access through the internal port (80). - - ordering.backgroundtasks: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} - - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - - UseCustomizationData=True - - AzureServiceBusEnabled=False - - CheckUpdateTime=30000 - - GracePeriodTime=1 - - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - - OrchestratorType=${ORCHESTRATOR_TYPE} - - UseLoadTest=${USE_LOADTEST:-False} - ports: - - "5111:80" - marketing.api: environment: - ASPNETCORE_ENVIRONMENT=Development @@ -179,7 +160,6 @@ services: - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://catalog.api/hc - OrderingUrl=http://ordering.api/hc - - OrderingBackgroundTasksUrl=http://ordering.backgroundtasks/hc - BasketUrl=http://basket.api/hc - IdentityUrl=http://identity.api/hc - LocationsUrl=http://locations.api/hc diff --git a/docker-compose.yml b/docker-compose.yml index 243fbf2c6..ccc888bf2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,15 +52,7 @@ services: depends_on: - sql.data - rabbitmq - - ordering.backgroundtasks: - image: ${REGISTRY:-eshop}/ordering.backgroundtasks:${PLATFORM:-linux}-${TAG:-latest} - build: - context: . - dockerfile: src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile - depends_on: - - sql.data - - rabbitmq + - identity.api marketing.api: image: ${REGISTRY:-eshop}/marketing.api:${PLATFORM:-linux}-${TAG:-latest} diff --git a/eShopOnContainers.sln b/eShopOnContainers.sln index c3e63925d..232331854 100644 --- a/eShopOnContainers.sln +++ b/eShopOnContainers.sln @@ -99,8 +99,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunne EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Windows", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Windows\eShopOnContainers.TestRunner.Windows.csproj", "{A7337243-33B8-463A-87AD-944B75EFD820}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "src\Services\Ordering\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{16CDE5D2-2DDE-4AF2-B902-AD9CC42DE480}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basket.FunctionalTests", "src\Services\Basket\Basket.FunctionalTests\Basket.FunctionalTests.csproj", "{9F00E62F-E180-4A9C-8794-98A72AFAC2DB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basket.UnitTests", "src\Services\Basket\Basket.UnitTests\Basket.UnitTests.csproj", "{63417272-1E6A-406A-AD11-C738558D89C0}" diff --git a/k8s/build-push-images.ps1 b/k8s/build-push-images.ps1 index e2c8e06b6..769e74abc 100644 --- a/k8s/build-push-images.ps1 +++ b/k8s/build-push-images.ps1 @@ -57,7 +57,7 @@ if (-not [string]::IsNullOrEmpty($dockerUser)) { # Push images to Docker registry if ($pushImages) { Write-Host "Pushing images to $registry/$dockerOrg..." -ForegroundColor Yellow - $services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "ordering.backgroundtasks", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub") + $services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub") foreach ($service in $services) { $imageFqdn = if ($useDockerHub) {"$dockerOrg/${service}"} else {"$registry/$dockerOrg/${service}"} diff --git a/k8s/deploy.ps1 b/k8s/deploy.ps1 index abeb12aed..81af1bec7 100644 --- a/k8s/deploy.ps1 +++ b/k8s/deploy.ps1 @@ -68,7 +68,7 @@ if ($buildImages) { if ($pushImages) { Write-Host "Pushing images to $registry/$dockerOrg..." -ForegroundColor Yellow - $services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "ordering.backgroundtasks", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub") + $services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub") foreach ($service in $services) { $imageFqdn = if ($useDockerHub) {"$dockerOrg/${service}"} else {"$registry/$dockerOrg/${service}"} diff --git a/k8s/deployments.yaml b/k8s/deployments.yaml index f362c319c..46d139d1c 100644 --- a/k8s/deployments.yaml +++ b/k8s/deployments.yaml @@ -265,65 +265,6 @@ spec: --- apiVersion: extensions/v1beta1 kind: Deployment -metadata: - name: ordering-backgroundtasks -spec: - paused: true - template: - metadata: - labels: - app: eshop - component: ordering-backgroundtasks - spec: - containers: - - name: ordering-backgroundtasks - image: eshop/ordering.backgroundtasks - imagePullPolicy: Always - env: - - name: ConnectionString - valueFrom: - configMapKeyRef: - name: externalcfg - key: ordering__ConnectionString - - name: EventBusConnection - valueFrom: - configMapKeyRef: - name: externalcfg - key: all__EventBusConnection - - name: AzureServiceBusEnabled - valueFrom: - configMapKeyRef: - name: externalcfg - key: all__UseAzureServiceBus - - name: CheckUpdateTime - valueFrom: - configMapKeyRef: - name: externalcfg - key: GracePeriodManager__CheckUpdateTime - - name: GracePeriodTime - valueFrom: - configMapKeyRef: - name: externalcfg - key: GracePeriodManager__GracePeriodTime - - name: ApplicationInsights__InstrumentationKey - valueFrom: - configMapKeyRef: - name: externalcfg - key: all__InstrumentationKey - - name: UseLoadTest - valueFrom: - configMapKeyRef: - name: externalcfg - key: all__EnableLoadTest - - name: OrchestratorType - value: 'K8S' - ports: - - containerPort: 80 - imagePullSecrets: - - name: registry-key ---- -apiVersion: extensions/v1beta1 -kind: Deployment metadata: name: ordering-signalrhub spec: @@ -702,11 +643,6 @@ spec: configMapKeyRef: name: internalurls key: ordering__hc - - name: OrderingBackgroundTasksUrl - valueFrom: - configMapKeyRef: - name: internalurls - key: ordering-background__hc - name: LocationsUrl valueFrom: configMapKeyRef: diff --git a/k8s/helm/app.yaml b/k8s/helm/app.yaml index 91e829b27..390844a6e 100644 --- a/k8s/helm/app.yaml +++ b/k8s/helm/app.yaml @@ -28,7 +28,6 @@ app: # app global settings basket: basket # service name for basket api catalog: catalog # service name for catalog api ordering: ordering # service name for ordering api - orderingbackgroundtasks: orderingbackgroundtasks # service name for orderingbackgroundtasks orderingsignalrhub: ordering-signalrhub # service name for orderingsignalrhub identity: identity # service name for identity api mvc: webmvc # service name for web mvc diff --git a/k8s/helm/deploy-all-istio.ps1 b/k8s/helm/deploy-all-istio.ps1 index 5e05c6dbb..9e32704b1 100644 --- a/k8s/helm/deploy-all-istio.ps1 +++ b/k8s/helm/deploy-all-istio.ps1 @@ -80,7 +80,7 @@ if (-not [string]::IsNullOrEmpty($registry)) { Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green $infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data") -$charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") +$charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") if ($deployInfrastructure) { foreach ($infra in $infras) { diff --git a/k8s/helm/deploy-all.ps1 b/k8s/helm/deploy-all.ps1 index 3cf6936bc..21bb2f1a0 100644 --- a/k8s/helm/deploy-all.ps1 +++ b/k8s/helm/deploy-all.ps1 @@ -62,7 +62,7 @@ if (-not [string]::IsNullOrEmpty($registry)) { Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green $infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data") -$charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") +$charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") if ($deployInfrastructure) { foreach ($infra in $infras) { diff --git a/k8s/helm/deploy-all.sh b/k8s/helm/deploy-all.sh index 705b172f5..04891799b 100755 --- a/k8s/helm/deploy-all.sh +++ b/k8s/helm/deploy-all.sh @@ -185,7 +185,7 @@ fi echo "#################### Begin $app_name installation using Helm ####################" infras=(sql-data nosql-data rabbitmq keystore-data basket-data) -charts=(eshop-common apigwmm apigwms apigwwm apigwws basket-api catalog-api identity-api locations-api marketing-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web) +charts=(eshop-common apigwmm apigwms apigwwm apigwws basket-api catalog-api identity-api locations-api marketing-api mobileshoppingagg ordering-api ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web) if [[ !$skip_infrastructure ]]; then for infra in "${infras[@]}" diff --git a/k8s/helm/istio/doc.md b/k8s/helm/istio/doc.md index b8c0a0257..f60b714f1 100644 --- a/k8s/helm/istio/doc.md +++ b/k8s/helm/istio/doc.md @@ -258,7 +258,6 @@ fec1e3499416 a3f21ec4bd11 "/entrypoint.sh /ngi…" 76485867f032 eshop/payment.api "dotnet Payment.API.…" 2 hours ago Up 2 hours k8s_payment-api_eshop-payment-api-75d5f9bdf6-6zx2v_default_4a3cdab4-e67f-11e8-b4b6-00155d016146_1 c2c4640ed610 eshop/marketing.api "dotnet Marketing.AP…" 2 hours ago Up 2 hours k8s_marketing-api_eshop-marketing-api-6b8c5989fd-jpxqv_default_45780626-e67f-11e8-b4b6-00155d016146_1 85301d538574 eshop/ordering.signalrhub "dotnet Ordering.Sig…" 2 hours ago Up 2 hours k8s_ordering-signalrhub_eshop-ordering-signalrhub-58cf5ff6-cnlm8_default_4932c344-e67f-11e8-b4b6-00155d016146_1 -7a408a98000e eshop/ordering.backgroundtasks "dotnet Ordering.Bac…" 2 hours ago Up 2 hours k8s_ordering-backgroundtasks_eshop-ordering-backgroundtasks-cc8f6d4d8-ztfk7_default_47f9cf10-e67f-11e8-b4b6-00155d016146_1 12c64b3a13e0 eshop/basket.api "dotnet Basket.API.d…" 2 hours ago Up 2 hours k8s_basket-api_eshop-basket-api-658546684d-6hlvd_default_4262d022-e67f-11e8-b4b6-00155d016146_1 133fccfeeff3 eshop/webstatus "dotnet WebStatus.dll" 2 hours ago Up 2 hours k8s_webstatus_eshop-webstatus-7f46479dc4-bqnq7_default_4dc13eb2-e67f-11e8-b4b6-00155d016146_0 00c6e4c52135 eshop/webspa "dotnet WebSPA.dll" 2 hours ago Up 2 hours k8s_webspa_eshop-webspa-64cb8df9cb-dcbwg_default_4cd47376-e67f-11e8-b4b6-00155d016146_0 diff --git a/k8s/helm/ordering-backgroundtasks/.helmignore b/k8s/helm/ordering-backgroundtasks/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/k8s/helm/ordering-backgroundtasks/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/k8s/helm/ordering-backgroundtasks/Chart.yaml b/k8s/helm/ordering-backgroundtasks/Chart.yaml deleted file mode 100644 index 6ad4f47e6..000000000 --- a/k8s/helm/ordering-backgroundtasks/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: ordering-backgroundtasks -version: 0.1.0 diff --git a/k8s/helm/ordering-backgroundtasks/templates/NOTES.txt b/k8s/helm/ordering-backgroundtasks/templates/NOTES.txt deleted file mode 100644 index 54e1b49ea..000000000 --- a/k8s/helm/ordering-backgroundtasks/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -eShop Ordering Background Tasks installed. ------------------------------------------- - diff --git a/k8s/helm/ordering-backgroundtasks/templates/_helpers.tpl b/k8s/helm/ordering-backgroundtasks/templates/_helpers.tpl deleted file mode 100644 index e61b78285..000000000 --- a/k8s/helm/ordering-backgroundtasks/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "ordering-backgroundtasks.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ordering-backgroundtasks.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "ordering-backgroundtasks.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/k8s/helm/ordering-backgroundtasks/templates/_names.tpl b/k8s/helm/ordering-backgroundtasks/templates/_names.tpl deleted file mode 100644 index 39ee485ef..000000000 --- a/k8s/helm/ordering-backgroundtasks/templates/_names.tpl +++ /dev/null @@ -1,51 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/k8s/helm/ordering-backgroundtasks/templates/configmap.yaml b/k8s/helm/ordering-backgroundtasks/templates/configmap.yaml deleted file mode 100644 index 7ed4a0e8e..000000000 --- a/k8s/helm/ordering-backgroundtasks/templates/configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $name := include "ordering-backgroundtasks.fullname" . -}} -{{- $sqlsrv := include "sql-name" . -}} -{{- $cfgname := printf "cfg-%s" $name | trunc 63 }} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ $cfgname }}" - labels: - app: {{ template "ordering-backgroundtasks.name" . }} - chart: {{ template "ordering-backgroundtasks.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; - ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" - all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" - all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" - graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}" - graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}" \ No newline at end of file diff --git a/k8s/helm/ordering-backgroundtasks/templates/deployment.yaml b/k8s/helm/ordering-backgroundtasks/templates/deployment.yaml deleted file mode 100644 index d93c7f764..000000000 --- a/k8s/helm/ordering-backgroundtasks/templates/deployment.yaml +++ /dev/null @@ -1,92 +0,0 @@ -{{- $name := include "ordering-backgroundtasks.fullname" . -}} -{{- $cfgname := printf "cfg-%s" $name | trunc 63 }} - -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: {{ template "ordering-backgroundtasks.fullname" . }} - labels: - app: {{ template "ordering-backgroundtasks.name" . }} - chart: {{ template "ordering-backgroundtasks.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "ordering-backgroundtasks.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "ordering-backgroundtasks.name" . }} - release: {{ .Release.Name }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/k8s/helm/ordering-backgroundtasks/templates/service.yaml b/k8s/helm/ordering-backgroundtasks/templates/service.yaml deleted file mode 100644 index d8fcba036..000000000 --- a/k8s/helm/ordering-backgroundtasks/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.orderingbackgroundtasks }} - labels: - app: {{ template "ordering-backgroundtasks.name" . }} - chart: {{ template "ordering-backgroundtasks.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "ordering-backgroundtasks.name" . }} - release: {{ .Release.Name }} diff --git a/k8s/helm/ordering-backgroundtasks/values.yaml b/k8s/helm/ordering-backgroundtasks/values.yaml deleted file mode 100644 index d065f0345..000000000 --- a/k8s/helm/ordering-backgroundtasks/values.yaml +++ /dev/null @@ -1,70 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /ordering-backgroundtasks - -image: - repository: eshop/ordering.backgroundtasks - tag: latest - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - hosts: - - chart-example.local - tls: [] - -cfg: - checkUpdateTime: "15000" - gracePeriodTime: "1" - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: - urls: - # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). - configmap: - - name: ConnectionString - key: ordering__ConnectionString - - name: ApplicationInsights__InstrumentationKey - key: all__InstrumentationKey - - name: EventBusConnection - key: all__EventBusConnection - - name: AzureServiceBusEnabled - key: all__UseAzureServiceBus - - name: UseLoadTest - key: ordering__EnableLoadTest - - name: CheckUpdateTime - key: graceperiodmanager__CheckUpdateTime - - name: GracePeriodTime - key: graceperiodmanager__GracePeriodTime - # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) - values: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: OrchestratorType - value: 'K8S' -probes: - liveness: - path: /liveness - initialDelaySeconds: 10 - periodSeconds: 15 - port: 80 - readiness: - path: /hc - timeoutSeconds: 5 - initialDelaySeconds: 90 - periodSeconds: 60 - port: 80 diff --git a/src/csproj-files.txt b/src/csproj-files.txt index 6dc3532d9..96420d96e 100644 --- a/src/csproj-files.txt +++ b/src/csproj-files.txt @@ -20,7 +20,6 @@ COPY src/Services/Location/Locations.FunctionalTests/*.csproj /src/src/Services/ COPY src/Services/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ COPY src/Services/Marketing/Marketing.FunctionalTests/*.csproj /src/src/Services/Marketing/Marketing.FunctionalTests/ COPY src/Services/Ordering/Ordering.API/*.csproj /src/src/Services/Ordering/Ordering.API/ -COPY src/Services/Ordering/Ordering.BackgroundTasks/*.csproj /src/src/Services/Ordering/Ordering.BackgroundTasks/ COPY src/Services/Ordering/Ordering.Domain/*.csproj /src/src/Services/Ordering/Ordering.Domain/ COPY src/Services/Ordering/Ordering.FunctionalTests/*.csproj /src/src/Services/Ordering/Ordering.FunctionalTests/ COPY src/Services/Ordering/Ordering.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ diff --git a/src/prepare-devspaces.ps1 b/src/prepare-devspaces.ps1 index 5b692e908..5e1b72d4e 100644 --- a/src/prepare-devspaces.ps1 +++ b/src/prepare-devspaces.ps1 @@ -52,9 +52,6 @@ Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Ordering\Ordering.API" Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Ordering\Ordering.SignalrHub" -Force Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Ordering\Ordering.SignalrHub" -Force -Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Ordering\Ordering.BackgroundTasks" -Force -Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Ordering\Ordering.BackgroundTasks" -Force - Write-Host "Copying app.yaml and inf.yaml to Payment API" -ForegroundColor Yellow Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Payment\Payment.API" -Force Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Payment\Payment.API" -Force