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

Updates for v4 #330

Merged
merged 36 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5f8c41b
Update Welcome documentation
bart-vmware Oct 7, 2024
ebd37dc
Update Bootstrap documentation
bart-vmware Oct 2, 2024
1e8d625
Update Configuration documentation
bart-vmware Oct 2, 2024
88c8a9f
Update Logging documentation
bart-vmware Oct 3, 2024
d88fe24
Update Management documentation
bart-vmware Oct 4, 2024
b9e43d6
Update File Shares documentation
bart-vmware Oct 4, 2024
ca060d9
Update Connectors documentation
bart-vmware Oct 4, 2024
6380ad9
Update Discovery documentation
bart-vmware Oct 4, 2024
7836649
Update Initializr documentation
bart-vmware Oct 21, 2024
f041480
Update Tracing documentation (needs work)
bart-vmware Nov 18, 2024
f744ffb
Update Security documentation (needs work)
bart-vmware Nov 18, 2024
2441919
update metadata-layer-changed filter
TimHess Nov 18, 2024
2a9bd55
Guides: add top banner to every file, revert preliminary changes (pac…
bart-vmware Nov 19, 2024
9762915
Apply suggestions from code review
bart-vmware Nov 20, 2024
7451f2e
Review feedback: remove note for old Tanzu versions
bart-vmware Nov 20, 2024
c5abcd2
Review feedback: remove conference materials
bart-vmware Nov 20, 2024
f4011ca
Apply suggestions from code review
bart-vmware Nov 20, 2024
b792b1a
Review feedback: update banner for Steeltoe v2
bart-vmware Nov 20, 2024
fba618a
Review feedback: update remaining banners with suggested text
bart-vmware Nov 20, 2024
b0ad843
Review feedback: recommend BootstrapLogger
bart-vmware Nov 20, 2024
14aa9ee
Review feedback: remove the note that only Eureka can be used with di…
bart-vmware Nov 20, 2024
70cc3c2
Review feedback: clarify exposure settings
bart-vmware Nov 20, 2024
fc2ff27
Review feedback: remove Windows-only note on thread dumps
bart-vmware Nov 20, 2024
3d49b48
Review feedback: update another banner for v2
bart-vmware Nov 20, 2024
16cb0b9
Review feedback: Updated banners for messaging guide
bart-vmware Nov 20, 2024
c030760
Review feedback: Add note for 'beans'
bart-vmware Nov 20, 2024
7cdf9cc
Apply suggestions from code review
bart-vmware Nov 21, 2024
4cec129
Review feedback: Add KeysToSanitize
bart-vmware Nov 21, 2024
c616ab9
Review feedback: repeat tip on AddAllActuators
bart-vmware Nov 21, 2024
5088f63
Review feedback: indicate defaults for SBA
bart-vmware Nov 21, 2024
b7a16a2
Trim trailing whitespace in *.md, ensure blank line before EOF
bart-vmware Nov 21, 2024
ab7887b
Replace TABs with spaces in *.md
bart-vmware Nov 21, 2024
e303565
Trim trailing whitespace in other non-binary files, ensure blank line…
bart-vmware Nov 21, 2024
fe2d569
Replace TABs with spaces in other non-binary files
bart-vmware Nov 21, 2024
8da7c4a
Review feedback: clarify CF security
bart-vmware Nov 21, 2024
0b1a165
Review feedback: alternate port doesn't apply to /cloudfoundryapplica…
bart-vmware Nov 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build-and-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
metadata-layer-changed:
- .github/workflows/build-and-stage.yml
- Dockerfile-metadata
- '/api-*.*'
- 'api/**'
- 'articles/**'
- 'guides/**'
- build-metadata.sh
- docfx.json
- name: Declare image versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stage-prod-swap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: |
az webapp config appsettings set --resource-group steeltoe --name docs-steeltoe --slot Staging --settings mainsite_host=https://staging.steeltoe.io
az webapp restart --resource-group steeltoe --name docs-steeltoe --slot Staging

2 changes: 1 addition & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"MD013": false,
"MD033": { "allowed_elements": ["img"] }
}
}
2 changes: 1 addition & 1 deletion api/v2/circuitbreaker/hystrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ All Hystrix command settings should be prefixed with `hystrix:command:`.

