Skip to content

Commit f657f2d

Browse files
authored
Merge pull request #375 from dotnet/main
✅ Merge `main` into `live`
2 parents 733510b + bd8be5f commit f657f2d

7 files changed

+75
-60
lines changed

docs/deployment/azure/aca-deployment-azd-in-depth.md

+2
Original file line numberDiff line numberDiff line change
@@ -403,3 +403,5 @@ azd env new
403403
```
404404

405405
This will prompt the user for subscription and resource group information again and subsequent `azd up`, `azd provision`, and `azd deploy` invocations will use this new environment by default. The `--environment` switch can be applied to these commands to switch between environments.
406+
407+
[!INCLUDE [clean-up-resources](../../includes/clean-up-resources.md)]

docs/deployment/azure/aca-deployment-github-actions.md

+2
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,5 @@ The Azure Developer CLI enables you to automatically create CICD pipelines with
153153
:::image type="content" source="media/deployment-links.png" alt-text="A screenshot showing the deployed app links.":::
154154

155155
Congratulations! You successfully deployed a .NET Aspire app using the Azure Developer CLI and GitHub Actions.
156+
157+
[!INCLUDE [clean-up-resources](../../includes/clean-up-resources.md)]

docs/deployment/azure/aca-deployment.md

+2
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ Click the **Application URL** link to open the front end in the browser.
5252
:::image type="content" source="../../media/front-end-open.png" alt-text="A screenshot of the .NET Aspire app's front end in the browser.":::
5353

5454
When you click the "Weather" node in the navigation bar, the front end `web` container app makes a call to the `apiservice` container app to get data. The front end's output will be cached using the `redis` container app and the [.NET Aspire Redis Output Caching component](../../caching/stackexchange-redis-output-caching-component.md). As you refresh the front end a few times, you'll notice that the weather data is cached. It will update after a few seconds.
55+
56+
[!INCLUDE [clean-up-resources](../../includes/clean-up-resources.md)]

docs/get-started/build-your-first-aspire-app.md

+59-59
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,77 @@ ms.topic: quickstart
77

88
# Quickstart: Build your first .NET Aspire app
99

10-
Cloud-native apps often require connections to various services such as databases, storage and caching solutions, messaging providers, or other web services. .NET Aspire is designed to streamline connections and configurations between these types of services. In this quickstart, you learn how to create a .NET Aspire Starter Application template solution.
10+
Cloud-native apps often require connections to various services such as databases, storage and caching solutions, messaging providers, or other web services. .NET Aspire is designed to streamline connections and configurations between these types of services. This quickstart shows how to create a .NET Aspire Starter Application template solution.
1111

12-
In this quickstart, you explore the following tasks:
12+
In this quickstart, you'll explore the following tasks:
1313

1414
> [!div class="checklist"]
1515
>
1616
> - Create a basic .NET app that is set up to use .NET Aspire.
17-
> - Add and configure a .NET Aspire component to implement caching.
17+
> - Add and configure a .NET Aspire component to implement caching
1818
> - Create an API and use service discovery to connect to it.
1919
> - Orchestrate communication between a front end UI, a back end API, and a local Redis cache.
2020
2121
[!INCLUDE [aspire-prereqs](../includes/aspire-prereqs.md)]
2222

2323
[!INCLUDE [file-new-aspire](../includes/file-new-aspire.md)]
2424

25+
## Test the app locally
26+
27+
The sample app is now ready for testing. You want to verify the following:
28+
29+
- Weather data is retrieved from the API project using service discovery and displayed on the weather page.
30+
- Subsequent requests are handled via the output caching configured by the .NET Aspire Redis component.
31+
32+
### [Visual Studio](#tab/visual-studio)
33+
34+
In Visual Studio, set the **AspireSample.AppHost** project as the startup project by right-clicking on the project in the **Solution Explorer** and selecting **Set as Startup Project**. Then, press <kbd>F5</kbd> to run the app.
35+
36+
### [.NET CLI](#tab/dotnet-cli)
37+
38+
```dotnetcli
39+
dotnet run --project AspireSample/AspireSample.AppHost
40+
```
41+
42+
For more information, see [dotnet run](/dotnet/core/tools/dotnet-run).
43+
44+
---
45+
46+
1. Navigate from the home page to the weather page in the browser. The page should load the weather data, make a mental note of some of the values represented in the forecast table.
47+
1. Continue occasionally refreshing the page for 10 seconds. Within 10 seconds, the cached data is returned. Eventually, a different set of weather data appears, since the data is randomly generated and the cache is updated.
48+
49+
:::image type="content" source="media/weather-page.png" lightbox="media/weather-page.png" alt-text="The Weather page of the webfrontend app showing the weather data retrieved from the API.":::
50+
51+
🤓 Congratulations! You created and ran your first .NET Aspire application! Now let's investigate the structure and other features of your new .NET Aspire app.
52+
53+
## Explore the .NET Aspire dashboard
54+
55+
When you run a .NET Aspire app, a dashboard also launches that you use to monitor various parts of your app. The dashboard should resemble the following screenshot:
56+
57+
:::image type="content" source="media/aspire-dashboard.png" lightbox="media/aspire-dashboard.png" alt-text="A screenshot of the .NET Aspire Dashboard, depicting the Projects tab.":::
58+
59+
Visit each link on the left navigation to view different information about the .NET Aspire app:
60+
61+
- **Projects**: Lists basic information for all of the individual .NET projects in your .NET Aspire app, such as the app state, endpoint addresses, and the environment variables that were loaded in.
62+
- **Containers**: Lists basic information about your app containers, such as the state, image tag, and port number. You should see the Redis container you added for output caching with the name you provided.
63+
- **Executables**: Lists the running executables used by your app. The sample app doesn't include any executables, so it should display the message **No running executables found**.
64+
- **Logs**:
65+
66+
- **Project**: Displays the output logs for the projects in your app. Select which project you'd like to display logs for using the drop-down at the top of the page.
67+
- **Container**: Displays logs from the containers in your app. You should see Redis logs from the container you configured as part of the template. If you have more than one container, you can select which to show logs from using the drop-down at the top of the page.
68+
- **Executable**: Displays logs from the executables in your app. The sample app doesn't include any executables, so there's nothing to see here.
69+
- **Structured**: Displays structured logs in table format. These logs support basic filtering, free-form search, and log level filtering as well. You should see logs from the `apiservice` and the `webfrontend`. You can expand the details of each log entry by selecting the **View** button on the right end of the row.
70+
71+
- **Traces**: Displays the traces for your application, which can track request paths through your apps. Locate a request for **/weather** and select **View** on the right side of the page. The dashboard should display the request in stages as it travels through the different parts of your app.
72+
73+
:::image type="content" source="media/aspire-dashboard-trace.png" lightbox="media/aspire-dashboard-trace.png" alt-text="A screenshot showing an .NET Aspire dashboard trace for the webfrontend /weather route.":::
74+
75+
- **Metrics**: Displays various instruments and meters that are exposed and their corresponding dimensions for your app. Metrics conditionally expose filters based on their available dimensions.
76+
77+
:::image type="content" source="media/aspire-dashboard-metrics.png" lightbox="media/aspire-dashboard-metrics.png" alt-text="A screenshot showing an Aspire dashboard metrics page for the webfrontend.":::
78+
79+
For more information, see [.NET Aspire dashboard overview](../fundamentals/dashboard.md).
80+
2581
The solution consists of the following projects:
2682

2783
- **AspireSample.ApiService**: An ASP.NET Core Minimal API project is used to provide data to the front end. This project depends on the shared **AspireSample.ServiceDefaults** project.
@@ -86,62 +142,6 @@ The preceding code:
86142

87143
For more information, see [Make HTTP requests with the `HttpClient`](/dotnet/fundamentals/networking/http/httpclient) class.
88144

89-
## Test the app locally
90-
91-
The sample app is now ready for testing. You want to verify the following:
92-
93-
- Weather data is retrieved from the API project using service discovery and displayed on the weather page.
94-
- Subsequent requests are handled via the output caching configured by the .NET Aspire Redis component.
95-
96-
### [Visual Studio](#tab/visual-studio)
97-
98-
In Visual Studio, set the **AspireSample.AppHost** project as the startup project by right-clicking on the project in the **Solution Explorer** and selecting **Set as Startup Project**. Then, press <kbd>F5</kbd> to run the app.
99-
100-
### [.NET CLI](#tab/dotnet-cli)
101-
102-
```dotnetcli
103-
dotnet run --project AspireSample/AspireSample.AppHost
104-
```
105-
106-
For more information, see [dotnet run](/dotnet/core/tools/dotnet-run).
107-
108-
---
109-
110-
1. Navigate from the home page to the weather page in the browser. The page should load the weather data, make a mental note of some of the values represented in the forecast table.
111-
1. Continue occasionally refreshing the page for 10 seconds. Within 10 seconds, the cached data is returned. Eventually, a different set of weather data appears, since the data is randomly generated and the cache is updated.
112-
113-
:::image type="content" source="media/weather-page.png" lightbox="media/weather-page.png" alt-text="The Weather page of the webfrontend app showing the weather data retrieved from the API.":::
114-
115-
## Explore the .NET Aspire dashboard
116-
117-
When you run a .NET Aspire app, a dashboard also launches that you use to monitor various parts of your app. The dashboard should resemble the following screenshot:
118-
119-
:::image type="content" source="media/aspire-dashboard.png" lightbox="media/aspire-dashboard.png" alt-text="A screenshot of the .NET Aspire Dashboard, depicting the Projects tab.":::
120-
121-
Visit each link on the left navigation to view different information about the .NET Aspire app:
122-
123-
- **Projects**: Lists basic information for all of the individual .NET projects in your .NET Aspire app, such as the app state, endpoint addresses, and the environment variables that were loaded in.
124-
- **Containers**: Lists basic information about your app containers, such as the state, image tag, and port number. You should see the Redis container you added for output caching with the name you provided.
125-
- **Executables**: Lists the running executables used by your app. The sample app doesn't include any executables, so it should display the message **No running executables found**.
126-
- **Logs**:
127-
128-
- **Project**: Displays the output logs for the projects in your app. Select which project you'd like to display logs for using the drop-down at the top of the page.
129-
- **Container**: Displays logs from the containers in your app. You should see Redis logs from the container you configured as part of the template. If you have more than one container, you can select which to show logs from using the drop-down at the top of the page.
130-
- **Executable**: Displays logs from the executables in your app. The sample app doesn't include any executables, so there's nothing to see here.
131-
- **Structured**: Displays structured logs in table format. These logs support basic filtering, free-form search, and log level filtering as well. You should see logs from the `apiservice` and the `webfrontend`. You can expand the details of each log entry by selecting the **View** button on the right end of the row.
132-
133-
- **Traces**: Displays the traces for your application, which can track request paths through your apps. Locate a request for **/weather** and select **View** on the right side of the page. The dashboard should display the request in stages as it travels through the different parts of your app.
134-
135-
:::image type="content" source="media/aspire-dashboard-trace.png" lightbox="media/aspire-dashboard-trace.png" alt-text="A screenshot showing an .NET Aspire dashboard trace for the webfrontend /weather route.":::
136-
137-
- **Metrics**: Displays various instruments and meters that are exposed and their corresponding dimensions for your app. Metrics conditionally expose filters based on their available dimensions.
138-
139-
:::image type="content" source="media/aspire-dashboard-metrics.png" lightbox="media/aspire-dashboard-metrics.png" alt-text="A screenshot showing an Aspire dashboard metrics page for the webfrontend.":::
140-
141-
For more information, see [.NET Aspire dashboard overview](../fundamentals/dashboard.md).
142-
143-
🤓 Congratulations! You created your first .NET Aspire application.
144-
145145
## Next steps
146146

147147
- [.NET Aspire components overview](../fundamentals/components-overview.md)

docs/includes/clean-up-resources.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Clean up resources
2+
3+
Run the following Azure CLI command to delete the resource group when you no longer need the Azure resources you created. Deleting the resource group also deletes the resources contained inside of it.
4+
5+
```azurecli
6+
az group delete --name <your-resource-group-name>
7+
```

docs/messaging/messaging-components.md

+2
Original file line numberDiff line numberDiff line change
@@ -294,3 +294,5 @@ The sample app is now ready for testing. Verify that the data submitted to the A
294294
1. Switch back to the **AspireWorkerService** logs. You should see the test message printed in the output logs.
295295

296296
Congratulations! You created and configured an ASP.NET Core API that connects to Azure Service Bus using Aspire components.
297+
298+
[!INCLUDE [clean-up-resources](../includes/clean-up-resources.md)]

docs/storage/azure-storage-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,6 @@ Since you choose to use Azurite, there's no need to clean up these resources whe
241241
:::zone-end
242242
:::zone pivot="azure-portal,azure-cli"
243243

244-
Don't forget to clean up any Azure resources when you're done testing them.
244+
[!INCLUDE [clean-up-resources](../includes/clean-up-resources.md)]
245245

246246
:::zone-end

0 commit comments

Comments
 (0)