diff --git a/docs/azureai/azureai-search-document-component.md b/docs/azureai/azureai-search-document-component.md index d43338e8d0..f8008d1343 100644 --- a/docs/azureai/azureai-search-document-component.md +++ b/docs/azureai/azureai-search-document-component.md @@ -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. diff --git a/docs/caching/caching-components.md b/docs/caching/caching-components.md index 5756da5c7a..1371254414 100644 --- a/docs/caching/caching-components.md +++ b/docs/caching/caching-components.md @@ -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("apiservice") - .WithReference(redis); + ```dotnetcli + dotnet add package Aspire.Hosting.Redis --prerelease + ``` -builder.AddProject("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("apiservice") + .WithReference(redis); + + builder.AddProject("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. @@ -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 extension method: diff --git a/docs/deployment/azure/aca-deployment-azd-in-depth.md b/docs/deployment/azure/aca-deployment-azd-in-depth.md index 3a616874fe..dfe4fd4f40 100644 --- a/docs/deployment/azure/aca-deployment-azd-in-depth.md +++ b/docs/deployment/azure/aca-deployment-azd-in-depth.md @@ -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 @@ -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). diff --git a/docs/deployment/azure/aca-deployment-visual-studio.md b/docs/deployment/azure/aca-deployment-visual-studio.md index ef87c02555..88a3cb6ec4 100644 --- a/docs/deployment/azure/aca-deployment-visual-studio.md +++ b/docs/deployment/azure/aca-deployment-visual-studio.md @@ -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)] diff --git a/docs/deployment/azure/aca-deployment.md b/docs/deployment/azure/aca-deployment.md index 7553484c3b..374a7e6312 100644 --- a/docs/deployment/azure/aca-deployment.md +++ b/docs/deployment/azure/aca-deployment.md @@ -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)] @@ -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)] diff --git a/docs/deployment/azure/includes/azd-dashboard.md b/docs/deployment/azure/includes/azd-dashboard.md new file mode 100644 index 0000000000..4b99c42810 --- /dev/null +++ b/docs/deployment/azure/includes/azd-dashboard.md @@ -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 +``` diff --git a/docs/deployment/azure/includes/azd-up-output.md b/docs/deployment/azure/includes/azd-up-output.md index 53aa2faa87..b1c63ae45a 100644 --- a/docs/deployment/azure/includes/azd-up-output.md +++ b/docs/deployment/azure/includes/azd-up-output.md @@ -26,7 +26,6 @@ Location: (✓) Done: Container Registry: (✓) Done: Log Analytics workspace: (✓) Done: Container Apps Environment: - (✓) Done: Container App: SUCCESS: Your application was provisioned in Azure in 1 minute 13 seconds. You can view the resources created under the resource group in Azure Portal: diff --git a/docs/deployment/azure/includes/init-workflow.md b/docs/deployment/azure/includes/init-workflow.md index c730e0206b..cf2cd6fd59 100644 --- a/docs/deployment/azure/includes/init-workflow.md +++ b/docs/deployment/azure/includes/init-workflow.md @@ -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. diff --git a/docs/deployment/azure/media/visual-studio-delete-environment.png b/docs/deployment/azure/media/visual-studio-delete-environment.png new file mode 100644 index 0000000000..f7599a3051 Binary files /dev/null and b/docs/deployment/azure/media/visual-studio-delete-environment.png differ diff --git a/docs/frameworks/orleans.md b/docs/frameworks/orleans.md index e934618dc6..9a2f38cd74 100644 --- a/docs/frameworks/orleans.md +++ b/docs/frameworks/orleans.md @@ -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. diff --git a/docs/includes/clean-up-resources-visual-studio.md b/docs/includes/clean-up-resources-visual-studio.md new file mode 100644 index 0000000000..3cd5a0e3f1 --- /dev/null +++ b/docs/includes/clean-up-resources-visual-studio.md @@ -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."::: diff --git a/docs/toc.yml b/docs/toc.yml index c1884fb72c..9e2067f443 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -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: