Updated SF Linux manifests

This commit is contained in:
Ramón Tomás 2017-10-16 16:10:40 +02:00
parent 4e7bb7a408
commit 42ce196270
24 changed files with 108 additions and 59 deletions

3
.env
View File

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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/Bus" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/Bus" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="RabbitMQ_InstanceCount" Value="-1" /> <Parameter Name="RabbitMQ_InstanceCount" Value="1" />
</Parameters> </Parameters>
</Application> </Application>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/NoSQL" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/NoSQL" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="MongoDB_InstanceCount" Value="-1" /> <Parameter Name="MongoDB_InstanceCount" Value="1" />
</Parameters> </Parameters>
</Application> </Application>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/Redis" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/Redis" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="BasketData_InstanceCount" Value="-1" /> <Parameter Name="BasketData_InstanceCount" Value="1" />
</Parameters> </Parameters>
</Application> </Application>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/Sql" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/Sql" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="SqlServer_InstanceCount" Value="-1" /> <Parameter Name="SqlServer_InstanceCount" Value="1" />
</Parameters> </Parameters>
</Application> </Application>

View File

@ -12,7 +12,8 @@
<Parameter Name="CatalogApi_InstanceCount" DefaultValue="-1" /> <Parameter Name="CatalogApi_InstanceCount" DefaultValue="-1" />
<Parameter Name="BasketApi_InstanceCount" DefaultValue="-1" /> <Parameter Name="BasketApi_InstanceCount" DefaultValue="-1" />
<Parameter Name="IdentityUrlExternal" DefaultValue="" /> <Parameter Name="IdentityUrlExternal" DefaultValue="" />
<Parameter Name="PicBaseUrl" DefaultValue="" /> <Parameter Name="PicBaseUrlCatalog" DefaultValue="" />
<Parameter Name="PicBaseUrlMarketing" DefaultValue="" />
<Parameter Name="InstrumentationKey" DefaultValue="" /> <Parameter Name="InstrumentationKey" DefaultValue="" />
</Parameters> </Parameters>
<!-- Import the ServiceManifest from the ServicePackage. The ServiceManifestName and ServiceManifestVersion <!-- Import the ServiceManifest from the ServicePackage. The ServiceManifestName and ServiceManifestVersion
@ -25,6 +26,7 @@
<EnvironmentOverrides CodePackageRef="Code"> <EnvironmentOverrides CodePackageRef="Code">
<EnvironmentVariable Name="IdentityUrlExternal" Value="[IdentityUrlExternal]"/> <EnvironmentVariable Name="IdentityUrlExternal" Value="[IdentityUrlExternal]"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value="[InstrumentationKey]"/> <EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value="[InstrumentationKey]"/>
<EnvironmentVariable Name="PicBaseUrl" Value="[PicBaseUrlMarketing]"/>
</EnvironmentOverrides> </EnvironmentOverrides>
<Policies> <Policies>
<ContainerHostPolicies CodePackageRef="Code"> <ContainerHostPolicies CodePackageRef="Code">
@ -70,7 +72,7 @@
<ServiceManifestImport> <ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="CatalogApiPkg" ServiceManifestVersion="1.0.0" /> <ServiceManifestRef ServiceManifestName="CatalogApiPkg" ServiceManifestVersion="1.0.0" />
<EnvironmentOverrides CodePackageRef="Code"> <EnvironmentOverrides CodePackageRef="Code">
<EnvironmentVariable Name="PicBaseUrl" Value="[PicBaseUrl]"/> <EnvironmentVariable Name="PicBaseUrl" Value="[PicBaseUrlCatalog]"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value="[InstrumentationKey]"/> <EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value="[InstrumentationKey]"/>
</EnvironmentOverrides> </EnvironmentOverrides>
<Policies> <Policies>

View File

