Cesar De la Torre 7 years ago
parent
commit
d0f39b0587
107 changed files with 368 additions and 39 deletions
  1. +2
    -0
      .env
  2. +20
    -1
      docker-compose.override.yml
  3. +2
    -0
      k8s/conf_local.yml
  4. +77
    -7
      k8s/deployments.yaml
  5. +0
    -1
      mssql/.system/instance_id
  6. BIN
      mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Crypto/RSA/S-1-5-21-4137405425-2340124300-2890394999-500/42e7704ae40b0d75de00736cc66b813a_67aaedee-1e4a-4132-b8ba-5397448c74de
  7. BIN
      mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Protect/CREDHIST
  8. BIN
      mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Protect/S-1-5-21-4137405425-2340124300-2890394999-500/48e880fa-19d4-4fd8-b209-07cff1308993
  9. BIN
      mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Protect/S-1-5-21-4137405425-2340124300-2890394999-500/Preferred
  10. +0
    -0
      mssql/.system/profiles/Client/AppData/Roaming/Microsoft/SystemCertificates/My/AppContainerUserCertRead
  11. BIN
      mssql/.system/profiles/Temp/1a541f5da82a46408b4fbfc4cbc88b2
  12. BIN
      mssql/.system/profiles/Temp/1b42c59ee5d0b243aaf792ba47169816
  13. BIN
      mssql/.system/profiles/Temp/1c81b699afe567302ac6ebbccfe58faf
  14. BIN
      mssql/.system/profiles/Temp/1e42979f514909df4e55f88bc5f33d2f
  15. BIN
      mssql/.system/profiles/Temp/23d74814f69031dbc0ccc2df7136e49d
  16. BIN
      mssql/.system/profiles/Temp/2aa13217ef04d399db1f5bf837df6133
  17. BIN
      mssql/.system/profiles/Temp/2ceaf558dea6ea34749579158b71cd81
  18. BIN
      mssql/.system/profiles/Temp/30ebb5aa7a83a397d7be7db38866066
  19. BIN
      mssql/.system/profiles/Temp/32f4099bd7615b9e5661802aa7f5263c
  20. BIN
      mssql/.system/profiles/Temp/3381e0697f2e1f4d0a8ec84906e38be
  21. BIN
      mssql/.system/profiles/Temp/3d358c0071446cfcdf51d001911f0a76
  22. BIN
      mssql/.system/profiles/Temp/42b29843fc2cb7da8c24ad9c1610bf0b
  23. BIN
      mssql/.system/profiles/Temp/4322133a39682df51341c921988ba43e
  24. BIN
      mssql/.system/profiles/Temp/43359794eab4b6542013fa43abadfaa3
  25. BIN
      mssql/.system/profiles/Temp/4f00a20180e71c01826e3251bef80fd8
  26. BIN
      mssql/.system/profiles/Temp/6015d19ff83133aab7fbc00e055c31a
  27. BIN
      mssql/.system/profiles/Temp/732d238512e92e4ef9089fb4c61a4808
  28. BIN
      mssql/.system/profiles/Temp/7907394830ef17d4ba0175bd9826da51
  29. BIN
      mssql/.system/profiles/Temp/7bcc896c1f2df666851a1f73c84e9cff
  30. BIN
      mssql/.system/profiles/Temp/7d1bf98b298a3c8850d74e5b660332fb
  31. BIN
      mssql/.system/profiles/Temp/8129f518dd51573cf4133f18ec1b91f5
  32. BIN
      mssql/.system/profiles/Temp/84c18e096493bccd90c998b08df6a21d
  33. BIN
      mssql/.system/profiles/Temp/8e7242dcdb663928bc35e846ec723a6
  34. BIN
      mssql/.system/profiles/Temp/9d3bc5ac6d976a983b53e8e6fbb3a24e
  35. BIN
      mssql/.system/profiles/Temp/a248390ce868079187416f934759fba9
  36. BIN
      mssql/.system/profiles/Temp/a2b2d2c1e3374a928a751febe0395fd
  37. BIN
      mssql/.system/profiles/Temp/ae5574d6c15bd1a63341127b45e498da
  38. BIN
      mssql/.system/profiles/Temp/af09a9c0f1aac9656097f623fc81d159
  39. BIN
      mssql/.system/profiles/Temp/b0be8059be14de098ad41f86831e1da1
  40. BIN
      mssql/.system/profiles/Temp/b457fe0369797a89bff03c6e1fc69fa2
  41. BIN
      mssql/.system/profiles/Temp/b71273b08a354ee7e274d621bf431e90
  42. BIN
      mssql/.system/profiles/Temp/be6eef1d8f9b5ffbc7282050e4c34197
  43. BIN
      mssql/.system/profiles/Temp/c33e2c07b053ed06080e18f9cc59f77
  44. BIN
      mssql/.system/profiles/Temp/c3eca02fc0502f7786376d0cd281d604
  45. BIN
      mssql/.system/profiles/Temp/c428f4c0244fbb9b4a888ddfe25fcb03
  46. BIN
      mssql/.system/profiles/Temp/c460f565e5f9bf596e84618bae567754
  47. BIN
      mssql/.system/profiles/Temp/c7fff830bc209b3cb2d2a9541c61aa6
  48. BIN
      mssql/.system/profiles/Temp/d1136286d24fd64a5a957a3d86bc0576
  49. BIN
      mssql/.system/profiles/Temp/d38e57dc354641377a0a21444180bc92
  50. BIN
      mssql/.system/profiles/Temp/d68589df980066c61cbc6b6e0781bb
  51. BIN
      mssql/.system/profiles/Temp/d71268d41db313db8113907726e7bad
  52. BIN
      mssql/.system/profiles/Temp/d9afcc42ac8e8fa3d7f426545902b6d5
  53. BIN
      mssql/.system/profiles/Temp/e18b66c54da5d9742837799f70ac6d31
  54. BIN
      mssql/.system/profiles/Temp/e464d86334b854c8f93090881f82e70d
  55. BIN
      mssql/.system/profiles/Temp/e7c8cf705009960cb96991c9207c386
  56. BIN
      mssql/.system/profiles/Temp/ec4c7e8181ae15da5710fd3d87d1e7
  57. BIN
      mssql/.system/profiles/Temp/f68cc8518fc6f0388dd468caa5024e62
  58. BIN
      mssql/.system/profiles/Temp/f6960589693f36be384813057950420c
  59. BIN
      mssql/.system/profiles/Temp/f94a5478dc3f78f6c45943eda1a0285e
  60. +0
    -0
      mssql/.system/programdata/Microsoft/NetFramework/BreadcrumbStore/Microsoft.Diagnostics.Tracing.EventSource, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  61. +0
    -0
      mssql/.system/programdata/Microsoft/NetFramework/BreadcrumbStore/Microsoft.Diagnostics.Tracing.EventSource, Version=1.1.26.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  62. BIN
      mssql/.system/system/licensing.hiv
  63. BIN
      mssql/.system/system/lsa.hiv
  64. BIN
      mssql/.system/system/security.hiv
  65. BIN
      mssql/.system/system/system32/Microsoft/Protect/S-1-5-18/User/Preferred
  66. BIN
      mssql/.system/system/system32/Microsoft/Protect/S-1-5-18/User/d01f9596-8a07-4854-9c5a-348703ee814c
  67. BIN
      mssql/secrets/machine-key
  68. +3
    -0
      src/Services/Basket/Basket.API/Basket.API.csproj
  69. +6
    -0
      src/Services/Basket/Basket.API/Program.cs
  70. +16
    -5
      src/Services/Basket/Basket.API/Startup.cs
  71. +4
    -1
      src/Services/Basket/Basket.API/appsettings.json
  72. +3
    -0
      src/Services/Catalog/Catalog.API/Catalog.API.csproj
  73. +8
    -2
      src/Services/Catalog/Catalog.API/Program.cs
  74. +10
    -1
      src/Services/Catalog/Catalog.API/Startup.cs
  75. +4
    -1
      src/Services/Catalog/Catalog.API/appsettings.json
  76. +3
    -0
      src/Services/Identity/Identity.API/Identity.API.csproj
  77. +5
    -0
      src/Services/Identity/Identity.API/Program.cs
  78. +11
    -1
      src/Services/Identity/Identity.API/Startup.cs
  79. +3
    -0
      src/Services/Identity/Identity.API/appsettings.json
  80. +3
    -0
      src/Services/Location/Locations.API/Locations.API.csproj
  81. +8
    -1
      src/Services/Location/Locations.API/Program.cs
  82. +11
    -0
      src/Services/Location/Locations.API/Startup.cs
  83. +4
    -1
      src/Services/Location/Locations.API/appsettings.json
  84. +10
    -0
      src/Services/Marketing/Marketing.API/Marketing.API.csproj
  85. +9
    -1
      src/Services/Marketing/Marketing.API/Program.cs
  86. +12
    -1
      src/Services/Marketing/Marketing.API/Startup.cs
  87. +6
    -4
      src/Services/Marketing/Marketing.API/appsettings.json
  88. +3
    -0
      src/Services/Ordering/Ordering.API/Ordering.API.csproj
  89. +8
    -1
      src/Services/Ordering/Ordering.API/Program.cs
  90. +11
    -1
      src/Services/Ordering/Ordering.API/Startup.cs
  91. +4
    -1
      src/Services/Ordering/Ordering.API/settings.json
  92. +3
    -0
      src/Services/Payment/Payment.API/Payment.API.csproj
  93. +8
    -1
      src/Services/Payment/Payment.API/Program.cs
  94. +12
    -2
      src/Services/Payment/Payment.API/Startup.cs
  95. +4
    -1
      src/Services/Payment/Payment.API/appsettings.json
  96. +8
    -1
      src/Web/WebMVC/Program.cs
  97. +10
    -0
      src/Web/WebMVC/Startup.cs
  98. +3
    -0
      src/Web/WebMVC/WebMVC.csproj
  99. +3
    -0
      src/Web/WebMVC/appsettings.json
  100. +6
    -0
      src/Web/WebSPA/Program.cs

