Browse Source

Merge branch 'dev' into enhancement/add-restore-packages-layer

pull/1005/head
Miguel Veloso 5 years ago
committed by GitHub
parent
commit
376030c179
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
108 changed files with 1915 additions and 91 deletions
  1. +5
    -0
      .gitignore
  2. +56
    -2
      eShopOnContainers-ServicesAndWebApps.sln
  3. +5
    -6
      k8s/helm/apigwmm/templates/_names.tpl
  4. +2
    -2
      k8s/helm/apigwmm/templates/deployment.yaml
  5. +6
    -3
      k8s/helm/apigwmm/templates/ingress.yaml
  6. +2
    -0
      k8s/helm/apigwmm/values.yaml
  7. +4
    -6
      k8s/helm/apigwms/templates/_names.tpl
  8. +2
    -2
      k8s/helm/apigwms/templates/deployment.yaml
  9. +7
    -3
      k8s/helm/apigwms/templates/ingress.yaml
  10. +3
    -1
      k8s/helm/apigwms/values.yaml
  11. +4
    -6
      k8s/helm/apigwwm/templates/_names.tpl
  12. +2
    -2
      k8s/helm/apigwwm/templates/deployment.yaml
  13. +7
    -3
      k8s/helm/apigwwm/templates/ingress.yaml
  14. +3
    -1
      k8s/helm/apigwwm/values.yaml
  15. +5
    -6
      k8s/helm/apigwws/templates/_names.tpl
  16. +2
    -2
      k8s/helm/apigwws/templates/deployment.yaml
  17. +6
    -3
      k8s/helm/apigwws/templates/ingress.yaml
  18. +2
    -0
      k8s/helm/apigwws/values.yaml
  19. +37
    -0
      k8s/helm/basket-api/templates/ingress.yaml
  20. +3
    -0
      k8s/helm/basket-api/values.yaml
  21. +37
    -0
      k8s/helm/catalog-api/templates/ingress.yaml
  22. +18
    -9
      k8s/helm/deploy-all.ps1
  23. +1
    -2
      k8s/helm/identity-api/templates/configmap.yaml
  24. +5
    -2
      k8s/helm/identity-api/templates/ingress.yaml
  25. +6
    -1
      k8s/helm/identity-api/values.yaml
  26. +36
    -0
      k8s/helm/locations-api/templates/ingress.yaml
  27. +36
    -0
      k8s/helm/marketing-api/templates/ingress.yaml
  28. +36
    -0
      k8s/helm/mobileshoppingagg/templates/ingress.yaml
  29. +2
    -1
      k8s/helm/ordering-backgroundtasks/templates/configmap.yaml
  30. +2
    -2
      k8s/helm/ordering-backgroundtasks/templates/deployment.yaml
  31. +5
    -2
      k8s/helm/webhooks-api/templates/ingress.yaml
  32. +0
    -1
      k8s/helm/webmvc/templates/configmap.yaml
  33. +5
    -2
      k8s/helm/webmvc/templates/ingress.yaml
  34. +36
    -0
      k8s/helm/webshoppingagg/templates/ingress.yaml
  35. +14
    -0
      src/ApiGateways/ApiGw-Base/Dockerfile.develop
  36. +44
    -0
      src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml
  37. +2
    -0
      src/ApiGateways/Mobile.Bff.Marketing/apigw/values.dev.yaml
  38. +16
    -0
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop
  39. +4
    -0
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj
  40. +7
    -0
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Properties/launchSettings.json
  41. +8
    -3
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs
  42. +55
    -0
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml
  43. +3
    -0
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/values.dev.yaml
  44. +44
    -0
      src/ApiGateways/Mobile.Bff.Shopping/apigw/azds.yaml
  45. +2
    -0
      src/ApiGateways/Mobile.Bff.Shopping/apigw/values.dev.yaml
  46. +44
    -0
      src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml
  47. +2
    -0
      src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml
  48. +16
    -0
      src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop
  49. +9
    -5
      src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs
  50. +4
    -0
      src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj
  51. +55
    -0
      src/ApiGateways/Web.Bff.Shopping/aggregator/azds.yaml
  52. +2
    -0
      src/ApiGateways/Web.Bff.Shopping/aggregator/values.dev.yaml
  53. +43
    -0
      src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml
  54. +2
    -0
      src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml
  55. +11
    -0
      src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj
  56. +30
    -0
      src/BuildingBlocks/Devspaces.Support/DevspacesMessageHandler.cs
  57. +16
    -0
      src/BuildingBlocks/Devspaces.Support/HttpClientBuilderDevspacesExtensions.cs
  58. +16
    -0
      src/BuildingBlocks/Devspaces.Support/ServiceCollectionDevspacesExtensions.cs
  59. +14
    -0
      src/Services/Basket/Basket.API/.dockerignore
  60. +2
    -2
      src/Services/Basket/Basket.API/Controllers/BasketController.cs
  61. +19
    -0
      src/Services/Basket/Basket.API/Dockerfile.develop
  62. +56
    -0
      src/Services/Basket/Basket.API/azds.yaml
  63. +3
    -0
      src/Services/Basket/Basket.API/values.dev.yaml
  64. +2
    -0
      src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj
  65. +9
    -0
      src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs
  66. +21
    -0
      src/Services/Catalog/Catalog.API/Dockerfile.develop
  67. +7
    -0
      src/Services/Catalog/Catalog.API/Properties/launchSettings.json
  68. +54
    -0
      src/Services/Catalog/Catalog.API/azds.yaml
  69. +3
    -0
      src/Services/Catalog/Catalog.API/values.dev.yaml
  70. +2
    -0
      src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj
  71. +14
    -0
      src/Services/Identity/Identity.API/.dockerignore
  72. +31
    -0
      src/Services/Identity/Identity.API/Devspaces/DevspacesRedirectUriValidator.cs
  73. +20
    -0
      src/Services/Identity/Identity.API/Devspaces/IdentityDevspacesBuilderExtensions.cs
  74. +15
    -0
      src/Services/Identity/Identity.API/Dockerfile.develop
  75. +2
    -0
      src/Services/Identity/Identity.API/Startup.cs
  76. +1
    -1
      src/Services/Identity/Identity.API/Views/Shared/_LoginPartial.cshtml
  77. +56
    -0
      src/Services/Identity/Identity.API/azds.yaml
  78. +1
    -0
      src/Services/Identity/Identity.API/values.dev.yaml
  79. +17
    -0
      src/Services/Location/Locations.API/Dockerfile.develop
  80. +56
    -0
      src/Services/Location/Locations.API/azds.yaml
  81. +3
    -0
      src/Services/Location/Locations.API/values.dev.yaml
  82. +2
    -0
      src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj
  83. +18
    -0
      src/Services/Marketing/Marketing.API/Dockerfile.develop
  84. +56
    -0
      src/Services/Marketing/Marketing.API/azds.yaml
  85. +3
    -0
      src/Services/Marketing/Marketing.API/values.dev.yaml
  86. +1
    -1
      src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarios.cs
  87. +27
    -0
      src/Services/Marketing/Marketing.FunctionalTests/Properties/launchSettings.json
  88. +14
    -0
      src/Services/Ordering/Ordering.API/.dockerignore
  89. +22
    -0
      src/Services/Ordering/Ordering.API/Dockerfile.develop
  90. +56
    -0
      src/Services/Ordering/Ordering.API/azds.yaml
  91. +18
    -0
      src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile.develop
  92. +56
    -0
      src/Services/Ordering/Ordering.BackgroundTasks/azds.yaml
  93. +2
    -0
      src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj
  94. +18
    -0
      src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop
  95. +56
    -0
      src/Services/Ordering/Ordering.SignalrHub/azds.yaml
  96. +19
    -0
      src/Services/Payment/Payment.API/Dockerfile.develop
  97. +56
    -0
      src/Services/Payment/Payment.API/azds.yaml
  98. +22
    -0
      src/Services/Webhooks/Webhooks.API/Dockerfile.develop
  99. +4
    -2
      src/Services/Webhooks/Webhooks.API/Startup.cs
  100. +1
    -0
      src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj

+ 5
- 0
.gitignore View File

@ -273,3 +273,8 @@ pub/
# Ignore HealthCheckdb
*healthchecksdb*
# Ignores all extra inf.yaml and app.yaml that are copied by prepare-devspaces.ps1
src/**/app.yaml
src/**/inf.yaml

+ 56
- 2
eShopOnContainers-ServicesAndWebApps.sln View File

@ -142,9 +142,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Services
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Webhooks", "Webhooks", "{E0AA11C4-2873-461D-8F82-53392530FB7A}"
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
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
Global
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|x86.ActiveCfg = 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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1808,6 +1860,8 @@ Global
{E0AA11C4-2873-461D-8F82-53392530FB7A} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
{84E2016E-0435-44C6-8020-3D288AA38B2C} = {E0AA11C4-2873-461D-8F82-53392530FB7A}
{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
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}


+ 5
- 6
k8s/helm/apigwmm/templates/_names.tpl View File

@ -33,14 +33,13 @@
{{- end -}}
{{- define "pathBase" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if $ctx.Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" $ctx -}}
{{- printf "/%s-%s" $name $suffix -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- printf "/%s" $name -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}


+ 2
- 2
k8s/helm/apigwmm/templates/deployment.yaml View File

@ -61,10 +61,10 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
mountPath: {{ .Values.ocelot.configPath }}
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) }}
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}


