Browse Source

Ordering API devspaces

pull/1004/head
eiximenis 6 years ago
parent
commit
f94a561233
5 changed files with 35 additions and 88 deletions
  1. +2
    -5
      src/Services/Ordering/Ordering.API/Dockerfile.develop
  2. +0
    -43
      src/Services/Ordering/Ordering.API/app.yaml
  3. +29
    -18
      src/Services/Ordering/Ordering.API/azds.yaml
  4. +0
    -22
      src/Services/Ordering/Ordering.API/inf.yaml
  5. +4
    -0
      src/prepare-devspaces.ps1

+ 2
- 5
src/Services/Ordering/Ordering.API/Dockerfile.develop View File

@ -1,4 +1,4 @@
FROM microsoft/dotnet:2.2.100-sdk
FROM microsoft/dotnet:2.2-sdk
ARG BUILD_CONFIGURATION=Debug ARG BUILD_CONFIGURATION=Debug
ENV ASPNETCORE_ENVIRONMENT=Development ENV ASPNETCORE_ENVIRONMENT=Development
ENV DOTNET_USE_POLLING_FILE_WATCHER=true 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/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "src/BuildingBlocks/EventBus/EventBusRabbitMQ/"]
COPY ["src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "src/BuildingBlocks/EventBus/EventBusServiceBus/"] 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/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/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.Domain/Ordering.Domain.csproj", "src/Services/Ordering/Ordering.Domain/"]
COPY ["src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj", "src/Services/Ordering/Ordering.Infrastructure/"] 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 WORKDIR /src/src/Services/Ordering/Ordering.API
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
CMD ["dotnet", "run", "--no-restore", "--no-build", "--no-launch-profile"]
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]

+ 0
- 43
src/Services/Ordering/Ordering.API/app.yaml View File

@ -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

+ 29
- 18
src/Services/Ordering/Ordering.API/azds.yaml View File

@ -1,43 +1,54 @@
kind: helm-release kind: helm-release
apiVersion: 1.0
apiVersion: 1.1
build: build:
context: ..\..\..\.. context: ..\..\..\..
dockerfile: Dockerfile dockerfile: Dockerfile
install: install:
chart: ../../../../k8s/helm/ordering-api chart: ../../../../k8s/helm/ordering-api
values:
- values.dev.yaml?
- secrets.dev.yaml?
- inf.yaml
- app.yaml
set: set:
replicaCount: 1 replicaCount: 1
image: image:
tag: $(tag) tag: $(tag)
pullPolicy: Never pullPolicy: Never
inf:
k8s:
dns: "$(spacePrefix)orderingapi$(hostSuffix)"
ingress: ingress:
annotations:
kubernetes.io/ingress.class: traefik-azds
hosts: hosts:
# This expands to [space.s.]orderingapi.<guid>.<region>.aksapp.io # This expands to [space.s.]orderingapi.<guid>.<region>.aksapp.io
- $(spacePrefix)orderingapi$(hostSuffix) - $(spacePrefix)orderingapi$(hostSuffix)
values:
- values.dev.yaml?
- secrets.dev.yaml?
- inf.yaml
- app.yaml
configurations: configurations:
develop: develop:
build: build:
dockerfile: Dockerfile.develop
useGitIgnore: true useGitIgnore: true
dockerfile: Dockerfile.develop
args: args:
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug}
container: container:
sync: 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: iterate:
processesToKill: [dotnet, vsdbg]
processesToKill:
- dotnet
- vsdbg
buildCommands: buildCommands:
- [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"]
- - dotnet
- build
- --no-restore
- -c
- ${BUILD_CONFIGURATION:-Debug}

+ 0
- 22
src/Services/Ordering/Ordering.API/inf.yaml View File

@ -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-<appname>" 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

+ 4
- 0
src/prepare-devspaces.ps1 View File

@ -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\app.yaml" -Destination ".\Services\Marketing\Marketing.API" -Force
Copy-Item "..\k8s\helm\inf.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 Write-Host "Copying app.yaml and inf.yaml to WebMVC" -ForegroundColor Yellow
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Web\WebMVC" -Force Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Web\WebMVC" -Force


Loading…
Cancel
Save