@ -27,7 +27,7 @@
<EnvironmentVariable Name="EventBusConnection" Value="rabbitmq.eshoponservicefabricbus"/> <EnvironmentVariable Name="EventBusConnection" Value="rabbitmq.eshoponservicefabricbus"/>
<EnvironmentVariable Name="AzureServiceBusEnabled" Value="False"/> <EnvironmentVariable Name="AzureServiceBusEnabled" Value="False"/>
<EnvironmentVariable Name="CampaignDetailFunctionUri" Value=""/> <EnvironmentVariable Name="CampaignDetailFunctionUri" Value=""/>
<EnvironmentVariable Name="PicBaseUrl" Value="http://marketingapi.eshoponservicefabric:5110/api/v1/campaigns/[0]/pic/"/> <EnvironmentVariable Name="PicBaseUrl" Value=""/>
<EnvironmentVariable Name="AzureStorageAccountName" Value=""/> <EnvironmentVariable Name="AzureStorageAccountName" Value=""/>
<EnvironmentVariable Name="AzureStorageAccountKey" Value=""/> <EnvironmentVariable Name="AzureStorageAccountKey" Value=""/>
<EnvironmentVariable Name="AzureStorageEnabled" Value="False"/> <EnvironmentVariable Name="AzureStorageEnabled" Value="False"/>

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/eShopOnServiceFabric" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/eShopOnServiceFabric" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="MarketingApi_InstanceCount" Value="-1" /> <Parameter Name="MarketingApi_InstanceCount" Value="1" />
<Parameter Name="LocationsApi_InstanceCount" Value="-1" /> <Parameter Name="LocationsApi_InstanceCount" Value="1" />
<Parameter Name="PaymentApi_InstanceCount" Value="-1" /> <Parameter Name="PaymentApi_InstanceCount" Value="1" />
<Parameter Name="OrderingApi_InstanceCount" Value="-1" /> <Parameter Name="OrderingApi_InstanceCount" Value="1" />
<Parameter Name="CatalogApi_InstanceCount" Value="-1" /> <Parameter Name="CatalogApi_InstanceCount" Value="1" />
<Parameter Name="BasketApi_InstanceCount" Value="-1" /> <Parameter Name="BasketApi_InstanceCount" Value="1" />
<Parameter Name="IdentityUrlExternal" Value="http://#{your_sf_dns}#:5105" /> <Parameter Name="IdentityUrlExternal" Value="http://#{your_sf_dns}#:5105" />
<Parameter Name="PicBaseUrl" Value="http://#{your_sf_dns}#:5101/api/v1/catalog/items/[0]/pic/" /> <Parameter Name="PicBaseUrlCatalog" Value="http://#{your_sf_dns}#:5101/api/v1/catalog/items/[0]/pic/" />
<Parameter Name="PicBaseUrlMarketing" Value="http://#{your_sf_dns}#:5110/api/v1/campaigns/[0]/pic/" />
<Parameter Name="InstrumentationKey" Value="" /> <Parameter Name="InstrumentationKey" Value="" />
</Parameters> </Parameters>
</Application> </Application>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/eShopOnServiceFabricIdSrv" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/eShopOnServiceFabricIdSrv" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="IdentityApi_InstanceCount" Value="-1" /> <Parameter Name="IdentityApi_InstanceCount" Value="1" />
<Parameter Name="SpaClient" Value="http://#{your_sf_dns}#:5104" /> <Parameter Name="SpaClient" Value="http://#{your_sf_dns}#:5104" />
<Parameter Name="XamarinCallback" Value="http://#{your_sf_dns}#:5105/xamarincallback" /> <Parameter Name="XamarinCallback" Value="http://#{your_sf_dns}#:5105/xamarincallback" />
<Parameter Name="MvcClient" Value="http://#{your_sf_dns}#:5100" /> <Parameter Name="MvcClient" Value="http://#{your_sf_dns}#:5100" />

View File

@ -28,11 +28,17 @@
<EnvironmentVariable Name="IdentityUrl" Value=""/> <EnvironmentVariable Name="IdentityUrl" Value=""/>
<EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110"/> <EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110"/>
<EnvironmentVariable Name="LocationsUrl" Value="http://locationsapi.eshoponservicefabric:5109"/> <EnvironmentVariable Name="LocationsUrl" Value="http://locationsapi.eshoponservicefabric:5109"/>
<EnvironmentVariable Name="CatalogUrlHC" Value="http://catalogapi.eshoponservicefabric:5101/hc"/>
<EnvironmentVariable Name="OrderingUrlHC" Value="http://orderingapi.eshoponservicefabric:5102/hc"/>
<EnvironmentVariable Name="IdentityUrlHC" Value="http://identityapi.eshoponservicefabric:5105/hc"/>
<EnvironmentVariable Name="BasketUrlHC" Value="http://basketapi.eshoponservicefabric:5103/hc"/>
<EnvironmentVariable Name="PaymentUrlHC" Value="http://paymentapi.eshoponservicefabric:5108/hc"/>
<EnvironmentVariable Name="MarketingUrlHC" Value="http://marketingapi.eshoponservicefabric:5110/hc"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value=""/> <EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value=""/>
<EnvironmentVariable Name="OrchestratorType" Value="SF"/> <EnvironmentVariable Name="OrchestratorType" Value="SF"/>
</EnvironmentVariables> </EnvironmentVariables>
</CodePackage> </CodePackage>
<!-- Config package is the contents of the Config directoy under PackageRoot that contains an <!-- Config package is the contents of the Config directoy under PackageRoot that contains an
independently-updateable and versioned set of custom configuration settings for your service. --> independently-updateable and versioned set of custom configuration settings for your service. -->
<ConfigPackage Name="Config" Version="1.0.0" /> <ConfigPackage Name="Config" Version="1.0.0" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/eShopOnServiceFabricWebMVC" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/eShopOnServiceFabricWebMVC" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="WebMVC_InstanceCount" Value="-1" /> <Parameter Name="WebMVC_InstanceCount" Value="1" />
<Parameter Name="IdentityUrl" Value="http://#{your_sf_dns}#:5105" /> <Parameter Name="IdentityUrl" Value="http://#{your_sf_dns}#:5105" />
<Parameter Name="InstrumentationKey" Value="" /> <Parameter Name="InstrumentationKey" Value="" />
</Parameters> </Parameters>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/eShopOnServiceFabricWebSPA" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/eShopOnServiceFabricWebSPA" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="WebSPA_InstanceCount" Value="-1" /> <Parameter Name="WebSPA_InstanceCount" Value="1" />
<Parameter Name="CatalogUrl" Value="http://#{your_sf_dns}#:5101" /> <Parameter Name="CatalogUrl" Value="http://#{your_sf_dns}#:5101" />
<Parameter Name="OrderingUrl" Value="http://#{your_sf_dns}#:5102" /> <Parameter Name="OrderingUrl" Value="http://#{your_sf_dns}#:5102" />
<Parameter Name="BasketUrl" Value="http://#{your_sf_dns}#:5103" /> <Parameter Name="BasketUrl" Value="http://#{your_sf_dns}#:5103" />

