Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Management Samples #343

Open
wants to merge 15 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 14 additions & 14 deletions CommonTasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ The Steeltoe team has built a docker image of a [basic Config server](https://gi
To start a config server backed by the Spring Cloud Samples repo:

```bash
docker run --rm -ti -p 8888:8888 --name steeltoe-config steeltoeoss/config-server
docker run --rm -it --pull=always -p 8888:8888 --name steeltoe-config steeltoe.azurecr.io/config-server
```

To start a config server backed by a folder on your local disk, start the docker image like this:

```bash
# Note: Ensure Docker is configured to share host drive/volume so the mount below will work correctly!
docker run --rm -ti -p 8888:8888 -v $PWD/steeltoe/config-repo:/config --name steeltoe-config steeltoeoss/configserver --spring.profiles.active=native
docker run --rm -it --pull=always -p 8888:8888 -v $PWD/steeltoe/config-repo:/config --name steeltoe-config steeltoe.azurecr.io/configserver --spring.profiles.active=native
```

To start a config server that registers itself with Eureka at startup (discovery-first):

```bash
docker run --rm -ti -p 8888:8888 --name steeltoe-config -e eureka.client.enabled=true steeltoeoss/config-server
docker run --rm -it --pull=always -p 8888:8888 --name steeltoe-config -e eureka.client.enabled=true steeltoe.azurecr.io/config-server
```

### Run SCCS with Java
Expand Down Expand Up @@ -56,7 +56,7 @@ Use the [cf cli](https://github.com/cloudfoundry/cli) to create a Spring Cloud C
The Steeltoe team has built a docker image of a [basic Eureka server](https://github.com/SteeltoeOSS/Dockerfiles/tree/main/eureka-server) for an easy experience getting started:

```bash
docker run --rm -ti -p 8761:8761 --name steeltoe-eureka steeltoeoss/eureka-server
docker run --rm -it --pull=always -p 8761:8761 --name steeltoe-eureka steeltoe.azurecr.io/eureka-server
```

### Run Eureka with Java
Expand All @@ -76,15 +76,15 @@ Use the [cf cli](https://github.com/cloudfoundry/cli) to create a Service Regist
This command starts a RabbitMQ server with the management plugin enabled with no credentials and default ports:

```script
docker run --rm -ti -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:3-management
docker run --rm -it --pull=always -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:3-management
```

## Consul

### Run Consul Server with Docker

```script
docker run --rm -ti -p 8500:8500 --name=steeltoe-consul hashicorp/consul
docker run --rm -it --pull=always -p 8500:8500 --name=steeltoe-consul hashicorp/consul
```

## Spring Boot Admin
Expand All @@ -94,47 +94,47 @@ docker run --rm -ti -p 8500:8500 --name=steeltoe-consul hashicorp/consul
There are multiple Spring Boot Admin images to choose from, this is only one option:

```script
docker run --rm -it -p 8080:8080 --name steeltoe-springbootadmin steeltoeoss/spring-boot-admin
docker run --rm -it --pull=always -p 9090:9090 --name steeltoe-springbootadmin steeltoe.azurecr.io/spring-boot-admin
```

## Redis

### Run Redis server with Docker

```script
docker run --rm -ti -p 6379:6379 --name redis redis
docker run --rm -it --pull=always -p 6379:6379 --name redis redis
```

## MySQL

### Run MySQL Server with Docker

```script
docker run --rm -ti -p 3306:3306 --name steeltoe-mysql -e MYSQL_ROOT_PASSWORD=steeltoe -e MYSQL_DATABASE=steeltoe -e MYSQL_USER=steeltoe -e MYSQL_PASSWORD=steeltoe mysql
docker run --rm -it --pull=always -p 3306:3306 --name steeltoe-mysql -e MYSQL_ROOT_PASSWORD=steeltoe -e MYSQL_DATABASE=steeltoe -e MYSQL_USER=steeltoe -e MYSQL_PASSWORD=steeltoe mysql
```

## SQL Server

### Run SQL Server with Docker

```script
docker run --rm -ti -p 1433:1433 --name steeltoe-sqlserver -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=St33ltoeR0cks!' mcr.microsoft.com/mssql/server
docker run --rm -it --pull=always -p 1433:1433 --name steeltoe-sqlserver -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=St33ltoeR0cks!' mcr.microsoft.com/mssql/server
```

## PostgreSQL

### Run PostgreSQL Server with Docker

```script
docker run --rm -ti -p 5432:5432 --name steeltoe-postgres -e POSTGRES_DB=steeltoe -e POSTGRES_USER=steeltoe -e POSTGRES_PASSWORD=steeltoe postgres:alpine
docker run --rm -it --pull=always -p 5432:5432 --name steeltoe-postgres -e POSTGRES_DB=steeltoe -e POSTGRES_USER=steeltoe -e POSTGRES_PASSWORD=steeltoe postgres:alpine
```

## MongoDB

### Run MongoDB Server with Docker

```script
docker run --rm -ti -p 27017:27017 --name mongoserver mongo
docker run --rm -it --pull=always -p 27017:27017 --name mongoserver mongo
```

## UAA Server for Steeltoe Samples
Expand All @@ -144,7 +144,7 @@ The Steeltoe team has created a [UAA configuration](https://github.com/SteeltoeO
### Run UAA Server with Docker

```script
docker run --rm -it -p 8080:8080 --name steeltoe-uaa steeltoe.azurecr.io/uaa-server:77.10
docker run --rm -it --pull=always -p 8080:8080 --name steeltoe-uaa steeltoe.azurecr.io/uaa-server:77.10
```

### Run Steeltoe UAA on Cloud Foundry
Expand All @@ -156,5 +156,5 @@ Refer to the [README in the Dockerfiles repository](https://github.com/SteeltoeO
### Run Zipkin Server with Docker

```script
docker run --rm -ti -p 9411:9411 --name zipkin openzipkin/zipkin
docker run --rm -it --pull=always -p 9411:9411 --name zipkin openzipkin/zipkin
```
4 changes: 2 additions & 2 deletions Configuration/src/ConfigurationProviders/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Steeltoe.Configuration.Kubernetes.ServiceBindings;
using Steeltoe.Configuration.Placeholder;
using Steeltoe.Configuration.RandomValue;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.ConfigurationProviders.Models;

// Steeltoe: Log to the console until the app has fully started.
Expand Down Expand Up @@ -32,7 +32,7 @@
builder.Services.UpgradeBootstrapLoggerFactory(bootstrapLoggerFactory);

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: map VCAP_APPLICATION and VCAP_SERVICES to IOptions<CloudFoundryApplicationOptions> and IOptions<CloudFoundryServicesOptions>
builder.Services.AddCloudFoundryOptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceSequenceEqualWithConstantPattern/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceSliceWithRangeIndexer/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceSubstringWithRangeIndexer/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceWithPrimaryConstructorParameter/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SimplifyStringInterpolation/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SpecifyStringComparison/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringEndsWithIsCultureSpecific/@EntryIndexedValue">WARNING</s:String>
Expand All @@ -105,6 +106,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VirtualMemberNeverOverridden_002ELocal/@EntryIndexedValue">WARNING</s:String>
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/ReplaceWithPrimaryConstructorParameter/PreserveReadonlyModifier/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/UseCollectionExpression/ConvertEmptyCollection/@EntryValue">SUGGESTION</s:String>
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/UseCollectionExpression/ConvertForInterfaceTargetTypes/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Steeltoe_0020Full_0020Cleanup/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Steeltoe Full Cleanup"&gt;&lt;XMLReformatCode&gt;True&lt;/XMLReformatCode&gt;&lt;CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="True" ArrangeVarStyle="True" ArrangeTrailingCommas="True" ArrangeObjectCreation="True" ArrangeDefaultValue="True" ArrangeNamespaces="True" ArrangeNullCheckingPattern="True" /&gt;&lt;CssAlphabetizeProperties&gt;True&lt;/CssAlphabetizeProperties&gt;&lt;JsInsertSemicolon&gt;True&lt;/JsInsertSemicolon&gt;&lt;FormatAttributeQuoteDescriptor&gt;True&lt;/FormatAttributeQuoteDescriptor&gt;&lt;CorrectVariableKindsDescriptor&gt;True&lt;/CorrectVariableKindsDescriptor&gt;&lt;VariablesToInnerScopesDescriptor&gt;True&lt;/VariablesToInnerScopesDescriptor&gt;&lt;StringToTemplatesDescriptor&gt;True&lt;/StringToTemplatesDescriptor&gt;&lt;JsReformatCode&gt;True&lt;/JsReformatCode&gt;&lt;JsFormatDocComments&gt;True&lt;/JsFormatDocComments&gt;&lt;RemoveRedundantQualifiersTs&gt;True&lt;/RemoveRedundantQualifiersTs&gt;&lt;OptimizeImportsTs&gt;True&lt;/OptimizeImportsTs&gt;&lt;OptimizeReferenceCommentsTs&gt;True&lt;/OptimizeReferenceCommentsTs&gt;&lt;PublicModifierStyleTs&gt;True&lt;/PublicModifierStyleTs&gt;&lt;ExplicitAnyTs&gt;True&lt;/ExplicitAnyTs&gt;&lt;TypeAnnotationStyleTs&gt;True&lt;/TypeAnnotationStyleTs&gt;&lt;RelativePathStyleTs&gt;True&lt;/RelativePathStyleTs&gt;&lt;AsInsteadOfCastTs&gt;True&lt;/AsInsteadOfCastTs&gt;&lt;HtmlReformatCode&gt;True&lt;/HtmlReformatCode&gt;&lt;AspOptimizeRegisterDirectives&gt;True&lt;/AspOptimizeRegisterDirectives&gt;&lt;RemoveCodeRedundancies&gt;True&lt;/RemoveCodeRedundancies&gt;&lt;CSUseAutoProperty&gt;True&lt;/CSUseAutoProperty&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSMakeAutoPropertyGetOnly&gt;True&lt;/CSMakeAutoPropertyGetOnly&gt;&lt;CSArrangeQualifiers&gt;True&lt;/CSArrangeQualifiers&gt;&lt;CSFixBuiltinTypeReferences&gt;True&lt;/CSFixBuiltinTypeReferences&gt;&lt;CssReformatCode&gt;True&lt;/CssReformatCode&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;&lt;/CSOptimizeUsings&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;CSharpFormatDocComments&gt;True&lt;/CSharpFormatDocComments&gt;&lt;CSReorderTypeMembers&gt;True&lt;/CSReorderTypeMembers&gt;&lt;XAMLCollapseEmptyTags&gt;False&lt;/XAMLCollapseEmptyTags&gt;&lt;CSReformatInactiveBranches&gt;True&lt;/CSReformatInactiveBranches&gt;&lt;CSUpdateFileHeader&gt;True&lt;/CSUpdateFileHeader&gt;&lt;/Profile&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Steeltoe Full Cleanup</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
Expand Down Expand Up @@ -612,6 +614,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002EMemberReordering_002EMigrations_002ECSharpFileLayoutPatternRemoveIsAttributeUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/CosmosDb/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
using Microsoft.Azure.Cosmos.Fluent;
using Microsoft.Extensions.Options;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.CosmosDb;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.CosmosDb;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
bart-vmware marked this conversation as resolved.
Show resolved Hide resolved
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup CosmosDB options, connection factory and health checks.
builder.AddCosmosDb(null, addOptions =>
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/MongoDb/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
using MongoDB.Driver;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.MongoDb;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.MongoDb;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup MongoDB options, connection factory and health checks.
builder.AddMongoDb();
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/MySql/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
using MySqlConnector;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.MySql;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.MySql;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup MySQL options, connection factory and health checks.
builder.AddMySql();
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/MySqlEFCore/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Microsoft.EntityFrameworkCore.Infrastructure;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.EntityFrameworkCore.MySql;
using Steeltoe.Connectors.MySql;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.MySqlEFCore;
using Steeltoe.Samples.MySqlEFCore.Data;

Expand All @@ -10,8 +11,11 @@
// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup MySQL options, connection factory and health checks.
builder.AddMySql();
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/PostgreSql/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
using Npgsql;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.PostgreSql;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.PostgreSql;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup PostgreSQL options, connection factory and health checks.
builder.AddPostgreSql();
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/PostgreSqlEFCore/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using Npgsql;
using Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.EntityFrameworkCore.PostgreSql;
using Steeltoe.Connectors.PostgreSql;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.PostgreSqlEFCore;
using Steeltoe.Samples.PostgreSqlEFCore.Data;

Expand All @@ -11,8 +12,11 @@
// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup PostgreSQL options, connection factory and health checks.
builder.AddPostgreSql();
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/RabbitMQ/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
using Microsoft.Extensions.Options;
using RabbitMQ.Client;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.RabbitMQ;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup RabbitMQ options, connection factory and health checks.
builder.AddRabbitMQ(null, addOptions =>
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/Redis/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
using Microsoft.Extensions.Options;
using StackExchange.Redis;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.Redis;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.Redis;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup Redis options, connection factory and health checks, optionally providing a callback to customize client settings.
builder.AddRedis(null, addOptions =>
Expand Down
8 changes: 6 additions & 2 deletions Connectors/src/SqlServerEFCore/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Connectors.EntityFrameworkCore.SqlServer;
using Steeltoe.Connectors.SqlServer;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Actuators.All;
using Steeltoe.Samples.SqlServerEFCore;
using Steeltoe.Samples.SqlServerEFCore.Data;

Expand All @@ -11,8 +12,11 @@
// Add services to the container.
builder.Services.AddControllersWithViews();

// Steeltoe: Add Cloud Foundry Config Provider for Actuator integration (not required for connectors)
builder.AddCloudFoundryConfiguration();

// Steeltoe: Add actuator endpoints.
builder.AddAllActuators();
builder.Services.AddAllActuators();

// Steeltoe: Setup SQL Server options, connection factory and health checks.
builder.AddSqlServer();
Expand Down
Loading
Loading