`hystrix:command:default:execution:isolation:thread:timeoutInMilliseconds=750`

To configure the settings for a command in code, use `HystrixCommandOptions` from the `Steeltoe.CircuitBreaker.HystrixBase` package.
To configure the settings for a command in code, use `HystrixCommandOptions` from the `Steeltoe.CircuitBreaker.HystrixBase` package.

All configured command-specific settings, as described earlier in #4, should be prefixed with `hystrix:command:HYSTRIX_COMMAND_KEY:`, where `HYSTRIX_COMMAND_KEY` is the `name` of the command. The following example configures the timeout for the Hystrix command with a name of `sample` to be 750 milliseconds:

Expand Down
6 changes: 3 additions & 3 deletions api/v2/configuration/cloud-foundry-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ public class HomeController : Controller

#### ConfigureCloudFoundryService

As an alternative to using `CloudFoundryServicesOptions` to access Cloud Foundry service data you can also use `ConfigureCloudFoundryService<TOption>()` or `ConfigureCloudFoundryServices<TOption>()` to easily gain access to service data.
As an alternative to using `CloudFoundryServicesOptions` to access Cloud Foundry service data you can also use `ConfigureCloudFoundryService<TOption>()` or `ConfigureCloudFoundryServices<TOption>()` to easily gain access to service data.

These methods allow you to define an Option class which represents a particular type of Cloud Foundry service binding and then use either method to select that data from `VCAP_SERVICES` and bind the data to it.

To do this, you first need to create a Options class that derives from `AbstractServiceOptions`. That class must match the data provided in `VCAP_SERVICES`.
To do this, you first need to create a Options class that derives from `AbstractServiceOptions`. That class must match the data provided in `VCAP_SERVICES`.

Here is an example that illustrates how to do this for a MySql service binding on PCF:

Expand All @@ -210,7 +210,7 @@ public class MySqlCredentials

Next in your `Startup` class you can use either `ConfigureCloudFoundryService<TOption>()` or `ConfigureCloudFoundryServices<TOption>()` to bind the service data from `VCAP_SERVICES` to your `TOption`. There are multiple ways to do this depending on your needs.

You can use `ConfigureCloudFoundryService<TOption>()` method to select a specific Cloud Foundry service binding from `VCAP_SERVICES` by specifying a service name. Or you can use `ConfigureCloudFoundryServices<TOption>()` to bind to all services of a particular type by specifying a Cloud Foundry service label.
You can use `ConfigureCloudFoundryService<TOption>()` method to select a specific Cloud Foundry service binding from `VCAP_SERVICES` by specifying a service name. Or you can use `ConfigureCloudFoundryServices<TOption>()` to bind to all services of a particular type by specifying a Cloud Foundry service label.

Here are some examples:

Expand Down
2 changes: 1 addition & 1 deletion api/v2/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Steeltoe adds four additional configuration providers to the preceding list:
* Placeholder resolvers
* RandomValue generator

The following sections provide more more detail on each of these new providers.
The following sections provide more detail on each of these new providers.
2 changes: 1 addition & 1 deletion api/v2/configuration/placeholder-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ To add this type of NuGet to your project, add a `PackageReference` resembling t

### Add Configuration Provider

In order to have placeholders resolved when accessing your configuration data, you need to add the Placeholder resolver provider to the `ConfigurationBuilder`.
In order to have placeholders resolved when accessing your configuration data, you need to add the Placeholder resolver provider to the `ConfigurationBuilder`.

There are four different ways in which you can do this.

Expand Down
4 changes: 2 additions & 2 deletions api/v2/configuration/random-value-provider.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RandomValue Provider

Sometimes you might find the need to generate random values as part of your applications configuration values.
Sometimes you might find the need to generate random values as part of your applications configuration values.

The Steeltoe RandomValue generator is a configuration provider which you can use to do just that. It can produce integers, longs, uuids or strings as shown in the following examples:

