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: articles/azure-functions/functions-core-tools-reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ When you supply `<PROJECT_FOLDER>`, the project is created in a new folder with
53
53
|
54
54
55
55
> [!NOTE]
56
-
> When you use either `--docker` or `--dockerfile` options, Core Tools automatically create the Dockerfile for C#, JavaScript, Python, and PowerShell functions. For Java functions, you must manually create the Dockerfile. For more information, see [Creating containerized function apps](functions-how-to-custom-container.md#creating-containerized-function-apps).
56
+
> When you use either `--docker` or `--docker-only` options, Core Tools automatically create the Dockerfile for C#, JavaScript, Python, and PowerShell functions. For Java functions, you must manually create the Dockerfile. For more information, see [Creating containerized function apps](functions-how-to-custom-container.md#creating-containerized-function-apps).
#Customer intent: As an Azure Functions developer, I want to understand how Visual Studio Code supports Azure Functions so that I can more efficiently create, publish, and maintain my Functions projects.
11
11
---
@@ -98,37 +98,27 @@ You also need these prerequisites to [run and debug your functions locally](#run
98
98
99
99
The Functions extension lets you create the required function app project at the same time you create your first function. Use these steps to create an HTTP-triggered function in a new project. An [HTTP trigger](functions-bindings-http-webhook.md) is the simplest function trigger template to demonstrate.
100
100
101
-
1. In the Activity bar, select the Azure icon. In the **Workspace (Local)** area, open the **+** list, and select **Create Function**.
101
+
1. In Visual Studio Code, press <kbd>F1</kbd> to open the command palette and search for and run the command `Azure Functions: Create New Project...`. Select the directory location for your project workspace, and then choose **Select**.
102
102
103
-
:::image type="content" source="./media/functions-create-first-function-vs-code/create-new-project.png" alt-text="Screenshot of create a new project window.":::
103
+
You can either create a new folder or choose an empty folder for the project workspace, but don't choose a project folder that's already part of a workspace.
104
104
105
-
1. When prompted, select **Create new project**. Select the directory location for your project workspace, and then choose **Select**.
106
-
107
-
You can either create a new folder or choose an empty folder for the project workspace, but don't choose a project folder that's already part of a workspace.
105
+
You can instead run the command `Azure Functions: Create New Containerized Project...` to also get a Dockerfile generated for the project.
108
106
109
107
1. When prompted, **Select a language** for your project. If necessary, choose a specific language version.
110
108
111
109
1. Select the **HTTP trigger** function template, or you can select **Skip for now** to create a project without a function. You can always [add a function to your project](#add-a-function-to-your-project) later.
112
110
113
-
:::image type="content" source="./media/functions-develop-vs-code/select-http-trigger.png" alt-text="Screenshot for selecting HTTP trigger.":::
114
-
115
111
> [!TIP]
116
112
> You can view additional templates by selecting the **Change template filter** option and setting the value to **Core** or **All**.
117
113
118
114
1. For the function name, enter **HttpExample**, select Enter, and then select **Function** authorization.
119
115
120
116
This authorization level requires that you provide a [function key](functions-bindings-http-webhook-trigger.md#authorization-keys) when you call the function endpoint.
121
117
122
-
:::image type="content" source="./media/functions-develop-vs-code/create-function-auth.png" alt-text="Screenshot for creating function authorization.":::
123
-
124
118
1. From the dropdown list, select **Add to workspace**.
125
119
126
-
:::image type="content" source="./media/functions-develop-vs-code/add-to-workplace.png" alt-text=" Screenshot for selectIng Add to workplace.":::
127
-
128
120
1. In the **Do you trust the authors of the files in this folder?** window, select **Yes**.
129
121
130
-
:::image type="content" source="./media/functions-develop-vs-code/select-author-file.png" alt-text="Screenshot to confirm trust in authors of the files.":::
131
-
132
122
Visual Studio Code creates a function in your chosen language and in the template for an HTTP-triggered function.
133
123
134
124
### Generated project files
@@ -142,6 +132,8 @@ The project template creates a project in your chosen language and installs the
142
132
> [!IMPORTANT]
143
133
> Because the **local.settings.json** file can contain secrets, make sure to exclude the file from your project source control.
144
134
135
+
***Dockerfile** (optional): Lets you create a containerized function app from your project by using an approved base image for your project. You only get this file when you run the command `Azure Functions: Create New Containerized Project...`. You can add a Dockerfile to an existing project using the `func init --docker-only` command in [Core Tools](./functions-core-tools-reference.md#func-init).
136
+
145
137
Depending on your language, these other files are created:
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-how-to-custom-container.md
+61-10Lines changed: 61 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,11 +63,13 @@ For a complete example, see [Create a function app in a local container](functio
63
63
64
64
#### [Visual Studio Code](#tab/vs-code)
65
65
66
-
The Azure Functions extension for Visual Studio Code doesn't provide a way to create a Dockerfile when you create the project. However, you can instead create the Dockerfile for an existing project by using the `--docker-only` option when you run the [`func init`](./functions-core-tools-reference.md#func-init) command in the Terminal windows of an existing project folder, as in the following example:
66
+
The Azure Functions extension for Visual Studio Code creates your Dockerfile when it creates your code project. To create a containerized code project:
67
67
68
-
```console
69
-
func init --docker-only
70
-
```
68
+
1. In Visual Studio Code, press <kbd>F1</kbd> to open the command palette and search for and run the command `Azure Functions: Create New Containerized Project...`.
69
+
70
+
1. Select a folder for your new code project, choose **Select**, and follow the remaining prompts.
71
+
72
+
1. After your project is created, you can open and review the Dockerfile in the root folder you chose for your project.
71
73
72
74
#### [Visual Studio](#tab/vs)
73
75
@@ -83,7 +85,7 @@ func init --docker-only
83
85
84
86
### Creating your function app in a container
85
87
86
-
With a Core Tools-generated Dockerfile in your code project, you can use Docker to create the containerized function app on your local computer. The following `docker build` command creates an image of your containerized functions from the project in the local directory:
88
+
With a Functions-generated Dockerfile in your code project, you can use Docker to create the containerized function app on your local computer. The following `docker build` command creates an image of your containerized functions from the project in the local directory:
@@ -114,21 +116,41 @@ Replace `<DOCKER_ID>` with your Docker Hub account ID.
114
116
115
117
---
116
118
117
-
At this point, you need to update the deployment to use the new image. The following example updates the function app to use the new image:
119
+
At this point, you need to update an existing deployment to use the new image. You can updates the function app to use the new image either by using the Azure CLI or in the [Azure portal]:
120
+
121
+
### [Azure CLI](#tab/azure-cli2)
118
122
119
123
```azurecli
120
124
az functionapp config container set --image <IMAGE_NAME> --registry-password <SECURE_PASSWORD>--registry-username <USER_NAME> --name <APP_NAME> --resource-group <RESOURCE_GROUP>
121
125
```
122
126
123
127
In this example, `<IMAGE_NAME>` is the full name of the new image with version. Private registries require you to supply a username and password. Store these credentials securely.
124
128
129
+
### [Azure portal](#tab/portal)
130
+
:::zone pivot="container-apps"
131
+
1. In the [Azure portal], locate your function app and select **Settings** > **Configuration** on the left-hand side.
132
+
133
+
1. Under **Image settings**, update the **Image tag** value to the update version in the registry, and then select **Save**.
134
+
135
+
The specified image version is deployed to your app.
136
+
::: zone-end
137
+
:::zone pivot="azure-functions"
138
+
1. In the [Azure portal], locate your function app and select **Deployment** > **Deployment center** on the left-hand side.
139
+
140
+
1. Under **Settings**, select **Container registry** for **Source**, update the **Full Image Name and Tag** value to the update version in the registry, and then select **Save**.
141
+
142
+
The specified image version is deployed to your app.
143
+
::: zone-end
144
+
145
+
---
146
+
125
147
:::zone pivot="azure-functions"
126
148
You should also consider [enabling continuous deployment](#enable-continuous-deployment-to-azure).
127
149
::: zone-end
128
150
:::zone pivot="azure-functions"
129
151
## Azure portal create using containers
130
152
131
-
When you create a function app in the [Azure portal](https://portal.azure.com), you can choose to deploy the function app from an image in a container registry. To learn how to create a containerized function app in a container registry, see [Creating your function app in a container](#creating-your-function-app-in-a-container).
153
+
When you create a function app in the [Azure portal], you can choose to deploy the function app from an image in a container registry. To learn how to create a containerized function app in a container registry, see [Creating your function app in a container](#creating-your-function-app-in-a-container).
132
154
133
155
The following steps create and deploy an existing containerized function app from a container registry.
134
156
@@ -168,7 +190,7 @@ The following steps create and deploy an existing containerized function app fro
168
190
:::zone pivot="container-apps"
169
191
## Azure portal create using containers
170
192
171
-
When you create a function app in the [Azure portal](https://portal.azure.com), you can choose to deploy the function app from an image in a container registry. To learn how to create a containerized function app in a container registry, see [Creating your function app in a container](#creating-your-function-app-in-a-container).
193
+
When you create a function app in the [Azure portal], you can choose to deploy the function app from an image in a container registry. To learn how to create a containerized function app in a container registry, see [Creating your function app in a container](#creating-your-function-app-in-a-container).
172
194
173
195
The following steps create and deploy an existing containerized function app from a container registry.
174
196
@@ -206,12 +228,38 @@ The following steps create and deploy an existing containerized function app fro
206
228
207
229
## Work with images in Azure Functions
208
230
209
-
When your function app container is deployed from a registry, Functions maintains information about the source image. Use the following commands to get data about the image or change the deployment image used:
231
+
When your function app container is deployed from a registry, Functions maintains information about the source image.
232
+
233
+
### [Azure CLI](#tab/azure-cli2)
234
+
235
+
Use the following commands to get data about the image or change the deployment image used:
210
236
211
237
+[`az functionapp config container show`](/cli/azure/functionapp/config/container#az-functionapp-config-container-show): returns information about the image used for deployment.
212
238
213
239
+[`az functionapp config container set`](/cli/azure/functionapp/config/container#az-functionapp-config-container-set): change registry settings or update the image used for deployment, as shown in the previous example.
214
240
241
+
### [Azure portal](#tab/portal)
242
+
:::zone pivot="container-apps"
243
+
1. In the [Azure portal], locate your function app and select **Settings** > **Configuration** on the left-hand side.
244
+
245
+
1. Under **Image settings**, you can review information about the currently deployed image or change the deployment to a different image. You can also change the container environment allocation settings.
246
+
247
+
1. To make updates, modify any of the image settings, such as the **Image tag**, or container environment allocation settings and select **Save**.
248
+
249
+
Based on your changes, a new image is deployed to your app or new allocations are provisioned.
250
+
::: zone-end
251
+
:::zone pivot="azure-functions"
252
+
1. In the [Azure portal], locate your function app and select **Deployment** > **Deployment center** on the left-hand side.
253
+
254
+
1. Under **Settings**, select **Container registry** for **Source** and you can review information about the currently deployed image.
255
+
256
+
1. To make updates, modify any of the image settings, such as the **Full Image Name and Tag** and then select **Save**.
257
+
258
+
The a new image is deployed to your app based on your new settings.
259
+
::: zone-end
260
+
261
+
---
262
+
215
263
:::zone pivot="container-apps"
216
264
## Container Apps workload profiles
217
265
@@ -333,10 +381,13 @@ SSH enables secure communication between a container and a client. With SSH enab
333
381
<!---For when we support connecting to the container console -->
334
382
::: zone-end
335
383
336
-
## Next steps
384
+
## Related articles
337
385
338
386
The following articles provide more information about deploying and managing containers:
339
387
340
388
+ [Azure Container Apps hosting of Azure Functions](./functions-container-apps-hosting.md)
@@ -75,12 +75,12 @@ Maximum instances are given on a per-function app (Consumption) or per-plan (Pre
75
75
|**[Flex Consumption plan]**|[Per-function scaling](./flex-consumption-plan.md#per-function-scaling). Event-driven scaling decisions are calculated on a per-function basis, which provides a more deterministic way of scaling the functions in your app. With the exception of HTTP, Blob storage (Event Grid), and Durable Functions, all other function trigger types in your app scale on independent instances. All HTTP triggers in your app scale together as a group on the same instances, as do all Blob storage (Event Grid) triggers. All Durable Functions triggers also share instances and scale together. | Limited only by total memory usage of all instances across a given region. For more information, see [Instance memory](flex-consumption-plan.md#instance-memory). |
76
76
|**[Premium plan]**|[Event driven](event-driven-scaling.md). Scale out automatically, even during periods of high load. Azure Functions infrastructure scales CPU and memory resources by adding more instances of the Functions host, based on the number of events that its functions are triggered on. |**Windows:** 100<br/>**Linux:** 20-100<sup>2</sup>|
|**[Container Apps]**|[Event driven](event-driven-scaling.md). Scale out automatically, even during periods of high load. Azure Functions infrastructure scales CPU and memory resources by adding more instances of the Functions host, based on the number of events that its functions are triggered on. |10-300<sup>4</sup> |
78
+
|**[Container Apps]**|[Event driven](event-driven-scaling.md). Scale out automatically, even during periods of high load. Azure Functions infrastructure scales CPU and memory resources by adding more instances of the Functions host, based on the number of events that its functions are triggered on. | 300-1000<sup>4</sup> |
79
79
80
80
1. During scale-out, there's currently a limit of 500 instances per subscription per hour for Linux apps on a Consumption plan. <br/>
81
81
2. In some regions, Linux apps on a Premium plan can scale to 100 instances. For more information, see the [Premium plan article](functions-premium-plan.md#region-max-scale-out). <br/>
82
82
3. For specific limits for the various App Service plan options, see the [App Service plan limits](../azure-resource-manager/management/azure-subscription-service-limits.md#app-service-limits).
83
-
4. On Container Apps, you can set the [maximum number of replicas](../container-apps/scale-app.md#scale-definition), which is honored as long as there's enough cores quota available.
83
+
4. On Container Apps, the default is 10 instances, but you can set the [maximum number of replicas](../container-apps/scale-app.md#scale-definition), which has an overall maximum of 1000. This setting is honored as long as there's enough cores quota available. When you create your function app from the Azure portal you're limited to 300 instances.
0 commit comments