Skip to content

Commit 19b3a53

Browse files
initial draft
1 parent 38f9f69 commit 19b3a53

File tree

2 files changed

+69
-15
lines changed

2 files changed

+69
-15
lines changed

articles/container-apps/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@
129129
href: storage-mounts.md
130130
- name: Create an Azure Files storage mount
131131
href: storage-mounts-azure-files.md
132+
- name: Use Azure Functions
133+
href: functions-usage.md
132134
- name: Use dynamic sessions
133135
items:
134136
- name: Code interpreter sessions

articles/container-apps/functions-usage.md

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
11
---
22
title: Create an Azure Functions app with auto scaling rules on Azure Container Apps
3-
description: Learn to create an Azure Functions app pre-configured with auto scaling rules in Azure Container Apps.
3+
description: Learn to create an Azure Functions app preconfigured with auto scaling rules in Azure Container Apps.
44
services: container-apps
55
author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.topic: how-to
8-
ms.date: 03/19/2025
8+
ms.date: 03/25/2025
99
ms.author: cshoe
1010
zone_pivot_groups: azure-cli-or-portal
1111
---
1212

1313
# Use Azure Functions in Azure Container Apps
1414

15-
you can create your container app pre-configured with auto-scaling rules fine-tuned for Azure Functions.
15+
Azure Functions allows you to run small pieces of code (functions) without worrying about application infrastructure. When you combine Azure Functions with Azure Container Apps, you get the best of both worlds: the simplicity and event-driven nature of Functions with the containerization and advanced deployment capabilities of Container Apps.
1616

17-
TODO
17+
This article shows you how to create and deploy an Azure Functions app that runs within Azure Container Apps. You'll learn how to:
18+
19+
- Set up a containerized Functions app with pre-configured auto scaling rules
20+
- Deploy your application using either the Azure portal or Azure CLI
21+
- Verify your deployed function with an HTTP trigger
22+
23+
By running Functions in Container Apps, you benefit from automatic scaling based on HTTP traffic, easy configuration, and a fully managed container environment—all without having to manage the underlying infrastructure yourself.
24+
25+
## Scenarios
26+
27+
Azure Functions in Container Apps provides a versatile combination of services to meet the needs of your applications. The following scenarios are representative of the types of situations where paring Azure Container Apps with Azure Functions gives you the control and scaling features you need.
28+
29+
- **Line-of-business APIs**: Package custom libraries, packages, and APIs with Functions for line-of-business applications.
30+
31+
- **Migration support**: Migration of on-premises legacy and/or monolith applications to cloud native microservices on containers.
32+
33+
- **Event-driven architecture**: Supports event-driven applications for workloads already running on Azure Container Apps.
34+
35+
- **Serverless workloads**: Serverless workload processing of videos, images, transcripts, or any other processing intensive tasks that required GPU compute resources.
1836

1937
## Prerequisites
2038

@@ -65,9 +83,9 @@ TODO
6583

6684
1. Under the *Container details* section, enter the following values.
6785

68-
| Property | value |
86+
| Property | Value |
6987
|---|---|
70-
| Name | This box is pre-filled with your selection in the last section. |
88+
| Name | This box is prefilled with your selection in the last section. |
7189
| Image source | Select **Docker Hub or other registries** |
7290
| Subscription | Select your subscription |
7391
| Image type | Select **Public**. |
@@ -76,8 +94,27 @@ TODO
7694

7795
1. For *Development stack*, select **.NET**
7896

97+
1. Select the **Ingress** to switch to the Ingress section and enter the following values.
98+
99+
| Property | Value |
100+
|---|---|
101+
| Ingress | Select the checkbox to enable ingress. |
102+
| Ingress traffic | Select **Accepting traffic from anywhere**. |
103+
| Ingress type | Select **HTTP**. |
104+
| Target port | Enter **80**. |
105+
79106
1. Select **Review + Create**.
80107

108+
1. Select **Create**.
109+
110+
1. Once the deployment is complete, select **Go to resource**.
111+
112+
1. From the *Overview* page, select the link next to *Application URL* to open the application in a new browser tab.
113+
114+
1. Append `/api/HttpExample` to the end of the URL.
115+
116+
A message stating "HTTP trigger function processed a request" is returned in the browser.
117+
81118
:::zone-end
82119

83120
:::zone pivot="azure-cli"
@@ -125,7 +162,7 @@ To sign in to Azure from the CLI, run the following command and follow the promp
125162
1. Create environment variables.
126163
127164
```bash
128-
GROUP_NAME="my-aca-functions-group"
165+
RESOURCE_GROUP_NAME="my-aca-functions-group"
129166
CONTAINER_APP_NAME="my-aca-functions-app"
130167
ENVIRONMENT_NAME="my-aca-functions-environment"
131168
LOCATION="westus"
@@ -135,26 +172,41 @@ To sign in to Azure from the CLI, run the following command and follow the promp
135172
136173
```azurecli
137174
az group create \
138-
--name $GROUP_NAME \
175+
--name $RESOURCE_GROUP_NAME \
139176
--location $LOCATION \
140177
--output none
141178
```
142179
143-
1. Create Functions container app.
180+
1. Create the Container Apps environment.
181+
182+
```azurecli
183+
az containerapp env create \
184+
--name $ENVIRONMENT_NAME \
185+
--resource-group $RESOURCE_GROUP_NAME \
186+
--location $LOCATION \
187+
--output none
188+
```
189+
190+
1. Create an Azure Functions container app.
144191
145192
```azurecli
146193
az containerapp create \
147-
--resource-group $GROUP_NAME \
194+
--resource-group $RESOURCE_GROUP_NAME \
148195
--name $CONTAINER_APP_NAME \
149-
--environment $CONNECTED_ENVIRONMENT_ID \
150-
--environment-type connected \
151-
--image mcr.microsoft.com/k8se/quickstart:latest \
152-
--target-port 80 \
196+
--environment $ENVIRONMENT_NAME \
197+
--image mcr.microsoft.com/azure-functions/dotnet8-quickstart-demo:1.0 \
153198
--ingress external \
154-
--kind functions \
199+
--target-port 80 \
200+
--kind functionapp \
155201
--query properties.outputs.fqdn
156202
```
157203
204+
This command returns the URL of your Functions app. Copy this URL and paste it into a web browser.
205+
206+
1. Append `/api/HttpExample` to the end of the URL.
207+
208+
A message stating "HTTP trigger function processed a request" is returned in the browser.
209+
158210
:::zone-end
159211
160212
## Related content

0 commit comments

Comments
 (0)