From d7e7faae42aae52e4843802523a164b685d5aa80 Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 19 Jul 2024 14:25:32 -0500 Subject: [PATCH 01/36] Initial placeholder bits, to let other's help out --- docfx.json | 1 + docs/app-host/withdockerfile.md | 23 ++++++++++++++ docs/caching/garnet-component.md | 31 +++++++++++++++++++ docs/caching/valkey-component.md | 31 +++++++++++++++++++ docs/database/milvus-component.md | 22 +++++++++++++ .../build-aspire-apps-with-nodejs.md | 4 +-- .../build-aspire-apps-with-python.md | 18 +++++++++++ docs/index.yml | 15 +++++++++ docs/search/elasticsearch-component.md | 26 ++++++++++++++++ docs/toc.yml | 15 +++++++-- 10 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 docs/app-host/withdockerfile.md create mode 100644 docs/caching/garnet-component.md create mode 100644 docs/caching/valkey-component.md create mode 100644 docs/database/milvus-component.md create mode 100644 docs/get-started/build-aspire-apps-with-python.md create mode 100644 docs/search/elasticsearch-component.md diff --git a/docfx.json b/docfx.json index a824cea8f7..c1c07ea804 100644 --- a/docfx.json +++ b/docfx.json @@ -149,6 +149,7 @@ "Docker", "Dockerfile", "EF Core", + "Elasticsearch", "Entity Framework Core", "Git", "GitHub", diff --git a/docs/app-host/withdockerfile.md b/docs/app-host/withdockerfile.md new file mode 100644 index 0000000000..9414d92ffe --- /dev/null +++ b/docs/app-host/withdockerfile.md @@ -0,0 +1,23 @@ +--- +title: Add Dockerfiles to your .NET app model +description: Learn how to add Dockerfiles to your .NET app model. +ms.date: 07/19/2024 +--- + +# Add Dockerfiles to your .NET app model + + \ No newline at end of file diff --git a/docs/caching/garnet-component.md b/docs/caching/garnet-component.md new file mode 100644 index 0000000000..db6eaaaace --- /dev/null +++ b/docs/caching/garnet-component.md @@ -0,0 +1,31 @@ +--- +title: .NET Aspire Garnet component +description: This article describes the .NET Aspire Garnet component features and capabilities +ms.topic: how-to +ms.date: 07/19/2024 +--- + +# .NET Aspire Garnet component + + \ No newline at end of file diff --git a/docs/caching/valkey-component.md b/docs/caching/valkey-component.md new file mode 100644 index 0000000000..1c71be80cf --- /dev/null +++ b/docs/caching/valkey-component.md @@ -0,0 +1,31 @@ +--- +title: .NET Aspire Valkey component +description: This article describes the .NET Aspire Valkey component features and capabilities +ms.topic: how-to +ms.date: 07/19/2024 +--- + +# .NET Aspire Valkey component + + \ No newline at end of file diff --git a/docs/database/milvus-component.md b/docs/database/milvus-component.md new file mode 100644 index 0000000000..71bfe8d8d8 --- /dev/null +++ b/docs/database/milvus-component.md @@ -0,0 +1,22 @@ +--- +title: .NET Aspire Milvus database component +description: This article describes the .NET Aspire Milvus database component. +ms.topic: how-to +ms.date: 07/19/2024 +--- + +# .NET Aspire Milvus database component + + \ No newline at end of file diff --git a/docs/get-started/build-aspire-apps-with-nodejs.md b/docs/get-started/build-aspire-apps-with-nodejs.md index 0302e611a8..d6e351529f 100644 --- a/docs/get-started/build-aspire-apps-with-nodejs.md +++ b/docs/get-started/build-aspire-apps-with-nodejs.md @@ -1,10 +1,10 @@ --- -title: Add Node.js apps to a .NET Aspire project +title: Orchestrate Node.js apps in .NET Aspire description: Learn how to integrate Node.js and npm apps into a .NET Aspire App Host project. ms.date: 06/13/2024 --- -# Add Node.js apps to a .NET Aspire project +# Orchestrate Node.js apps in .NET Aspire In this article, you learn how to use Node.js and Node Package Manager (`npm`) apps in a .NET Aspire project. The sample app in this article demonstrates [Angular](https://angular.io), [React](https://react.dev/), and [Vue](https://vuejs.org/) client experiences. The following .NET Aspire APIs exist to support these scenarios: diff --git a/docs/get-started/build-aspire-apps-with-python.md b/docs/get-started/build-aspire-apps-with-python.md new file mode 100644 index 0000000000..85491292c0 --- /dev/null +++ b/docs/get-started/build-aspire-apps-with-python.md @@ -0,0 +1,18 @@ +--- +title: Orchestrate Python apps in .NET Aspire +description: Learn how to integrate Python apps into a .NET Aspire App Host project. +ms.date: 07/19/2024 +--- + +# Orchestrate Python apps in .NET Aspire + + \ No newline at end of file diff --git a/docs/index.yml b/docs/index.yml index 1121bf09a2..36673b4d28 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -163,6 +163,12 @@ conceptualContent: - itemType: how-to-guide text: Redis distributed caching url: caching/stackexchange-redis-distributed-caching-component.md + - itemType: how-to-guide + text: Garnet caching + url: caching/garnet-component.md + - itemType: how-to-guide + text: Valkey caching + url: caching/valkey-component.md - title: Frameworks links: @@ -235,6 +241,15 @@ conceptualContent: - itemType: training text: Use telemetry in a .NET Aspire project url: /training/modules/use-telemetry-dotnet-aspire + - itemType: training + text: Use databases in a .NET Aspire project + url: /training/modules/use-databases-dotnet-aspire-app/ + - itemType: training + text: Improve performance with a cache in a .NET Aspire project + url: /training/modules/improve-performance-cache-aspire/ + - itemType: training + text: Send messages with RabbitMQ in a .NET Aspire project + url: /training/modules/send-messages-rabbitmq-dotnet-aspire-app/ additionalContent: sections: diff --git a/docs/search/elasticsearch-component.md b/docs/search/elasticsearch-component.md new file mode 100644 index 0000000000..483a964174 --- /dev/null +++ b/docs/search/elasticsearch-component.md @@ -0,0 +1,26 @@ +--- +title: .NET Aspire Elasticsearch component +description: This article describes the .NET Aspire Elasticsearch component features and capabilities. +ms.topic: how-to +ms.date: 07/19/2024 +--- + +# .NET Aspire Elasticsearch component + + \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml index 6b327f8576..fe486f26ea 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -12,8 +12,6 @@ items: href: get-started/build-your-first-aspire-app.md - name: Tutorial - Add .NET Aspire to an existing .NET app href: get-started/add-aspire-existing-app.md - - name: Sample - Add Node.js apps to a .NET Aspire project - href: get-started/build-aspire-apps-with-nodejs.md - name: Setup and tooling href: fundamentals/setup-tooling.md - name: What's new in .NET Aspire @@ -24,6 +22,10 @@ items: - name: Overview displayName: orchestration,aspire apphost,aspire app href: fundamentals/app-host-overview.md + - name: Orchestrate Node.js apps in .NET Aspire + href: get-started/build-aspire-apps-with-nodejs.md + - name: Orchestrate Python apps in .NET Aspire + href: get-started/build-aspire-apps-with-python.md - name: Networking overview displayName: inner loop,local networking href: fundamentals/networking-overview.md @@ -135,6 +137,12 @@ items: - name: Azure Table Storage displayName: table storage,azure storage href: storage/azure-storage-tables-component.md + - name: Elasticsearch + displayName: elasticsearch,search + href: search/elasticsearch-component.md + - name: Garnet + href: caching/garnet-component.md + displayName: caching,redis,resp,cache-store - name: MongoDB displayName: mongodb,database href: database/mongodb-component.md @@ -184,6 +192,9 @@ items: - name: Seq displayName: seq,logging href: logging/seq-component.md + - name: Valkey + href: caching/valkey-component.md + displayName: caching,redis - name: Deployment items: From 3d1b0b93e1fd6b7e71ed025e538fb036b9858eaa Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 19 Jul 2024 15:24:16 -0500 Subject: [PATCH 02/36] Fix MD lint --- docs/app-host/withdockerfile.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/app-host/withdockerfile.md b/docs/app-host/withdockerfile.md index 9414d92ffe..f23ef4d73f 100644 --- a/docs/app-host/withdockerfile.md +++ b/docs/app-host/withdockerfile.md @@ -9,7 +9,6 @@ ms.date: 07/19/2024 \ No newline at end of file diff --git a/docs/caching/includes/garnet-app-host.md b/docs/caching/includes/garnet-app-host.md new file mode 100644 index 0000000000..989a5b7cd9 --- /dev/null +++ b/docs/caching/includes/garnet-app-host.md @@ -0,0 +1,56 @@ + + +To model the Garnet resource in the app host, install the [Aspire.Hosting.Garnet](https://www.nuget.org/packages/Aspire.Hosting.Garnet) NuGet package in the [app host](xref:aspire/app-host) project. + +### [.NET CLI](#tab/dotnet-cli) + +```dotnetcli +dotnet add package Aspire.Hosting.Garnet +``` + +### [PackageReference](#tab/package-reference) + +```xml + +``` + +--- + +In your app host project, register the .NET Aspire Garnet as a resource using the `AddGarnet` method and consume the service using the following methods: + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var cache = builder.AddGarnet("cache"); + +builder.AddProject() + .WithReference(cache) +``` + +The method configures a connection in the `ExampleProject` project named `cache`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Garnet connection can be consumed using: + +```csharp +builder.AddGarnet("cache"); +``` diff --git a/docs/caching/includes/redis-app-host.md b/docs/caching/includes/redis-app-host.md index a6c5929774..a5f0fd4a63 100644 --- a/docs/caching/includes/redis-app-host.md +++ b/docs/caching/includes/redis-app-host.md @@ -16,3 +16,18 @@ dotnet add package Aspire.Hosting.Redis --- In your app host project, register the .NET Aspire Stack Exchange Redis as a resource using the method and consume the service using the following methods: + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var cache = builder.AddRedis("cache"); + +builder.AddProject() + .WithReference(cache) +``` + +The method configures a connection in the `ExampleProject` project named `cache`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Redis connection can be consumed using: + +```csharp +builder.AddRedis("cache"); +``` diff --git a/docs/caching/includes/valkey-app-host.md b/docs/caching/includes/valkey-app-host.md new file mode 100644 index 0000000000..3d43ea1347 --- /dev/null +++ b/docs/caching/includes/valkey-app-host.md @@ -0,0 +1,56 @@ + + +To model the Valkey resource in the app host, install the [Aspire.Hosting.Valkey](https://www.nuget.org/packages/Aspire.Hosting.Valkey) NuGet package in the [app host](xref:aspire/app-host) project. + +### [.NET CLI](#tab/dotnet-cli) + +```dotnetcli +dotnet add package Aspire.Hosting.Valkey +``` + +### [PackageReference](#tab/package-reference) + +```xml + +``` + +--- + +In your app host project, register the .NET Aspire Valkey as a resource using the `AddValkey` method and consume the service using the following methods: + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var cache = builder.AddValkey("cache"); + +builder.AddProject() + .WithReference(cache) +``` + +The method configures a connection in the `ExampleProject` project named `cache`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Valkey connection can be consumed using: + +```csharp +builder.AddValkey("cache"); +``` diff --git a/docs/caching/stackexchange-redis-component.md b/docs/caching/stackexchange-redis-component.md index 9af494eadf..6b6aa29a1d 100644 --- a/docs/caching/stackexchange-redis-component.md +++ b/docs/caching/stackexchange-redis-component.md @@ -3,6 +3,7 @@ title: .NET Aspire Stack Exchange Redis component description: This article describes the .NET Aspire Stack Exchange Redis component features and capabilities ms.topic: how-to ms.date: 07/17/2024 +zonezone_pivot_groups: resp-host --- # .NET Aspire Stack Exchange Redis component @@ -49,22 +50,21 @@ public class ExampleService(IConnectionMultiplexer connectionMultiplexer) ## App host usage +:::zone pivot="redis" + [!INCLUDE [redis-app-host](includes/redis-app-host.md)] -```csharp -var builder = DistributedApplication.CreateBuilder(args); +:::zone-end +:::zone pivot="garnet" -var redis = builder.AddRedis("redis"); +[!INCLUDE [garnet-app-host](includes/garnet-app-host.md)] -builder.AddProject() - .WithReference(redis) -``` +:::zone-end +:::zone pivot="valkey" -The method configures a connection in the `ExampleProject` project named `redis`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Redis connection can be consumed using: +[!INCLUDE [valkey-app-host](includes/valkey-app-host.md)] -```csharp -builder.AddRedis("cache"); -``` +:::zone-end ## Configuration diff --git a/docs/caching/stackexchange-redis-distributed-caching-component.md b/docs/caching/stackexchange-redis-distributed-caching-component.md index 42df645d52..623d3ec31c 100644 --- a/docs/caching/stackexchange-redis-distributed-caching-component.md +++ b/docs/caching/stackexchange-redis-distributed-caching-component.md @@ -3,6 +3,7 @@ title: .NET Aspire Stack Exchange Redis distributed caching component description: This article describes the .NET Aspire Stack Exchange Redis distributed caching component features and capabilities ms.topic: how-to ms.date: 07/17/2024 +zonezone_pivot_groups: resp-host --- # .NET Aspire Stack Exchange Redis distributed caching component @@ -49,22 +50,21 @@ public class ExampleService(IDistributedCache cache) ## App host usage +:::zone pivot="redis" + [!INCLUDE [redis-app-host](includes/redis-app-host.md)] -```csharp -var builder = DistributedApplication.CreateBuilder(args); +:::zone-end +:::zone pivot="garnet" -var redis = builder.AddRedis("cache"); +[!INCLUDE [garnet-app-host](includes/garnet-app-host.md)] -builder.AddProject() - .WithReference(redis) -``` +:::zone-end +:::zone pivot="valkey" -The method configures a connection in the `ExampleProject` project named `cache`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Redis connection can be consumed using: +[!INCLUDE [valkey-app-host](includes/valkey-app-host.md)] -```csharp -builder.AddRedisDistributedCache("cache"); -``` +:::zone-end ## Configuration diff --git a/docs/caching/stackexchange-redis-output-caching-component.md b/docs/caching/stackexchange-redis-output-caching-component.md index c7c24d9915..d8337622ce 100644 --- a/docs/caching/stackexchange-redis-output-caching-component.md +++ b/docs/caching/stackexchange-redis-output-caching-component.md @@ -3,6 +3,7 @@ title: .NET Aspire Stack Exchange Redis output caching Component description: This article describes the .NET Aspire Stack Exchange Redis output caching component features and capabilities ms.topic: how-to ms.date: 07/17/2024 +zonezone_pivot_groups: resp-host --- # .NET Aspire Stack Exchange Redis output caching component @@ -56,22 +57,21 @@ For apps with controllers, apply the `[OutputCache]` attribute to the action met ## App host usage +:::zone pivot="redis" + [!INCLUDE [redis-app-host](includes/redis-app-host.md)] -```csharp -var builder = DistributedApplication.CreateBuilder(args); +:::zone-end +:::zone pivot="garnet" -var redis = builder.AddRedis("redis"); +[!INCLUDE [garnet-app-host](includes/garnet-app-host.md)] -var basket = builder.AddProject() - .WithReference(redis) -``` +:::zone-end +:::zone pivot="valkey" -The method configures a connection in the `ExampleProject` project named `redis`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Redis connection can be consumed using: +[!INCLUDE [valkey-app-host](includes/valkey-app-host.md)] -```csharp -builder.AddRedisOutputCache("messaging"); -``` +:::zone-end ## Configuration diff --git a/docs/caching/valkey-component.md b/docs/caching/valkey-component.md deleted file mode 100644 index 1c71be80cf..0000000000 --- a/docs/caching/valkey-component.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: .NET Aspire Valkey component -description: This article describes the .NET Aspire Valkey component features and capabilities -ms.topic: how-to -ms.date: 07/19/2024 ---- - -# .NET Aspire Valkey component - - \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml index fe486f26ea..0ce9bb0375 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -140,9 +140,6 @@ items: - name: Elasticsearch displayName: elasticsearch,search href: search/elasticsearch-component.md - - name: Garnet - href: caching/garnet-component.md - displayName: caching,redis,resp,cache-store - name: MongoDB displayName: mongodb,database href: database/mongodb-component.md @@ -192,9 +189,6 @@ items: - name: Seq displayName: seq,logging href: logging/seq-component.md - - name: Valkey - href: caching/valkey-component.md - displayName: caching,redis - name: Deployment items: diff --git a/docs/zones/zone-pivot-groups.yml b/docs/zones/zone-pivot-groups.yml index 6bc5cf7074..d20c58bd86 100644 --- a/docs/zones/zone-pivot-groups.yml +++ b/docs/zones/zone-pivot-groups.yml @@ -43,4 +43,13 @@ groups: title: Visual Studio Code - id: dotnet-cli title: .NET CLI - +- id: resp-host + title: RESP Host + prompt: Choose a RESP host resource + pivots: + - id: redis + title: Stack Exchange Redis + - id: garnet + title: Garnet + - id: valkey + title: Valkey From d52b45c395f54cbe5ddce95d65f6de4764ff267e Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 19 Jul 2024 16:42:14 -0500 Subject: [PATCH 05/36] Fix hosting packages --- docs/caching/stackexchange-redis-component.md | 2 +- .../stackexchange-redis-distributed-caching-component.md | 2 +- .../caching/stackexchange-redis-output-caching-component.md | 2 +- docs/index.yml | 6 ------ docs/search/elasticsearch-component.md | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/caching/stackexchange-redis-component.md b/docs/caching/stackexchange-redis-component.md index 6b6aa29a1d..c670ce91c7 100644 --- a/docs/caching/stackexchange-redis-component.md +++ b/docs/caching/stackexchange-redis-component.md @@ -3,7 +3,7 @@ title: .NET Aspire Stack Exchange Redis component description: This article describes the .NET Aspire Stack Exchange Redis component features and capabilities ms.topic: how-to ms.date: 07/17/2024 -zonezone_pivot_groups: resp-host +zone_pivot_groups: resp-host --- # .NET Aspire Stack Exchange Redis component diff --git a/docs/caching/stackexchange-redis-distributed-caching-component.md b/docs/caching/stackexchange-redis-distributed-caching-component.md index 623d3ec31c..f200a73ffe 100644 --- a/docs/caching/stackexchange-redis-distributed-caching-component.md +++ b/docs/caching/stackexchange-redis-distributed-caching-component.md @@ -3,7 +3,7 @@ title: .NET Aspire Stack Exchange Redis distributed caching component description: This article describes the .NET Aspire Stack Exchange Redis distributed caching component features and capabilities ms.topic: how-to ms.date: 07/17/2024 -zonezone_pivot_groups: resp-host +zone_pivot_groups: resp-host --- # .NET Aspire Stack Exchange Redis distributed caching component diff --git a/docs/caching/stackexchange-redis-output-caching-component.md b/docs/caching/stackexchange-redis-output-caching-component.md index d8337622ce..95c65ecd8c 100644 --- a/docs/caching/stackexchange-redis-output-caching-component.md +++ b/docs/caching/stackexchange-redis-output-caching-component.md @@ -3,7 +3,7 @@ title: .NET Aspire Stack Exchange Redis output caching Component description: This article describes the .NET Aspire Stack Exchange Redis output caching component features and capabilities ms.topic: how-to ms.date: 07/17/2024 -zonezone_pivot_groups: resp-host +zone_pivot_groups: resp-host --- # .NET Aspire Stack Exchange Redis output caching component diff --git a/docs/index.yml b/docs/index.yml index 36673b4d28..86c0f3626b 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -163,12 +163,6 @@ conceptualContent: - itemType: how-to-guide text: Redis distributed caching url: caching/stackexchange-redis-distributed-caching-component.md - - itemType: how-to-guide - text: Garnet caching - url: caching/garnet-component.md - - itemType: how-to-guide - text: Valkey caching - url: caching/valkey-component.md - title: Frameworks links: diff --git a/docs/search/elasticsearch-component.md b/docs/search/elasticsearch-component.md index f8781d9c51..fa017d896e 100644 --- a/docs/search/elasticsearch-component.md +++ b/docs/search/elasticsearch-component.md @@ -96,7 +96,7 @@ And then the connection string will be retrieved from the `ConnectionStrings` co ### Use configuration providers -The .NET Aspire Elasticsearch Client component supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration). It loads the `ElasticClientsElasticsearchSettings` from configuration by using the `Aspire:Elastic:Clients:Elasticsearch` key. Example _appsettings.json_ that configures some of the options: +The .NET Aspire Elasticsearch Client component supports [Microsoft.Extensions.Configuration](/dotnet/api/microsoft.extensions.configuration). It loads the `ElasticClientsElasticsearchSettings` from configuration by using the `Aspire:Elastic:Clients:Elasticsearch` key. Example _appsettings.json_ that configures some of the options: ```json { From 69beee2a0acaf11b838da9d4f44ad9ecc928ce70 Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 19 Jul 2024 17:04:50 -0500 Subject: [PATCH 06/36] Fix the host toggles for zones --- docs/caching/stackexchange-redis-component.md | 52 ++++++++++++++++++- ...exchange-redis-output-caching-component.md | 4 +- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/docs/caching/stackexchange-redis-component.md b/docs/caching/stackexchange-redis-component.md index c670ce91c7..4723a2feb5 100644 --- a/docs/caching/stackexchange-redis-component.md +++ b/docs/caching/stackexchange-redis-component.md @@ -72,18 +72,42 @@ The .NET Aspire Stack Exchange Redis component provides multiple options to conf ### Use a connection string +:::zone pivot="redis" + When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddRedis`: ```csharp -builder.AddRedis("RedisConnection"); +builder.AddRedis("cache"); ``` +:::zone-end +:::zone pivot="garnet" + +When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddGarnet`: + +```csharp +builder.AddGarnet("cache"); +``` + +:::zone-end +:::zone pivot="valkey" + +[!INCLUDE [valkey-app-host](includes/valkey-app-host.md)] + +When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddValkey`: + +```csharp +builder.AddValkey("cache"); +``` + +:::zone-end + And then the connection string will be retrieved from the `ConnectionStrings` configuration section: ```json { "ConnectionStrings": { - "RedisConnection": "localhost:6379" + "cache": "localhost:6379" } } ``` @@ -115,12 +139,36 @@ The .NET Aspire Stack Exchange Redis component supports ` delegate to set up some or all the options inline, for example to configure `DisableTracing`: +:::zone pivot="redis" + ```csharp builder.AddRedis( "cache", settings => settings.DisableTracing = true); ``` +:::zone-end +:::zone pivot="garnet" + +```csharp +builder.AddGarnet( + "cache", + settings => settings.DisableTracing = true); +``` + +:::zone-end +:::zone pivot="valkey" + +[!INCLUDE [valkey-app-host](includes/valkey-app-host.md)] + +```csharp +builder.AddValkey( + "cache", + settings => settings.DisableTracing = true); +``` + +:::zone-end + [!INCLUDE [component-health-checks](../includes/component-health-checks.md)] The .NET Aspire Stack Exchange Redis component handles the following: diff --git a/docs/caching/stackexchange-redis-output-caching-component.md b/docs/caching/stackexchange-redis-output-caching-component.md index 95c65ecd8c..44da2991e5 100644 --- a/docs/caching/stackexchange-redis-output-caching-component.md +++ b/docs/caching/stackexchange-redis-output-caching-component.md @@ -2,13 +2,13 @@ title: .NET Aspire Stack Exchange Redis output caching Component description: This article describes the .NET Aspire Stack Exchange Redis output caching component features and capabilities ms.topic: how-to -ms.date: 07/17/2024 +ms.date: 07/19/2024 zone_pivot_groups: resp-host --- # .NET Aspire Stack Exchange Redis output caching component -In this article, you learn how to use the .NET Aspire Stack Exchange Redis output caching component. The `Aspire.StackExchange.Redis.OutputCaching` library is used to register an [ASP.NET Core Output Caching](/aspnet/core/performance/caching/output) provider backed by a [Redis](https://redis.io/) server. It enables corresponding health check, logging, and telemetry. +In this article, you learn how to use the .NET Aspire Stack Exchange Redis output caching component. The `Aspire.StackExchange.Redis.OutputCaching` library is used to register an [ASP.NET Core Output Caching](/aspnet/core/performance/caching/output) provider backed by a [Redis](https://redis.io/) server. It enables corresponding health check, logging, and telemetry.. ## Get started From 51db798eb13d54d986b68adc2ea6d9714e7642eb Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Mon, 22 Jul 2024 19:35:17 +1000 Subject: [PATCH 07/36] Dockerfile docs. --- docs/app-host/withdockerfile.md | 105 ++++++++++++++++++++++++++++---- 1 file changed, 94 insertions(+), 11 deletions(-) diff --git a/docs/app-host/withdockerfile.md b/docs/app-host/withdockerfile.md index f23ef4d73f..5d45b4b3ed 100644 --- a/docs/app-host/withdockerfile.md +++ b/docs/app-host/withdockerfile.md @@ -6,17 +6,100 @@ ms.date: 07/19/2024 # Add Dockerfiles to your .NET app model - \ No newline at end of file +Unless the context path argument is a rooted path the context path is interpretted as being relative to the app host projects directory (where the AppHost `*.csproj` folder is located). + +By default the name of the Dockerfile which is used is `Dockerfile` and is expected to be within the context path directory. It is possible to explicitly specify the _Dockerfile_ name either as an absolute path or a relative path to the context path. + +This is useful if you wish to modify the specific dockerfile being used when running locally vs. deployment. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); +var container = builder.ExecutionContext.IsRunMode + ? builder.AddDockerfile("mycontainer", "relative/context/path", "Dockerfile.debug") + : builder.AddDockerfile("mycontainer", "relative/context/path", "Dockerfile.release"); +``` + +## Customizing existing container resources + +When using the return value is an `IResourceBuilder`. .NET Aspire includes many custom resource types that are derived from . + +Using the extension method it is possible to continue using these strongly typed resource types and customize the underlying container that is used. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var pgsql = builder.AddPostgres("pgsql") + .WithDockerfile("path/to/context") + .WithPgAdmin(); +``` + +## Passing build arguments + +The method can be used to pass arguments into the container image build. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); +var container = builder.AddDockerfile("mygoapp", "relative/context/path") + .WithBuildArg("GO_VERSION", "1.22"); +``` + +The value parameter on the method can be a literal value (boolean, string, int) or it can be a resource builder for a parameter resource. The following code replaces the `GO_VERSION` with a parameter value that can be specified at deployment time. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var goVersion = builder.AddParameter("goversion"); + +var container = builder.AddDockerfile("mygoapp", "relative/context/path") + .WithBuildArg("GO_VERSION", goVersion); +``` + +Build arguments correspond to the `ARG` command in _Dockerfiles_. Expanding the example above, this is a mult-stage Dockerfile which specifies specific container image version to use as a parameter. + +```Dockerfile +# Stage 1: Build the Go program +ARG GO_VERSION=1.22 +FROM golang:${GO_VERSION} AS builder +WORKDIR /build +COPY . . +RUN go build mygoapp.go + +# Stage 2: Run the Go program +FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 +WORKDIR /app +COPY --from=builder /build/mygoapp . +CMD ["./mygoapp"] +``` + +> NOTE: Build arguments hardcode values into the produced container image which means that the container image needs to rebuilt whenever a change is required. This is often not desirable and the use of environment variables is recommended to values that change frequently. + +## Passing build secrets + +In addition to build arguments it is possible to specify build secrets using which are made selectively available to individual commands in the _Dockerfile_ using the `--mount=type=secret` syntax on `RUN` commands. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var accessToken = builder.AddParameter("accesstoken", secret: true); + +var container = builder.AddDockerfile("myapp", "relative/context/path") + .WithBuildSecret("ACCESS_TOKEN", accessToken); +``` + +Example of `RUN` command in Dockerfile which exposes the specified secret to the specific command: + +``` +# The helloworld command can read the secret from /run/secrets/ACCESS_TOKEN +RUN --mount=type=secret,id=ACCESS_TOKEN helloworld +``` + +> NOTE: Caution should be used whenever secrets are handed in build environments. Common scenarios include using a token to restore dependencies from private repositories/feeds prior to a build occuring. The injected secrets should not be copied into the final or intermediate images. From e1d4c07db9039c17af219cecd0a128af4b13b5b8 Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Mon, 22 Jul 2024 19:48:08 +1000 Subject: [PATCH 08/36] Add note for event hubs emulator. --- docs/messaging/azure-event-hubs-component.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/messaging/azure-event-hubs-component.md b/docs/messaging/azure-event-hubs-component.md index d9edff769e..16c3e34d01 100644 --- a/docs/messaging/azure-event-hubs-component.md +++ b/docs/messaging/azure-event-hubs-component.md @@ -100,6 +100,16 @@ var ExampleService = builder.AddProject() The `AddAzureEventHubs` method will read connection information from the AppHost's configuration (for example, from "user secrets") under the `ConnectionStrings:eventHubsConnectionName` config key. The `WithReference` method passes that connection information into a connection string named `eventHubsConnectionName` in the `ExampleService` project. +As of .NET Aspire 8.1, the Azure EventHubs extension for .NET Aspire supports launching a local emulator for EventHubs. You can use the emulator by applying the `RunAsEmulator()` extension method as follows: + +```csharp +var eventHubs = builder.AddAzureEventHubs("eventHubsConnectionName") + .RunAsEmulator() + .AddEventHub("MyHub"); +``` + +The emulator for Azure EventHubs results in two container resources being launched inside .NET Aspire derived from the name of the Event Hubs resource name. + > [!IMPORTANT] > Even though we are creating an Event Hub using the `AddEventHub` at the same time as the namespace, as of .NET Aspire version `preview-5`, the connection string will not include the `EntityPath` property, so the `EventHubName` property must be set in the settings callback for the preferred client. Future versions of Aspire will include the `EntityPath` property in the connection string and will not require the `EventHubName` property to be set in this scenario. From 9d8d147ddb0343e39492f9473cead1c4054e46e4 Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Mon, 22 Jul 2024 22:23:06 +1000 Subject: [PATCH 09/36] WIP: Python. --- .../build-aspire-apps-with-python.md | 165 +++++++++++++++++- 1 file changed, 159 insertions(+), 6 deletions(-) diff --git a/docs/get-started/build-aspire-apps-with-python.md b/docs/get-started/build-aspire-apps-with-python.md index 85491292c0..e2c47a1a2e 100644 --- a/docs/get-started/build-aspire-apps-with-python.md +++ b/docs/get-started/build-aspire-apps-with-python.md @@ -6,13 +6,166 @@ ms.date: 07/19/2024 # Orchestrate Python apps in .NET Aspire - \ No newline at end of file +Once the template has been created launch the app host with the following command to ensure that the apphost and the dashboard launches successfully: + +```dotnetcli +$ dotnet run --project PythonSample.AppHost\PythonSample.AppHost.csproj +``` + +Once AppHost starts it should be possible to click on the dashboard link in the console output. At this stage the dashboard will not show any resources. + +## Preparing a Python project + +Create a new directory to contain Python source code. + +```dotnetcli +$ mkdir hellopython +$ cd hellopython +``` + +TODO: Install virtual environment + +```dotnetcli +$ python -m pip install venv +``` + +TODO: Setup virtual environment + +```dotnetcli +$ python -m venv .venv +``` + +TODO: Activate virtual environment + +```dotnetcli +$ .\.venv\Scripts\activate.ps1 +``` + +TODO: Setup requirements + +```text +Flask=3.0.3 +``` + +```dotnetcli + +``` + +TODO: Add Python code. + +```python +import os +from flask import Flask + +app = Flask(__name__) + +@app.route('/', methods=['GET']) +def hello_world(): + return 'Hello, World!' + +if __name__ == '__main__': + port = int(os.environ.get('PORT', 8111)) + app.run(host='0.0.0.0', port=port) +``` + +TODO: Add Python extension to app host. + +```xml + + + + Exe + net8.0 + enable + enable + true + + + + + + + + + + +``` + +TODO: Add Python project to app model. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +builder.AddPythonProject("hellopython", "..\\hellopython", "main.py") + .WithEndpoint(targetPort: 8111, scheme: "http", env: "PORT"); + +builder.Build().Run(); +``` + +TODO: Launch project / screenshot. + +## Adding telemetry support. + +TODO: Add OTLP dependency. + +```text +Flask==3.0.3 +opentelemetry-distro[otlp] +``` + +TODO: Install dependencies again. + +```dotnetcli +pip install -r requirements.txt +``` + +TODO: Update source + +```python +import os +from flask import Flask +import logging + +logging.basicConfig() +logging.getLogger().setLevel(logging.NOTSET) + +app = Flask(__name__) + +@app.route('/', methods=['GET']) +def hello_world(): + logging.getLogger(__name__).info("request received!") + return 'Hello, World!' + +if __name__ == '__main__': + port = int(os.environ.get('PORT', 8111)) + app.run(host='0.0.0.0', port=port) +``` + +TODO: Update app launchSettings to use `ASPIRE_ALLOW_UNSECURED_TRANSPORT`: + +```json +"http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:15044", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19080", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20252", + "ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true" + } +} +``` \ No newline at end of file From 0dcf2b9925b37c0616cbe8ae816dee8bfd84f871 Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 19 Jul 2024 17:06:46 -0500 Subject: [PATCH 10/36] Update the zone name --- docs/zones/zone-pivot-groups.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zones/zone-pivot-groups.yml b/docs/zones/zone-pivot-groups.yml index d20c58bd86..60fa7d1612 100644 --- a/docs/zones/zone-pivot-groups.yml +++ b/docs/zones/zone-pivot-groups.yml @@ -45,7 +45,7 @@ groups: title: .NET CLI - id: resp-host title: RESP Host - prompt: Choose a RESP host resource + prompt: Choose a RESP Hosting resource type pivots: - id: redis title: Stack Exchange Redis From 4c395ae8ef7454f37d9cba04bd3aba3ac7da8a5b Mon Sep 17 00:00:00 2001 From: David Pine Date: Mon, 22 Jul 2024 07:16:00 -0500 Subject: [PATCH 11/36] Fix the 'missed one' :P --- docs/search/elasticsearch-component.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/search/elasticsearch-component.md b/docs/search/elasticsearch-component.md index fa017d896e..e49ad6435b 100644 --- a/docs/search/elasticsearch-component.md +++ b/docs/search/elasticsearch-component.md @@ -40,7 +40,7 @@ builder.AddElasticsearchClient("elasticsearch"); ## App host usage -To model the RabbitMQ resource in the app host, install the [Aspire.Hosting.Elasticsearch](https://www.nuget.org/packages/Aspire.Hosting.Elasticsearch) NuGet package in the [app host](xref:aspire/app-host) project. +To model the Elasticsearch resource in the app host, install the [Aspire.Hosting.Elasticsearch](https://www.nuget.org/packages/Aspire.Hosting.Elasticsearch) NuGet package in the [app host](xref:aspire/app-host) project. ### [.NET CLI](#tab/dotnet-cli) From c098966a40acb553f1262fca102318b4706e5f23 Mon Sep 17 00:00:00 2001 From: David Pine Date: Mon, 22 Jul 2024 07:29:09 -0500 Subject: [PATCH 12/36] Sync Elasticsearch --- docs/caching/includes/garnet-app-host.md | 2 +- docs/search/elasticsearch-component.md | 37 +++++++++++++++++------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/docs/caching/includes/garnet-app-host.md b/docs/caching/includes/garnet-app-host.md index 989a5b7cd9..e100532337 100644 --- a/docs/caching/includes/garnet-app-host.md +++ b/docs/caching/includes/garnet-app-host.md @@ -38,7 +38,7 @@ dotnet add package Aspire.Hosting.Garnet --- -In your app host project, register the .NET Aspire Garnet as a resource using the `AddGarnet` method and consume the service using the following methods: +In your app host project, register .NET Aspire Garnet as a `GarnetResource` using the `AddGarnet` method and consume the service using the following methods: ```csharp var builder = DistributedApplication.CreateBuilder(args); diff --git a/docs/search/elasticsearch-component.md b/docs/search/elasticsearch-component.md index e49ad6435b..29e1b02dfa 100644 --- a/docs/search/elasticsearch-component.md +++ b/docs/search/elasticsearch-component.md @@ -2,13 +2,18 @@ title: .NET Aspire Elasticsearch component description: This article describes the .NET Aspire Elasticsearch component features and capabilities. ms.topic: how-to -ms.date: 07/19/2024 +ms.date: 07/22/2024 --- # .NET Aspire Elasticsearch component In this article, you learn how to use the .NET Aspire Elasticsearch component. The `Aspire.Elastic.Clients.Elasticsearch` library registers a [ElasticsearchClient](https://github.com/elastic/elasticsearch-net) in the DI container for connecting to a Elasticsearch. It enables corresponding health check, logging and telemetry. +## Prerequisites + +- Elasticsearch cluster. +- Endpoint URI string for accessing the Elasticsearch API endpoint or a CloudId and an ApiKey from [Elastic Cloud](https://www.elastic.co/cloud) + ## Get started To get started with the .NET Aspire Elasticsearch component, install the [Aspire.Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Aspire.Elastic.Clients.Elasticsearch) NuGet package in the consuming client project. @@ -96,7 +101,7 @@ And then the connection string will be retrieved from the `ConnectionStrings` co ### Use configuration providers -The .NET Aspire Elasticsearch Client component supports [Microsoft.Extensions.Configuration](/dotnet/api/microsoft.extensions.configuration). It loads the `ElasticClientsElasticsearchSettings` from configuration by using the `Aspire:Elastic:Clients:Elasticsearch` key. Example _appsettings.json_ that configures some of the options: +The .NET Aspire Elasticsearch Client component supports [Microsoft.Extensions.Configuration](/dotnet/api/microsoft.extensions.configuration). It loads the `ElasticClientsElasticsearchSettings` from configuration by using the `Aspire:Elastic:Clients:Elasticsearch` key. Consider the following example _appsettings.json_ that configures some of the options: ```json { @@ -104,7 +109,7 @@ The .NET Aspire Elasticsearch Client component supports [Microsoft.Extensions.Co "Elastic": { "Clients": { "Elasticsearch": { - "ConnectionString": "http://elastic:password@localhost:27011" + "Endpoint": "http://elastic:password@localhost:27011" } } } @@ -120,12 +125,12 @@ Also you can pass the `Action configureSett builder.AddElasticsearchClient( "elasticsearch", settings => - settings.ConnectionString = "http://elastic:password@localhost:27011"); + settings.Endpoint = new Uri("http://elastic:password@localhost:27011")); ``` ### Use a `CloudId` and an `ApiKey` with configuration providers -When using [Elastic Cloud](https://www.elastic.co/cloud), you can provide the `CloudId` and `ApiKey` in `Aspire:Elastic:Clients:Elasticsearch:Cloud` section and set `Aspire:Elastic:Clients:Elasticsearch:UseCloud` key to `true` when calling `builder.AddElasticsearchClient()`. +When using [Elastic Cloud](https://www.elastic.co/cloud), you can provide the `CloudId` and `ApiKey` in `Aspire:Elastic:Clients:Elasticsearch:Cloud` section when calling `builder.AddElasticsearchClient()`. ```csharp builder.AddElasticsearchClient("elasticsearch"); @@ -138,10 +143,9 @@ Consider the following example _appsettings.json_ that configures the options: "Aspire": { "Elastic": { "Clients": { - "UseCloud" : true, "Cloud": { - "ApiKey": "Valid ApiKey", - "CloudId": "Valid CloudId" + "ApiKey": "", + "CloudId": "" } } } @@ -154,14 +158,25 @@ Consider the following example _appsettings.json_ that configures the options: ```csharp builder.AddElasticsearchClient( "elasticsearch", - settings => + settings => { - settings.UseCloud = true; - settings.Cloud.CloudId = ""; settings.Cloud.ApiKey = ""; + settings.Cloud.CloudId = ""; }); ``` +[!INCLUDE [component-health-checks](../includes/component-health-checks.md)] + +The .NET Aspire Elasticsearch component uses the configured client to perform a `PingAsync`. If the result is an HTTP 200 OK, the health check is considered healthy, otherwise it's unhealthy. Likewise, if there's an exception, the health check is considered unhealthy with the error propagating through the health check failure. + +[!INCLUDE [component-observability-and-telemetry](../includes/component-observability-and-telemetry.md)] + +### Tracing + +The .NET Aspire Elasticsearch component will emit the following tracing activities using OpenTelemetry: + +- `Elastic.Transport` + ## See also - [Elasticsearch .NET](https://github.com/elastic/elasticsearch-net) From 17908d75616cde228d1d8d0998f3cd8ab13a5208 Mon Sep 17 00:00:00 2001 From: David Pine Date: Mon, 22 Jul 2024 08:01:33 -0500 Subject: [PATCH 13/36] Edit pass on withdockerfile content --- docs/app-host/withdockerfile.md | 52 ++++++++++++++++++++------------- docs/toc.yml | 2 ++ 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/docs/app-host/withdockerfile.md b/docs/app-host/withdockerfile.md index 5d45b4b3ed..c008f5b958 100644 --- a/docs/app-host/withdockerfile.md +++ b/docs/app-host/withdockerfile.md @@ -1,38 +1,45 @@ --- title: Add Dockerfiles to your .NET app model description: Learn how to add Dockerfiles to your .NET app model. -ms.date: 07/19/2024 +ms.date: 07/22/2024 --- # Add Dockerfiles to your .NET app model -Using .NET Aspire it is possible to specify a _Dockerfile_ to build when the apphost is started using either the or extension methods. +With .NET Aspire it's possible to specify a _Dockerfile_ to build when the [app host](../fundamentals/app-host-overview.md) is started using either the or extension methods. -In the example below the extension method is used to specify a container by referencing the context path for the container build. +## Add a Dockerfile to the app model + +In the following example the extension method is used to specify a container by referencing the context path for the container build. ```csharp var builder = DistributedApplication.CreateBuilder(args); -var container = builder.AddDockerfile("mycontainer", "relative/context/path"); + +var container = builder.AddDockerfile( + "mycontainer", "relative/context/path"); ``` -Unless the context path argument is a rooted path the context path is interpretted as being relative to the app host projects directory (where the AppHost `*.csproj` folder is located). +Unless the context path argument is a rooted path the context path is interpreted as being relative to the app host projects directory (where the AppHost `*.csproj` folder is located). -By default the name of the Dockerfile which is used is `Dockerfile` and is expected to be within the context path directory. It is possible to explicitly specify the _Dockerfile_ name either as an absolute path or a relative path to the context path. +By default the name of the _Dockerfile_ which is used is `Dockerfile` and is expected to be within the context path directory. It's possible to explicitly specify the _Dockerfile_ name either as an absolute path or a relative path to the context path. -This is useful if you wish to modify the specific dockerfile being used when running locally vs. deployment. +This is useful if you wish to modify the specific _Dockerfile_ being used when running locally or when the app host is deploying. ```csharp var builder = DistributedApplication.CreateBuilder(args); + var container = builder.ExecutionContext.IsRunMode - ? builder.AddDockerfile("mycontainer", "relative/context/path", "Dockerfile.debug") - : builder.AddDockerfile("mycontainer", "relative/context/path", "Dockerfile.release"); + ? builder.AddDockerfile( + "mycontainer", "relative/context/path", "Dockerfile.debug") + : builder.AddDockerfile( + "mycontainer", "relative/context/path", "Dockerfile.release"); ``` -## Customizing existing container resources +## Customize existing container resources When using the return value is an `IResourceBuilder`. .NET Aspire includes many custom resource types that are derived from . -Using the extension method it is possible to continue using these strongly typed resource types and customize the underlying container that is used. +Using the extension method it's possible to continue using these strongly typed resource types and customize the underlying container that is used. ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -42,17 +49,18 @@ var pgsql = builder.AddPostgres("pgsql") .WithPgAdmin(); ``` -## Passing build arguments +## Pass build arguments The method can be used to pass arguments into the container image build. ```csharp var builder = DistributedApplication.CreateBuilder(args); + var container = builder.AddDockerfile("mygoapp", "relative/context/path") .WithBuildArg("GO_VERSION", "1.22"); ``` -The value parameter on the method can be a literal value (boolean, string, int) or it can be a resource builder for a parameter resource. The following code replaces the `GO_VERSION` with a parameter value that can be specified at deployment time. +The value parameter on the method can be a literal value (`boolean`, `string`, `int`) or it can be a resource builder for a [parameter resource](../fundamentals/external-parameters.md). The following code replaces the `GO_VERSION` with a parameter value that can be specified at deployment time. ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -63,9 +71,9 @@ var container = builder.AddDockerfile("mygoapp", "relative/context/path") .WithBuildArg("GO_VERSION", goVersion); ``` -Build arguments correspond to the `ARG` command in _Dockerfiles_. Expanding the example above, this is a mult-stage Dockerfile which specifies specific container image version to use as a parameter. +Build arguments correspond to the [`ARG` command](https://docs.docker.com/build/guide/build-args/) in _Dockerfiles_. Expanding the preceding example, this is a multi-stage _Dockerfile_ which specifies specific container image version to use as a parameter. -```Dockerfile +```dockerfile # Stage 1: Build the Go program ARG GO_VERSION=1.22 FROM golang:${GO_VERSION} AS builder @@ -80,11 +88,12 @@ COPY --from=builder /build/mygoapp . CMD ["./mygoapp"] ``` -> NOTE: Build arguments hardcode values into the produced container image which means that the container image needs to rebuilt whenever a change is required. This is often not desirable and the use of environment variables is recommended to values that change frequently. +> [!NOTE] +> Instead of hardcoding values into the container image, it's recommended to use environment variables for values that frequently change. This avoids the need to rebuild the container image whenever a change is required. -## Passing build secrets +## Pass build secrets -In addition to build arguments it is possible to specify build secrets using which are made selectively available to individual commands in the _Dockerfile_ using the `--mount=type=secret` syntax on `RUN` commands. +In addition to build arguments it's possible to specify build secrets using which are made selectively available to individual commands in the _Dockerfile_ using the `--mount=type=secret` syntax on `RUN` commands. ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -95,11 +104,12 @@ var container = builder.AddDockerfile("myapp", "relative/context/path") .WithBuildSecret("ACCESS_TOKEN", accessToken); ``` -Example of `RUN` command in Dockerfile which exposes the specified secret to the specific command: +For example, consider the `RUN` command in a _Dockerfile_ which exposes the specified secret to the specific command: -``` +```dockerfile # The helloworld command can read the secret from /run/secrets/ACCESS_TOKEN RUN --mount=type=secret,id=ACCESS_TOKEN helloworld ``` -> NOTE: Caution should be used whenever secrets are handed in build environments. Common scenarios include using a token to restore dependencies from private repositories/feeds prior to a build occuring. The injected secrets should not be copied into the final or intermediate images. +> [!CAUTION] +> Caution should be exercised when passing secrets in build environments. This is often done when using a token to retrieve dependencies from private repositories or feeds before a build. It is important to ensure that the injected secrets are not copied into the final or intermediate images. diff --git a/docs/toc.yml b/docs/toc.yml index 0ce9bb0375..a10078da51 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -26,6 +26,8 @@ items: href: get-started/build-aspire-apps-with-nodejs.md - name: Orchestrate Python apps in .NET Aspire href: get-started/build-aspire-apps-with-python.md + - name: Add Dockerfiles to your .NET Aspire app model + href: app-host/withdockerfile.md - name: Networking overview displayName: inner loop,local networking href: fundamentals/networking-overview.md From 0ccb22d5ac624fc27fd23c54d88afdd2284012e7 Mon Sep 17 00:00:00 2001 From: David Pine Date: Mon, 22 Jul 2024 08:11:50 -0500 Subject: [PATCH 14/36] Add Milvus --- docs/database/milvus-component.md | 137 ++++++++++++++++++++++++- docs/search/elasticsearch-component.md | 2 +- 2 files changed, 137 insertions(+), 2 deletions(-) diff --git a/docs/database/milvus-component.md b/docs/database/milvus-component.md index 71bfe8d8d8..06b7567178 100644 --- a/docs/database/milvus-component.md +++ b/docs/database/milvus-component.md @@ -2,11 +2,146 @@ title: .NET Aspire Milvus database component description: This article describes the .NET Aspire Milvus database component. ms.topic: how-to -ms.date: 07/19/2024 +ms.date: 07/22/2024 --- # .NET Aspire Milvus database component +In this article, you learn how to use the .NET Aspire Milvus database component. The `Aspire.Milvus.Client` library registers a [MilvusClient](https://github.com/milvus-io/milvus-sdk-csharp) in the DI container for connecting to a Milvus server. + +## Prerequisites + +- Milvus server and connection string for accessing the server API endpoint. + +## Get started + +To get started with the .NET Aspire Milvus database component, install the [Aspire.Milvus.Client](https://www.nuget.org/packages/Aspire.Milvus.Client) NuGet package in the consuming client project. + +### [.NET CLI](#tab/dotnet-cli) + +```dotnetcli +dotnet add package Aspire.Milvus.Client +``` + +### [PackageReference](#tab/package-reference) + +```xml + +``` + +--- + +For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-package) or [Manage package dependencies in .NET applications](/dotnet/core/tools/dependencies). + +## Example usage + +In the _Program.cs_ file of your project, call the `AddMilvusClient` extension method to register a `MilvusClient` for use via the dependency injection container. The method takes a connection name parameter. + +```csharp +builder.AddMilvusClient("milvus"); +``` + +## App host usage + +To model the Milvus resource in the app host, install the [Aspire.Hosting.Milvus](https://www.nuget.org/packages/Aspire.Hosting.Milvus) NuGet package in the [app host](xref:aspire/app-host) project. + +### [.NET CLI](#tab/dotnet-cli) + +```dotnetcli +dotnet add package Aspire.Hosting.Milvus +``` + +### [PackageReference](#tab/package-reference) + +```xml + +``` + +--- + +In the _Program.cs_ file of `AppHost`, register a Milvus server and consume the connection using the following methods: + +```csharp +var milvus = builder.AddMilvus("milvus"); + +var myService = builder.AddProject() + .WithReference(milvus); +``` + +The `WithReference` method configures a connection in the `MyService` project named `milvus`. In the _Program.cs_ file of `MyService`, the Milvus connection can be consumed using: + +```csharp +builder.AddMilvusClient("milvus"); +``` + +## Configuration + +The .NET Aspire Milvus Client component provides multiple options to configure the server connection based on the requirements and conventions of your project. + +### Use a connection string + +When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddMilvusClient()`: + +```csharp +builder.AddMilvusClient("milvus"); +``` + +And then the connection string will be retrieved from the `ConnectionStrings` configuration section: + +```json +{ + "ConnectionStrings": { + "milvus": "Endpoint=http://localhost:19530/;Key=root:123456!@#$%" + } +} +``` + +By default the `MilvusClient` uses the gRPC API endpoint. + +### Use configuration providers + +The .NET Aspire Milvus Client component supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration). It loads the `MilvusSettings` from configuration by using the `Aspire:Milvus:Client` key. Example `appsettings.json` that configures some of the options: + +```json +{ + "Aspire": { + "Milvus": { + "Client": { + "Key": "root:123456!@#$%" + } + } + } +} +``` + +### Use inline delegates + +Also you can pass the `Action configureSettings` delegate to set up some or all the options inline, for example to set the API key from code: + +```csharp +builder.AddMilvusClient("milvus", settings => settings.Key = "root:12345!@#$%"); +``` + +[!INCLUDE [component-health-checks](../includes/component-health-checks.md)] + +The .NET Aspire Milvus database component uses the configured client to perform a `HealthAsync`. If the result _is healthy_, the health check is considered healthy, otherwise it's unhealthy. Likewise, if there's an exception, the health check is considered unhealthy with the error propagating through the health check failure. + +[!INCLUDE [component-observability-and-telemetry](../includes/component-observability-and-telemetry.md)] + +### Logging + +The .NET Aspire Milvus database component uses standard .NET logging, and you'll see log entries from the following category: + +- `Milvus.Client` + +## See also + +- [Milvus .NET SDK](https://github.com/milvus-io/milvus-sdk-csharp) +- [.NET Aspire components](../fundamentals/components-overview.md) +- [.NET Aspire GitHub repo](https://github.com/dotnet/aspire) + - -To model the Garnet resource in the app host, install the [Aspire.Hosting.Garnet](https://www.nuget.org/packages/Aspire.Hosting.Garnet) NuGet package in the [app host](xref:aspire/app-host) project. +To model the Garnet resource (`GarnetResource`) in the app host, install the [Aspire.Hosting.Garnet](https://www.nuget.org/packages/Aspire.Hosting.Garnet) NuGet package in the [app host](xref:aspire/app-host) project. ### [.NET CLI](#tab/dotnet-cli) diff --git a/docs/caching/includes/redis-app-host.md b/docs/caching/includes/redis-app-host.md index a5f0fd4a63..6dbe7074a4 100644 --- a/docs/caching/includes/redis-app-host.md +++ b/docs/caching/includes/redis-app-host.md @@ -1,4 +1,4 @@ -To model the Redis resource in the app host, install the [Aspire.Hosting.Redis](https://www.nuget.org/packages/Aspire.Hosting.Redis) NuGet package in the [app host](xref:aspire/app-host) project. +To model the Redis resource (`RedisResource`) in the app host, install the [Aspire.Hosting.Redis](https://www.nuget.org/packages/Aspire.Hosting.Redis) NuGet package in the [app host](xref:aspire/app-host) project. ### [.NET CLI](#tab/dotnet-cli) diff --git a/docs/caching/includes/valkey-app-host.md b/docs/caching/includes/valkey-app-host.md index 3d43ea1347..ca44e5b488 100644 --- a/docs/caching/includes/valkey-app-host.md +++ b/docs/caching/includes/valkey-app-host.md @@ -1,27 +1,4 @@ - - -To model the Valkey resource in the app host, install the [Aspire.Hosting.Valkey](https://www.nuget.org/packages/Aspire.Hosting.Valkey) NuGet package in the [app host](xref:aspire/app-host) project. +To model the Valkey resource (`ValkeyResource`) in the app host, install the [Aspire.Hosting.Valkey](https://www.nuget.org/packages/Aspire.Hosting.Valkey) NuGet package in the [app host](xref:aspire/app-host) project. ### [.NET CLI](#tab/dotnet-cli) From 45adb306a8d05c4038117033f7c8fa284c50c3cc Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 23 Jul 2024 10:22:04 -0500 Subject: [PATCH 32/36] Add Azure Web PubSub component --- docs/fundamentals/components-overview.md | 1 + .../media/icons/AzureWebPubSub_256x.png | Bin 0 -> 10709 bytes docs/index.yml | 3 + docs/messaging/azure-event-hubs-component.md | 2 +- docs/messaging/azure-web-pubsub-component.md | 198 ++++++++++++++++++ docs/toc.yml | 3 + 6 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 docs/fundamentals/media/icons/AzureWebPubSub_256x.png create mode 100644 docs/messaging/azure-web-pubsub-component.md diff --git a/docs/fundamentals/components-overview.md b/docs/fundamentals/components-overview.md index e2f6f80c9b..7af66df2c9 100644 --- a/docs/fundamentals/components-overview.md +++ b/docs/fundamentals/components-overview.md @@ -32,6 +32,7 @@ The following table lists the .NET Aspire components currently available for use | [Azure Service Bus](../messaging/azure-service-bus-component.md)
Azure Service Bus logo. | [Aspire.Azure.Messaging.ServiceBus](https://www.nuget.org/packages/Aspire.Azure.Messaging.ServiceBus) | A library for accessing [Azure Service Bus](/azure/service-bus-messaging/service-bus-messaging-overview). | | [Azure Storage Queues](../storage/azure-storage-queues-component.md)
Azure Storage Queues logo. | [Aspire.Azure.Storage.Queues](https://www.nuget.org/packages/Aspire.Azure.Storage.Queues) | A library for accessing [Azure Storage Queues](/azure/storage/queues/storage-queues-introduction). | | [Azure Table Storage](../storage/azure-storage-tables-component.md)
Azure Table Storage logo. | [Aspire.Azure.Data.Tables](https://www.nuget.org/packages/Aspire.Azure.Data.Tables) | A library for accessing the [Azure Table](/azure/storage/tables/table-storage-overview) service. | +| [Azure Web PubSub](../messaging/azure-web-pubsub-component.md)
Azure Table Storage logo. | [Aspire.Azure.Messaging.WebPubSub](https://www.nuget.org/packages/Aspire.Azure.Messaging.WebPubSub) | A library for accessing the [Azure Web PubSub](/azure/azure-web-pubsub/) service. | | [Elasticsearch](../search/elasticsearch-component.md)
Elasticsearch logo. | [Aspire.Elasticsearch.Client](https://www.nuget.org/packages/Aspire.Elasticsearch.Client) | A library for accessing [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/client/index.html) databases. | | [Keycloak](../authentication/keycloak-component.md)
.NET Aspire logo. | [Aspire.Keycloak.Authentication](https://www.nuget.org/packages/Aspire.Keycloak.Authentication) | A library for accessing [Keycloak](https://www.keycloak.org/docs/latest/server_admin/index.html) authentication. | | [Milvus](../database/milvus-component.md)
Milvus logo. | [Aspire.Milvus.Client](https://www.nuget.org/packages/Aspire.Milvus.Client) | A library for accessing [Milvus](https://milvus.io/) databases. | diff --git a/docs/fundamentals/media/icons/AzureWebPubSub_256x.png b/docs/fundamentals/media/icons/AzureWebPubSub_256x.png new file mode 100644 index 0000000000000000000000000000000000000000..5625427aa42338c2ceb07b031c06a8d089a82078 GIT binary patch literal 10709 zcmb7Kgmr9)|?K|ty5loXH-$wicu?%o9f>6C5+R3xQy0VSlnOS-%3-S2JkKCLQ%rl<(nl+U^ywh zbp-$%qW?}1ke*5YpNgxNqAXB0NVSb>pjpYN$pAoQEY6)dIsm+|RhE;{@dE8dr170fSq-L%T`o2pE~ec+2Johd@mX0O zG;Q7mZU#PVW>Ns5=H&nHLzEbUIjE23EjG6e7Ut%Ar{BFRi!w07LHRbZWv=K7zlFFq zZX&o-XfD`D8uJjtGw>fr$;zyLStuzVmSJz3_`~J04(HKBBXWxxgxg8(^c%p$Wb6K` z<=F6)bFLXZ*GItkc1}np(mEPI6L?5LmaorjQ54BQK|ZZ(SnXdHH$6LQBK2Mk>d-mf zaf#WGR74JOd-H5@l*rQeeDOo4y9&|=b#j+3|7ez{lLEn3ty073^q=%70(XK^&!jq4 z30c7^^cXHDz#W{nlbcA9Q*f#oFuvFlgF^yv`9^R%Zd)8Kn0wnHTfGvzz1*s#PEl%! z`fy9k*@s{xcmHq3-@OA};Pf-#r3%74Rq!8Y2(z^wkPLKk??X1H_+?zdbeUb2Y23Jp z1TnwJ({pF&mg%^0wGGlUa6j>-Vt4(U@vpd=mNejYeTs{(8rq(gXbyXg4lTO4>JA~y z{w7+nUdR*ZyL#|snwS5el;Aoi48H-%P5qmWU&gK&;t5zEsgTk@t+>)R0u?NVI)V_( z#c!*eY^w=21sqP~mRB|vmM^+5JJqwPEoETXYA?`%=)2J|O9cfp9R81wy{x7KhYi4S zEodqDC>iHX+JWQJ-Lh%D|7k$I{V52Rny>j1gq$^`lzcvrTR4J&6;l|L9CDX~F$}FxF!f#$H@GfaecBbf)m1K@k2ZJ5o3$#p zTWwV+5=RV)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4629`c_`5&sIw1ax|l6y5dFEYzRul zf`)j`aOl=wy@y}2<6nHh`j@_LEZ}v0{jdP!%wSd=h_G@L2IvWpCQOwBSHDtlu9^}* zaiM)4{fkrZNYX7nKvwOHE=;<7VWuO#>Up=zx4%9{0P(xEIXWdfrBEK6qf?I><)D7A z#o`r`S+{t{fP9qPMtWx3nDA9;Z$*SnSSb8E5$nbjw#&mQ9&$DJ;mX z{ryZt&eVdeeoHBs?*g&u{8O5sdBd74Cg%lg&>U>aLx^^`p^AeIhWdC=JHZ~mLDUbv zd!ZNnJG2tbFu?#EPMi6Rxw$maVo*gD*KBu-!4JKhXO}@ab*VW`E$43>XO8-?#jmwI zHyo#0%Pdhje4B#RUo1)y&JvH4Tk_FmvoQ1jlDN?AcLo4?Q6ws@O65eQWdHlkbP_lR zl3VrGDU;qBe1XE6{)k|9(I=0+)xI8xBn5m9ERSGJ@Wskr#bg zv%OP#c!db&@)C7|#hIVH!^u@!|9Gclw}?kxtxnqUA!BK!wEQet2Gz49)u#D3pM^ac zbt4t){XUsshlmVR6&LohkIDxuOe;WxkctPu?NqA0dMp^h3H*F-dv%0Wg7_aQ7gHV9 bA3>T;MAKhSk@To4Oh8%wja->5Ea?9Le(G|q literal 0 HcmV?d00001 diff --git a/docs/index.yml b/docs/index.yml index 86c0f3626b..bdf17a369c 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -136,6 +136,9 @@ conceptualContent: - itemType: overview text: Azure Service Bus url: messaging/azure-service-bus-component.md + - itemType: overview + text: Azure Web PubSub + url: messaging/azure-web-pubsub-component.md - itemType: how-to-guide text: RabbitMQ client .NET Aspire component url: messaging/rabbitmq-client-component.md diff --git a/docs/messaging/azure-event-hubs-component.md b/docs/messaging/azure-event-hubs-component.md index 16c3e34d01..da2839d2fb 100644 --- a/docs/messaging/azure-event-hubs-component.md +++ b/docs/messaging/azure-event-hubs-component.md @@ -94,7 +94,7 @@ var builder = DistributedApplication.CreateBuilder(args); var eventHubs = builder.AddAzureEventHubs("eventHubsConnectionName") .AddEventHub("MyHub"); -var ExampleService = builder.AddProject() +var exampleService = builder.AddProject() .WithReference(eventHubs); ``` diff --git a/docs/messaging/azure-web-pubsub-component.md b/docs/messaging/azure-web-pubsub-component.md new file mode 100644 index 0000000000..ee51abbe5d --- /dev/null +++ b/docs/messaging/azure-web-pubsub-component.md @@ -0,0 +1,198 @@ +--- +title: .NET Aspire Azure Web PubSub component +description: This article describes the .NET Aspire Azure Web PubSub component features and capabilities. +ms.topic: how-to +ms.date: 07/23/2024 +--- + +# .NET Aspire Azure Web PubSub component + +In this article, you learn how to use the .NET Aspire Azure Web PubSub component. The `Aspire.Azure.Messaging.WebPubSub` library offers options for registering an in the DI container for connecting to [Azure Web PubSub](/azure/azure-web-pubsub). + +## Prerequisites + +- Azure subscription: [create one for free](https://azure.microsoft.com/free/). +- An existing Azure Web PubSub service instance. For more information, see [Create a Web PubSub resource](https://learn.microsoft.com/azure/azure-web-pubsub/howto-develop-create-instance). Alternatively, you can use a connection string, which isn't recommended in production environments. + +## Get started + +To get started with the .NET Aspire Azure Web PubSub component, install the [Aspire.Azure.Messaging.WebPubSub](https://www.nuget.org/packages/Aspire.Azure.Messaging.WebPubSub) NuGet package in the consuming client project. + +### [.NET CLI](#tab/dotnet-cli) + +```dotnetcli +dotnet add package Aspire.Azure.Messaging.WebPubSub +``` + +### [PackageReference](#tab/package-reference) + +```xml + +``` + +--- + +For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-package) or [Manage package dependencies in .NET applications](/dotnet/core/tools/dependencies). + +## Example usage + +In the _Program.cs_ file of your project, call the `AddAzureWebPubSubHub` extension method to register a `WebPubSubServiceClient` for use via the dependency injection container. The method takes a connection name parameter. + +```csharp +builder.AddAzureWebPubSubServiceClient("wps"); +``` + +You can then retrieve the `WebPubSubServiceClient` instance using dependency injection. For example, to retrieve the client from a service: + +```csharp +public class ExampleService(WebPubSubServiceClient client) +{ + // Use client... +} +``` + +For more information, see the [Azure.Messaging.WebPubSub documentation](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/webpubsub/Azure.Messaging.WebPubSub/README.md). + +## App host usage + +To add Azure Web PubSub hosting support to your , install the [Aspire.Hosting.Azure.WebPubSub](https://www.nuget.org/packages/Aspire.Hosting.Azure.WebPubSub) NuGet package in the [app host](xref:aspire/app-host) project. + +### [.NET CLI](#tab/dotnet-cli) + +```dotnetcli +dotnet add package Aspire.Hosting.Azure.WebPubSub +``` + +### [PackageReference](#tab/package-reference) + +```xml + +``` + +--- + +In your app host project, add a Web PubSub connection and consume the connection using the following methods: + +```csharp +var webPubSub = builder.AddAzureWebPubSub("wps"); + +var exampleService = builder.AddProject() + .WithReference(webPubSub); +``` + +The `AddAzureWebPubSubHub` method reads connection information from the app host's configuration (for example, from "user secrets") under the `ConnectionStrings:wps` configuration key. The `WithReference` method passes that connection information into a connection string named `wps` in the `ExampleService` project. In the _Program.cs_ file of `ExampleService`, the connection can be consumed using: + +```csharp +builder.AddAzureWebPubSubServiceClient("wps"); +``` + +## Configuration + +The .NET Aspire Azure Web PubSub library provides multiple options to configure the Azure Web PubSub connection based on the requirements and conventions of your project. Note that either a `Endpoint` or a `ConnectionString` is a required to be supplied. + +### Use a connection string + +When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddAzureWebPubSubHub()`: + +```csharp +builder.AddAzureWebPubSubServiceClient( + "WebPubSubConnectionName", + "your_hub_name"); +``` + +And then the connection information will be retrieved from the `ConnectionStrings` configuration section. Two connection formats are supported: + +#### Use the service endpoint + +The recommended approach is to use the service endpoint, which works with the `AzureMessagingWebPubSubSettings.Credential` property to establish a connection. If no credential is configured, the [DefaultAzureCredential](/dotnet/api/azure.identity.defaultazurecredential) is used. + +```json +{ + "ConnectionStrings": { + "WebPubSubConnectionName": "https://xxx.webpubsub.azure.com" + } +} +``` + +#### Connection string + +Alternatively, a connection string can be used. + +```json +{ + "ConnectionStrings": { + "WebPubSubConnectionName": "Endpoint=https://xxx.webpubsub.azure.com;AccessKey==xxxxxxx" + } +} +``` + +### Use configuration providers + +The .NET Aspire Azure Web PubSub library supports [Microsoft.Extensions.Configuration](/dotnet/api/microsoft.extensions.configuration). It loads the `AzureMessagingWebPubSubSettings` and `WebPubSubServiceClientOptions` from configuration by using the `Aspire:Azure:Messaging:WebPubSub` key. Consider the example _appsettings.json_ that configures some of the options: + +```json +{ + "Aspire": { + "Azure": { + "Messaging": { + "WebPubSub": { + "DisableHealthChecks": true, + "HubName": "your_hub_name" + } + } + } + } +} +``` + +### Use inline delegates + +You can also pass the `Action configureSettings` delegate to set up some or all the options inline, for example to disable health checks from code: + +```csharp +builder.AddAzureWebPubSubServiceClient( + "wps", + settings => settings.DisableHealthChecks = true); +``` + +You can also setup the using the optional `Action> configureClientBuilder` parameter of the `AddAzureWebPubSubHub` method. For example, to set the client ID for this client: + +```csharp +builder.AddAzureWebPubSubServiceClient( + "wps", + configureClientBuilder: clientBuilder => + clientBuilder.ConfigureOptions(options => options.Retry.MaxRetries = 5)); +``` + +[!INCLUDE [component-health-checks](../includes/component-health-checks.md)] + +The .NET Aspire Azure Web PubSub component handles exposes a configurable health check that reports as _healthy_, when the client can successfully connect to the Azure Web PubSub service. + +[!INCLUDE [component-observability-and-telemetry](../includes/component-observability-and-telemetry.md)] + +### Logging + +The .NET Aspire Azure Web PubSub component uses the following log categories: + +- `Azure` +- `Azure.Core` +- `Azure.Identity` +- `Azure.Messaging.WebPubSub` + +### Tracing + +The .NET Aspire Azure Web PubSub component will emit the following tracing activities using OpenTelemetry: + +- "Azure.Messaging.WebPubSub.*" + +### Metrics + +The .NET Aspire Azure Web PubSub component currently doesn't support metrics by default due to limitations with the Azure SDK for .NET. If that changes in the future, this section will be updated to reflect those changes. + +## See also + +- [Azure Web PubSub](/azure/azure-web-pubsub/) +- [.NET Aspire components](../fundamentals/components-overview.md) +- [.NET Aspire GitHub repo](https://github.com/dotnet/aspire) diff --git a/docs/toc.yml b/docs/toc.yml index 1acb1449f4..bb9adc810d 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -140,6 +140,9 @@ items: - name: Azure Table Storage displayName: table storage,azure storage href: storage/azure-storage-tables-component.md + - name: Azure Web PubSub + displayName: web pubsub,real-time,messaging + href: messaging/azure-web-pubsub-component.md - name: Elasticsearch displayName: elasticsearch,search href: search/elasticsearch-component.md From a8a3545d1557ce1bc15f5b1cf48f3edc73b01693 Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 23 Jul 2024 11:32:38 -0500 Subject: [PATCH 33/36] Touch dates --- docs/app-host/withdockerfile.md | 2 +- docs/caching/stackexchange-redis-component.md | 2 +- .../stackexchange-redis-distributed-caching-component.md | 2 +- docs/caching/stackexchange-redis-output-caching-component.md | 2 +- docs/database/milvus-component.md | 2 +- docs/messaging/azure-event-hubs-component.md | 2 +- docs/search/elasticsearch-component.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/app-host/withdockerfile.md b/docs/app-host/withdockerfile.md index c008f5b958..b1e8b1031d 100644 --- a/docs/app-host/withdockerfile.md +++ b/docs/app-host/withdockerfile.md @@ -1,7 +1,7 @@ --- title: Add Dockerfiles to your .NET app model description: Learn how to add Dockerfiles to your .NET app model. -ms.date: 07/22/2024 +ms.date: 07/23/2024 --- # Add Dockerfiles to your .NET app model diff --git a/docs/caching/stackexchange-redis-component.md b/docs/caching/stackexchange-redis-component.md index 4723a2feb5..cd95bb8e6a 100644 --- a/docs/caching/stackexchange-redis-component.md +++ b/docs/caching/stackexchange-redis-component.md @@ -2,7 +2,7 @@ title: .NET Aspire Stack Exchange Redis component description: This article describes the .NET Aspire Stack Exchange Redis component features and capabilities ms.topic: how-to -ms.date: 07/17/2024 +ms.date: 07/23/2024 zone_pivot_groups: resp-host --- diff --git a/docs/caching/stackexchange-redis-distributed-caching-component.md b/docs/caching/stackexchange-redis-distributed-caching-component.md index f200a73ffe..37536bb4bd 100644 --- a/docs/caching/stackexchange-redis-distributed-caching-component.md +++ b/docs/caching/stackexchange-redis-distributed-caching-component.md @@ -2,7 +2,7 @@ title: .NET Aspire Stack Exchange Redis distributed caching component description: This article describes the .NET Aspire Stack Exchange Redis distributed caching component features and capabilities ms.topic: how-to -ms.date: 07/17/2024 +ms.date: 07/23/2024 zone_pivot_groups: resp-host --- diff --git a/docs/caching/stackexchange-redis-output-caching-component.md b/docs/caching/stackexchange-redis-output-caching-component.md index 44da2991e5..9fd3e6fe24 100644 --- a/docs/caching/stackexchange-redis-output-caching-component.md +++ b/docs/caching/stackexchange-redis-output-caching-component.md @@ -2,7 +2,7 @@ title: .NET Aspire Stack Exchange Redis output caching Component description: This article describes the .NET Aspire Stack Exchange Redis output caching component features and capabilities ms.topic: how-to -ms.date: 07/19/2024 +ms.date: 07/23/2024 zone_pivot_groups: resp-host --- diff --git a/docs/database/milvus-component.md b/docs/database/milvus-component.md index 8ad04d6dfc..1bcb83b4b2 100644 --- a/docs/database/milvus-component.md +++ b/docs/database/milvus-component.md @@ -2,7 +2,7 @@ title: .NET Aspire Milvus database component description: This article describes the .NET Aspire Milvus database component. ms.topic: how-to -ms.date: 07/22/2024 +ms.date: 07/23/2024 --- # .NET Aspire Milvus database component diff --git a/docs/messaging/azure-event-hubs-component.md b/docs/messaging/azure-event-hubs-component.md index da2839d2fb..9bf03865ed 100644 --- a/docs/messaging/azure-event-hubs-component.md +++ b/docs/messaging/azure-event-hubs-component.md @@ -2,7 +2,7 @@ title: .NET Aspire Azure Event Hubs component description: This article describes the .NET Aspire Azure Event Hubs component features and capabilities. ms.topic: how-to -ms.date: 07/17/2024 +ms.date: 07/23/2024 --- # .NET Aspire Azure Event Hubs component diff --git a/docs/search/elasticsearch-component.md b/docs/search/elasticsearch-component.md index 79a87333e7..387690e560 100644 --- a/docs/search/elasticsearch-component.md +++ b/docs/search/elasticsearch-component.md @@ -2,7 +2,7 @@ title: .NET Aspire Elasticsearch component description: This article describes the .NET Aspire Elasticsearch component features and capabilities. ms.topic: how-to -ms.date: 07/22/2024 +ms.date: 07/23/2024 --- # .NET Aspire Elasticsearch component From 28b3dab02bd303506380973caaea04be349e3ebd Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 23 Jul 2024 12:59:52 -0500 Subject: [PATCH 34/36] Bump all versions --- .../AspireApp.ApiService/AspireApp.ApiService.csproj | 2 +- .../AspireApp.AppHost/AspireApp.AppHost.csproj | 4 ++-- .../AspireApp.ServiceDefaults.csproj | 2 +- .../AspireSql.AppHost/AspireSql.AppHost.csproj | 4 ++-- .../AspireSql.ServiceDefaults.csproj | 2 +- .../AspireSql.AppHost/AspireSql.AppHost.csproj | 4 ++-- .../AspireSql.ServiceDefaults.csproj | 2 +- .../AspireSQLEFCore.AppHost.csproj | 4 ++-- .../AspireSQLEFCore.ServiceDefaults.csproj | 2 +- .../AspireSQLEFCore/AspireSQLEFCore.csproj | 2 +- .../azure/snippets/AppHost.Bicep/AppHost.Bicep.csproj | 4 ++-- .../MailDev.Hosting/MailDev.Hosting.csproj | 2 +- .../MailDevResource.AppHost.csproj | 2 +- .../MailDevResource.ServiceDefaults.csproj | 2 +- .../MailDev.Hosting/MailDev.Hosting.csproj | 2 +- .../MailDevResource.AppHost.csproj | 2 +- .../MailDevResource.ServiceDefaults.csproj | 2 +- .../MailKit.Client/MailKit.Client.csproj | 2 +- .../MailDev.Hosting/MailDev.Hosting.csproj | 2 +- .../MailDevResource.AppHost.csproj | 2 +- .../MailDevResource.ServiceDefaults.csproj | 2 +- .../MailKit.Client/MailKit.Client.csproj | 2 +- .../snippets/Dapr/Dapr.AppHost/Dapr.AppHost.csproj | 4 ++-- .../Dapr.ServiceDefaults/Dapr.ServiceDefaults.csproj | 2 +- .../Orleans/OrleansAppHost/OrleansAppHost.csproj | 8 ++++---- .../OrleansServiceDefaults.csproj | 2 +- .../AspireApp.AppHost/AspireApp.AppHost.csproj | 4 ++-- .../AspireApp.ServiceDefaults.csproj | 2 +- .../Healthz.ServiceDefaults.csproj | 2 +- .../Networking.AppHost/Networking.AppHost.csproj | 4 ++-- .../Networking.ServiceDefaults.csproj | 2 +- .../Parameters.ApiService/Parameters.ApiService.csproj | 2 +- .../Parameters.AppHost/Parameters.AppHost.csproj | 4 ++-- .../Parameters.ServiceDefaults.csproj | 2 +- .../YourAppName/YourAppName.ServiceDefaults.csproj | 2 +- .../AspireApp1.AppHost/AspireApp1.AppHost.csproj | 4 ++-- .../AspireApp1.ServiceDefaults.csproj | 2 +- .../AspireApp1.Tests/AspireApp1.Tests.csproj | 2 +- .../AspireApp1/AspireApp1.Web/AspireApp1.Web.csproj | 2 +- .../VolumeMounts.AppHost/VolumeMounts.AppHost.csproj | 10 +++++----- .../VolumeMounts.ServiceDefaults.csproj | 2 +- .../AspireSample.AppHost/AspireSample.AppHost.csproj | 4 ++-- .../AspireSample.ServiceDefaults.csproj | 2 +- .../AspireSample.Web/AspireSample.Web.csproj | 2 +- .../signalr/SignalR.AppHost/SignalR.AppHost.csproj | 6 +++--- .../SignalR.ServiceDefaults.csproj | 2 +- .../AspireStorage.AppHost/AspireStorage.AppHost.csproj | 4 ++-- .../AspireStorage.ServiceDefaults.csproj | 2 +- .../AspireStorage.Web/AspireStorage.Web.csproj | 4 ++-- .../AspireStorage.WorkerService.csproj | 2 +- 50 files changed, 72 insertions(+), 72 deletions(-) diff --git a/docs/database/snippets/cosmos-db/AspireApp.ApiService/AspireApp.ApiService.csproj b/docs/database/snippets/cosmos-db/AspireApp.ApiService/AspireApp.ApiService.csproj index e9bed540ab..b39697686c 100644 --- a/docs/database/snippets/cosmos-db/AspireApp.ApiService/AspireApp.ApiService.csproj +++ b/docs/database/snippets/cosmos-db/AspireApp.ApiService/AspireApp.ApiService.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/database/snippets/cosmos-db/AspireApp.AppHost/AspireApp.AppHost.csproj b/docs/database/snippets/cosmos-db/AspireApp.AppHost/AspireApp.AppHost.csproj index 16fb05970d..d8e52cccdc 100644 --- a/docs/database/snippets/cosmos-db/AspireApp.AppHost/AspireApp.AppHost.csproj +++ b/docs/database/snippets/cosmos-db/AspireApp.AppHost/AspireApp.AppHost.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/docs/database/snippets/cosmos-db/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj b/docs/database/snippets/cosmos-db/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/database/snippets/cosmos-db/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj +++ b/docs/database/snippets/cosmos-db/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.AppHost/AspireSql.AppHost.csproj b/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.AppHost/AspireSql.AppHost.csproj index c6e85315d4..ff35507796 100644 --- a/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.AppHost/AspireSql.AppHost.csproj +++ b/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.AppHost/AspireSql.AppHost.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj b/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj +++ b/docs/database/snippets/tutorial/aspiresqldeployazure/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.AppHost/AspireSql.AppHost.csproj b/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.AppHost/AspireSql.AppHost.csproj index ab28716e81..008a649bdc 100644 --- a/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.AppHost/AspireSql.AppHost.csproj +++ b/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.AppHost/AspireSql.AppHost.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj b/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj +++ b/docs/database/snippets/tutorial/aspiresqldeploycontainer/AspireSql.ServiceDefaults/AspireSql.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/AspireSQLEFCore.AppHost.csproj b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/AspireSQLEFCore.AppHost.csproj index 2a3433bf1a..0568378087 100644 --- a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/AspireSQLEFCore.AppHost.csproj +++ b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/AspireSQLEFCore.AppHost.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.ServiceDefaults/AspireSQLEFCore.ServiceDefaults.csproj b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.ServiceDefaults/AspireSQLEFCore.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.ServiceDefaults/AspireSQLEFCore.ServiceDefaults.csproj +++ b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.ServiceDefaults/AspireSQLEFCore.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore/AspireSQLEFCore.csproj b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore/AspireSQLEFCore.csproj index cd6d54683e..b1e8d92531 100644 --- a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore/AspireSQLEFCore.csproj +++ b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore/AspireSQLEFCore.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/deployment/azure/snippets/AppHost.Bicep/AppHost.Bicep.csproj b/docs/deployment/azure/snippets/AppHost.Bicep/AppHost.Bicep.csproj index c9dee9a8d1..3ec3d0b836 100644 --- a/docs/deployment/azure/snippets/AppHost.Bicep/AppHost.Bicep.csproj +++ b/docs/deployment/azure/snippets/AppHost.Bicep/AppHost.Bicep.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/docs/extensibility/snippets/MailDevResource/MailDev.Hosting/MailDev.Hosting.csproj b/docs/extensibility/snippets/MailDevResource/MailDev.Hosting/MailDev.Hosting.csproj index fc602e5bc4..1230adeafe 100644 --- a/docs/extensibility/snippets/MailDevResource/MailDev.Hosting/MailDev.Hosting.csproj +++ b/docs/extensibility/snippets/MailDevResource/MailDev.Hosting/MailDev.Hosting.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResource/MailDevResource.AppHost/MailDevResource.AppHost.csproj b/docs/extensibility/snippets/MailDevResource/MailDevResource.AppHost/MailDevResource.AppHost.csproj index 4e177d9495..10ac6c5b34 100644 --- a/docs/extensibility/snippets/MailDevResource/MailDevResource.AppHost/MailDevResource.AppHost.csproj +++ b/docs/extensibility/snippets/MailDevResource/MailDevResource.AppHost/MailDevResource.AppHost.csproj @@ -10,7 +10,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResource/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj b/docs/extensibility/snippets/MailDevResource/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/extensibility/snippets/MailDevResource/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj +++ b/docs/extensibility/snippets/MailDevResource/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceAndComponent/MailDev.Hosting/MailDev.Hosting.csproj b/docs/extensibility/snippets/MailDevResourceAndComponent/MailDev.Hosting/MailDev.Hosting.csproj index fc602e5bc4..1230adeafe 100644 --- a/docs/extensibility/snippets/MailDevResourceAndComponent/MailDev.Hosting/MailDev.Hosting.csproj +++ b/docs/extensibility/snippets/MailDevResourceAndComponent/MailDev.Hosting/MailDev.Hosting.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.AppHost/MailDevResource.AppHost.csproj b/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.AppHost/MailDevResource.AppHost.csproj index 4e177d9495..10ac6c5b34 100644 --- a/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.AppHost/MailDevResource.AppHost.csproj +++ b/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.AppHost/MailDevResource.AppHost.csproj @@ -10,7 +10,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj b/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj +++ b/docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceAndComponent/MailKit.Client/MailKit.Client.csproj b/docs/extensibility/snippets/MailDevResourceAndComponent/MailKit.Client/MailKit.Client.csproj index c543c8dbe9..f4b0cfa7a5 100644 --- a/docs/extensibility/snippets/MailDevResourceAndComponent/MailKit.Client/MailKit.Client.csproj +++ b/docs/extensibility/snippets/MailDevResourceAndComponent/MailKit.Client/MailKit.Client.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDev.Hosting/MailDev.Hosting.csproj b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDev.Hosting/MailDev.Hosting.csproj index fc602e5bc4..1230adeafe 100644 --- a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDev.Hosting/MailDev.Hosting.csproj +++ b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDev.Hosting/MailDev.Hosting.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.AppHost/MailDevResource.AppHost.csproj b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.AppHost/MailDevResource.AppHost.csproj index 4e177d9495..10ac6c5b34 100644 --- a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.AppHost/MailDevResource.AppHost.csproj +++ b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.AppHost/MailDevResource.AppHost.csproj @@ -10,7 +10,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj +++ b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.ServiceDefaults/MailDevResource.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailKit.Client/MailKit.Client.csproj b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailKit.Client/MailKit.Client.csproj index c543c8dbe9..f4b0cfa7a5 100644 --- a/docs/extensibility/snippets/MailDevResourceWithCredentials/MailKit.Client/MailKit.Client.csproj +++ b/docs/extensibility/snippets/MailDevResourceWithCredentials/MailKit.Client/MailKit.Client.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/frameworks/snippets/Dapr/Dapr.AppHost/Dapr.AppHost.csproj b/docs/frameworks/snippets/Dapr/Dapr.AppHost/Dapr.AppHost.csproj index 33a49c0a85..b29cd0e949 100644 --- a/docs/frameworks/snippets/Dapr/Dapr.AppHost/Dapr.AppHost.csproj +++ b/docs/frameworks/snippets/Dapr/Dapr.AppHost/Dapr.AppHost.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/docs/frameworks/snippets/Dapr/Dapr.ServiceDefaults/Dapr.ServiceDefaults.csproj b/docs/frameworks/snippets/Dapr/Dapr.ServiceDefaults/Dapr.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/frameworks/snippets/Dapr/Dapr.ServiceDefaults/Dapr.ServiceDefaults.csproj +++ b/docs/frameworks/snippets/Dapr/Dapr.ServiceDefaults/Dapr.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/frameworks/snippets/Orleans/OrleansAppHost/OrleansAppHost.csproj b/docs/frameworks/snippets/Orleans/OrleansAppHost/OrleansAppHost.csproj index f12ff38d42..c4f4e52fbc 100644 --- a/docs/frameworks/snippets/Orleans/OrleansAppHost/OrleansAppHost.csproj +++ b/docs/frameworks/snippets/Orleans/OrleansAppHost/OrleansAppHost.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/docs/frameworks/snippets/Orleans/OrleansServiceDefaults/OrleansServiceDefaults.csproj b/docs/frameworks/snippets/Orleans/OrleansServiceDefaults/OrleansServiceDefaults.csproj index 3e0d94a75e..d39dbd4c83 100644 --- a/docs/frameworks/snippets/Orleans/OrleansServiceDefaults/OrleansServiceDefaults.csproj +++ b/docs/frameworks/snippets/Orleans/OrleansServiceDefaults/OrleansServiceDefaults.csproj @@ -15,7 +15,7 @@ - + diff --git a/docs/fundamentals/snippets/components/AspireApp/AspireApp.AppHost/AspireApp.AppHost.csproj b/docs/fundamentals/snippets/components/AspireApp/AspireApp.AppHost/AspireApp.AppHost.csproj index 4c183dc273..a9228e7213 100644 --- a/docs/fundamentals/snippets/components/AspireApp/AspireApp.AppHost/AspireApp.AppHost.csproj +++ b/docs/fundamentals/snippets/components/AspireApp/AspireApp.AppHost/AspireApp.AppHost.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/fundamentals/snippets/components/AspireApp/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj b/docs/fundamentals/snippets/components/AspireApp/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/fundamentals/snippets/components/AspireApp/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj +++ b/docs/fundamentals/snippets/components/AspireApp/AspireApp.ServiceDefaults/AspireApp.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/fundamentals/snippets/healthz/Healthz.ServiceDefaults/Healthz.ServiceDefaults.csproj b/docs/fundamentals/snippets/healthz/Healthz.ServiceDefaults/Healthz.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/fundamentals/snippets/healthz/Healthz.ServiceDefaults/Healthz.ServiceDefaults.csproj +++ b/docs/fundamentals/snippets/healthz/Healthz.ServiceDefaults/Healthz.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/fundamentals/snippets/networking/Networking.AppHost/Networking.AppHost.csproj b/docs/fundamentals/snippets/networking/Networking.AppHost/Networking.AppHost.csproj index 1c8d96710e..4bb9e45d13 100644 --- a/docs/fundamentals/snippets/networking/Networking.AppHost/Networking.AppHost.csproj +++ b/docs/fundamentals/snippets/networking/Networking.AppHost/Networking.AppHost.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/fundamentals/snippets/networking/Networking.ServiceDefaults/Networking.ServiceDefaults.csproj b/docs/fundamentals/snippets/networking/Networking.ServiceDefaults/Networking.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/fundamentals/snippets/networking/Networking.ServiceDefaults/Networking.ServiceDefaults.csproj +++ b/docs/fundamentals/snippets/networking/Networking.ServiceDefaults/Networking.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/fundamentals/snippets/params/Parameters.ApiService/Parameters.ApiService.csproj b/docs/fundamentals/snippets/params/Parameters.ApiService/Parameters.ApiService.csproj index 5af75a18e8..95da5e0531 100644 --- a/docs/fundamentals/snippets/params/Parameters.ApiService/Parameters.ApiService.csproj +++ b/docs/fundamentals/snippets/params/Parameters.ApiService/Parameters.ApiService.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/fundamentals/snippets/params/Parameters.AppHost/Parameters.AppHost.csproj b/docs/fundamentals/snippets/params/Parameters.AppHost/Parameters.AppHost.csproj index 4ebd8c8f6b..45e9e84d04 100644 --- a/docs/fundamentals/snippets/params/Parameters.AppHost/Parameters.AppHost.csproj +++ b/docs/fundamentals/snippets/params/Parameters.AppHost/Parameters.AppHost.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/fundamentals/snippets/params/Parameters.ServiceDefaults/Parameters.ServiceDefaults.csproj b/docs/fundamentals/snippets/params/Parameters.ServiceDefaults/Parameters.ServiceDefaults.csproj index 23006b8b7b..94e10ec058 100644 --- a/docs/fundamentals/snippets/params/Parameters.ServiceDefaults/Parameters.ServiceDefaults.csproj +++ b/docs/fundamentals/snippets/params/Parameters.ServiceDefaults/Parameters.ServiceDefaults.csproj @@ -12,7 +12,7 @@ - + diff --git a/docs/fundamentals/snippets/template/YourAppName/YourAppName.ServiceDefaults.csproj b/docs/fundamentals/snippets/template/YourAppName/YourAppName.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/fundamentals/snippets/template/YourAppName/YourAppName.ServiceDefaults.csproj +++ b/docs/fundamentals/snippets/template/YourAppName/YourAppName.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.AppHost/AspireApp1.AppHost.csproj b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.AppHost/AspireApp1.AppHost.csproj index 65bd0d66ba..eac3bf3064 100644 --- a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.AppHost/AspireApp1.AppHost.csproj +++ b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.AppHost/AspireApp1.AppHost.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj +++ b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.ServiceDefaults/AspireApp1.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Tests/AspireApp1.Tests.csproj b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Tests/AspireApp1.Tests.csproj index c4e26ea722..2894b0cd2b 100644 --- a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Tests/AspireApp1.Tests.csproj +++ b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Tests/AspireApp1.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Web/AspireApp1.Web.csproj b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Web/AspireApp1.Web.csproj index 57034996c4..344a1197dc 100644 --- a/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Web/AspireApp1.Web.csproj +++ b/docs/fundamentals/snippets/testing/AspireApp1/AspireApp1.Web/AspireApp1.Web.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/fundamentals/snippets/volumes/VolumeMounts.AppHost/VolumeMounts.AppHost.csproj b/docs/fundamentals/snippets/volumes/VolumeMounts.AppHost/VolumeMounts.AppHost.csproj index 9c3920bc03..30a7a83de1 100644 --- a/docs/fundamentals/snippets/volumes/VolumeMounts.AppHost/VolumeMounts.AppHost.csproj +++ b/docs/fundamentals/snippets/volumes/VolumeMounts.AppHost/VolumeMounts.AppHost.csproj @@ -15,11 +15,11 @@ - - - - - + + + + + diff --git a/docs/fundamentals/snippets/volumes/VolumeMounts.ServiceDefaults/VolumeMounts.ServiceDefaults.csproj b/docs/fundamentals/snippets/volumes/VolumeMounts.ServiceDefaults/VolumeMounts.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/fundamentals/snippets/volumes/VolumeMounts.ServiceDefaults/VolumeMounts.ServiceDefaults.csproj +++ b/docs/fundamentals/snippets/volumes/VolumeMounts.ServiceDefaults/VolumeMounts.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.AppHost/AspireSample.AppHost.csproj b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.AppHost/AspireSample.AppHost.csproj index c7ccd1f190..a45d57e615 100644 --- a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.AppHost/AspireSample.AppHost.csproj +++ b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.AppHost/AspireSample.AppHost.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/AspireSample.ServiceDefaults.csproj b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/AspireSample.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/AspireSample.ServiceDefaults.csproj +++ b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/AspireSample.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.Web/AspireSample.Web.csproj b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.Web/AspireSample.Web.csproj index 95909a7892..cee24fbc67 100644 --- a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.Web/AspireSample.Web.csproj +++ b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.Web/AspireSample.Web.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/real-time/snippets/signalr/SignalR.AppHost/SignalR.AppHost.csproj b/docs/real-time/snippets/signalr/SignalR.AppHost/SignalR.AppHost.csproj index e05915bb9f..8dd8bd2646 100644 --- a/docs/real-time/snippets/signalr/SignalR.AppHost/SignalR.AppHost.csproj +++ b/docs/real-time/snippets/signalr/SignalR.AppHost/SignalR.AppHost.csproj @@ -15,9 +15,9 @@ - - - + + + \ No newline at end of file diff --git a/docs/real-time/snippets/signalr/SignalR.ServiceDefaults/SignalR.ServiceDefaults.csproj b/docs/real-time/snippets/signalr/SignalR.ServiceDefaults/SignalR.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/real-time/snippets/signalr/SignalR.ServiceDefaults/SignalR.ServiceDefaults.csproj +++ b/docs/real-time/snippets/signalr/SignalR.ServiceDefaults/SignalR.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.AppHost/AspireStorage.AppHost.csproj b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.AppHost/AspireStorage.AppHost.csproj index f69dddc918..5bc9d73a74 100644 --- a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.AppHost/AspireStorage.AppHost.csproj +++ b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.AppHost/AspireStorage.AppHost.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.ServiceDefaults/AspireStorage.ServiceDefaults.csproj b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.ServiceDefaults/AspireStorage.ServiceDefaults.csproj index b8d847c913..84e9efc96f 100644 --- a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.ServiceDefaults/AspireStorage.ServiceDefaults.csproj +++ b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.ServiceDefaults/AspireStorage.ServiceDefaults.csproj @@ -11,7 +11,7 @@ - + diff --git a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Web/AspireStorage.Web.csproj b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Web/AspireStorage.Web.csproj index 41c6bc2ddd..21754bb58f 100644 --- a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Web/AspireStorage.Web.csproj +++ b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Web/AspireStorage.Web.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.WorkerService/AspireStorage.WorkerService.csproj b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.WorkerService/AspireStorage.WorkerService.csproj index f65e12cee3..9d0b8aa205 100644 --- a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.WorkerService/AspireStorage.WorkerService.csproj +++ b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.WorkerService/AspireStorage.WorkerService.csproj @@ -8,7 +8,7 @@ - + From 6c66e02c6e2bd833d5e89d6981dddf478179467e Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 23 Jul 2024 13:57:42 -0500 Subject: [PATCH 35/36] Fix alt-text --- docs/fundamentals/components-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fundamentals/components-overview.md b/docs/fundamentals/components-overview.md index 7af66df2c9..f28b9fdba1 100644 --- a/docs/fundamentals/components-overview.md +++ b/docs/fundamentals/components-overview.md @@ -32,7 +32,7 @@ The following table lists the .NET Aspire components currently available for use | [Azure Service Bus](../messaging/azure-service-bus-component.md)
Azure Service Bus logo. | [Aspire.Azure.Messaging.ServiceBus](https://www.nuget.org/packages/Aspire.Azure.Messaging.ServiceBus) | A library for accessing [Azure Service Bus](/azure/service-bus-messaging/service-bus-messaging-overview). | | [Azure Storage Queues](../storage/azure-storage-queues-component.md)
Azure Storage Queues logo. | [Aspire.Azure.Storage.Queues](https://www.nuget.org/packages/Aspire.Azure.Storage.Queues) | A library for accessing [Azure Storage Queues](/azure/storage/queues/storage-queues-introduction). | | [Azure Table Storage](../storage/azure-storage-tables-component.md)
Azure Table Storage logo. | [Aspire.Azure.Data.Tables](https://www.nuget.org/packages/Aspire.Azure.Data.Tables) | A library for accessing the [Azure Table](/azure/storage/tables/table-storage-overview) service. | -| [Azure Web PubSub](../messaging/azure-web-pubsub-component.md)
Azure Table Storage logo. | [Aspire.Azure.Messaging.WebPubSub](https://www.nuget.org/packages/Aspire.Azure.Messaging.WebPubSub) | A library for accessing the [Azure Web PubSub](/azure/azure-web-pubsub/) service. | +| [Azure Web PubSub](../messaging/azure-web-pubsub-component.md)
Azure Web PubSub logo. | [Aspire.Azure.Messaging.WebPubSub](https://www.nuget.org/packages/Aspire.Azure.Messaging.WebPubSub) | A library for accessing the [Azure Web PubSub](/azure/azure-web-pubsub/) service. | | [Elasticsearch](../search/elasticsearch-component.md)
Elasticsearch logo. | [Aspire.Elasticsearch.Client](https://www.nuget.org/packages/Aspire.Elasticsearch.Client) | A library for accessing [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/client/index.html) databases. | | [Keycloak](../authentication/keycloak-component.md)
.NET Aspire logo. | [Aspire.Keycloak.Authentication](https://www.nuget.org/packages/Aspire.Keycloak.Authentication) | A library for accessing [Keycloak](https://www.keycloak.org/docs/latest/server_admin/index.html) authentication. | | [Milvus](../database/milvus-component.md)
Milvus logo. | [Aspire.Milvus.Client](https://www.nuget.org/packages/Aspire.Milvus.Client) | A library for accessing [Milvus](https://milvus.io/) databases. | From 074e36b1ab2f4f0838e746ba602bfdb56f8dd73f Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 23 Jul 2024 14:09:58 -0500 Subject: [PATCH 36/36] A few API fixes --- docs/app-host/withdockerfile.md | 14 +++++++------- docs/messaging/azure-web-pubsub-component.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/app-host/withdockerfile.md b/docs/app-host/withdockerfile.md index b1e8b1031d..6f67a0f7a5 100644 --- a/docs/app-host/withdockerfile.md +++ b/docs/app-host/withdockerfile.md @@ -6,11 +6,11 @@ ms.date: 07/23/2024 # Add Dockerfiles to your .NET app model -With .NET Aspire it's possible to specify a _Dockerfile_ to build when the [app host](../fundamentals/app-host-overview.md) is started using either the or extension methods. +With .NET Aspire it's possible to specify a _Dockerfile_ to build when the [app host](../fundamentals/app-host-overview.md) is started using either the or extension methods. ## Add a Dockerfile to the app model -In the following example the extension method is used to specify a container by referencing the context path for the container build. +In the following example the extension method is used to specify a container by referencing the context path for the container build. ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -37,9 +37,9 @@ var container = builder.ExecutionContext.IsRunMode ## Customize existing container resources -When using the return value is an `IResourceBuilder`. .NET Aspire includes many custom resource types that are derived from . +When using the return value is an `IResourceBuilder`. .NET Aspire includes many custom resource types that are derived from . -Using the extension method it's possible to continue using these strongly typed resource types and customize the underlying container that is used. +Using the extension method it's possible to continue using these strongly typed resource types and customize the underlying container that is used. ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -51,7 +51,7 @@ var pgsql = builder.AddPostgres("pgsql") ## Pass build arguments -The method can be used to pass arguments into the container image build. +The method can be used to pass arguments into the container image build. ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -60,7 +60,7 @@ var container = builder.AddDockerfile("mygoapp", "relative/context/path") .WithBuildArg("GO_VERSION", "1.22"); ``` -The value parameter on the method can be a literal value (`boolean`, `string`, `int`) or it can be a resource builder for a [parameter resource](../fundamentals/external-parameters.md). The following code replaces the `GO_VERSION` with a parameter value that can be specified at deployment time. +The value parameter on the method can be a literal value (`boolean`, `string`, `int`) or it can be a resource builder for a [parameter resource](../fundamentals/external-parameters.md). The following code replaces the `GO_VERSION` with a parameter value that can be specified at deployment time. ```csharp var builder = DistributedApplication.CreateBuilder(args); @@ -93,7 +93,7 @@ CMD ["./mygoapp"] ## Pass build secrets -In addition to build arguments it's possible to specify build secrets using which are made selectively available to individual commands in the _Dockerfile_ using the `--mount=type=secret` syntax on `RUN` commands. +In addition to build arguments it's possible to specify build secrets using which are made selectively available to individual commands in the _Dockerfile_ using the `--mount=type=secret` syntax on `RUN` commands. ```csharp var builder = DistributedApplication.CreateBuilder(args); diff --git a/docs/messaging/azure-web-pubsub-component.md b/docs/messaging/azure-web-pubsub-component.md index ee51abbe5d..1445fac96b 100644 --- a/docs/messaging/azure-web-pubsub-component.md +++ b/docs/messaging/azure-web-pubsub-component.md @@ -12,7 +12,7 @@ In this article, you learn how to use the .NET Aspire Azure Web PubSub component ## Prerequisites - Azure subscription: [create one for free](https://azure.microsoft.com/free/). -- An existing Azure Web PubSub service instance. For more information, see [Create a Web PubSub resource](https://learn.microsoft.com/azure/azure-web-pubsub/howto-develop-create-instance). Alternatively, you can use a connection string, which isn't recommended in production environments. +- An existing Azure Web PubSub service instance. For more information, see [Create a Web PubSub resource](/azure/azure-web-pubsub/howto-develop-create-instance). Alternatively, you can use a connection string, which isn't recommended in production environments. ## Get started