You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/deployment/azure/aca-deployment-azd-in-depth.md
+2
Original file line number
Diff line number
Diff line change
@@ -403,3 +403,5 @@ azd env new
403
403
```
404
404
405
405
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.
Copy file name to clipboardexpand all lines: docs/deployment/azure/aca-deployment.md
+2
Original file line number
Diff line number
Diff line change
@@ -52,3 +52,5 @@ Click the **Application URL** link to open the front end in the browser.
52
52
:::image type="content" source="../../media/front-end-open.png" alt-text="A screenshot of the .NET Aspire app's front end in the browser.":::
53
53
54
54
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.
Copy file name to clipboardexpand all lines: docs/get-started/build-your-first-aspire-app.md
+59-59
Original file line number
Diff line number
Diff line change
@@ -7,21 +7,77 @@ ms.topic: quickstart
7
7
8
8
# Quickstart: Build your first .NET Aspire app
9
9
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.
11
11
12
-
In this quickstart, you explore the following tasks:
12
+
In this quickstart, you'll explore the following tasks:
13
13
14
14
> [!div class="checklist"]
15
15
>
16
16
> - 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
18
18
> - Create an API and use service discovery to connect to it.
19
19
> - Orchestrate communication between a front end UI, a back end API, and a local Redis cache.
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
+
25
81
The solution consists of the following projects:
26
82
27
83
-**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:
86
142
87
143
For more information, see [Make HTTP requests with the `HttpClient`](/dotnet/fundamentals/networking/http/httpclient) class.
88
144
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.
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.
0 commit comments