+ 2
- 0
.env View File

@ -23,3 +23,5 @@ ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92
#ESHOP_AZURE_STORAGE_MARKETING_KEY=<YourAzureStorageMarketingKey>
#ESHOP_SERVICE_BUS_USERNAME=<ServiceBusUserName-OnlyUsedIfUsingRabbitMQUnderwindows>
#ESHOP_SERVICE_BUS_PASSWORD=<ServiceBusUserPassword-OnlyUsedIfUsingRabbitMQUnderwindows>
#INSTRUMENTATION_KEY=
#ORCHESTRATOR_TYPE=<k8S/SF>

+ 20
- 1
docker-compose.override.yml View File

@ -19,6 +19,8 @@ services:
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
- AzureServiceBusEnabled=False
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5103:80"
@ -36,6 +38,8 @@ services:
- UseCustomizationData=True
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5101:80"
@ -51,7 +55,9 @@ services:
- MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110
- BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
- OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
- UseCustomizationData=True
- UseCustomizationData=True
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5105:80"
@ -69,6 +75,8 @@ services:
- AzureServiceBusEnabled=False
- CheckUpdateTime=30000
- GracePeriodTime=1
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5102:80"
@ -90,6 +98,8 @@ services:
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5110:80"
@ -110,6 +120,8 @@ services:
- MarketingUrlHC=http://marketing.api/hc
- PaymentUrlHC=http://payment.api/hc
- UseCustomizationData=True
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5104:80"
@ -130,6 +142,8 @@ services:
- MarketingUrlHC=http://marketing.api/hc
- PaymentUrlHC=http://payment.api/hc
- UseCustomizationData=True
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5100:80"
@ -146,6 +160,8 @@ services:
- PaymentUrl=http://payment.api/hc
- mvc=http://webmvc/hc
- spa=http://webspa/hc
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5107:80"
@ -157,6 +173,7 @@ services:
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
- AzureServiceBusEnabled=False
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
ports:
- "5108:80"
@ -172,6 +189,8 @@ services:
- EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
- EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
- AzureServiceBusEnabled=False
- ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
- OrchestratorType=${ORCHESTRATOR_TYPE}
ports:
- "5109:80"


