Skip to content

✅ Merge main into live #876

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/azureai/azureai-search-document-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For more information on using the `SearchIndexClient`, see [How to use Azure.Sea
## Get started

- Azure subscription: [create one for free](https://azure.microsoft.com/free/).
- Azure Search service: [create an Azure OpenAI Service resource](/azure/search/search-create-service-portal).
- Azure Search service: [create an Azure AI Search service resource](/azure/search/search-create-service-portal).

To get started with the .NET Aspire Azure AI Search Documents component, install the [Aspire.Azure.Search.Documents](https://www.nuget.org/packages/Aspire.Azure.Search.Documents) NuGet package.

Expand Down
39 changes: 23 additions & 16 deletions docs/caching/caching-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,29 @@ Visual Studio creates a new .NET Aspire solution that consists of the following

## Configure the App Host project

Update the _Program.cs_ file of the `AspireRedis.AppHost` project to match the following code:
1. Add the [.NET Aspire Hosting Redis](https://www.nuget.org/packages/Aspire.Hosting.Redis) package to the `AspireRedis.AppHost` project:

```csharp
var builder = DistributedApplication.CreateBuilder(args);

var redis = builder.AddRedis("cache");

var apiservice = builder.AddProject<Projects.AspireRedis_ApiService>("apiservice")
.WithReference(redis);
```dotnetcli
dotnet add package Aspire.Hosting.Redis --prerelease
```

builder.AddProject<Projects.AspireRedis_Web>("webfrontend")
.WithReference(apiservice)
.WithReference(redis);
2. Update the _Program.cs_ file of the `AspireRedis.AppHost` project to match the following code:

builder.Build().Run();
```
```csharp
var builder = DistributedApplication.CreateBuilder(args);

var redis = builder.AddRedis("cache");

var apiservice = builder.AddProject<Projects.AspireRedis_ApiService>("apiservice")
.WithReference(redis);

builder.AddProject<Projects.AspireRedis_Web>("webfrontend")
.WithExternalHttpEndpoints()
.WithReference(apiservice)
.WithReference(redis);

builder.Build().Run();
```

The preceding code creates a local Redis container instance and configures the UI and API to use the instance automatically for both output and distributed caching. The code also configures communication between the frontend UI and the backend API using service discovery. With .NET Aspire's implicit service discovery, setting up and managing service connections is streamlined for developer productivity. In the context of this tutorial, the feature simplifies how you connect to Redis.

Expand All @@ -78,9 +85,9 @@ Configuring connection string with this method, while functional, requires dupli

1. Add the [.NET Aspire StackExchange Redis output caching](stackexchange-redis-output-caching-component.md) component packages to your `AspireRedis.Web` app:

```dotnetcli
dotnet add package Aspire.StackExchange.Redis.OutputCaching --prerelease
```
```dotnetcli
dotnet add package Aspire.StackExchange.Redis.OutputCaching --prerelease
```

1. In the _Program.cs_ file of the `AspireRedis.Web` Blazor project, immediately after the line `var builder = WebApplication.CreateBuilder(args);`, add a call to the <xref:Microsoft.Extensions.Hosting.AspireRedisOutputCacheExtensions.AddRedisOutputCache%2A> extension method:

Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/azure/aca-deployment-azd-in-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ This file is how `azd` remembers (on a per environment basis) which services sho

The previous command will launch a browser to authenticate the command-line session.

1. Once authenticated, use the following command to provision and deploy the application.
1. Once authenticated, run the following command from the _AppHost_ project directory to provision and deploy the application.

```azdeveloper
azd up
Expand Down Expand Up @@ -225,7 +225,7 @@ azd config set alpha.infraSynth on
azd infra synth
```

After this command is executed in the starter template example used in this guide, the following files are created:
After this command is executed in the starter template example used in this guide, the following files are created in the _AppHost_ project directory:

- _infra/main.bicep_: Represents the main entry point for the deployment.
- _infra/main.parameters.json_: Used as the parameters for main Bicep (maps to environment variables defined in _.azure_ folder).
Expand Down
4 changes: 3 additions & 1 deletion docs/deployment/azure/aca-deployment-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ ms.date: 05/03/2024

[!INCLUDE [test-deployed-app](includes/test-deployed-app.md)]

[!INCLUDE [clean-up-resources](../../includes/clean-up-resources.md)]
[!INCLUDE [azd-dashboard](includes/azd-dashboard.md)]

[!INCLUDE [clean-up-resources](../../includes/clean-up-resources-visual-studio.md)]
4 changes: 3 additions & 1 deletion docs/deployment/azure/aca-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The process for installing `azd` varies based on your operating system, but it i

## Deploy the app

Once `azd` is initialized, the provisioning and deployment process can be executed as a single command, [azd up](/azure/developer/azure-developer-cli/reference#azd-up).
Once `azd` is initialized, the provisioning and deployment process can be executed as a single command from the _AppHost_ project directory, [azd up](/azure/developer/azure-developer-cli/reference#azd-up).

[!INCLUDE [azd-up-output](includes/azd-up-output.md)]

Expand All @@ -47,4 +47,6 @@ At this point the app has been deployed and configured, and you can open the Azu

[!INCLUDE [test-deployed-app](includes/test-deployed-app.md)]

[!INCLUDE [azd-dashboard](includes/azd-dashboard.md)]

[!INCLUDE [clean-up-resources](../../includes/clean-up-resources.md)]
13 changes: 13 additions & 0 deletions docs/deployment/azure/includes/azd-dashboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Deploy the .NET Aspire Dashboard

You can deploy the .NET Aspire dashboard as part of your hosted app. This feature is currently in alpha support, so you must enable the `alpha.aspire.dashboard` [feature flag](/azure/developer/azure-developer-cli/feature-versioning). When enabled, the `azd` output logs print an additional URL to the deployed dashboard.

```azdeveloper
azd config set alpha.aspire.dashboard on
```

You can also run `azd monitor` to automatically launch the dashboard.

```azdeveloper
azd monitor
```
1 change: 0 additions & 1 deletion docs/deployment/azure/includes/azd-up-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Location: <YOUR LOCATION>
(✓) Done: Container Registry: <ID>
(✓) Done: Log Analytics workspace: <ID>
(✓) Done: Container Apps Environment: <ID>
(✓) Done: Container App: <ID>

SUCCESS: Your application was provisioned in Azure in 1 minute 13 seconds.
You can view the resources created under the resource group <YOUR RESOURCE GROUP> in Azure Portal:
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/azure/includes/init-workflow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Initialize the template

1. Open a new terminal window and `cd` into the root of your .NET Aspire project.
1. Open a new terminal window and `cd` into the _AppHost_ project directory of your .NET Aspire solution.

1. Execute the `azd init` command to initialize your project with `azd`, which will inspect the local directory structure and determine the type of app.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/frameworks/orleans.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.topic: overview

# Use Orleans with .NET Aspire

Orleans and .NET Aspire are built for each other. .NET Aspire's application model lets you describe the services, databases, and other resources/infrastructure in your app and how they relate. Orleans' provides a straightforward way to build distributed applications which are elastically scalable and fault-tolerant. .NET Aspire is used to configure and orchestrate Orleans and its dependencies, such as, by providing Orleans with database cluster membership and storage.
Orleans has in-built support for .NET Aspire. .NET Aspire's application model lets you describe the services, databases, and other resources/infrastructure in your app and how they relate. Orleans provides a straightforward way to build distributed applications which are elastically scalable and fault-tolerant. .NET Aspire is used to configure and orchestrate Orleans and its dependencies, such as, by providing Orleans with database cluster membership and storage.

Orleans is represented as a resource in .NET Aspire. The Orleans resource includes configuration which your service needs to operate, such as cluster membership providers and storage providers.

Expand Down
5 changes: 5 additions & 0 deletions docs/includes/clean-up-resources-visual-studio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Clean up resources

To delete the `azd` environment, the **More actions** dropdown and then choose **Delete environment**.

:::image type="content" source="../deployment/azure/media/visual-studio-delete-environment.png" alt-text="A screenshot showing how to delete an environment with Visual Studio.":::
7 changes: 7 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ items:
- name: Allow unsecure transport
displayName: unsecure transport,http,non-tls
href: troubleshooting/allow-unsecure-transport.md
- name: .NET Aspire GitHub repository
href: https://github.com/dotnet/aspire
- name: Discord
displayName: discord,community
href: https://aka.ms/aspire/discord
- name: Stack Overflow — .NET Aspire
href: https://stackoverflow.com/questions/tagged/dotnet-aspire

- name: Resources
items:
Expand Down
Loading