View File

@ -22,14 +22,15 @@
<EnvironmentVariables> <EnvironmentVariables>
<EnvironmentVariable Name="ASPNETCORE_ENVIRONMENT" Value="Development"/> <EnvironmentVariable Name="ASPNETCORE_ENVIRONMENT" Value="Development"/>
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/> <EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/>
<EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101"/> <EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101/hc"/>
<EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102"/> <EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102/hc"/>
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103"/> <EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103/hc"/>
<EnvironmentVariable Name="IdentityUrl" Value="http://identityapi.eshoponservicefabric:5105"/> <EnvironmentVariable Name="IdentityUrl" Value="http://identityapi.eshoponservicefabric:5105/hc"/>
<EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110"/> <EnvironmentVariable Name="MarketingUrl" Value="http://marketingapi.eshoponservicefabric:5110/hc"/>
<EnvironmentVariable Name="LocationsUrl" Value="http://locationsapi.eshoponservicefabric:5109"/> <EnvironmentVariable Name="LocationsUrl" Value="http://locationsapi.eshoponservicefabric:5109/hc"/>
<EnvironmentVariable Name="mvc" Value="http://webmvc.eshoponservicefabric:5100"/> <EnvironmentVariable Name="PaymentUrl" Value="http://paymentapi.eshoponservicefabric:5108/hc"/>
<EnvironmentVariable Name="spa" Value="http://webspa.eshoponservicefabric:5104"/> <EnvironmentVariable Name="mvc" Value="http://webmvc.eshoponservicefabric:5100/hc"/>
<EnvironmentVariable Name="spa" Value="http://webspa.eshoponservicefabric:5104/hc"/>
<EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value=""/> <EnvironmentVariable Name="ApplicationInsights__InstrumentationKey" Value=""/>
<EnvironmentVariable Name="OrchestratorType" Value="SF"/> <EnvironmentVariable Name="OrchestratorType" Value="SF"/>
</EnvironmentVariables> </EnvironmentVariables>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Application Name="fabric:/eShopOnServiceFabricWebStatus" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Application Name="fabric:/eShopOnServiceFabricWebStatus" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters> <Parameters>
<Parameter Name="WebStatus_InstanceCount" Value="-1" /> <Parameter Name="WebStatus_InstanceCount" Value="1" />
<Parameter Name="InstrumentationKey" Value="" /> <Parameter Name="InstrumentationKey" Value="" />
</Parameters> </Parameters>
</Application> </Application>

View File

@ -209,13 +209,17 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -207,13 +207,17 @@
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -163,13 +163,17 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -181,13 +181,17 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -212,13 +212,17 @@
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -234,13 +234,17 @@
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -110,13 +110,17 @@ namespace Payment.API
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -180,13 +180,17 @@ namespace Microsoft.eShopOnContainers.WebMVC
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -134,13 +134,17 @@ namespace eShopConContainers.WebSPA
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>

View File

@ -87,13 +87,17 @@ namespace WebStatus
private void RegisterAppInsights(IServiceCollection services) private void RegisterAppInsights(IServiceCollection services)
{ {
services.AddApplicationInsightsTelemetry(Configuration); services.AddApplicationInsightsTelemetry(Configuration);
var orchestratorType = Configuration.GetValue<string>("OrchestratorType");
if (Configuration.GetValue<string>("OrchestratorType").Equals("K8S")) if (string.IsNullOrEmpty(orchestratorType))
{
return;
}
if (orchestratorType.ToUpper().Equals("K8S"))
{ {
// Enable K8s telemetry initializer // Enable K8s telemetry initializer
services.EnableKubernetes(); services.EnableKubernetes();
} }
if (Configuration.GetValue<string>("OrchestratorType").Equals("SF")) if (orchestratorType.ToUpper().Equals("SF"))
{ {
// Enable SF telemetry initializer // Enable SF telemetry initializer
services.AddSingleton<ITelemetryInitializer>((serviceProvider) => services.AddSingleton<ITelemetryInitializer>((serviceProvider) =>