+ 2
- 0
k8s/conf_local.yml View File

@ -25,5 +25,7 @@ data:
keystore: keystore-data
GracePeriodManager_GracePeriodTime: "1"
GracePeriodManager_CheckUpdateTime: "15000"
Instrumentation_Key: ""

+ 77
- 7
k8s/deployments.yaml View File

@ -32,11 +32,18 @@ spec:
configMapKeyRef:
name: externalcfg
key: UseAzureServiceBus
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: IdentityUrl
valueFrom:
configMapKeyRef:
name: urls
key: IdentityUrl
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -95,6 +102,13 @@ spec:
configMapKeyRef:
name: externalcfg
key: CatalogBus
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -133,7 +147,7 @@ spec:
env:
- name: PATH_BASE
value: /identity
- name: ConnectionStrings__DefaultConnection
- name: ConnectionString
valueFrom:
configMapKeyRef:
name: externalcfg
@ -174,7 +188,14 @@ spec:
valueFrom:
configMapKeyRef:
name: urls
key: OrderingApiClient
key: OrderingApiClient
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -242,7 +263,14 @@ spec:
valueFrom:
configMapKeyRef:
name: externalcfg
key: GracePeriodManager_GracePeriodTime
key: GracePeriodManager_GracePeriodTime
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -310,7 +338,14 @@ spec:
valueFrom:
configMapKeyRef:
name: urls
key: IdentityUrl
key: IdentityUrl
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -388,7 +423,14 @@ spec:
valueFrom:
configMapKeyRef:
name: urls
key: Marketing_PicBaseUrl
key: Marketing_PicBaseUrl
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -437,6 +479,13 @@ spec:
configMapKeyRef:
name: externalcfg
key: PaymentBus
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -546,7 +595,14 @@ spec:
valueFrom:
configMapKeyRef:
name: urls
key: PaymentHealthCheckUrl
key: PaymentHealthCheckUrl
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:
@ -629,7 +685,14 @@ spec:
valueFrom:
configMapKeyRef:
name: urls
key: PaymentHealthCheckUrl
key: PaymentHealthCheckUrl
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
imagePullSecrets:
@ -726,6 +789,13 @@ spec:
configMapKeyRef:
name: urls
key: PaymentHealthCheckUrl
- name: ApplicationInsights__InstrumentationKey
valueFrom:
configMapKeyRef:
name: externalcfg
key: Instrumentation_Key
- name: OrchestratorType
value: 'K8S'
ports:
- containerPort: 80
readinessProbe:


+ 0
- 1
mssql/.system/instance_id View File

@ -1 +0,0 @@
42e93c96-946a-448e-9d1f-182c8ccc5005

BIN
mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Crypto/RSA/S-1-5-21-4137405425-2340124300-2890394999-500/42e7704ae40b0d75de00736cc66b813a_67aaedee-1e4a-4132-b8ba-5397448c74de View File


BIN
mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Protect/CREDHIST View File


BIN
mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Protect/S-1-5-21-4137405425-2340124300-2890394999-500/48e880fa-19d4-4fd8-b209-07cff1308993 View File


BIN
mssql/.system/profiles/Client/AppData/Roaming/Microsoft/Protect/S-1-5-21-4137405425-2340124300-2890394999-500/Preferred View File


+ 0
- 0
mssql/.system/profiles/Client/AppData/Roaming/Microsoft/SystemCertificates/My/AppContainerUserCertRead View File


BIN
mssql/.system/profiles/Temp/1a541f5da82a46408b4fbfc4cbc88b2 View File


BIN
mssql/.system/profiles/Temp/1b42c59ee5d0b243aaf792ba47169816 View File


BIN
mssql/.system/profiles/Temp/1c81b699afe567302ac6ebbccfe58faf View File


BIN
mssql/.system/profiles/Temp/1e42979f514909df4e55f88bc5f33d2f View File


BIN
mssql/.system/profiles/Temp/23d74814f69031dbc0ccc2df7136e49d View File


BIN
mssql/.system/profiles/Temp/2aa13217ef04d399db1f5bf837df6133 View File


BIN
mssql/.system/profiles/Temp/2ceaf558dea6ea34749579158b71cd81 View File


BIN
mssql/.system/profiles/Temp/30ebb5aa7a83a397d7be7db38866066 View File


BIN
mssql/.system/profiles/Temp/32f4099bd7615b9e5661802aa7f5263c View File