Expand Down Expand Up @@ -65,7 +65,7 @@ To do this add a `PackageReference` resembling the following:

### Add Configuration Provider

In order to have the ability to generate random values from the configuration, you need to add the RandomValue generatore provider to the `ConfigurationBuilder`.
In order to have the ability to generate random values from the configuration, you need to add the RandomValue generatore provider to the `ConfigurationBuilder`.

The following example shows how to add to this:

Expand Down
2 changes: 1 addition & 1 deletion api/v2/developer-tools/cli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Steeltoe CLI
# Steeltoe CLI
Steeltoe CLI simplifies the process of running and deploying Steeltoe applications. With this tooling you can, with minimal commands, run your application locally while also being able to easily deploy to Kubernetes or Cloud Foundry.

There are 3 basic steps when using Steeltoe Tooling:
Expand Down
4 changes: 2 additions & 2 deletions api/v2/developer-tools/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Developer Tools

## Steeltoe CLI
## Steeltoe CLI
Steeltoe CLI simplifies the process of running and deploying Steeltoe applications. With this tooling you can, with minimal commands, run your application locally while also being able to easily deploy to Kubernetes or Cloud Foundry.

## Initializr
The Steeltoe Initializr project is an application generator meant to get cloud-native .NET developers going very quickly.

Check out our [Getting Started Guide for Initializr](https://steeltoe.io/initializr)
Check out our [Getting Started Guide for Initializr](https://steeltoe.io/initializr)
2 changes: 1 addition & 1 deletion api/v2/discovery/hashicorp-consul.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In order to use the Steeltoe Discovery client, you need to do the following:
### Consul Settings

To get the Steeltoe Discovery client to properly communicate with the Consul server, you need to provide a few configuration settings to the client. There are two sections you may need to configure.
To get the Steeltoe Discovery client to properly communicate with the Consul server, you need to provide a few configuration settings to the client. There are two sections you may need to configure.

The first pertains to configuring the information needed to connect to the Consul server. All of these settings should start with `consul:`

Expand Down
2 changes: 1 addition & 1 deletion api/v2/logging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Steeltoe adds a Logging provider to the set of available logging packages in order to support the Steeltoe Management Logger endpoint.

When used with the Steeltoe Logger Management endpoint, this package enables dynamically changing the logging levels for running applications with the [TAS Apps Manager](https://docs.pivotal.io/pivotalcf/2-0/console/index.html) on Cloud Foundry.
When used with the Steeltoe Logger Management endpoint, this package enables dynamically changing the logging levels for running applications with the [TAS Apps Manager](https://docs.pivotal.io/pivotalcf/2-0/console/index.html) on Cloud Foundry.
6 changes: 3 additions & 3 deletions api/v2/management/health.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Steeltoe health management endpoint can be used to check and return the stat
|Name|Description|
|---|---|
|`never`|Details are never shown.|
|`whenauthorized`|Details are only shown to authorized users. |
|`whenauthorized`|Details are only shown to authorized users. |
|`always`|Details are always shown.|

The default value is `always`. Authorized roles can be configured using `management:endpoints:health:claim or management:endpoints:health:role`. A user is considered to be authorized when they are in the given role or have the specified claim. For example:
Expand Down Expand Up @@ -202,7 +202,7 @@ public void ConfigureServices(IServiceCollection services)
var connectionString = cm.Get<MySqlConnectionInfo>().ConnectionString;

// Add microsoft community health checks from xabaril
services.AddHealthChecks().AddMySql(connectionString);
services.AddHealthChecks().AddMySql(connectionString);

// Add in a MySql connection (this method also adds an IHealthContributor for it)
services.AddMySqlConnection(Configuration); // will now use community health check instead of Steeltoe health check
Expand All @@ -218,7 +218,7 @@ public void ConfigureServices(IServiceCollection services)
```

>NOTE: AddMySqlConnection will default to the ASP.NET Core health check if found in the service container. This behavior can be toggled off by passing AddMySqlConnection(Configuration, addSteeltoeHealthChecks: true) which will add both health checks. Be warned that this will make the Health check endpoint slower by calling multiple health checks for the same service.

```csharp
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
Expand Down
4 changes: 2 additions & 2 deletions api/v2/management/hypermedia.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ The purpose of this endpoint is to provide hypermedia for all the management end

## Base Context Path

This actuator also creates a base context path from which the endpoints can be accessed. The hypermedia actuator enables the following functionality:
This actuator also creates a base context path from which the endpoints can be accessed. The hypermedia actuator enables the following functionality:

* Exposes an endpoint that can be queried to return the IDs of and links to all of the enabled management endpoints in the application.
* Adds extension methods that simplify adding all of the Steeltoe management endpoints with HTTP access to the application.

Expand Down
2 changes: 1 addition & 1 deletion api/v2/management/loggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The default path to the Loggers endpoint is computed by combining the global `pa

The coding steps you take to enable HTTP access to the Loggers endpoint together with how to use the Steeltoe Logging provider, differs depending on the type of .NET application your are developing. The sections which follow describe the steps needed for each of the supported application types.

>NOTE: The Steeltoe logging provider is a wrapper around the [Microsoft Console Logging](https://github.com/aspnet/Logging) provider from Microsoft. This wrapper allows querying defined loggers and modifying the levels dynamically at runtime.
>NOTE: The Steeltoe logging provider is a wrapper around the [Microsoft Console Logging](https://github.com/aspnet/Logging) provider from Microsoft. This wrapper allows querying defined loggers and modifying the levels dynamically at runtime.
### ASP.NET Core App

Expand Down
4 changes: 2 additions & 2 deletions api/v2/management/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PM>Install-Package Steeltoe.Management.EndpointCore -Version 2.5.2

The [Metrics Forwarder for TAS](https://docs.pivotal.io/metrics-forwarder/) is no longer supported on Tanzu Application Service (TAS) v2.5 and later. To emit custom metrics on PAS v2.5 or later, use the Metric Registrar. For more information about enabling and configuring the Metric Registrar, see [Configuring the Metric Registrar](https://docs.pivotal.io/platform/application-service/2-8/metric-registrar/index.html).

To register your endpoint for metrics collection install the metrics-registrar plugin and use it to register your endpoint.
To register your endpoint for metrics collection install the metrics-registrar plugin and use it to register your endpoint.

`cf install-plugin -r CF-Community "metric-registrar"`

Expand All @@ -74,7 +74,7 @@ scrape_configs:
static_configs:
- targets: ['host.docker.internal:8000']
```
Running Prometheus server with this configuration will allow you view metrics in the built-in UI. Other visualization tools such as [Grafana](https://grafana.com/docs/grafana/latest/features/datasources/prometheus/) can then be configured to use Prometheus as a datasource.
Running Prometheus server with this configuration will allow you view metrics in the built-in UI. Other visualization tools such as [Grafana](https://grafana.com/docs/grafana/latest/features/datasources/prometheus/) can then be configured to use Prometheus as a datasource.

```docker
docker run -d --name=prometheus -p 9090:9090 -v <Absolute-Path>/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml
Expand Down
4 changes: 2 additions & 2 deletions api/v2/security/credhub-api-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ You can use `await _credHub.FindAllPathsAsync()` to retrieve a list of all known

#### Interpolate

One of the more powerful features of CredHub is the `Interpolate` endpoint. With one request, you may retrieve N number of credentials that have been stored in CredHub. To use it from .NET, call `await _credHub.InterpolateServiceDataAsync(serviceData)`, where `serviceData` is the string representation of `VCAP_SERVICES`. `CredHubClient` returns the interpolated `VCAP_SERVICES` data as a string.
One of the more powerful features of CredHub is the `Interpolate` endpoint. With one request, you may retrieve N number of credentials that have been stored in CredHub. To use it from .NET, call `await _credHub.InterpolateServiceDataAsync(serviceData)`, where `serviceData` is the string representation of `VCAP_SERVICES`. `CredHubClient` returns the interpolated `VCAP_SERVICES` data as a string.

The following example shows a typical request object for the `Interpolate` endpoint:

Expand Down Expand Up @@ -370,4 +370,4 @@ You can delete a permission associated with a credential. The following example

```csharp
bool response = await _credHub.DeletePermissionAsync("/example-password", "uaa-user:credhub_client");
```
```
2 changes: 1 addition & 1 deletion api/v2/security/jwt-authentication-in-asp.NET-WCF.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ To pass a user's token (instead of the application's) to the backing service, fi
// apply the behavior, including the user's token
sRef.Endpoint.EndpointBehaviors.Add(new JwtHeaderEndpointBehavior(new CloudFoundryOptions(ApplicationConfig.Configuration), token));
string serviceResponse = await sRef.GetDataAsync();
```
```
2 changes: 1 addition & 1 deletion api/v2/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
name: Apache Geode/GemFire
- name: Service Discovery
topicHref: discovery/
items:
items:
- topicHref: discovery/initialize-discovery-client.md
name: Initialize Discovery Client
- topicHref: discovery/discovering-services.md
Expand Down
2 changes: 1 addition & 1 deletion api/v2/tracing/distributed-tracing-exporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The following table describes the settings that you can apply to the exporter:
|serviceName|app name used in log messages|null|
|useShortTraceIds|truncate the ids to 8 bytes instead of 16, use for backwards compatibility with Spring Sleuth, PCF Metrics, etc.|true|

**Note**: **Each setting above must be prefixed with `management:tracing:exporter:zipkin`**.
**Note**: **Each setting above must be prefixed with `management:tracing:exporter:zipkin`**.

#### Add and Use Zipkin Exporter

Expand Down
2 changes: 1 addition & 1 deletion api/v3/circuitbreaker/hystrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Each setting is prefixed with the key `RequestLog`, as shown in the following ex

#### Thread Pool Settings

Hystrix commands use thread pools to implement an underlying isolation pattern for resilience and fault tolerance features. By default each command will create its own 'named' thread pool and every time an instance of that command is executed, a thread from that thread pool will be chosen and used.
Hystrix commands use thread pools to implement an underlying isolation pattern for resilience and fault tolerance features. By default each command will create its own 'named' thread pool and every time an instance of that command is executed, a thread from that thread pool will be chosen and used.

Optionally, you can configure your own 'named' thread pool (see next section) and in turn associate one or more commands to a specific thread pool. The describes the settings that control what thread pool a command uses when executing:

Expand Down
2 changes: 1 addition & 1 deletion api/v3/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Steeltoe adds additional configuration providers to the preceding list:
* RandomValue generator
* Spring Cloud Config Server

The following sections provide more more detail on each of these new providers.
The following sections provide more detail on each of these new providers.
2 changes: 1 addition & 1 deletion api/v3/discovery/hashicorp-consul.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The health check for a Consul service instance defaults to `/actuator/health`, w

## Configuring Metadata

Steeltoe `IServiceInstance` has an `IDictionary<string, string> Metadata` property that is used to obtain metadata settings for an instance.
Steeltoe `IServiceInstance` has an `IDictionary<string, string> Metadata` property that is used to obtain metadata settings for an instance.

Steeltoe `IServiceInstance` also has a `IEnumerable<string> Tags`, which can be used to approximate metadata registration.

Expand Down
2 changes: 1 addition & 1 deletion api/v3/management/cloud-foundry.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class Startup
//services.AddCloudFoundryActuators(Configuration);
// if you prefer to add individual actuators
//services.AddCloudFoundryActuator(Configuration);
...
...
}
public void Configure(IApplicationBuilder app)
{
Expand Down
4 changes: 2 additions & 2 deletions api/v3/management/dbmigrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void ConfigureServices(IServiceCollection services)
{
// Add Db Migration Actuator
services.AddDbMigrationsActuator();

// Other registrations...
}

Expand All @@ -73,7 +73,7 @@ The default path for this endpoint is `/actuator/dbmigrations` and the response

```json
{
"TestDataContext":
"TestDataContext":
{
"pendingMigrations": [
"2021078158434_AddNewTable"
Expand Down
Loading
Loading