Final fixes to make it work under Devspaces
This commit is contained in:
parent
a327fac586
commit
e809029e2c
@ -1,10 +1,11 @@
|
||||
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
|
||||
{{- $sqlsrv := include "sql-name" . -}}
|
||||
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "cfg-{{ $name }}"
|
||||
name: "{{ $cfgname }}"
|
||||
labels:
|
||||
app: {{ template "ordering-backgroundtasks.name" . }}
|
||||
chart: {{ template "ordering-backgroundtasks.chart" .}}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
|
||||
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }}
|
||||
|
||||
apiVersion: apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "ordering-backgroundtasks.fullname" . }}
|
||||
labels:
|
||||
ufo: {{ $cfgname}}
|
||||
app: {{ template "ordering-backgroundtasks.name" . }}
|
||||
chart: {{ template "ordering-backgroundtasks.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
|
@ -15,7 +15,10 @@ install:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)apigwmm$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,7 +14,10 @@ install:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]apigwms.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)mobileshoppingagg$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -15,7 +15,10 @@ install:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)apigwms$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -15,7 +15,10 @@ install:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)apigwwm$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,7 +14,10 @@ install:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]apigwms.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)webshoppingagg$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)apigwws$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]basketapi.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)basketapi$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -60,6 +60,15 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
|
||||
.Take(pageSize)
|
||||
.ToListAsync();
|
||||
|
||||
/* The "awesome" fix for testing Devspaces */
|
||||
|
||||
/*
|
||||
foreach (var pr in itemsOnPage) {
|
||||
pr.Name = "Awesome " + pr.Name;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
itemsOnPage = ChangeUriPlaceholder(itemsOnPage);
|
||||
|
||||
var model = new PaginatedItemsViewModel<CatalogItem>(pageIndex, pageSize, totalItems, itemsOnPage);
|
||||
|
@ -13,8 +13,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]catalogapi.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)catalogapi$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
||||
x.IssuerUri = "null";
|
||||
x.Authentication.CookieLifetime = TimeSpan.FromHours(2);
|
||||
})
|
||||
.AddDevspacesIfNeeded(Configuration.GetValue("UseDevspaces", false))
|
||||
.AddDevspacesIfNeeded(Configuration.GetValue("EnableDevspaces", false))
|
||||
.AddSigningCredential(Certificate.Get())
|
||||
.AddAspNetIdentity<ApplicationUser>()
|
||||
.AddConfigurationStore(options =>
|
||||
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]identity.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)identity-api$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]identity.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)locations-api$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]identity.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)marketing-api$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]orderingapi.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)orderingapi$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -0,0 +1,18 @@
|
||||
FROM microsoft/dotnet:2.2-sdk
|
||||
ARG BUILD_CONFIGURATION=Debug
|
||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||
ENV DOTNET_USE_POLLING_FILE_WATCHER=true
|
||||
EXPOSE 80
|
||||
|
||||
WORKDIR /src
|
||||
COPY ["src/BuildingBlocks/EventBus/EventBus/EventBus.csproj", "src/BuildingBlocks/EventBus/EventBus/"]
|
||||
COPY ["src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "src/BuildingBlocks/EventBus/EventBusRabbitMQ/"]
|
||||
COPY ["src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "src/BuildingBlocks/EventBus/EventBusServiceBus/"]
|
||||
COPY ["src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj", "src/Services/Ordering/Ordering.BackgroundTasks/"]
|
||||
|
||||
RUN dotnet restore src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks
|
||||
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||
|
||||
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
56
src/Services/Ordering/Ordering.BackgroundTasks/azds.yaml
Normal file
56
src/Services/Ordering/Ordering.BackgroundTasks/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
kind: helm-release
|
||||
apiVersion: 1.1
|
||||
build:
|
||||
context: ..\..\..\..
|
||||
dockerfile: Dockerfile
|
||||
install:
|
||||
chart: ../../../../k8s/helm/ordering-backgroundtasks
|
||||
set:
|
||||
replicaCount: 1
|
||||
image:
|
||||
tag: $(tag)
|
||||
pullPolicy: Never
|
||||
ingress:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
- inf.yaml
|
||||
- app.yaml
|
||||
configurations:
|
||||
develop:
|
||||
build:
|
||||
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}
|
||||
iterate:
|
||||
processesToKill:
|
||||
- dotnet
|
||||
- vsdbg
|
||||
buildCommands:
|
||||
- - dotnet
|
||||
- build
|
||||
- --no-restore
|
||||
- -c
|
||||
- ${BUILD_CONFIGURATION:-Debug}
|
18
src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop
Normal file
18
src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop
Normal file
@ -0,0 +1,18 @@
|
||||
FROM microsoft/dotnet:2.2-sdk
|
||||
ARG BUILD_CONFIGURATION=Debug
|
||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||
ENV DOTNET_USE_POLLING_FILE_WATCHER=true
|
||||
EXPOSE 80
|
||||
|
||||
WORKDIR /src
|
||||
COPY ["src/BuildingBlocks/EventBus/EventBus/EventBus.csproj", "src/BuildingBlocks/EventBus/EventBus/"]
|
||||
COPY ["src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "src/BuildingBlocks/EventBus/EventBusRabbitMQ/"]
|
||||
COPY ["src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "src/BuildingBlocks/EventBus/EventBusServiceBus/"]
|
||||
COPY ["src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj", "src/Services/Ordering/Ordering.SignalrHub/"]
|
||||
|
||||
RUN dotnet restore src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub
|
||||
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||
|
||||
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
56
src/Services/Ordering/Ordering.SignalrHub/azds.yaml
Normal file
56
src/Services/Ordering/Ordering.SignalrHub/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
kind: helm-release
|
||||
apiVersion: 1.1
|
||||
build:
|
||||
context: ..\..\..\..
|
||||
dockerfile: Dockerfile
|
||||
install:
|
||||
chart: ../../../../k8s/helm/ordering-signalrhub
|
||||
set:
|
||||
replicaCount: 1
|
||||
image:
|
||||
tag: $(tag)
|
||||
pullPolicy: Never
|
||||
ingress:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
- inf.yaml
|
||||
- app.yaml
|
||||
configurations:
|
||||
develop:
|
||||
build:
|
||||
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}
|
||||
iterate:
|
||||
processesToKill:
|
||||
- dotnet
|
||||
- vsdbg
|
||||
buildCommands:
|
||||
- - dotnet
|
||||
- build
|
||||
- --no-restore
|
||||
- -c
|
||||
- ${BUILD_CONFIGURATION:-Debug}
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]paymentapi.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)paymentapi$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -13,8 +13,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]webhooksapi.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)webhooksapi$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -14,8 +14,10 @@ install:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-azds
|
||||
hosts:
|
||||
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||
- $(spacePrefix)webmvc$(hostSuffix)
|
||||
- $(spacePrefix)eshop$(hostSuffix)
|
||||
inf:
|
||||
k8s:
|
||||
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||
values:
|
||||
- values.dev.yaml?
|
||||
- secrets.dev.yaml?
|
||||
|
@ -49,6 +49,12 @@ Write-Host "Copying app.yaml and inf.yaml to Ordering API" -ForegroundColor Yell
|
||||
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Ordering\Ordering.API" -Force
|
||||
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Ordering\Ordering.API" -Force
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user