BIN
mssql/.system/profiles/Temp/3381e0697f2e1f4d0a8ec84906e38be View File


BIN
mssql/.system/profiles/Temp/3d358c0071446cfcdf51d001911f0a76 View File


BIN
mssql/.system/profiles/Temp/42b29843fc2cb7da8c24ad9c1610bf0b View File


BIN
mssql/.system/profiles/Temp/4322133a39682df51341c921988ba43e View File


BIN
mssql/.system/profiles/Temp/43359794eab4b6542013fa43abadfaa3 View File


BIN
mssql/.system/profiles/Temp/4f00a20180e71c01826e3251bef80fd8 View File


BIN
mssql/.system/profiles/Temp/6015d19ff83133aab7fbc00e055c31a View File

Before After

BIN
mssql/.system/profiles/Temp/732d238512e92e4ef9089fb4c61a4808 View File


BIN
mssql/.system/profiles/Temp/7907394830ef17d4ba0175bd9826da51 View File


BIN
mssql/.system/profiles/Temp/7bcc896c1f2df666851a1f73c84e9cff View File


BIN
mssql/.system/profiles/Temp/7d1bf98b298a3c8850d74e5b660332fb View File


BIN
mssql/.system/profiles/Temp/8129f518dd51573cf4133f18ec1b91f5 View File


BIN
mssql/.system/profiles/Temp/84c18e096493bccd90c998b08df6a21d View File


BIN
mssql/.system/profiles/Temp/8e7242dcdb663928bc35e846ec723a6 View File


BIN
mssql/.system/profiles/Temp/9d3bc5ac6d976a983b53e8e6fbb3a24e View File


BIN
mssql/.system/profiles/Temp/a248390ce868079187416f934759fba9 View File


BIN
mssql/.system/profiles/Temp/a2b2d2c1e3374a928a751febe0395fd View File


BIN
mssql/.system/profiles/Temp/ae5574d6c15bd1a63341127b45e498da View File


BIN
mssql/.system/profiles/Temp/af09a9c0f1aac9656097f623fc81d159 View File


BIN
mssql/.system/profiles/Temp/b0be8059be14de098ad41f86831e1da1 View File


BIN
mssql/.system/profiles/Temp/b457fe0369797a89bff03c6e1fc69fa2 View File


BIN
mssql/.system/profiles/Temp/b71273b08a354ee7e274d621bf431e90 View File


BIN
mssql/.system/profiles/Temp/be6eef1d8f9b5ffbc7282050e4c34197 View File


BIN
mssql/.system/profiles/Temp/c33e2c07b053ed06080e18f9cc59f77 View File


BIN
mssql/.system/profiles/Temp/c3eca02fc0502f7786376d0cd281d604 View File


BIN
mssql/.system/profiles/Temp/c428f4c0244fbb9b4a888ddfe25fcb03 View File


BIN
mssql/.system/profiles/Temp/c460f565e5f9bf596e84618bae567754 View File


BIN
mssql/.system/profiles/Temp/c7fff830bc209b3cb2d2a9541c61aa6 View File


BIN
mssql/.system/profiles/Temp/d1136286d24fd64a5a957a3d86bc0576 View File


BIN
mssql/.system/profiles/Temp/d38e57dc354641377a0a21444180bc92 View File


BIN
mssql/.system/profiles/Temp/d68589df980066c61cbc6b6e0781bb View File


BIN
mssql/.system/profiles/Temp/d71268d41db313db8113907726e7bad View File


BIN
mssql/.system/profiles/Temp/d9afcc42ac8e8fa3d7f426545902b6d5 View File


BIN
mssql/.system/profiles/Temp/e18b66c54da5d9742837799f70ac6d31 View File


BIN
mssql/.system/profiles/Temp/e464d86334b854c8f93090881f82e70d View File


BIN
mssql/.system/profiles/Temp/e7c8cf705009960cb96991c9207c386 View File


BIN
mssql/.system/profiles/Temp/ec4c7e8181ae15da5710fd3d87d1e7 View File


BIN
mssql/.system/profiles/Temp/f68cc8518fc6f0388dd468caa5024e62 View File


BIN
mssql/.system/profiles/Temp/f6960589693f36be384813057950420c View File


