Merge from features/devspaces to dev
This commit is contained in:
commit
c0e125f2bf
5
.gitignore
vendored
5
.gitignore
vendored
@ -270,3 +270,8 @@ pub/
|
|||||||
|
|
||||||
# Ignore HealthCheckdb
|
# Ignore HealthCheckdb
|
||||||
*healthchecksdb*
|
*healthchecksdb*
|
||||||
|
|
||||||
|
# Ignores all extra inf.yaml and app.yaml that are copied by prepare-devspaces.ps1
|
||||||
|
src/**/app.yaml
|
||||||
|
src/**/inf.yaml
|
||||||
|
|
||||||
|
@ -142,9 +142,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Services
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Webhooks", "Webhooks", "{E0AA11C4-2873-461D-8F82-53392530FB7A}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Webhooks", "Webhooks", "{E0AA11C4-2873-461D-8F82-53392530FB7A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Webhooks.API", "src\Services\Webhooks\Webhooks.API\Webhooks.API.csproj", "{84E2016E-0435-44C6-8020-3D288AA38B2C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Webhooks.API", "src\Services\Webhooks\Webhooks.API\Webhooks.API.csproj", "{84E2016E-0435-44C6-8020-3D288AA38B2C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebhookClient", "src\Web\WebhookClient\WebhookClient.csproj", "{766D7E92-6AF0-476C-ADD5-282BF4D8C576}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebhookClient", "src\Web\WebhookClient\WebhookClient.csproj", "{766D7E92-6AF0-476C-ADD5-282BF4D8C576}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Devspace.Support", "Devspace.Support", "{68F5041D-51F2-4630-94B6-B49789F5E51A}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Devspaces.Support", "src\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj", "{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -1744,6 +1748,54 @@ Global
|
|||||||
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x64.Build.0 = Release|Any CPU
|
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x86.ActiveCfg = Release|Any CPU
|
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x86.Build.0 = Release|Any CPU
|
{766D7E92-6AF0-476C-ADD5-282BF4D8C576}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|ARM.Build.0 = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|iPhone.Build.0 = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -1808,6 +1860,8 @@ Global
|
|||||||
{E0AA11C4-2873-461D-8F82-53392530FB7A} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
|
{E0AA11C4-2873-461D-8F82-53392530FB7A} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
|
||||||
{84E2016E-0435-44C6-8020-3D288AA38B2C} = {E0AA11C4-2873-461D-8F82-53392530FB7A}
|
{84E2016E-0435-44C6-8020-3D288AA38B2C} = {E0AA11C4-2873-461D-8F82-53392530FB7A}
|
||||||
{766D7E92-6AF0-476C-ADD5-282BF4D8C576} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04}
|
{766D7E92-6AF0-476C-ADD5-282BF4D8C576} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04}
|
||||||
|
{68F5041D-51F2-4630-94B6-B49789F5E51A} = {DB0EFB20-B024-4E5E-A75C-52143C131D25}
|
||||||
|
{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35} = {68F5041D-51F2-4630-94B6-B49789F5E51A}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}
|
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}
|
||||||
|
@ -33,14 +33,13 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{- define "pathBase" -}}
|
{{- define "pathBase" -}}
|
||||||
{{- $name := first .}}
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
{{- $ctx := last .}}
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
{{- if $ctx.Values.inf.k8s.suffix -}}
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
{{- $suffix := include "suffix-name" $ctx -}}
|
|
||||||
{{- printf "/%s-%s" $name $suffix -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "/%s" $name -}}
|
{{- .Values.pathBase -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@ -61,10 +61,10 @@ spec:
|
|||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /app/configuration
|
mountPath: {{ .Values.ocelot.configPath }}
|
||||||
env:
|
env:
|
||||||
- name: PATH_BASE
|
- name: PATH_BASE
|
||||||
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) }}
|
value: {{ include "pathBase" . }}
|
||||||
- name: k8sname
|
- name: k8sname
|
||||||
value: {{ .Values.clusterName }}
|
value: {{ .Values.clusterName }}
|
||||||
{{- if .Values.env.values -}}
|
{{- if .Values.env.values -}}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) -}}
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@ -23,11 +24,13 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.inf.k8s.dns }}
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ .Values.app.svc.mobilemarketingapigw }}
|
serviceName: {{ $serviceName }}
|
||||||
servicePort: http
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -62,3 +62,5 @@ probes:
|
|||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
port: 80
|
port: 80
|
||||||
|
ocelot:
|
||||||
|
configPath: /app/configuration
|
||||||
|
@ -35,13 +35,11 @@
|
|||||||
|
|
||||||
|
|
||||||
{{- define "pathBase" -}}
|
{{- define "pathBase" -}}
|
||||||
{{- $name := first .}}
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
{{- $ctx := last .}}
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
{{- if $ctx.Values.inf.k8s.suffix -}}
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
{{- $suffix := include "suffix-name" $ctx -}}
|
|
||||||
{{- printf "/%s-%s" $name $suffix -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "/%s" $name -}}
|
{{- .Values.pathBase -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@ -61,10 +61,10 @@ spec:
|
|||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /app/configuration
|
mountPath: {{ .Values.ocelot.configPath }}
|
||||||
env:
|
env:
|
||||||
- name: PATH_BASE
|
- name: PATH_BASE
|
||||||
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) }}
|
value: {{ include "pathBase" . }}
|
||||||
- name: k8sname
|
- name: k8sname
|
||||||
value: {{ .Values.clusterName }}
|
value: {{ .Values.clusterName }}
|
||||||
{{- if .Values.env.values -}}
|
{{- if .Values.env.values -}}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) -}}
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.mobileshoppingapigw -}}
|
||||||
|
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@ -23,11 +25,13 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.inf.k8s.dns }}
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ .Values.app.svc.mobileshoppingapigw }}
|
serviceName: {{ $serviceName }}
|
||||||
servicePort: http
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -62,3 +62,5 @@ probes:
|
|||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
port: 80
|
port: 80
|
||||||
|
ocelot:
|
||||||
|
configPath: /app/configuration
|
@ -35,13 +35,11 @@
|
|||||||
|
|
||||||
|
|
||||||
{{- define "pathBase" -}}
|
{{- define "pathBase" -}}
|
||||||
{{- $name := first .}}
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
{{- $ctx := last .}}
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
{{- if $ctx.Values.inf.k8s.suffix -}}
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
{{- $suffix := include "suffix-name" $ctx -}}
|
|
||||||
{{- printf "/%s-%s" $name $suffix -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "/%s" $name -}}
|
{{- .Values.pathBase -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@ -61,10 +61,10 @@ spec:
|
|||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /app/configuration
|
mountPath: {{ .Values.ocelot.configPath }}
|
||||||
env:
|
env:
|
||||||
- name: PATH_BASE
|
- name: PATH_BASE
|
||||||
value: {{ include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) }}
|
value: {{ include "pathBase" . }}
|
||||||
- name: k8sname
|
- name: k8sname
|
||||||
value: {{ .Values.clusterName }}
|
value: {{ .Values.clusterName }}
|
||||||
{{- if .Values.env.values -}}
|
{{- if .Values.env.values -}}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) -}}
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.webmarketingapigw -}}
|
||||||
|
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@ -23,11 +25,13 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.inf.k8s.dns }}
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ .Values.app.svc.webmarketingapigw }}
|
serviceName: {{ $serviceName }}
|
||||||
servicePort: http
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -62,3 +62,5 @@ probes:
|
|||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
port: 80
|
port: 80
|
||||||
|
ocelot:
|
||||||
|
configPath: /app/configuration
|
@ -33,14 +33,13 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{- define "pathBase" -}}
|
{{- define "pathBase" -}}
|
||||||
{{- $name := first .}}
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
{{- $ctx := last .}}
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
{{- if $ctx.Values.inf.k8s.suffix -}}
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
{{- $suffix := include "suffix-name" $ctx -}}
|
|
||||||
{{- printf "/%s-%s" $name $suffix -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "/%s" $name -}}
|
{{- .Values.pathBase -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@ -60,10 +60,10 @@ spec:
|
|||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /app/configuration
|
mountPath: {{ .Values.ocelot.configPath }}
|
||||||
env:
|
env:
|
||||||
- name: PATH_BASE
|
- name: PATH_BASE
|
||||||
value: {{ include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) }}
|
value: {{ include "pathBase" . }}
|
||||||
- name: k8sname
|
- name: k8sname
|
||||||
value: {{ .Values.clusterName }}
|
value: {{ .Values.clusterName }}
|
||||||
{{- if .Values.env.values -}}
|
{{- if .Values.env.values -}}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.webshoppingapigw -}}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@ -23,11 +24,13 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.inf.k8s.dns }}
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ .Values.app.svc.webshoppingapigw }}
|
serviceName: {{ $serviceName }}
|
||||||
servicePort: http
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -62,3 +62,5 @@ probes:
|
|||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
port: 80
|
port: 80
|
||||||
|
ocelot:
|
||||||
|
configPath: /app/configuration
|
37
k8s/helm/basket-api/templates/ingress.yaml
Normal file
37
k8s/helm/basket-api/templates/ingress.yaml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.basket -}}
|
||||||
|
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "basket-api.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "basket-api.name" . }}
|
||||||
|
chart: {{ template "basket-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.inf.k8s.dns }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
@ -53,3 +53,6 @@ probes:
|
|||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
port: 80
|
port: 80
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
37
k8s/helm/catalog-api/templates/ingress.yaml
Normal file
37
k8s/helm/catalog-api/templates/ingress.yaml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.catalog -}}
|
||||||
|
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "catalog-api.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "catalog-api.name" . }}
|
||||||
|
chart: {{ template "catalog-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.inf.k8s.dns }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
@ -5,6 +5,7 @@ Param(
|
|||||||
[parameter(Mandatory=$false)][string]$externalDns,
|
[parameter(Mandatory=$false)][string]$externalDns,
|
||||||
[parameter(Mandatory=$false)][string]$appName="eshop",
|
[parameter(Mandatory=$false)][string]$appName="eshop",
|
||||||
[parameter(Mandatory=$false)][bool]$deployInfrastructure=$true,
|
[parameter(Mandatory=$false)][bool]$deployInfrastructure=$true,
|
||||||
|
[parameter(Mandatory=$false)][bool]$deployCharts=$true,
|
||||||
[parameter(Mandatory=$false)][bool]$clean=$true,
|
[parameter(Mandatory=$false)][bool]$clean=$true,
|
||||||
[parameter(Mandatory=$false)][string]$aksName="",
|
[parameter(Mandatory=$false)][string]$aksName="",
|
||||||
[parameter(Mandatory=$false)][string]$aksRg="",
|
[parameter(Mandatory=$false)][string]$aksRg="",
|
||||||
@ -66,20 +67,28 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a
|
|||||||
if ($deployInfrastructure) {
|
if ($deployInfrastructure) {
|
||||||
foreach ($infra in $infras) {
|
foreach ($infra in $infras) {
|
||||||
Write-Host "Installing infrastructure: $infra" -ForegroundColor Green
|
Write-Host "Installing infrastructure: $infra" -ForegroundColor Green
|
||||||
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --name="$appName-$infra" $infra
|
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --name="$appName-$infra" $infra
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "eShopOnContainers infrastructure (bbdd, redis, ...) charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($chart in $charts) {
|
if ($deployCharts) {
|
||||||
Write-Host "Installing: $chart" -ForegroundColor Green
|
foreach ($chart in $charts) {
|
||||||
if ($useCustomRegistry) {
|
Write-Host "Installing: $chart" -ForegroundColor Green
|
||||||
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
|
if ($useCustomRegistry) {
|
||||||
}
|
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
|
||||||
else {
|
}
|
||||||
if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed
|
else {
|
||||||
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
|
if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed
|
||||||
|
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "eShopOnContainers non-infrastructure charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "helm charts installed." -ForegroundColor Green
|
Write-Host "helm charts installed." -ForegroundColor Green
|
@ -36,5 +36,4 @@ data:
|
|||||||
xamarin_callback_e: http://{{ $xamarincallback }}
|
xamarin_callback_e: http://{{ $xamarincallback }}
|
||||||
webhooksapi_e: http://{{ $webhooks_url }}
|
webhooksapi_e: http://{{ $webhooks_url }}
|
||||||
webhooksweb_e: http://{{ $webhooksweb_url }}
|
webhooksweb_e: http://{{ $webhooksweb_url }}
|
||||||
|
enableDevspaces: "{{ .Values.enableDevspaces }}"
|
||||||
|
|
@ -1,5 +1,6 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $ingressPath := include "pathBase" . -}}
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.identity }}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@ -23,11 +24,13 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.inf.k8s.dns }}
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ .Values.app.svc.identity }}
|
serviceName: {{ $serviceName }}
|
||||||
servicePort: http
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -58,6 +58,8 @@ env:
|
|||||||
key: webhooksapi_e
|
key: webhooksapi_e
|
||||||
- name: WebhooksWebClient
|
- name: WebhooksWebClient
|
||||||
key: webhooksweb_e
|
key: webhooksweb_e
|
||||||
|
- name: EnableDevspaces
|
||||||
|
key: enableDevspaces
|
||||||
values:
|
values:
|
||||||
- name: ASPNETCORE_ENVIRONMENT
|
- name: ASPNETCORE_ENVIRONMENT
|
||||||
value: Development
|
value: Development
|
||||||
@ -65,6 +67,7 @@ env:
|
|||||||
value: 'K8S'
|
value: 'K8S'
|
||||||
- name: IsClusterEnv
|
- name: IsClusterEnv
|
||||||
value: 'True'
|
value: 'True'
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
path: /liveness
|
path: /liveness
|
||||||
@ -77,3 +80,5 @@ probes:
|
|||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
port: 80
|
port: 80
|
||||||
|
|
||||||
|
enableDevspaces: "false"
|
36
k8s/helm/locations-api/templates/ingress.yaml
Normal file
36
k8s/helm/locations-api/templates/ingress.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.locations }}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "locations-api.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "locations-api.name" . }}
|
||||||
|
chart: {{ template "locations-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.inf.k8s.dns }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
36
k8s/helm/marketing-api/templates/ingress.yaml
Normal file
36
k8s/helm/marketing-api/templates/ingress.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.marketing }}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "marketing-api.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "marketing-api.name" . }}
|
||||||
|
chart: {{ template "marketing-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.inf.k8s.dns }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
36
k8s/helm/mobileshoppingagg/templates/ingress.yaml
Normal file
36
k8s/helm/mobileshoppingagg/templates/ingress.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.mobileshoppingagg }}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "mobileshoppingagg.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "mobileshoppingagg.name" . }}
|
||||||
|
chart: {{ template "mobileshoppingagg.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.inf.k8s.dns }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
@ -1,10 +1,11 @@
|
|||||||
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
|
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
|
||||||
{{- $sqlsrv := include "sql-name" . -}}
|
{{- $sqlsrv := include "sql-name" . -}}
|
||||||
|
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }}
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: "cfg-{{ $name }}"
|
name: "{{ $cfgname }}"
|
||||||
labels:
|
labels:
|
||||||
app: {{ template "ordering-backgroundtasks.name" . }}
|
app: {{ template "ordering-backgroundtasks.name" . }}
|
||||||
chart: {{ template "ordering-backgroundtasks.chart" .}}
|
chart: {{ template "ordering-backgroundtasks.chart" .}}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
|
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
|
||||||
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }}
|
||||||
|
|
||||||
apiVersion: apps/v1beta2
|
apiVersion: apps/v1beta2
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "ordering-backgroundtasks.fullname" . }}
|
name: {{ template "ordering-backgroundtasks.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
ufo: {{ $cfgname}}
|
|
||||||
app: {{ template "ordering-backgroundtasks.name" . }}
|
app: {{ template "ordering-backgroundtasks.name" . }}
|
||||||
chart: {{ template "ordering-backgroundtasks.chart" . }}
|
chart: {{ template "ordering-backgroundtasks.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $ingressPath := include "pathBase" . -}}
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.webhooks }}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@ -23,11 +24,13 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.inf.k8s.dns }}
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ .Values.app.svc.webhooks }}
|
serviceName: {{ $serviceName }}
|
||||||
servicePort: http
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
|
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
|
||||||
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
|
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
|
||||||
{{- $mvc := include "url-of" (list .Values.app.ingress.entries.mvc .) -}}
|
{{- $mvc := include "url-of" (list .Values.app.ingress.entries.mvc .) -}}
|
||||||
{{- $mongo := include "mongo-name" . -}}
|
|
||||||
|
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $ingressPath := include "pathBase" . -}}
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.mvc -}}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@ -23,11 +24,13 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.inf.k8s.dns }}
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ .Values.app.svc.mvc }}
|
serviceName: {{ $serviceName }}
|
||||||
servicePort: http
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
36
k8s/helm/webshoppingagg/templates/ingress.yaml
Normal file
36
k8s/helm/webshoppingagg/templates/ingress.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.webshoppingagg }}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "webshoppingagg.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "webshoppingagg.name" . }}
|
||||||
|
chart: {{ template "webshoppingagg.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.inf.k8s.dns }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
14
src/ApiGateways/ApiGw-Base/Dockerfile.develop
Normal file
14
src/ApiGateways/ApiGw-Base/Dockerfile.develop
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
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/ApiGateways/ApiGw-Base/OcelotApiGw.csproj", "src/ApiGateways/ApiGw-Base/"]
|
||||||
|
RUN dotnet restore "src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/ApiGateways/ApiGw-Base"
|
||||||
|
RUN dotnet build --no-restore "OcelotApiGw.csproj" -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
44
src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml
Normal file
44
src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..\
|
||||||
|
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/apigwmm
|
||||||
|
set:
|
||||||
|
replicaCount: 1
|
||||||
|
image:
|
||||||
|
tag: $(tag)
|
||||||
|
pullPolicy: Never
|
||||||
|
ingress:
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-azds
|
||||||
|
hosts:
|
||||||
|
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||||
|
- $(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: ..\..\..\ApiGateways\ApiGw-Base\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}"]
|
@ -0,0 +1,2 @@
|
|||||||
|
ocelot:
|
||||||
|
configPath: /src/src/ApiGateways/ApiGw-Base/configuration
|
@ -0,0 +1,16 @@
|
|||||||
|
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/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj", "src/ApiGateways/Mobile.Bff.Shopping/aggregator/"]
|
||||||
|
COPY ["src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj", "src/BuildingBlocks/Devspaces.Support/"]
|
||||||
|
|
||||||
|
RUN dotnet restore src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/ApiGateways/Mobile.Bff.Shopping/aggregator"
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
CMD ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]]
|
@ -23,4 +23,8 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -24,6 +24,13 @@
|
|||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:61632/"
|
"applicationUrl": "http://localhost:61632/"
|
||||||
|
},
|
||||||
|
"Azure Dev Spaces": {
|
||||||
|
"commandName": "AzureDevSpaces",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"resourceGroup": "eshoptestedu",
|
||||||
|
"aksName": "eshoptestedu",
|
||||||
|
"subscriptionId": "e3035ac1-c06c-4daf-8939-57b3c5f1f759"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -20,6 +20,7 @@ using Swashbuckle.AspNetCore.Swagger;
|
|||||||
using HealthChecks.UI.Client;
|
using HealthChecks.UI.Client;
|
||||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Devspaces.Support;
|
||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||||
{
|
{
|
||||||
@ -47,6 +48,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
|||||||
|
|
||||||
services.AddCustomMvc(Configuration)
|
services.AddCustomMvc(Configuration)
|
||||||
.AddCustomAuthentication(Configuration)
|
.AddCustomAuthentication(Configuration)
|
||||||
|
.AddDevspaces()
|
||||||
.AddHttpServices();
|
.AddHttpServices();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,15 +190,18 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
|||||||
services.AddHttpClient<IBasketService, BasketService>()
|
services.AddHttpClient<IBasketService, BasketService>()
|
||||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<ICatalogService, CatalogService>()
|
services.AddHttpClient<ICatalogService, CatalogService>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<IOrderApiClient, OrderApiClient>()
|
services.AddHttpClient<IOrderApiClient, OrderApiClient>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
55
src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml
Normal file
55
src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/mobileshoppingagg
|
||||||
|
set:
|
||||||
|
image:
|
||||||
|
tag: $(tag)
|
||||||
|
pullPolicy: Never
|
||||||
|
ingress:
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-azds
|
||||||
|
hosts:
|
||||||
|
# This expands to [space.s.]apigwms.<guid>.<region>.aksapp.io
|
||||||
|
- $(spacePrefix)eshop$(hostSuffix)
|
||||||
|
inf:
|
||||||
|
k8s:
|
||||||
|
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||||
|
values:
|
||||||
|
- values.dev.yaml?
|
||||||
|
- secrets.dev.yaml?
|
||||||
|
- app.yaml
|
||||||
|
- inf.yaml
|
||||||
|
configurations:
|
||||||
|
develop:
|
||||||
|
build:
|
||||||
|
useGitIgnore: true
|
||||||
|
dockerfile: Dockerfile.develop
|
||||||
|
container:
|
||||||
|
syncTarget: /src
|
||||||
|
sync:
|
||||||
|
- '**/Pages/**'
|
||||||
|
- '**/Views/**'
|
||||||
|
- '**/wwwroot/**'
|
||||||
|
- '!**/*.{sln,csproj}'
|
||||||
|
command:
|
||||||
|
- dotnet
|
||||||
|
- run
|
||||||
|
- --no-restore
|
||||||
|
- --no-build
|
||||||
|
- --no-launch-profile
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
||||||
|
iterate:
|
||||||
|
processesToKill:
|
||||||
|
- dotnet
|
||||||
|
- vsdbg
|
||||||
|
buildCommands:
|
||||||
|
- - dotnet
|
||||||
|
- build
|
||||||
|
- --no-restore
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
@ -0,0 +1,3 @@
|
|||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
tls: []
|
44
src/ApiGateways/Mobile.Bff.Shopping/apigw/azds.yaml
Normal file
44
src/ApiGateways/Mobile.Bff.Shopping/apigw/azds.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..\
|
||||||
|
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/apigwms
|
||||||
|
set:
|
||||||
|
replicaCount: 1
|
||||||
|
image:
|
||||||
|
tag: $(tag)
|
||||||
|
pullPolicy: Never
|
||||||
|
ingress:
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-azds
|
||||||
|
hosts:
|
||||||
|
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||||
|
- $(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: ..\..\..\ApiGateways\ApiGw-Base\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}"]
|
@ -0,0 +1,2 @@
|
|||||||
|
ocelot:
|
||||||
|
configPath: /src/src/ApiGateways/ApiGw-Base/configuration
|
44
src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml
Normal file
44
src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..\
|
||||||
|
dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/apigwwm
|
||||||
|
set:
|
||||||
|
replicaCount: 1
|
||||||
|
image:
|
||||||
|
tag: $(tag)
|
||||||
|
pullPolicy: Never
|
||||||
|
ingress:
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-azds
|
||||||
|
hosts:
|
||||||
|
# This expands to [space.s.]webmvc.<guid>.<region>.aksapp.io
|
||||||
|
- $(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: ..\..\..\ApiGateways\ApiGw-Base\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}"]
|
2
src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml
Normal file
2
src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ocelot:
|
||||||
|
configPath: /src/src/ApiGateways/ApiGw-Base/configuration
|
@ -0,0 +1,16 @@
|
|||||||
|
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/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj", "src/ApiGateways/Web.Bff.Shopping/aggregator/"]
|
||||||
|
COPY ["src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj", "src/BuildingBlocks/Devspaces.Support/"]
|
||||||
|
|
||||||
|
RUN dotnet restore src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/ApiGateways/Web.Bff.Shopping/aggregator"
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
CMD ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]]
|
@ -21,6 +21,7 @@ using System.Net.Http;
|
|||||||
using HealthChecks.UI.Client;
|
using HealthChecks.UI.Client;
|
||||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Devspaces.Support;
|
||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||||
{
|
{
|
||||||
@ -48,6 +49,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
|||||||
|
|
||||||
services.AddCustomMvc(Configuration)
|
services.AddCustomMvc(Configuration)
|
||||||
.AddCustomAuthentication(Configuration)
|
.AddCustomAuthentication(Configuration)
|
||||||
|
.AddDevspaces()
|
||||||
.AddApplicationServices();
|
.AddApplicationServices();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,17 +188,19 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
|||||||
services.AddHttpClient<IBasketService, BasketService>()
|
services.AddHttpClient<IBasketService, BasketService>()
|
||||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<ICatalogService, CatalogService>()
|
services.AddHttpClient<ICatalogService, CatalogService>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<IOrderApiClient, OrderApiClient>()
|
services.AddHttpClient<IOrderApiClient, OrderApiClient>()
|
||||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,8 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
55
src/ApiGateways/Web.Bff.Shopping/aggregator/azds.yaml
Normal file
55
src/ApiGateways/Web.Bff.Shopping/aggregator/azds.yaml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/webshoppingagg
|
||||||
|
set:
|
||||||
|
image:
|
||||||
|
tag: $(tag)
|
||||||
|
pullPolicy: Never
|
||||||
|
ingress:
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-azds
|
||||||
|
hosts:
|
||||||
|
# This expands to [space.s.]apigwms.<guid>.<region>.aksapp.io
|
||||||
|
- $(spacePrefix)eshop$(hostSuffix)
|
||||||
|
inf:
|
||||||
|
k8s:
|
||||||
|
dns: $(spacePrefix)eshop$(hostSuffix)
|
||||||
|
values:
|
||||||
|
- values.dev.yaml?
|
||||||
|
- secrets.dev.yaml?
|
||||||
|
- app.yaml
|
||||||
|
- inf.yaml
|
||||||
|
configurations:
|
||||||
|
develop:
|
||||||
|
build:
|
||||||
|
useGitIgnore: true
|
||||||
|
dockerfile: Dockerfile.develop
|
||||||
|
container:
|
||||||
|
syncTarget: /src
|
||||||
|
sync:
|
||||||
|
- '**/Pages/**'
|
||||||
|
- '**/Views/**'
|
||||||
|
- '**/wwwroot/**'
|
||||||
|
- '!**/*.{sln,csproj}'
|
||||||
|
command:
|
||||||
|
- dotnet
|
||||||
|
- run
|
||||||
|
- --no-restore
|
||||||
|
- --no-build
|
||||||
|
- --no-launch-profile
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
||||||
|
iterate:
|
||||||
|
processesToKill:
|
||||||
|
- dotnet
|
||||||
|
- vsdbg
|
||||||
|
buildCommands:
|
||||||
|
- - dotnet
|
||||||
|
- build
|
||||||
|
- --no-restore
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
@ -0,0 +1,2 @@
|
|||||||
|
ocelot:
|
||||||
|
configPath: /app/configuration
|
43
src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml
Normal file
43
src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..\
|
||||||
|
dockerfile: ..\..\..\..\ApiGateways\ApiGw-Base\Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/apigwws
|
||||||
|
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: ..\..\..\ApiGateways\ApiGw-Base\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}"]
|
2
src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml
Normal file
2
src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ocelot:
|
||||||
|
configPath: /src/src/ApiGateways/ApiGw-Base/configuration
|
@ -0,0 +1,11 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Http" Version="2.2.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,30 @@
|
|||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Devspaces.Support
|
||||||
|
{
|
||||||
|
public class DevspacesMessageHandler : DelegatingHandler
|
||||||
|
{
|
||||||
|
private const string DevspacesHeaderName = "azds-route-as";
|
||||||
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
public DevspacesMessageHandler(IHttpContextAccessor httpContextAccessor)
|
||||||
|
{
|
||||||
|
_httpContextAccessor = httpContextAccessor;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var req = _httpContextAccessor.HttpContext.Request;
|
||||||
|
|
||||||
|
if (req.Headers.ContainsKey(DevspacesHeaderName))
|
||||||
|
{
|
||||||
|
request.Headers.Add(DevspacesHeaderName, req.Headers[DevspacesHeaderName] as IEnumerable<string>);
|
||||||
|
}
|
||||||
|
return base.SendAsync(request, cancellationToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Devspaces.Support
|
||||||
|
{
|
||||||
|
public static class HttpClientBuilderDevspacesExtensions
|
||||||
|
{
|
||||||
|
public static IHttpClientBuilder AddDevspacesSupport(this IHttpClientBuilder builder)
|
||||||
|
{
|
||||||
|
builder.AddHttpMessageHandler<DevspacesMessageHandler>();
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Devspaces.Support
|
||||||
|
{
|
||||||
|
public static class ServiceCollectionDevspacesExtensions
|
||||||
|
{
|
||||||
|
public static IServiceCollection AddDevspaces(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddTransient<DevspacesMessageHandler>();
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
src/Services/Basket/Basket.API/.dockerignore
Normal file
14
src/Services/Basket/Basket.API/.dockerignore
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.vs
|
||||||
|
.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/Dockerfile
|
||||||
|
**/Dockerfile.develop
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
19
src/Services/Basket/Basket.API/Dockerfile.develop
Normal file
19
src/Services/Basket/Basket.API/Dockerfile.develop
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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/Basket/Basket.API/Basket.API.csproj", "src/Services/Basket/Basket.API/"]
|
||||||
|
|
||||||
|
RUN dotnet restore src/Services/Basket/Basket.API/Basket.API.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR /src/src/Services/Basket/Basket.API
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
56
src/Services/Basket/Basket.API/azds.yaml
Normal file
56
src/Services/Basket/Basket.API/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/basket-api
|
||||||
|
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}
|
3
src/Services/Basket/Basket.API/values.dev.yaml
Normal file
3
src/Services/Basket/Basket.API/values.dev.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
tls: []
|
@ -60,6 +60,15 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
|
|||||||
.Take(pageSize)
|
.Take(pageSize)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
/* The "awesome" fix for testing Devspaces */
|
||||||
|
|
||||||
|
/*
|
||||||
|
foreach (var pr in itemsOnPage) {
|
||||||
|
pr.Name = "Awesome " + pr.Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
itemsOnPage = ChangeUriPlaceholder(itemsOnPage);
|
itemsOnPage = ChangeUriPlaceholder(itemsOnPage);
|
||||||
|
|
||||||
var model = new PaginatedItemsViewModel<CatalogItem>(pageIndex, pageSize, totalItems, itemsOnPage);
|
var model = new PaginatedItemsViewModel<CatalogItem>(pageIndex, pageSize, totalItems, itemsOnPage);
|
||||||
|
21
src/Services/Catalog/Catalog.API/Dockerfile.develop
Normal file
21
src/Services/Catalog/Catalog.API/Dockerfile.develop
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj", "src/BuildingBlocks/EventBus/IntegrationEventLogEF/"]
|
||||||
|
COPY ["src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"]
|
||||||
|
COPY ["src/Services/Catalog/Catalog.API/Catalog.API.csproj", "src/Services/Catalog/Catalog.API/"]
|
||||||
|
|
||||||
|
RUN dotnet restore src/Services/Catalog/Catalog.API/Catalog.API.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/Services/Catalog/Catalog.API"
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
@ -27,6 +27,13 @@
|
|||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Azure Dev Spaces": {
|
||||||
|
"commandName": "AzureDevSpaces",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"resourceGroup": "edu-devspaces3",
|
||||||
|
"aksName": "edu-devspaces3",
|
||||||
|
"subscriptionId": "e3035ac1-c06c-4daf-8939-57b3c5f1f759"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
54
src/Services/Catalog/Catalog.API/azds.yaml
Normal file
54
src/Services/Catalog/Catalog.API/azds.yaml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/catalog-api
|
||||||
|
set:
|
||||||
|
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
|
||||||
|
container:
|
||||||
|
syncTarget: /src
|
||||||
|
sync:
|
||||||
|
- '**/Pages/**'
|
||||||
|
- '**/Views/**'
|
||||||
|
- '**/wwwroot/**'
|
||||||
|
- '!**/*.{sln,csproj}'
|
||||||
|
command:
|
||||||
|
- dotnet
|
||||||
|
- run
|
||||||
|
- --no-restore
|
||||||
|
- --no-build
|
||||||
|
- --no-launch-profile
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
||||||
|
iterate:
|
||||||
|
processesToKill:
|
||||||
|
- dotnet
|
||||||
|
- vsdbg
|
||||||
|
buildCommands:
|
||||||
|
- - dotnet
|
||||||
|
- build
|
||||||
|
- --no-restore
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
3
src/Services/Catalog/Catalog.API/values.dev.yaml
Normal file
3
src/Services/Catalog/Catalog.API/values.dev.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
tls: []
|
14
src/Services/Identity/Identity.API/.dockerignore
Normal file
14
src/Services/Identity/Identity.API/.dockerignore
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.vs
|
||||||
|
.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/Dockerfile
|
||||||
|
**/Dockerfile.develop
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
@ -0,0 +1,31 @@
|
|||||||
|
using IdentityServer4.Models;
|
||||||
|
using IdentityServer4.Validation;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Services.Identity.API.Devspaces
|
||||||
|
{
|
||||||
|
public class DevspacesRedirectUriValidator : IRedirectUriValidator
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
public DevspacesRedirectUriValidator(ILogger<DevspacesRedirectUriValidator> logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<bool> IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client)
|
||||||
|
{
|
||||||
|
|
||||||
|
_logger.LogInformation($"Client {client.ClientName} used post logout uri {requestedUri}.");
|
||||||
|
return Task.FromResult(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<bool> IsRedirectUriValidAsync(string requestedUri, Client client)
|
||||||
|
{
|
||||||
|
_logger.LogInformation($"Client {client.ClientName} used redirect uri {requestedUri}.");
|
||||||
|
return Task.FromResult(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.eShopOnContainers.Services.Identity.API.Devspaces
|
||||||
|
{
|
||||||
|
static class IdentityDevspacesBuilderExtensions
|
||||||
|
{
|
||||||
|
public static IIdentityServerBuilder AddDevspacesIfNeeded(this IIdentityServerBuilder builder, bool useDevspaces)
|
||||||
|
{
|
||||||
|
if (useDevspaces)
|
||||||
|
{
|
||||||
|
builder.AddRedirectUriValidator<DevspacesRedirectUriValidator>();
|
||||||
|
}
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
src/Services/Identity/Identity.API/Dockerfile.develop
Normal file
15
src/Services/Identity/Identity.API/Dockerfile.develop
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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/Services/Identity/Identity.API/Identity.API.csproj", "src/Services/Identity/Identity.API/"]
|
||||||
|
COPY ["src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"]
|
||||||
|
RUN dotnet restore src/Services/Identity/Identity.API/Identity.API.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/Services/Identity/Identity.API"
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
@ -13,6 +13,7 @@ using Microsoft.eShopOnContainers.Services.Identity.API.Certificates;
|
|||||||
using Microsoft.eShopOnContainers.Services.Identity.API.Data;
|
using Microsoft.eShopOnContainers.Services.Identity.API.Data;
|
||||||
using Microsoft.eShopOnContainers.Services.Identity.API.Models;
|
using Microsoft.eShopOnContainers.Services.Identity.API.Models;
|
||||||
using Microsoft.eShopOnContainers.Services.Identity.API.Services;
|
using Microsoft.eShopOnContainers.Services.Identity.API.Services;
|
||||||
|
using Microsoft.eShopOnContainers.Services.Identity.API.Devspaces;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@ -85,6 +86,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
|||||||
x.IssuerUri = "null";
|
x.IssuerUri = "null";
|
||||||
x.Authentication.CookieLifetime = TimeSpan.FromHours(2);
|
x.Authentication.CookieLifetime = TimeSpan.FromHours(2);
|
||||||
})
|
})
|
||||||
|
.AddDevspacesIfNeeded(Configuration.GetValue("EnableDevspaces", false))
|
||||||
.AddSigningCredential(Certificate.Get())
|
.AddSigningCredential(Certificate.Get())
|
||||||
.AddAspNetIdentity<ApplicationUser>()
|
.AddAspNetIdentity<ApplicationUser>()
|
||||||
.AddConfigurationStore(options =>
|
.AddConfigurationStore(options =>
|
||||||
|
56
src/Services/Identity/Identity.API/azds.yaml
Normal file
56
src/Services/Identity/Identity.API/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/identity-api
|
||||||
|
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}
|
1
src/Services/Identity/Identity.API/values.dev.yaml
Normal file
1
src/Services/Identity/Identity.API/values.dev.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
enableDevspaces: "true"
|
17
src/Services/Location/Locations.API/Dockerfile.develop
Normal file
17
src/Services/Location/Locations.API/Dockerfile.develop
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
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/Services/Location/Locations.API/Locations.API.csproj", "src/Services/Location/Locations.API/"]
|
||||||
|
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/"]
|
||||||
|
RUN dotnet restore src/Services/Location/Locations.API/Locations.API.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/Services/Location/Locations.API"
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
56
src/Services/Location/Locations.API/azds.yaml
Normal file
56
src/Services/Location/Locations.API/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/locations-api
|
||||||
|
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}
|
3
src/Services/Location/Locations.API/values.dev.yaml
Normal file
3
src/Services/Location/Locations.API/values.dev.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
tls: []
|
18
src/Services/Marketing/Marketing.API/Dockerfile.develop
Normal file
18
src/Services/Marketing/Marketing.API/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/Services/Marketing/Marketing.API/Marketing.API.csproj", "src/Services/Marketing/Marketing.API/"]
|
||||||
|
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/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"]
|
||||||
|
RUN dotnet restore src/Services/Marketing/Marketing.API/Marketing.API.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/Services/Marketing/Marketing.API"
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
56
src/Services/Marketing/Marketing.API/azds.yaml
Normal file
56
src/Services/Marketing/Marketing.API/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/marketing-api
|
||||||
|
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}
|
3
src/Services/Marketing/Marketing.API/values.dev.yaml
Normal file
3
src/Services/Marketing/Marketing.API/values.dev.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
tls: []
|
14
src/Services/Ordering/Ordering.API/.dockerignore
Normal file
14
src/Services/Ordering/Ordering.API/.dockerignore
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.vs
|
||||||
|
.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/Dockerfile
|
||||||
|
**/Dockerfile.develop
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
22
src/Services/Ordering/Ordering.API/Dockerfile.develop
Normal file
22
src/Services/Ordering/Ordering.API/Dockerfile.develop
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj", "src/BuildingBlocks/EventBus/IntegrationEventLogEF/"]
|
||||||
|
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/"]
|
||||||
|
COPY ["src/Services/Ordering/Ordering.API/Ordering.API.csproj", "src/Services/Ordering/Ordering.API/"]
|
||||||
|
|
||||||
|
RUN dotnet restore src/Services/Ordering/Ordering.API/Ordering.API.csproj
|
||||||
|
COPY . .
|
||||||
|
WORKDIR /src/src/Services/Ordering/Ordering.API
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
56
src/Services/Ordering/Ordering.API/azds.yaml
Normal file
56
src/Services/Ordering/Ordering.API/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/ordering-api
|
||||||
|
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}
|
@ -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}
|
19
src/Services/Payment/Payment.API/Dockerfile.develop
Normal file
19
src/Services/Payment/Payment.API/Dockerfile.develop
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj", "src/BuildingBlocks/EventBus/IntegrationEventLogEF/"]
|
||||||
|
COPY ["src/Services/Payment/Payment.API/Payment.API.csproj", "src/Services/Payment/Payment.API/"]
|
||||||
|
|
||||||
|
RUN dotnet restore src/Services/Payment/Payment.API/Payment.API.csproj
|
||||||
|
COPY . .
|
||||||
|
WORKDIR /src/src/Services/Payment/Payment.API
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
56
src/Services/Payment/Payment.API/azds.yaml
Normal file
56
src/Services/Payment/Payment.API/azds.yaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/payment-api
|
||||||
|
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}
|
22
src/Services/Webhooks/Webhooks.API/Dockerfile.develop
Normal file
22
src/Services/Webhooks/Webhooks.API/Dockerfile.develop
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj", "src/BuildingBlocks/EventBus/IntegrationEventLogEF/"]
|
||||||
|
COPY ["src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"]
|
||||||
|
COPY ["src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj", "src/BuildingBlocks/Devspaces.Support/"]
|
||||||
|
COPY ["src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj", "src/Services/Webhooks/Webhooks.API/"]
|
||||||
|
|
||||||
|
RUN dotnet restore src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj -nowarn:msb3202,nu1503
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/Services/Webhooks/Webhooks.API"
|
||||||
|
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
@ -8,6 +8,7 @@ using System.Threading;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Autofac.Extensions.DependencyInjection;
|
using Autofac.Extensions.DependencyInjection;
|
||||||
|
using Devspaces.Support;
|
||||||
using HealthChecks.UI.Client;
|
using HealthChecks.UI.Client;
|
||||||
using Microsoft.ApplicationInsights.Extensibility;
|
using Microsoft.ApplicationInsights.Extensibility;
|
||||||
using Microsoft.ApplicationInsights.ServiceFabric;
|
using Microsoft.ApplicationInsights.ServiceFabric;
|
||||||
@ -55,6 +56,7 @@ namespace Webhooks.API
|
|||||||
.AddCustomDbContext(Configuration)
|
.AddCustomDbContext(Configuration)
|
||||||
.AddSwagger(Configuration)
|
.AddSwagger(Configuration)
|
||||||
.AddCustomHealthCheck(Configuration)
|
.AddCustomHealthCheck(Configuration)
|
||||||
|
.AddDevspaces()
|
||||||
.AddHttpClientServices(Configuration)
|
.AddHttpClientServices(Configuration)
|
||||||
.AddIntegrationServices(Configuration)
|
.AddIntegrationServices(Configuration)
|
||||||
.AddEventBus(Configuration)
|
.AddEventBus(Configuration)
|
||||||
@ -293,8 +295,8 @@ namespace Webhooks.API
|
|||||||
services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(Timeout.InfiniteTimeSpan);
|
services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(Timeout.InfiniteTimeSpan);
|
||||||
//add http client services
|
//add http client services
|
||||||
services.AddHttpClient("GrantClient")
|
services.AddHttpClient("GrantClient")
|
||||||
.SetHandlerLifetime(TimeSpan.FromMinutes(5));
|
.SetHandlerLifetime(TimeSpan.FromMinutes(5))
|
||||||
//.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>();
|
.AddDevspacesSupport();
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="2.2.0" />
|
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="2.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
|
||||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
|
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
|
||||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
|
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
|
||||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
|
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
|
||||||
|
54
src/Services/Webhooks/Webhooks.API/azds.yaml
Normal file
54
src/Services/Webhooks/Webhooks.API/azds.yaml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../../k8s/helm/webhooks-api
|
||||||
|
set:
|
||||||
|
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
|
||||||
|
container:
|
||||||
|
syncTarget: /src
|
||||||
|
sync:
|
||||||
|
- '**/Pages/**'
|
||||||
|
- '**/Views/**'
|
||||||
|
- '**/wwwroot/**'
|
||||||
|
- '!**/*.{sln,csproj}'
|
||||||
|
command:
|
||||||
|
- dotnet
|
||||||
|
- run
|
||||||
|
- --no-restore
|
||||||
|
- --no-build
|
||||||
|
- --no-launch-profile
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
||||||
|
iterate:
|
||||||
|
processesToKill:
|
||||||
|
- dotnet
|
||||||
|
- vsdbg
|
||||||
|
buildCommands:
|
||||||
|
- - dotnet
|
||||||
|
- build
|
||||||
|
- --no-restore
|
||||||
|
- -c
|
||||||
|
- ${Configuration:-Debug}
|
14
src/Web/WebMVC/.dockerignore
Normal file
14
src/Web/WebMVC/.dockerignore
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.vs
|
||||||
|
.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/Dockerfile
|
||||||
|
**/Dockerfile.develop
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
15
src/Web/WebMVC/Dockerfile.develop
Normal file
15
src/Web/WebMVC/Dockerfile.develop
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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/Web/WebMVC/WebMVC.csproj", "src/Web/WebMVC/"]
|
||||||
|
COPY ["src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj", "src/BuildingBlocks/Devspaces.Support/"]
|
||||||
|
RUN dotnet restore "src/Web/WebMVC/WebMVC.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/src/Web/WebMVC"
|
||||||
|
RUN dotnet build --no-restore "WebMVC.csproj" -c $BUILD_CONFIGURATION
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]
|
@ -1,4 +1,5 @@
|
|||||||
using HealthChecks.UI.Client;
|
using Devspaces.Support;
|
||||||
|
using HealthChecks.UI.Client;
|
||||||
using Microsoft.ApplicationInsights.Extensibility;
|
using Microsoft.ApplicationInsights.Extensibility;
|
||||||
using Microsoft.ApplicationInsights.ServiceFabric;
|
using Microsoft.ApplicationInsights.ServiceFabric;
|
||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||||
@ -42,6 +43,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
services.AddAppInsight(Configuration)
|
services.AddAppInsight(Configuration)
|
||||||
.AddHealthChecks(Configuration)
|
.AddHealthChecks(Configuration)
|
||||||
.AddCustomMvc(Configuration)
|
.AddCustomMvc(Configuration)
|
||||||
|
.AddDevspaces()
|
||||||
.AddHttpClientServices(Configuration)
|
.AddHttpClientServices(Configuration)
|
||||||
//.AddHttpClientLogging(Configuration) //Opt-in HttpClientLogging config
|
//.AddHttpClientLogging(Configuration) //Opt-in HttpClientLogging config
|
||||||
.AddCustomAuthentication(Configuration);
|
.AddCustomAuthentication(Configuration);
|
||||||
@ -175,34 +177,39 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
services.AddTransient<HttpClientRequestIdDelegatingHandler>();
|
services.AddTransient<HttpClientRequestIdDelegatingHandler>();
|
||||||
|
|
||||||
//set 5 min as the lifetime for each HttpMessageHandler int the pool
|
//set 5 min as the lifetime for each HttpMessageHandler int the pool
|
||||||
services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(TimeSpan.FromMinutes(5));
|
services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(TimeSpan.FromMinutes(5)).AddDevspacesSupport();
|
||||||
|
|
||||||
//add http client services
|
//add http client services
|
||||||
services.AddHttpClient<IBasketService, BasketService>()
|
services.AddHttpClient<IBasketService, BasketService>()
|
||||||
.SetHandlerLifetime(TimeSpan.FromMinutes(5)) //Sample. Default lifetime is 2 minutes
|
.SetHandlerLifetime(TimeSpan.FromMinutes(5)) //Sample. Default lifetime is 2 minutes
|
||||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<ICatalogService, CatalogService>()
|
services.AddHttpClient<ICatalogService, CatalogService>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<IOrderingService, OrderingService>()
|
services.AddHttpClient<IOrderingService, OrderingService>()
|
||||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||||
.AddHttpMessageHandler<HttpClientRequestIdDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientRequestIdDelegatingHandler>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<ICampaignService, CampaignService>()
|
services.AddHttpClient<ICampaignService, CampaignService>()
|
||||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
services.AddHttpClient<ILocationService, LocationService>()
|
services.AddHttpClient<ILocationService, LocationService>()
|
||||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||||
.AddPolicyHandler(GetRetryPolicy())
|
.AddPolicyHandler(GetRetryPolicy())
|
||||||
.AddPolicyHandler(GetCircuitBreakerPolicy());
|
.AddPolicyHandler(GetCircuitBreakerPolicy())
|
||||||
|
.AddDevspacesSupport();
|
||||||
|
|
||||||
//add custom application services
|
//add custom application services
|
||||||
services.AddTransient<IIdentityParser<ApplicationUser>, IdentityParser>();
|
services.AddTransient<IIdentityParser<ApplicationUser>, IdentityParser>();
|
||||||
|
@ -56,4 +56,8 @@
|
|||||||
<None Include="ViewModels\CampaignItem.cs" />
|
<None Include="ViewModels\CampaignItem.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
43
src/Web/WebMVC/azds.yaml
Normal file
43
src/Web/WebMVC/azds.yaml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
kind: helm-release
|
||||||
|
apiVersion: 1.1
|
||||||
|
build:
|
||||||
|
context: ..\..\..\
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
install:
|
||||||
|
chart: ../../../k8s/helm/webmvc
|
||||||
|
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}"]
|
3
src/Web/WebMVC/values.dev.yaml
Normal file
3
src/Web/WebMVC/values.dev.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
inf:
|
||||||
|
k8s:
|
||||||
|
dns: $(spacePrefix)identity-api$(hostSuffix)
|
72
src/prepare-devspaces.ps1
Normal file
72
src/prepare-devspaces.ps1
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# This script just copies app.yaml and inf.yaml files to all devspaces projects.
|
||||||
|
# This is to workaround issue #56 - https://github.com/Azure/dev-spaces/issues/56
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Mobile.Bff.Marketing" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Mobile.Bff.Marketing\apigw" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Mobile.Bff.Marketing\apigw" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Web.Bff.Marketing" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Web.Bff.Marketing\apigw" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Web.Bff.Marketing\apigw" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Mobile.Bff.Shopping" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\apigw" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\apigw" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Web.Bff.Shopping" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\apigw" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\apigw" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Mobile.Bff Shopping Aggregator" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\aggregator" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\aggregator" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Web.Bff Shopping Aggregator" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\aggregator" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\aggregator" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Basket API" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Basket\Basket.API" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Basket\Basket.API" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Catalog API" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Catalog\Catalog.API" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Catalog\Catalog.API" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Identity API" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Identity\Identity.API" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Identity\Identity.API" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Locations API" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Location\Locations.API" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Location\Locations.API" -Force
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Marketing API" -ForegroundColor Yellow
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
Write-Host "Copying app.yaml and inf.yaml to Webhooks API" -ForegroundColor Yellow
|
||||||
|
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Webhooks\Webhooks.API" -Force
|
||||||
|
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Webhooks\Webhooks.API" -Force
|
||||||
|
|
||||||
|
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\inf.yaml" -Destination ".\Web\WebMVC" -Force
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user