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
# Tutorial: Deploy a Dapr application to Azure Container Apps with an Azure Resource Manager or Bicep template
15
15
16
-
[Dapr](https://dapr.io/) (Distributed Application Runtime) is a runtime that helps you build resilient stateless and stateful microservices. In this tutorial, a sample Dapr solution is deployed to Azure Container Apps via an Azure Resource Manager (ARM) or Bicep template.
17
-
18
-
You learn how to:
16
+
[Dapr](./dapr-overview.md) (Distributed Application Runtime) helps developers build resilient, reliable microservices. In this quickstart, you learn how to enable Dapr sidecars to run alongside your microservices container apps using either Azure Resource Manager or Bicep templates. You'll:
19
17
20
18
> [!div class="checklist"]
21
19
>
22
-
> - Create an Azure Blob Storage for use as a Dapr state store
23
-
> - Deploy a Container Apps environment to host container apps
24
-
> - Deploy two dapr-enabled container apps: one that produces orders and one that consumes orders and stores them
25
-
> - Assign a user-assigned identity to a container app and supply it with the appropriate role assignment to authenticate to the Dapr state store
26
-
> - Verify the interaction between the two microservices.
27
-
28
-
With Azure Container Apps, you get a [fully managed version of the Dapr APIs](./dapr-overview.md) when building microservices. When you use Dapr in Azure Container Apps, you can enable sidecars to run next to your microservices that provide a rich set of capabilities.
29
-
30
-
In this tutorial, you deploy the solution from the Dapr [Hello World](https://github.com/dapr/quickstarts/tree/master/tutorials/hello-world) quickstart.
31
-
32
-
The application consists of:
33
-
34
-
- A client (Python) container app to generate messages.
35
-
- A service (Node) container app to consume and persist those messages in a state store
36
-
37
-
The following architecture diagram illustrates the components that make up this tutorial:
20
+
> - Deploy a template that launches everything you need to run microservices that produce and consume messages and store them in an Azure Blob Storage state store.
21
+
> - Verify the interaction between the two microservices in the Azure portal.
38
22
39
23
:::image type="content" source="media/microservices-dapr/azure-container-apps-microservices-dapr.png" alt-text="Architecture diagram for Dapr Hello World microservices on Azure Container Apps":::
40
24
25
+
This quickstart mirrors the applications you deploy in the open-source Dapr [Hello World](https://github.com/dapr/quickstarts/tree/master/tutorials/hello-world) quickstart.
- the Container Apps environment and associated Log Analytics workspace for hosting the hello world Dapr solution
153
-
- an Application Insights instance for Dapr distributed tracing
154
-
- the `nodeapp` app server running on `targetPort: 3000` with Dapr enabled and configured using: `"appId": "nodeapp"` and `"appPort": 3000`, and a user-assigned identity with access to the Azure Blob storage via a Storage Data Contributor role assignment
155
-
- A Dapr component of `"type": "state.azure.blobstorage"` scoped for use by the `nodeapp` for storing state
156
-
- the Dapr-enabled, headless `pythonapp` that invokes the `nodeapp` service using Dapr service invocation
127
+
- The Container Apps environment and associated Log Analytics workspace for hosting the hello world Dapr solution.
128
+
- An Application Insights instance for Dapr distributed tracing.
129
+
- The `nodeapp` app server running on `targetPort: 3000` with Dapr enabled and configured using:
130
+
-`"appId": "nodeapp"`
131
+
-`"appPort": 3000`
132
+
- A user-assigned identity with access to the Azure Blob storage via a Storage Data Contributor role assignment
133
+
- A Dapr component of `"type": "state.azure.blobstorage"` scoped for use by the `nodeapp` for storing state.
134
+
- The Dapr-enabled, headless `pythonapp` that invokes the `nodeapp` service using Dapr service invocation.
135
+
- A Microsot Entra ID role assignment for the Node.js app used by the Dapr component to establish a connection to Blob storage.
157
136
158
137
## Verify the result
159
138
@@ -165,7 +144,7 @@ You can confirm that the services are working correctly by viewing data in your
165
144
166
145
1. Go to the newly created storage account in your resource group.
167
146
168
-
1. Select **Containers** from the menu on the left side.
147
+
1. Select **Data Storage** > **Containers** from the menu on the left side.
169
148
170
149
1. Select the created container.
171
150
@@ -179,7 +158,7 @@ You can confirm that the services are working correctly by viewing data in your
179
158
180
159
### View Logs
181
160
182
-
Data logged via a container app are stored in the `ContainerAppConsoleLogs_CL` custom table in the Log Analytics workspace. You can view logs through the Azure portal or from the command line. Wait a few minutes for the analytics to arrive for the first time before you query the logged data.
161
+
Logs from container apps are stored in the `ContainerAppConsoleLogs_CL` custom table in the Log Analytics workspace. You can view logs through the Azure portal or via the CLI. There may be a small delay initially for the table to appear in the workspace.
183
162
184
163
Use the following command to view logs in bash or PowerShell.
185
164
@@ -223,7 +202,9 @@ nodeapp Got a new order! Order ID: 63 PrimaryResult 2021-10-22
223
202
224
203
## Clean up resources
225
204
226
-
Once you're done, run the following command to delete your resource group along with all the resources you created in this tutorial.
205
+
Since `pythonapp` continuously makes calls to `nodeapp` with messages that get persisted into your configured state store, it is important to complete these cleanup steps to avoid ongoing billable operations.
206
+
207
+
If you'd like to delete the resources created as a part of this walkthrough, run the following command.
> Since `pythonapp` continuously makes calls to `nodeapp` with messages that get persisted into your configured state store, it is important to complete these cleanup steps to avoid ongoing billable operations.
245
-
246
-
---
247
-
248
224
> [!TIP]
249
225
> Having issues? Let us know on GitHub by opening an issue in the [Azure Container Apps repo](https://github.com/microsoft/azure-container-apps).
# Tutorial: Deploy a Dapr application to Azure Container Apps using the Azure CLI
14
+
# Quickstart: Deploy a Dapr application to Azure Container Apps using the Azure CLI
15
15
16
-
[Dapr](./dapr-overview.md) (Distributed Application Runtime) helps developers build resilient, reliable microservices. In this quickstart, you learn how to enable Dapr sidecars to run alongside your microservices container apps. You'll
16
+
[Dapr](./dapr-overview.md) (Distributed Application Runtime) helps developers build resilient, reliable microservices. In this quickstart, you learn how to enable Dapr sidecars to run alongside your microservices container apps. You'll:
17
17
18
18
> [!div class="checklist"]
19
19
> * Create a Container Apps environment and Azure Blog Storage state store for your container apps.
0 commit comments