BIN
mssql/.system/profiles/Temp/f94a5478dc3f78f6c45943eda1a0285e View File


+ 0
- 0
mssql/.system/programdata/Microsoft/NetFramework/BreadcrumbStore/Microsoft.Diagnostics.Tracing.EventSource, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a View File


+ 0
- 0
mssql/.system/programdata/Microsoft/NetFramework/BreadcrumbStore/Microsoft.Diagnostics.Tracing.EventSource, Version=1.1.26.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a View File


BIN
mssql/.system/system/licensing.hiv View File


BIN
mssql/.system/system/lsa.hiv View File


BIN
mssql/.system/system/security.hiv View File


BIN
mssql/.system/system/system32/Microsoft/Protect/S-1-5-18/User/Preferred View File


BIN
mssql/.system/system/system32/Microsoft/Protect/S-1-5-18/User/d01f9596-8a07-4854-9c5a-348703ee814c View File


BIN
mssql/secrets/machine-key View File


+ 3
- 0
src/Services/Basket/Basket.API/Basket.API.csproj View File

@ -16,6 +16,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />


+ 6
- 0
src/Services/Basket/Basket.API/Program.cs View File

@ -2,6 +2,7 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System.IO;
@ -23,12 +24,17 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
})
.UseApplicationInsights()
.Build();
}
}

+ 16
- 5
src/Services/Basket/Basket.API/Startup.cs View File

@ -43,7 +43,9 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
// This method gets called by the runtime. Use this method to add services to the container.
public IServiceProvider ConfigureServices(IServiceCollection services)
{
{
services.AddApplicationInsightsTelemetry(Configuration);
// Add framework services.
services.AddMvc(options =>
{
@ -63,6 +65,12 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
services.Configure<BasketSettings>(Configuration);
if(Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
//By connecting here we are making sure that our service
//cannot start until redis is ready. This might slow down startup,
//but given that there is a delay on resolving the ip address
@ -167,14 +175,17 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
var pathBase = Configuration["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))
{
app.UsePathBase(pathBase);
}
}
app.UseStaticFiles();
app.UseCors("CorsPolicy");
@ -198,8 +209,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
// prevent from mapping "sub" claim to nameidentifier.
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
var identityUrl = Configuration.GetValue<string>("IdentityUrl");
var identityUrl = Configuration.GetValue<string>("IdentityUrl");
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;


+ 4
- 1
src/Services/Basket/Basket.API/appsettings.json View File

@ -10,5 +10,8 @@
"IdentityUrl": "http://localhost:5105",
"ConnectionString": "127.0.0.1",
"AzureServiceBusEnabled": false,
"SubscriptionClientName": "Basket"
"SubscriptionClientName": "Basket",
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 3
- 0
src/Services/Catalog/Catalog.API/Catalog.API.csproj View File

@ -35,6 +35,9 @@
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />


+ 8
- 2
src/Services/Catalog/Catalog.API/Program.cs View File

@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@ -31,15 +32,20 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseApplicationInsights()
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseContentRoot(Directory.GetCurrentDirectory())
.UseWebRoot("Pics")
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
})
})
.Build();
}
}

+ 10
- 1
src/Services/Catalog/Catalog.API/Startup.cs View File

@ -13,7 +13,6 @@
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services;
using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure;
using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.EventHandling;
@ -41,6 +40,14 @@
{
// Add framework services.
services.AddApplicationInsightsTelemetry(Configuration);
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
services.AddHealthChecks(checks =>
{
var minutes = 1;
@ -171,6 +178,8 @@
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
var pathBase = Configuration["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))


+ 4
- 1
src/Services/Catalog/Catalog.API/appsettings.json View File

@ -12,5 +12,8 @@
},
"AzureServiceBusEnabled": false,
"AzureStorageEnabled": false,
"SubscriptionClientName": "Catalog"
"SubscriptionClientName": "Catalog",
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 3
- 0
src/Services/Identity/Identity.API/Identity.API.csproj View File

@ -16,6 +16,9 @@
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.0.0-rc1" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.0.0-rc1" />


+ 5
- 0
src/Services/Identity/Identity.API/Program.cs View File

@ -43,12 +43,17 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
})
.UseApplicationInsights()
.Build();
}
}


