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

.NET Aspire - Release 8.2 Content #1484

Merged
merged 10 commits into from
Aug 29, 2024
176 changes: 170 additions & 6 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
},
{
"source_path_from_root": "/docs/storage/azure-storage.md",
"redirect_url": "/dotnet/aspire/storage/azure-storage-components"
"redirect_url": "/dotnet/aspire/storage/azure-storage-integrations"
},
{
"source_path_from_root": "/docs/database/quickstart-sql-server.md",
"redirect_url": "/dotnet/aspire/database/sql-server-components"
"redirect_url": "/dotnet/aspire/database/sql-server-integrations"
},
{
"source_path_from_root": "/docs/get-started/quickstart-build-your-first-aspire-app.md",
"redirect_url": "/dotnet/aspire/get-started/build-your-first-aspire-app"
},
{
"source_path_from_root": "/docs/messaging/quickstart-messaging.md",
"redirect_url": "/dotnet/aspire/messaging/messaging-components"
"redirect_url": "/dotnet/aspire/messaging/messaging-integrations"
},
{
"source_path_from_root": "/docs/caching/quickstart-caching.md",
"redirect_url": "/dotnet/aspire/caching/caching-components"
"redirect_url": "/dotnet/aspire/caching/caching-integrations"
},
{
"source_path_from_root": "/docs/app-host-overview.md",
"redirect_url": "/dotnet/aspire/fundamentals/app-host-overview"
},
{
"source_path_from_root": "/docs/components-overview.md",
"redirect_url": "/dotnet/aspire/fundamentals/components-overview"
"redirect_url": "/dotnet/aspire/fundamentals/integrations-overview"
},
{
"source_path_from_root": "/docs/dashboard.md",
Expand Down Expand Up @@ -58,7 +58,11 @@
},
{
"source_path_from_root": "/docs/openai/azureai-openai-component.md",
"redirect_url": "/dotnet/aspire/azureai/azureai-openai-component"
"redirect_url": "/dotnet/aspire/azureai/azureai-openai-integration"
},
{
"source_path_from_root": "/docs/azureai/azureai-openai-component.md",
"redirect_url": "/dotnet/aspire/azureai/azureai-openai-integration"
},
{
"source_path_from_root": "/docs/troubleshooting/allowunsecuredtransport.md",
Expand Down Expand Up @@ -87,6 +91,166 @@
{
"source_path_from_root": "/docs/whats-new/preview-7.md",
"redirect_url": "/dotnet/aspire"
},
{
"source_path_from_root": "/docs/authentication/keycloak-component.md",
"redirect_url": "/dotnet/aspire/authentication/keycloak-integration"
},
{
"source_path_from_root": "/docs/azureai/azureai-search-document-component.md",
"redirect_url": "/dotnet/aspire/azureai/azureai-search-document-integration"
},
{
"source_path_from_root": "/docs/caching/caching-components-deployment.md",
"redirect_url": "/dotnet/aspire/caching/caching-integrations-deployment"
},
{
"source_path_from_root": "/docs/caching/caching-components.md",
"redirect_url": "/dotnet/aspire/caching/caching-integrations"
},
{
"source_path_from_root": "/docs/caching/stackexchange-redis-component.md",
"redirect_url": "/dotnet/aspire/caching/stackexchange-redis-integration"
},
{
"source_path_from_root": "/docs/caching/stackexchange-redis-distributed-caching-component.md",
"redirect_url": "/dotnet/aspire/caching/stackexchange-redis-distributed-caching-integration"
},
{
"source_path_from_root": "/docs/caching/stackexchange-redis-output-caching-component.md",
"redirect_url": "/dotnet/aspire/caching/stackexchange-redis-output-caching-integration"
},
{
"source_path_from_root": "/docs/database/azure-cosmos-db-component.md",
"redirect_url": "/dotnet/aspire/database/azure-cosmos-db-integration"
},
{
"source_path_from_root": "/docs/database/azure-cosmos-db-entity-framework-component.md",
"redirect_url": "/dotnet/aspire/database/azure-cosmos-db-entity-framework-integration"
},
{
"source_path_from_root": "/docs/database/milvus-component.md",
"redirect_url": "/dotnet/aspire/database/milvus-integration"
},
{
"source_path_from_root": "/docs/database/mongodb-component.md",
"redirect_url": "/dotnet/aspire/database/mongodb-integration"
},
{
"source_path_from_root": "/docs/database/mysql-component.md",
"redirect_url": "/dotnet/aspire/database/mysql-integration"
},
{
"source_path_from_root": "/docs/database/mysql-entity-framework-component.md",
"redirect_url": "/dotnet/aspire/database/mysql-entity-framework-integration"
},
{
"source_path_from_root": "/docs/database/oracle-entity-framework-component.md",
"redirect_url": "/dotnet/aspire/database/oracle-entity-framework-integration"
},
{
"source_path_from_root": "/docs/database/postgresql-component.md",
"redirect_url": "/dotnet/aspire/database/postgresql-integration"
},
{
"source_path_from_root": "/docs/database/postgresql-entity-framework-component.md",
"redirect_url": "/dotnet/aspire/database/postgresql-entity-framework-integration"
},
{
"source_path_from_root": "/docs/database/qdrant-component.md",
"redirect_url": "/dotnet/aspire/database/qdrant-integration"
},
{
"source_path_from_root": "/docs/database/sql-server-component-deployment.md",
"redirect_url": "/dotnet/aspire/database/sql-server-integration-deployment"
},
{
"source_path_from_root": "/docs/database/sql-server-component.md",
"redirect_url": "/dotnet/aspire/database/sql-server-integration"
},
{
"source_path_from_root": "/docs/database/sql-server-components.md",
"redirect_url": "/dotnet/aspire/database/sql-server-integrations"
},
{
"source_path_from_root": "/docs/database/sql-server-entity-framework-component.md",
"redirect_url": "/dotnet/aspire/database/sql-server-entity-framework-integration"
},
{
"source_path_from_root": "/docs/extensibility/custom-component.md",
"redirect_url": "/dotnet/aspire/extensibility/custom-integration"
},
{
"source_path_from_root": "/docs/extensibility/implement-auth-from-resource-to-component.md",
"redirect_url": "/dotnet/aspire/extensibility/implement-auth-from-resource-to-integration"
},
{
"source_path_from_root": "/docs/fundamentals/components-overview.md",
"redirect_url": "/dotnet/aspire/fundamentals/integrations-overview"
},
{
"source_path_from_root": "/docs/includes/component-health-checks.md",
"redirect_url": "/dotnet/includes/integration-health-checks"
},
{
"source_path_from_root": "/docs/includes/component-observability-and-telemetry.md",
"redirect_url": "/dotnet/includes/integration-observability-and-telemetry"
},
{
"source_path_from_root": "/docs/logging/seq-component.md",
"redirect_url": "/dotnet/aspire/logging/seq-integration"
},
{
"source_path_from_root": "/docs/messaging/azure-event-hubs-component.md",
"redirect_url": "/dotnet/aspire/messaging/azure-event-hubs-integration"
},
{
"source_path_from_root": "/docs/messaging/azure-service-bus-component.md",
"redirect_url": "/dotnet/aspire/messaging/azure-service-bus-integration"
},
{
"source_path_from_root": "/docs/messaging/azure-web-pubsub-component.md",
"redirect_url": "/dotnet/aspire/messaging/azure-web-pubsub-integration"
},
{
"source_path_from_root": "/docs/messaging/kafka-component.md",
"redirect_url": "/dotnet/aspire/messaging/kafka-integration"
},
{
"source_path_from_root": "/docs/messaging/messaging-components.md",
"redirect_url": "/dotnet/aspire/messaging/messaging-integrations"
},
{
"source_path_from_root": "/docs/messaging/nats-component.md",
"redirect_url": "/dotnet/aspire/messaging/nats-integration"
},
{
"source_path_from_root": "/docs/messaging/rabbitmq-client-component.md ",
"redirect_url": "/dotnet/aspire/messaging/rabbitmq-client-integration"
},
{
"source_path_from_root": "/docs/search/elasticsearch-component.md",
"redirect_url": "/dotnet/aspire/search/elasticsearch-integration"
},
{
"source_path_from_root": "/docs/security/azure-security-key-vault-component.md",
"redirect_url": "/dotnet/aspire/security/azure-security-key-vault-integration"
},
{
"source_path_from_root": "/docs/storage/azure-storage-components.md",
"redirect_url": "/dotnet/aspire/storage/azure-storage-integrations"
},
{
"source_path_from_root": "/docs/storage/azure-storage-blobs-component.md",
"redirect_url": "/dotnet/aspire/storage/azure-storage-blobs-integration"
},
{
"source_path_from_root": "/docs/storage/azure-storage-queues-component.md",
"redirect_url": "/dotnet/aspire/storage/azure-storage-queues-integration"
},
{
"source_path_from_root": "/docs/storage/azure-storage-tables-component.md",
"redirect_url": "/dotnet/aspire/storage/azure-storage-tables-integration"
}
]
}
1 change: 1 addition & 0 deletions docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
"Linux",
"localhost",
"MailDev",
"Milvus",
"MongoDB",
"MySQL",
"NATS",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: .NET Aspire Keycloak component
description: This article describes the .NET Aspire Keycloak component.
title: .NET Aspire Keycloak integration
description: This article describes the .NET Aspire Keycloak integration.
ms.topic: how-to
ms.date: 07/23/2024
ms.date: 08/12/2024
---

