From f94a5612335fbea0d10a35092b3e759d5d54cffe Mon Sep 17 00:00:00 2001 From: eiximenis Date: Mon, 25 Feb 2019 16:25:35 +0100 Subject: [PATCH] Ordering API devspaces --- .../Ordering/Ordering.API/Dockerfile.develop | 7 +-- src/Services/Ordering/Ordering.API/app.yaml | 43 ----------------- src/Services/Ordering/Ordering.API/azds.yaml | 47 ++++++++++++------- src/Services/Ordering/Ordering.API/inf.yaml | 22 --------- src/prepare-devspaces.ps1 | 4 ++ 5 files changed, 35 insertions(+), 88 deletions(-) delete mode 100644 src/Services/Ordering/Ordering.API/app.yaml delete mode 100644 src/Services/Ordering/Ordering.API/inf.yaml diff --git a/src/Services/Ordering/Ordering.API/Dockerfile.develop b/src/Services/Ordering/Ordering.API/Dockerfile.develop index 01b1e58c1..f91a71bd8 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile.develop +++ b/src/Services/Ordering/Ordering.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM microsoft/dotnet:2.2.100-sdk +FROM microsoft/dotnet:2.2-sdk ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true @@ -9,9 +9,6 @@ COPY ["src/BuildingBlocks/EventBus/EventBus/EventBus.csproj", "src/BuildingBlock COPY ["src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "src/BuildingBlocks/EventBus/EventBusRabbitMQ/"] COPY ["src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "src/BuildingBlocks/EventBus/EventBusServiceBus/"] COPY ["src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj", "src/BuildingBlocks/EventBus/IntegrationEventLogEF/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/"] COPY ["src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"] COPY ["src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj", "src/Services/Ordering/Ordering.Domain/"] COPY ["src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj", "src/Services/Ordering/Ordering.Infrastructure/"] @@ -22,4 +19,4 @@ COPY . . WORKDIR /src/src/Services/Ordering/Ordering.API RUN dotnet build --no-restore -c $BUILD_CONFIGURATION -CMD ["dotnet", "run", "--no-restore", "--no-build", "--no-launch-profile"] \ No newline at end of file +ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] \ No newline at end of file diff --git a/src/Services/Ordering/Ordering.API/app.yaml b/src/Services/Ordering/Ordering.API/app.yaml deleted file mode 100644 index 6ca5d9d31..000000000 --- a/src/Services/Ordering/Ordering.API/app.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# This heml values file defines app-based settings -# Charts use those values, so this file **MUST** be included in all chart releases - - -app: # app global settings - name: "my-eshop" # Override for custom app name - ingress: # ingress related settings - entries: - basket: basket-api # ingress entry for basket api - catalog: catalog-api # ingress entry for catalog api - ordering: ordering-api # ingress entry for ordering api - identity: identity # ingress entry for identity api - mvc: webmvc # ingress entry for web mvc - spa: "" # ingress entry for web spa - status: webstatus # ingress entry for web status - webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw - webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw - webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator - payment: payment-api # ingress entry for payment api - locations: locations-api # ingress entry for locations api - marketing: marketing-api # ingress entry for marketing api - svc: - 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: orderingsignalrhub # service name for orderingsignalrhub - identity: identity # service name for identity api - mvc: webmvc # service name for web mvc - spa: webspa # service name for web spa - status: webstatus # service name for web status - webshoppingapigw: webshoppingapigw # service name for web shopping Agw - webmarketingapigw: webmarketingapigw # service name for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw - webshoppingagg: webshoppingagg # service name for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator - payment: payment # service name for payment api - locations: locations # service name for locations api - marketing: marketing # service name for marketing ap diff --git a/src/Services/Ordering/Ordering.API/azds.yaml b/src/Services/Ordering/Ordering.API/azds.yaml index b81f9d773..39f2477b0 100644 --- a/src/Services/Ordering/Ordering.API/azds.yaml +++ b/src/Services/Ordering/Ordering.API/azds.yaml @@ -1,43 +1,54 @@ kind: helm-release -apiVersion: 1.0 +apiVersion: 1.1 build: context: ..\..\..\.. dockerfile: Dockerfile install: chart: ../../../../k8s/helm/ordering-api - values: - - values.dev.yaml? - - secrets.dev.yaml? - - inf.yaml - - app.yaml - set: replicaCount: 1 image: tag: $(tag) pullPolicy: Never - inf: - k8s: - dns: "$(spacePrefix)orderingapi$(hostSuffix)" ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds hosts: # This expands to [space.s.]orderingapi...aksapp.io - $(spacePrefix)orderingapi$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - inf.yaml + - app.yaml configurations: develop: build: - dockerfile: Dockerfile.develop useGitIgnore: true + dockerfile: Dockerfile.develop args: BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} container: sync: - - "**/Pages/**" - - "**/Views/**" - - "**/wwwroot/**" - - "!**/*.{sln,csproj}" - command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"] + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: + - dotnet + - run + - --no-restore + - --no-build + - --no-launch-profile + - -c + - ${BUILD_CONFIGURATION:-Debug} iterate: - processesToKill: [dotnet, vsdbg] + processesToKill: + - dotnet + - vsdbg buildCommands: - - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"] + - - dotnet + - build + - --no-restore + - -c + - ${BUILD_CONFIGURATION:-Debug} diff --git a/src/Services/Ordering/Ordering.API/inf.yaml b/src/Services/Ordering/Ordering.API/inf.yaml deleted file mode 100644 index 943ec99fb..000000000 --- a/src/Services/Ordering/Ordering.API/inf.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# This heml values file defines all infrastructure used by eShopOnContainers. -# It is used on all charts, so ** MUST BE INCLUDED ** on every deployment - -inf: - sql: # inf.sql defines the sql server databases & logins -# host: my-sql-server # Uncomment to specify a custom sql-server to be used. By default "sql-data-" will be used - common: - user: sa # SQL user - pwd: Pass@word # SQL pwd - pid: Developer - ordering: # inf.sql.ordering: settings for the ordering-api sql (user, pwd, db) - db: OrderingDb # Ordering API SQL db name - eventbus: - svc: rabbitmq # Name of k8s svc for rabbitmq - constr: rabbitmq # Event bus connection string - useAzure: false # true if use Azure Service Bus. False if RabbitMQ - appinsights: - key: "" # App insights to use - k8s: {} - misc: # inf.misc contains miscellaneous configuration related to infrastructure - useLoadTest: false # If running under loading test or not - useAzureStorage: false # If catalog api uses azure storage or not diff --git a/src/prepare-devspaces.ps1 b/src/prepare-devspaces.ps1 index 11dcebc06..b946168da 100644 --- a/src/prepare-devspaces.ps1 +++ b/src/prepare-devspaces.ps1 @@ -45,6 +45,10 @@ Write-Host "Copying app.yaml and inf.yaml to Marketing API" -ForegroundColor Yel Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Marketing\Marketing.API" -Force Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Marketing\Marketing.API" -Force +Write-Host "Copying app.yaml and inf.yaml to Ordering API" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Ordering\Ordering.API" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Ordering\Ordering.API" -Force + Write-Host "Copying app.yaml and inf.yaml to WebMVC" -ForegroundColor Yellow Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Web\WebMVC" -Force