+ 11
- 1
src/Services/Identity/Identity.API/Startup.cs View File

@ -31,6 +31,14 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
// This method gets called by the runtime. Use this method to add services to the container.
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry(Configuration);
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
// Add framework services.
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration["ConnectionString"],
@ -114,7 +122,9 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();


+ 3
- 0
src/Services/Identity/Identity.API/appsettings.json View File

@ -12,5 +12,8 @@
"System": "Information",
"Microsoft": "Information"
}
},
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 3
- 0
src/Services/Location/Locations.API/Locations.API.csproj View File

@ -11,6 +11,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="mongocsharpdriver" Version="2.4.4" />
<PackageReference Include="MongoDB.Bson" Version="2.4.4" />


+ 8
- 1
src/Services/Location/Locations.API/Program.cs View File

@ -1,6 +1,7 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System.IO;
@ -18,11 +19,17 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
}).Build();
})
.UseApplicationInsights()
.Build();
}
}

+ 11
- 0
src/Services/Location/Locations.API/Startup.cs View File

@ -37,6 +37,14 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry(Configuration);
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
services.AddMvc(options =>
{
options.Filters.Add(typeof(HttpGlobalExceptionFilter));
@ -142,6 +150,9 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
var pathBase = Configuration["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))
{


+ 4
- 1
src/Services/Location/Locations.API/appsettings.json View File

@ -11,5 +11,8 @@
}
},
"AzureServiceBusEnabled": false,
"SubscriptionClientName": "Locations"
"SubscriptionClientName": "Locations",
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 10
- 0
src/Services/Marketing/Marketing.API/Marketing.API.csproj View File

@ -7,9 +7,12 @@
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<UserSecretsId>aspnet-Marketing.API-20161122013619</UserSecretsId>
<AssemblyName />
<ApplicationInsightsResourceId>/subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights</ApplicationInsightsResourceId>
<ApplicationInsightsAnnotationResourceId>/subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights</ApplicationInsightsAnnotationResourceId>
</PropertyGroup>
<ItemGroup>
<Folder Include="Connected Services\" />
<Folder Include="Infrastructure\MarketingMigrations\" />
<Content Include="Pics\**\*;">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
@ -18,6 +21,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="mongocsharpdriver" Version="2.4.4" />
<PackageReference Include="MongoDB.Bson" Version="2.4.4" />
@ -45,4 +51,8 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services" />
</ItemGroup>
</Project>

+ 9
- 1
src/Services/Marketing/Marketing.API/Program.cs View File

@ -3,6 +3,7 @@
using AspNetCore.Hosting;
using Microsoft.AspNetCore;
using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.IO;
@ -25,15 +26,22 @@
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseApplicationInsights()
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.UseWebRoot("Pics")
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
}).Build();
})
.UseApplicationInsights()
.Build();
}
}

+ 12
- 1
src/Services/Marketing/Marketing.API/Startup.cs View File

@ -44,6 +44,14 @@
// This method gets called by the runtime. Use this method to add services to the container.
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry(Configuration);
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
// Add framework services.
services.AddMvc(options =>
{
@ -172,6 +180,9 @@
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env,ILoggerFactory loggerFactory)
{
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
var pathBase = Configuration["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))
@ -195,7 +206,7 @@
ConfigureEventBus(app);
}
private void ConfigureAuthService(IServiceCollection services)
private void ConfigureAuthService(IServiceCollection services, ILoggerFactory loggerFactory)
{
// prevent from mapping "sub" claim to nameidentifier.
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();


+ 6
- 4
src/Services/Marketing/Marketing.API/appsettings.json View File

@ -1,4 +1,4 @@
{
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
@ -12,6 +12,8 @@
"PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/",
"AzureServiceBusEnabled": false,
"SubscriptionClientName": "Marketing",
"AzureStorageEnabled": false
}
"AzureStorageEnabled": false,
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 3
- 0
src/Services/Ordering/Ordering.API/Ordering.API.csproj View File

@ -37,6 +37,9 @@
<PackageReference Include="FluentValidation.MVC6" Version="6.4.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="MediatR" Version="3.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />


+ 8
- 1
src/Services/Ordering/Ordering.API/Program.cs View File

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure;
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@ -30,16 +31,22 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddJsonFile("settings.json");
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
})
.UseApplicationInsights()
.Build();
}
}