+ 6
- 3
k8s/helm/apigwmm/templates/ingress.yaml View File

@ -1,5 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -23,11 +24,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.mobilemarketingapigw }}
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 2
- 0
k8s/helm/apigwmm/values.yaml View File

@ -62,3 +62,5 @@ probes:
initialDelaySeconds: 90
periodSeconds: 60
port: 80
ocelot:
configPath: /app/configuration

+ 4
- 6
k8s/helm/apigwms/templates/_names.tpl View File

@ -35,13 +35,11 @@
{{- define "pathBase" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if $ctx.Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" $ctx -}}
{{- printf "/%s-%s" $name $suffix -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- printf "/%s" $name -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}


+ 2
- 2
k8s/helm/apigwms/templates/deployment.yaml View File

@ -61,10 +61,10 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
mountPath: {{ .Values.ocelot.configPath }}
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) }}
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}


+ 7
- 3
k8s/helm/apigwms/templates/ingress.yaml View File

@ -1,5 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.mobileshoppingapigw -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -23,11 +25,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.mobileshoppingapigw }}
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 3
- 1
k8s/helm/apigwms/values.yaml View File

@ -61,4 +61,6 @@ probes:
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80
port: 80
ocelot:
configPath: /app/configuration

+ 4
- 6
k8s/helm/apigwwm/templates/_names.tpl View File

@ -35,13 +35,11 @@
{{- define "pathBase" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if $ctx.Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" $ctx -}}
{{- printf "/%s-%s" $name $suffix -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- printf "/%s" $name -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}


+ 2
- 2
k8s/helm/apigwwm/templates/deployment.yaml View File

@ -61,10 +61,10 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
mountPath: {{ .Values.ocelot.configPath }}
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) }}
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}


+ 7
- 3
k8s/helm/apigwwm/templates/ingress.yaml View File

@ -1,5 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.webmarketingapigw -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -23,11 +25,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.webmarketingapigw }}
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 3
- 1
k8s/helm/apigwwm/values.yaml View File

@ -61,4 +61,6 @@ probes:
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80
port: 80
ocelot:
configPath: /app/configuration

+ 5
- 6
k8s/helm/apigwws/templates/_names.tpl View File

@ -33,14 +33,13 @@
{{- end -}}
{{- define "pathBase" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if $ctx.Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" $ctx -}}
{{- printf "/%s-%s" $name $suffix -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- printf "/%s" $name -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}


+ 2
- 2
k8s/helm/apigwws/templates/deployment.yaml View File

@ -60,10 +60,10 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
mountPath: {{ .Values.ocelot.configPath }}
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) }}
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}


+ 6
- 3
k8s/helm/apigwws/templates/ingress.yaml View File

@ -1,5 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.webshoppingapigw -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -23,11 +24,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.webshoppingapigw }}
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 2
- 0
k8s/helm/apigwws/values.yaml View File

@ -62,3 +62,5 @@ probes:
initialDelaySeconds: 90
periodSeconds: 60
port: 80
ocelot:
configPath: /app/configuration

+ 37
- 0
k8s/helm/basket-api/templates/ingress.yaml View 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 }}

+ 3
- 0
k8s/helm/basket-api/values.yaml View File

@ -53,3 +53,6 @@ probes:
initialDelaySeconds: 90
periodSeconds: 60
port: 80
ingress:
enabled: false

+ 37
- 0
k8s/helm/catalog-api/templates/ingress.yaml View 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 }}

+ 18
- 9
k8s/helm/deploy-all.ps1 View File

@ -5,6 +5,7 @@ Param(
[parameter(Mandatory=$false)][string]$externalDns,
[parameter(Mandatory=$false)][string]$appName="eshop",
[parameter(Mandatory=$false)][bool]$deployInfrastructure=$true,
[parameter(Mandatory=$false)][bool]$deployCharts=$true,
[parameter(Mandatory=$false)][bool]$clean=$true,
[parameter(Mandatory=$false)][string]$aksName="",
[parameter(Mandatory=$false)][string]$aksRg="",
@ -66,20 +67,28 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a
if ($deployInfrastructure) {
foreach ($infra in $infras) {
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) {
Write-Host "Installing: $chart" -ForegroundColor Green
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 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
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 ($deployCharts) {
foreach ($chart in $charts) {
Write-Host "Installing: $chart" -ForegroundColor Green
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
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

+ 1
- 2
k8s/helm/identity-api/templates/configmap.yaml View File

@ -36,5 +36,4 @@ data:
xamarin_callback_e: http://{{ $xamarincallback }}
webhooksapi_e: http://{{ $webhooks_url }}
webhooksweb_e: http://{{ $webhooksweb_url }}
enableDevspaces: "{{ .Values.enableDevspaces }}"

+ 5
- 2
k8s/helm/identity-api/templates/ingress.yaml View File

@ -1,5 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.identity }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -23,11 +24,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.identity }}
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 6
- 1
k8s/helm/identity-api/values.yaml View File

@ -58,6 +58,8 @@ env:
key: webhooksapi_e
- name: WebhooksWebClient
key: webhooksweb_e
- name: EnableDevspaces
key: enableDevspaces
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
@ -65,6 +67,7 @@ env:
value: 'K8S'
- name: IsClusterEnv
value: 'True'
probes:
liveness:
path: /liveness
@ -76,4 +79,6 @@ probes:
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80
port: 80
enableDevspaces: "false"

+ 36
- 0
k8s/helm/locations-api/templates/ingress.yaml View 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
- 0
k8s/helm/marketing-api/templates/ingress.yaml View 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
- 0
k8s/helm/mobileshoppingagg/templates/ingress.yaml View 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 }}

+ 2
- 1
k8s/helm/ordering-backgroundtasks/templates/configmap.yaml View File

@ -1,10 +1,11 @@
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
{{- $sqlsrv := include "sql-name" . -}}
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }}
apiVersion: v1
kind: ConfigMap
metadata:
name: "cfg-{{ $name }}"
name: "{{ $cfgname }}"
labels:
app: {{ template "ordering-backgroundtasks.name" . }}
chart: {{ template "ordering-backgroundtasks.chart" .}}


+ 2
- 2
k8s/helm/ordering-backgroundtasks/templates/deployment.yaml View File

@ -1,11 +1,11 @@
{{- $name := include "ordering-backgroundtasks.fullname" . -}}
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "ordering-backgroundtasks.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "ordering-backgroundtasks.name" . }}
chart: {{ template "ordering-backgroundtasks.chart" . }}
release: {{ .Release.Name }}


+ 5
- 2
k8s/helm/webhooks-api/templates/ingress.yaml View File

@ -1,5 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.webhooks }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -23,11 +24,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.webhooks }}
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 0
- 1
k8s/helm/webmvc/templates/configmap.yaml View File

@ -2,7 +2,6 @@
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
{{- $mvc := include "url-of" (list .Values.app.ingress.entries.mvc .) -}}
{{- $mongo := include "mongo-name" . -}}
apiVersion: v1


+ 5
- 2
k8s/helm/webmvc/templates/ingress.yaml View File

@ -1,5 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.mvc -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@ -23,11 +24,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ .Values.app.svc.mvc }}
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 36
- 0
k8s/helm/webshoppingagg/templates/ingress.yaml View 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
- 0
src/ApiGateways/ApiGw-Base/Dockerfile.develop View 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
- 0
src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml View 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}"]

+ 2
- 0
src/ApiGateways/Mobile.Bff.Marketing/apigw/values.dev.yaml View File

@ -0,0 +1,2 @@
ocelot:
configPath: /src/src/ApiGateways/ApiGw-Base/configuration

+ 16
- 0
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop View File

@ -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", "--"]]

+ 4
- 0
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj View File

@ -23,4 +23,8 @@
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
</ItemGroup>
</Project>

+ 7
- 0
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Properties/launchSettings.json View File

@ -24,6 +24,13 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:61632/"
},
"Azure Dev Spaces": {
"commandName": "AzureDevSpaces",
"launchBrowser": true,
"resourceGroup": "eshoptestedu",
"aksName": "eshoptestedu",
"subscriptionId": "e3035ac1-c06c-4daf-8939-57b3c5f1f759"
}
}
}

+ 8
- 3
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs View File

@ -20,6 +20,7 @@ using Swashbuckle.AspNetCore.Swagger;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Devspaces.Support;
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
{
@ -47,6 +48,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
services.AddCustomMvc(Configuration)
.AddCustomAuthentication(Configuration)
.AddDevspaces()
.AddHttpServices();
}
@ -188,15 +190,18 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
services.AddHttpClient<IBasketService, BasketService>()
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
.AddPolicyHandler(GetRetryPolicy())
.AddPolicyHandler(GetCircuitBreakerPolicy());
.AddPolicyHandler(GetCircuitBreakerPolicy())
.AddDevspacesSupport();
services.AddHttpClient<ICatalogService, CatalogService>()
.AddPolicyHandler(GetRetryPolicy())
.AddPolicyHandler(GetCircuitBreakerPolicy());
.AddPolicyHandler(GetCircuitBreakerPolicy())
.AddDevspacesSupport();
services.AddHttpClient<IOrderApiClient, OrderApiClient>()
.AddPolicyHandler(GetRetryPolicy())
.AddPolicyHandler(GetCircuitBreakerPolicy());
.AddPolicyHandler(GetCircuitBreakerPolicy())
.AddDevspacesSupport();
return services;
}


+ 55
- 0
src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml View 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}

+ 3
- 0
src/ApiGateways/Mobile.Bff.Shopping/aggregator/values.dev.yaml View File

@ -0,0 +1,3 @@
ingress:
enabled: true
tls: []

+ 44
- 0
src/ApiGateways/Mobile.Bff.Shopping/apigw/azds.yaml View 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}"]

+ 2
- 0
src/ApiGateways/Mobile.Bff.Shopping/apigw/values.dev.yaml View File

@ -0,0 +1,2 @@
ocelot:
configPath: /src/src/ApiGateways/ApiGw-Base/configuration

+ 44
- 0
src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml View 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
- 0
src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml View File

@ -0,0 +1,2 @@
ocelot:
configPath: /src/src/ApiGateways/ApiGw-Base/configuration

+ 16
- 0
src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop View File

@ -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", "--"]]

+ 9
- 5
src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs View File

@ -21,6 +21,7 @@ using System.Net.Http;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Devspaces.Support;
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
{
@ -48,6 +49,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
services.AddCustomMvc(Configuration)
.AddCustomAuthentication(Configuration)
.AddDevspaces()
.AddApplicationServices();
}
@ -182,21 +184,23 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
//register http services
services.AddHttpClient<IBasketService, BasketService>()
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
.AddPolicyHandler(GetRetryPolicy())
.AddPolicyHandler(GetCircuitBreakerPolicy());
.AddPolicyHandler(GetCircuitBreakerPolicy())
.AddDevspacesSupport();
services.AddHttpClient<ICatalogService, CatalogService>()
.AddPolicyHandler(GetRetryPolicy())
.AddPolicyHandler(GetCircuitBreakerPolicy());
.AddPolicyHandler(GetCircuitBreakerPolicy())
.AddDevspacesSupport();
services.AddHttpClient<IOrderApiClient, OrderApiClient>()
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
.AddPolicyHandler(GetRetryPolicy())
.AddPolicyHandler(GetCircuitBreakerPolicy());
.AddPolicyHandler(GetCircuitBreakerPolicy())
.AddDevspacesSupport();
return services;
}


+ 4
- 0
src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj View File

@ -22,4 +22,8 @@
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
</ItemGroup>
</Project>

+ 55
- 0
src/ApiGateways/Web.Bff.Shopping/aggregator/azds.yaml View 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}

+ 2
- 0
src/ApiGateways/Web.Bff.Shopping/aggregator/values.dev.yaml View File

@ -0,0 +1,2 @@
ocelot:
configPath: /app/configuration

+ 43
- 0
src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml View 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
- 0
src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml View File

@ -0,0 +1,2 @@
ocelot:
configPath: /src/src/ApiGateways/ApiGw-Base/configuration

+ 11
- 0
src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj View File

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

+ 30
- 0
src/BuildingBlocks/Devspaces.Support/DevspacesMessageHandler.cs View File

@ -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);
}
}
}

+ 16
- 0
src/BuildingBlocks/Devspaces.Support/HttpClientBuilderDevspacesExtensions.cs View File

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

+ 16
- 0
src/BuildingBlocks/Devspaces.Support/ServiceCollectionDevspacesExtensions.cs View File

@ -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
- 0
src/Services/Basket/Basket.API/.dockerignore View 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

+ 2
- 2
src/Services/Basket/Basket.API/Controllers/BasketController.cs View File

@ -41,14 +41,14 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
{
var basket = await _repository.GetBasketAsync(id);
return basket ?? new CustomerBasket(id);
return Ok(basket ?? new CustomerBasket(id));
}
[HttpPost]
[ProducesResponseType(typeof(CustomerBasket), (int)HttpStatusCode.OK)]
public async Task<ActionResult<CustomerBasket>> UpdateBasketAsync([FromBody]CustomerBasket value)
{
return await _repository.UpdateBasketAsync(value);
return Ok(await _repository.UpdateBasketAsync(value));
}
[Route("checkout")]


+ 19
- 0
src/Services/Basket/Basket.API/Dockerfile.develop View 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
- 0
src/Services/Basket/Basket.API/azds.yaml View 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
- 0
src/Services/Basket/Basket.API/values.dev.yaml View File

@ -0,0 +1,3 @@
ingress:
enabled: true
tls: []

+ 2
- 0
src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj View File

@ -17,6 +17,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />


+ 9
- 0
src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs View File

@ -60,6 +60,15 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
.Take(pageSize)
.ToListAsync();
/* The "awesome" fix for testing Devspaces */
/*
foreach (var pr in itemsOnPage) {
pr.Name = "Awesome " + pr.Name;
}
*/
itemsOnPage = ChangeUriPlaceholder(itemsOnPage);
var model = new PaginatedItemsViewModel<CatalogItem>(pageIndex, pageSize, totalItems, itemsOnPage);


+ 21
- 0
src/Services/Catalog/Catalog.API/Dockerfile.develop View 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", "--"]

+ 7
- 0
src/Services/Catalog/Catalog.API/Properties/launchSettings.json View File

@ -27,6 +27,13 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Azure Dev Spaces": {
"commandName": "AzureDevSpaces",
"launchBrowser": true,
"resourceGroup": "edu-devspaces3",
"aksName": "edu-devspaces3",
"subscriptionId": "e3035ac1-c06c-4daf-8939-57b3c5f1f759"
}
}
}

+ 54
- 0
src/Services/Catalog/Catalog.API/azds.yaml View 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
- 0
src/Services/Catalog/Catalog.API/values.dev.yaml View File

@ -0,0 +1,3 @@
ingress:
enabled: true
tls: []

+ 2
- 0
src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj View File

@ -33,6 +33,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />


+ 14
- 0
src/Services/Identity/Identity.API/.dockerignore View 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

+ 31
- 0
src/Services/Identity/Identity.API/Devspaces/DevspacesRedirectUriValidator.cs View File

@ -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);
}
}
}

+ 20
- 0
src/Services/Identity/Identity.API/Devspaces/IdentityDevspacesBuilderExtensions.cs View File

@ -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
- 0
src/Services/Identity/Identity.API/Dockerfile.develop View 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", "--"]

+ 2
- 0
src/Services/Identity/Identity.API/Startup.cs View File

@ -13,6 +13,7 @@ using Microsoft.eShopOnContainers.Services.Identity.API.Certificates;
using Microsoft.eShopOnContainers.Services.Identity.API.Data;
using Microsoft.eShopOnContainers.Services.Identity.API.Models;
using Microsoft.eShopOnContainers.Services.Identity.API.Services;
using Microsoft.eShopOnContainers.Services.Identity.API.Devspaces;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@ -85,6 +86,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
x.IssuerUri = "null";
x.Authentication.CookieLifetime = TimeSpan.FromHours(2);
})
.AddDevspacesIfNeeded(Configuration.GetValue("EnableDevspaces", false))
.AddSigningCredential(Certificate.Get())
.AddAspNetIdentity<ApplicationUser>()
.AddConfigurationStore(options =>


+ 1
- 1
src/Services/Identity/Identity.API/Views/Shared/_LoginPartial.cshtml View File

@ -7,7 +7,7 @@
@if (SignInManager.IsSignedIn(User))
{
<form asp-area="" asp-controller="Account" asp-action="LogOff" method="post" id="logoutForm" class="navbar-right">
<form asp-area="" asp-controller="Account" asp-action="Logout" method="post" id="logoutForm" class="navbar-right">
<ul class="nav navbar-nav navbar-right">
<li>
<a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage">Hello @UserManager.GetUserName(User)!</a>


+ 56
- 0
src/Services/Identity/Identity.API/azds.yaml View 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
- 0
src/Services/Identity/Identity.API/values.dev.yaml View File

@ -0,0 +1 @@
enableDevspaces: "true"

+ 17
- 0
src/Services/Location/Locations.API/Dockerfile.develop View 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
- 0
src/Services/Location/Locations.API/azds.yaml View 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
- 0
src/Services/Location/Locations.API/values.dev.yaml View File

@ -0,0 +1,3 @@
ingress:
enabled: true
tls: []

+ 2
- 0
src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj View File

@ -17,6 +17,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />


+ 18
- 0
src/Services/Marketing/Marketing.API/Dockerfile.develop View 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
- 0
src/Services/Marketing/Marketing.API/azds.yaml View 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
- 0
src/Services/Marketing/Marketing.API/values.dev.yaml View File

@ -0,0 +1,3 @@
ingress:
enabled: true
tls: []

+ 1
- 1
src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarios.cs View File

@ -27,7 +27,7 @@ namespace Marketing.FunctionalTests
[Fact]
public async Task Get_get_campaign_by_id_and_response_ok_status_code()
{
var campaignId = 81;
var campaignId = 2;
using (var server = CreateServer())
{
var response = await server.CreateClient()


+ 27
- 0
src/Services/Marketing/Marketing.FunctionalTests/Properties/launchSettings.json View File

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:7496/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Marketing.FunctionalTests": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:7497/"
}
}
}

+ 14
- 0
src/Services/Ordering/Ordering.API/.dockerignore View 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
- 0
src/Services/Ordering/Ordering.API/Dockerfile.develop View 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
- 0
src/Services/Ordering/Ordering.API/azds.yaml View 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}

+ 18
- 0
src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile.develop View 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.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
- 0
src/Services/Ordering/Ordering.BackgroundTasks/azds.yaml View 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}

+ 2
- 0
src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj View File

@ -17,6 +17,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />


+ 18
- 0
src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop View 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
- 0
src/Services/Ordering/Ordering.SignalrHub/azds.yaml View 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
- 0
src/Services/Payment/Payment.API/Dockerfile.develop View 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
- 0
src/Services/Payment/Payment.API/azds.yaml View 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
- 0
src/Services/Webhooks/Webhooks.API/Dockerfile.develop View 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", "--"]

+ 4
- 2
src/Services/Webhooks/Webhooks.API/Startup.cs View File

@ -8,6 +8,7 @@ using System.Threading;
using System.Threading.Tasks;
using Autofac;
using Autofac.Extensions.DependencyInjection;
using Devspaces.Support;
using HealthChecks.UI.Client;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.ServiceFabric;
@ -55,6 +56,7 @@ namespace Webhooks.API
.AddCustomDbContext(Configuration)
.AddSwagger(Configuration)
.AddCustomHealthCheck(Configuration)
.AddDevspaces()
.AddHttpClientServices(Configuration)
.AddIntegrationServices(Configuration)
.AddEventBus(Configuration)
@ -293,8 +295,8 @@ namespace Webhooks.API
services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(Timeout.InfiniteTimeSpan);
//add http client services
services.AddHttpClient("GrantClient")
.SetHandlerLifetime(TimeSpan.FromMinutes(5));
//.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>();
.SetHandlerLifetime(TimeSpan.FromMinutes(5))
.AddDevspacesSupport();
return services;
}


+ 1
- 0
src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj View File

@ -22,6 +22,7 @@
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save