# .NET Aspire Keycloak component
# .NET Aspire Keycloak integration

In this article, you learn how to use the .NET Aspire Keycloak component. The `Aspire.Keycloak.Authentication` library registers JwtBearer and OpenId Connect authentication handlers in the DI container for connecting to a Keycloak server.
In this article, you learn how to use the .NET Aspire Keycloak integration. The `Aspire.Keycloak.Authentication` library registers JwtBearer and OpenId Connect authentication handlers in the DI container for connecting to a Keycloak server.

## Prerequisites

Expand All @@ -18,7 +18,7 @@ In this article, you learn how to use the .NET Aspire Keycloak component. The `A

## Get started

To get started with the .NET Aspire Keycloak component, install the [Aspire.Keycloak.Authentication](https://www.nuget.org/packages/Aspire.Keycloak.Authentication) NuGet package in the consuming client project.
To get started with the .NET Aspire Keycloak integration, install the [Aspire.Keycloak.Authentication](https://www.nuget.org/packages/Aspire.Keycloak.Authentication) NuGet package in the client-consuming project, i.e., the project for the application that uses the Keycloak client.

### [.NET CLI](#tab/dotnet-cli)

Expand Down Expand Up @@ -130,5 +130,5 @@ builder.Services.AddAuthentication(oidcScheme)
## See also

- [Keycloak](https://www.keycloak.org/)
- [.NET Aspire components](../fundamentals/components-overview.md)
- [.NET Aspire integrations](../fundamentals/integrations-overview.md)
- [.NET Aspire GitHub repo](https://github.com/dotnet/aspire)
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: .NET Aspire Azure AI OpenAI component
description: Learn how to use the .NET Aspire Azure AI OpenAI component.
title: .NET Aspire Azure AI OpenAI integration
description: Learn how to use the .NET Aspire Azure AI OpenAI integration.
ms.topic: how-to
ms.date: 08/20/2024
ms.date: 08/12/2024
---

# .NET Aspire Azure AI OpenAI component
# .NET Aspire Azure AI OpenAI integration

In this article, you learn how to use the .NET Aspire Azure AI OpenAI client. The `Aspire.Azure.AI.OpenAI` library is used to register an `OpenAIClient` in the dependency injection (DI) container for consuming Azure AI OpenAI or OpenAI functionality. It enables corresponding logging and telemetry.

Expand All @@ -16,7 +16,7 @@ For more information on using the `OpenAIClient`, see [Quickstart: Get started g
- Azure subscription: [create one for free](https://azure.microsoft.com/free/).
- Azure AI OpenAI or OpenAI account: [create an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource).

To get started with the .NET Aspire Azure AI OpenAI component, install the [Aspire.Azure.AI.OpenAI](https://www.nuget.org/packages/Aspire.Azure.AI.OpenAI) NuGet package in the consuming client project.
To get started with the .NET Aspire Azure AI OpenAI integration, install the [Aspire.Azure.AI.OpenAI](https://www.nuget.org/packages/Aspire.Azure.AI.OpenAI) NuGet package in the client-consuming project, i.e., the project for the application that uses the Azure AI OpenAI client.

### [.NET CLI](#tab/dotnet-cli)

Expand All @@ -37,7 +37,7 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac

## Example usage

In the _:::no-loc text="Program.cs":::_ file of your component-consuming project, call the extension method to register an `OpenAIClient` for use via the dependency injection container. The method takes a connection name parameter.
In the _:::no-loc text="Program.cs":::_ file of your client-consuming project, call the extension method to register an `OpenAIClient` for use via the dependency injection container. The method takes a connection name parameter.

```csharp
builder.AddAzureOpenAIClient("openAiConnectionName");
Expand Down Expand Up @@ -84,28 +84,15 @@ builder.AddProject<Projects.ExampleProject>()
.WithReference(openai);
```

The `AddAzureOpenAI` method reads connection information from the app host's configuration (for example, from "user secrets") under the `ConnectionStrings:openAiConnectionName` config key. The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> method passes that connection information into a connection string named `openAiConnectionName` in the `ExampleProject` project. In the _:::no-loc text="Program.cs":::_ file of ExampleProject, the connection can be consumed using:
The `AddAzureAIOpenAI` method will read connection information from the app host's configuration (for example, from "user secrets") under the `ConnectionStrings:openAiConnectionName` config key. The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> method passes that connection information into a connection string named `openAiConnectionName` in the `ExampleProject` project. In the _:::no-loc text="Program.cs":::_ file of ExampleProject, the connection can be consumed using:

```csharp
builder.AddAzureOpenAI("openAiConnectionName");
```

To add an Azure OpenAI Deployment resource to the application model, chain a call to <xref:Aspire.Hosting.AzureOpenAIExtensions.AddDeployment%2A> method:

```csharp
builder.AddAzureOpenAI("openAiConnectionName")
.AddDeployment(
new AzureOpenAIDeployment(
name: "chatmodel",
modelName: "gpt-4o",
modelVersion: "2024-05-13",
skuName: "Standard",
skuCapacity: 1000));
builder.AddAzureAIOpenAI("openAiConnectionName");
```

## Configuration

The .NET Aspire Azure AI OpenAI component provides multiple options to configure the connection based on the requirements and conventions of your project.
The .NET Aspire Azure AI OpenAI integration provides multiple options to configure the connection based on the requirements and conventions of your project.

### Use a connection string

Expand Down Expand Up @@ -145,7 +132,7 @@ In order to connect to the non-Azure OpenAI service, drop the `Endpoint` propert

### Use configuration providers

The .NET Aspire Azure AI OpenAI component supports <xref:Microsoft.Extensions.Configuration>. It loads the `AzureOpenAISettings` from configuration by using the `Aspire:Azure:AI:OpenAI` key. Example _:::no-loc text="appsettings.json":::_ that configures some of the options:
The .NET Aspire Azure AI OpenAI integration supports <xref:Microsoft.Extensions.Configuration>. It loads the `AzureOpenAISettings` from configuration by using the `Aspire:Azure:AI:OpenAI` key. Example _:::no-loc text="appsettings.json":::_ that configures some of the options:

```json
{
Expand Down Expand Up @@ -180,11 +167,11 @@ builder.AddAzureAIOpenAI(
options => options.Diagnostics.ApplicationId = "CLIENT_ID"));
```

[!INCLUDE [component-observability-and-telemetry](../includes/component-observability-and-telemetry.md)]
[!INCLUDE [integration-observability-and-telemetry](../includes/integration-observability-and-telemetry.md)]

### Logging

The .NET Aspire Azure AI OpenAI component uses the following log categories:
The .NET Aspire Azure AI OpenAI integration uses the following log categories:

- `Azure`
- `Azure.Core`
Expand All @@ -193,5 +180,5 @@ The .NET Aspire Azure AI OpenAI component uses the following log categories:
## See also

- [Azure AI OpenAI docs](/azure/ai-services/openai/overview)
- [.NET Aspire components](../fundamentals/components-overview.md)
- [.NET Aspire integrations](../fundamentals/integrations-overview.md)
- [.NET Aspire GitHub repo](https://github.com/dotnet/aspire)
Loading
Loading