+ 11
- 1
src/Services/Ordering/Ordering.API/Startup.cs View File

@ -46,6 +46,14 @@
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry(Configuration);
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
// Add framework services.
services.AddMvc(options =>
{
@ -196,6 +204,8 @@
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
var pathBase = Configuration["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))
@ -203,7 +213,7 @@
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
app.UsePathBase(pathBase);
}
app.UseCors("CorsPolicy");
ConfigureAuth(app);


+ 4
- 1
src/Services/Ordering/Ordering.API/settings.json View File

@ -13,5 +13,8 @@
"AzureServiceBusEnabled": false,
"SubscriptionClientName": "Ordering",
"GracePeriodTime": "1",
"CheckUpdateTime": "30000"
"CheckUpdateTime": "30000",
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 3
- 0
src/Services/Payment/Payment.API/Payment.API.csproj View File

@ -8,6 +8,9 @@
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />
</ItemGroup>


+ 8
- 1
src/Services/Payment/Payment.API/Program.cs View File

@ -1,6 +1,7 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System.IO;
@ -18,11 +19,17 @@ namespace Payment.API
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
}).Build();
})
.UseApplicationInsights()
.Build();
}
}

+ 12
- 2
src/Services/Payment/Payment.API/Startup.cs View File

@ -32,9 +32,16 @@ namespace Payment.API
// This method gets called by the runtime. Use this method to add services to the container.
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry(Configuration);
services.Configure<PaymentSettings>(Configuration);
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
if (Configuration.GetValue<bool>("AzureServiceBusEnabled"))
{
services.AddSingleton<IServiceBusPersisterConnection>(sp =>
@ -84,8 +91,11 @@ namespace Payment.API
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
var pathBase = Configuration["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))
{


+ 4
- 1
src/Services/Payment/Payment.API/appsettings.json View File

@ -7,5 +7,8 @@
},
"PaymentSucceded": true,
"AzureServiceBusEnabled": false,
"SubscriptionClientName": "Payment"
"SubscriptionClientName": "Payment",
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 8
- 1
src/Web/WebMVC/Program.cs View File

@ -1,5 +1,6 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System.IO;
@ -17,11 +18,17 @@ namespace Microsoft.eShopOnContainers.WebMVC
.UseContentRoot(Directory.GetCurrentDirectory())
.UseHealthChecks("/hc")
.UseStartup<Startup>()
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
}).Build();
})
.UseApplicationInsights()
.Build();
}
}

+ 10
- 0
src/Web/WebMVC/Startup.cs View File

@ -31,6 +31,14 @@ namespace Microsoft.eShopOnContainers.WebMVC
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry(Configuration);
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S"))
{
// Enable K8s telemetry initializer
services.EnableKubernetes();
}
services.AddMvc();
services.AddSession();
@ -115,6 +123,8 @@ namespace Microsoft.eShopOnContainers.WebMVC
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
loggerFactory.AddAzureWebAppDiagnostics();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
if (env.IsDevelopment())
{


+ 3
- 0
src/Web/WebMVC/WebMVC.csproj View File

@ -36,6 +36,9 @@
</ItemGroup>-->
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.1" />
</ItemGroup>


+ 3
- 0
src/Web/WebMVC/appsettings.json View File

@ -18,5 +18,8 @@
"System": "Information",
"Microsoft": "Information"
}
},
"ApplicationInsights": {
"InstrumentationKey": ""
}
}

+ 6
- 0
src/Web/WebSPA/Program.cs View File

@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Hosting;
using System.IO;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Configuration;
namespace eShopConContainers.WebSPA
{
@ -17,12 +18,17 @@ namespace eShopConContainers.WebSPA
.UseStartup<Startup>()
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.ConfigureAppConfiguration((builderContext, config) =>
{
config.AddEnvironmentVariables();
})
.ConfigureLogging((hostingContext, builder) =>
{
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
})
.UseApplicationInsights()
.Build();
}
}

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

Loading…
Cancel
Save