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/migration/migrate-plan-consumption-to-flex.md
+48-39Lines changed: 48 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -670,7 +670,7 @@ The location of your project source files depends on the `WEBSITE_RUN_FROM_PACKA
670
670
671
671
---
672
672
673
-
#### [Azure CLI](#tab/azure-cli)
673
+
#### [Linux](#tab/linux/azure-cli)
674
674
675
675
1. Use this [`az functionapp config appsettings list`](/cli/azure/functionapp/config/appsettings#az-functionapp-config-appsettings-list) command to get the `WEBSITE_RUN_FROM_PACKAGE` app setting, if present:
676
676
@@ -683,8 +683,6 @@ The location of your project source files depends on the `WEBSITE_RUN_FROM_PACKA
683
683
684
684
1. If the `WEBSITE_RUN_FROM_PACKAGE` value is `1` or nothing, use this script to get the deployment package for the existing app:
685
685
686
-
##### [Linux](#tab/linux)
687
-
688
686
```azurecli
689
687
appName=<APP_NAME>
690
688
rgName=<RESOURCE_GROUP>
@@ -709,7 +707,20 @@ The location of your project source files depends on the `WEBSITE_RUN_FROM_PACKA
709
707
fi
710
708
```
711
709
712
-
##### [Windows](#tab/windows)
710
+
Again, replace `<RESOURCE_GROUP>` and `<APP_NAME>` with your resource group name and app name. The package .zip file is downloaded to the directory from which you executed the command.
711
+
712
+
#### [Windows](#tab/windows/azure-cli)
713
+
714
+
1. Use this [`az functionapp config appsettings list`](/cli/azure/functionapp/config/appsettings#az-functionapp-config-appsettings-list) command to get the `WEBSITE_RUN_FROM_PACKAGE` app setting, if present:
715
+
716
+
```azurecli
717
+
az functionapp config appsettings list --name <APP_NAME> --resource-group <RESOURCE_GROUP> \
In this example, replace `<RESOURCE_GROUP>` and `<APP_NAME>` with your resource group name and app name, respectively. If this command returns a URL, then you can download the deployment package file from that remote location and skip to the next section.
722
+
723
+
1. If the `WEBSITE_RUN_FROM_PACKAGE` value is `1` or nothing, use this script to get the deployment package for the existing app:
713
724
714
725
```azurecli
715
726
appName=<APP_NAME>
@@ -739,11 +750,9 @@ The location of your project source files depends on the `WEBSITE_RUN_FROM_PACKA
739
750
fi
740
751
```
741
752
742
-
---
743
-
744
753
Again, replace `<RESOURCE_GROUP>` and `<APP_NAME>` with your resource group name and app name. The package .zip file is downloaded to the directory from which you executed the command.
745
754
746
-
#### [Azure portal](#tab/azure-portal)
755
+
#### [Linux](#tab/linux/azure-portal)
747
756
748
757
1. In the [Azure portal], search for or otherwise navigate to your function app page.
749
758
@@ -753,30 +762,32 @@ The location of your project source files depends on the `WEBSITE_RUN_FROM_PACKA
753
762
754
763
1. If the `WEBSITE_RUN_FROM_PACKAGE` setting doesn't exist or is set to `1`, you must download the package from the specific storage account, which depends on whether you are running on Linux or Windows.
755
764
756
-
1. Get the storage account name from app settings:
757
-
758
-
##### [Linux](#tab/linux)
759
-
760
-
The `AzureWebJobsStorage` or `AzureWebJobsStorage__accountName` application setting. For a connection string, the `AccountName` is the name your storage account.
765
+
1. Get the storage account name from the `AzureWebJobsStorage` or `AzureWebJobsStorage__accountName` application setting. For a connection string, the `AccountName` is the name your storage account.
761
766
762
-
##### [Windows](#tab/windows)
767
+
1. In the portal, search for your storage account name.
763
768
764
-
The `WEBSITE_CONTENTAZUREFILECONNECTIONSTRING` contains the connection string for the deployment file share, where the `AccountName` is the name your storage account. Also, make a note of the `WEBSITE_CONTENTSHARE` value, which is the name of the files share.
765
-
766
-
---
769
+
1. In the storage account page, locate the deployment package and download it.
767
770
768
-
1. In the portal, search for your storage account name.
771
+
1. Expand **Data storage** > **Containers** and select `scm_releases`. Choose the file named `scm-latest-<APP_NAME>.zip` and select **Download**.
769
772
770
-
1. In the storage account page, locate the deployment package and download it:
773
+
#### [Windows](#tab/windows/azure-portal)
771
774
772
-
##### [Linux](#tab/linux)
773
-
774
-
Expand **Data storage** > **Containers** and select `scm_releases`. Choose the file named `scm-latest-<APP_NAME>.zip` and select **Download**.
775
-
##### [Windows](#tab/windows)
775
+
1. In the [Azure portal], search for or otherwise navigate to your function app page.
776
+
777
+
1. In the left menu, expand **Settings** > **Environment variables** and see if a setting named `WEBSITE_RUN_FROM_PACKAGE` exists.
776
778
777
-
Expand **Data storage** > **File shares**, select the share name from `WEBSITE_CONTENTSHARE`, and browse to the `data\SitePackages` subfolder. Choose the most recent .zip file and select **Download**.
779
+
1. If `WEBSITE_RUN_FROM_PACKAGE` exists, check if it's set to a value of `1` or a URL. If set to a URL, that is the URL of where the zip file for your app content. Download the zip file from that URL location that is owned by you.
780
+
781
+
1. If the `WEBSITE_RUN_FROM_PACKAGE` setting doesn't exist or is set to `1`, you must download the package from the specific storage account, which depends on whether you are running on Linux or Windows.
782
+
783
+
1. Get the storage account name from the `WEBSITE_CONTENTAZUREFILECONNECTIONSTRING` setting, where the `AccountName` is the name your storage account. Also, make a note of the `WEBSITE_CONTENTSHARE` value, which is the name of the file share.
784
+
785
+
1. In the portal, search for your storage account name.
786
+
787
+
1. In the storage account page, locate the deployment package and download it.
788
+
789
+
1. Expand **Data storage** > **File shares**, select the share name from `WEBSITE_CONTENTSHARE`, and browse to the `data\SitePackages` subfolder. Choose the most recent .zip file and select **Download**.
778
790
779
-
---
780
791
---
781
792
782
793
The deployment package is compressed using the `squashfs` format. To see what's inside the package, you must use tools that can decompress this format.
@@ -809,17 +820,15 @@ A careful final review helps ensure a smoother migration process and minimizes t
809
820
810
821
### Step 2: Create an app in the Flex Consumption plan
811
822
812
-
There are various ways to create a function app in the Flex Consumption plan along with other required Azure resources:
823
+
You can There are various ways to create a function app in the Flex Consumption plan along with other required Azure resources:
| Visual Studio Code | [Visual Studio Code deployment](../functions-develop-vs-code.md#publish-to-azure) |
831
+
| Visual Studio | [Visual Studio deployment](../functions-develop-vs.md#publish-to-azure) |
823
832
824
833
>[!TIP]
825
834
>When possible, you should use Microsoft Entra ID for authentication instead of connection strings, which contain shared keys. Using managed identities is a best pratice that improves security by eliminating the need to store shared secrets directly in application settings. If your original app used connection strings, the Flex Consumption plan is designed to support managed identities. Most of these links show you how to enable managed identities in your function app.
@@ -1305,7 +1314,7 @@ If your original app had any IP-based inbound access restrictions, you can recre
1305
1314
1306
1315
##### [Azure CLI](#tab/azure-cli)
1307
1316
1308
-
Use this [`az functionapp config access-restriction add`](cli/azure/functionapp/config/access-restriction#az-functionapp-config-access-restriction-add) command for each IP access restriction you want to replicate in the new app:
1317
+
Use this [`az functionapp config access-restriction add`](/cli/azure/functionapp/config/access-restriction#az-functionapp-config-access-restriction-add) command for each IP access restriction you want to replicate in the new app:
1309
1318
1310
1319
```azurecli
1311
1320
az functionapp config access-restriction add --name <APP_NAME> --resource-group <RESOURCE_GROUP> \
@@ -1364,18 +1373,18 @@ Functions provides several ways to deploy your code, either from the code projec
1364
1373
1365
1374
You should update your existing deployment workflows to deploy your source code to your new app:
1366
1375
1367
-
+[Build and deploy using Azure Pipelines](./functions-how-to-azure-devops.md)
1368
-
+[Build and deploy using GitHub Actions](./functions-how-to-github-actions.md)
1376
+
+[Build and deploy using Azure Pipelines](../functions-how-to-azure-devops.md)
1377
+
+[Build and deploy using GitHub Actions](../functions-how-to-github-actions.md)
1369
1378
1370
1379
You can also create a new continuous deployment workflow for your new app. For more information, see [Continuous deployment for Azure Functions](../functions-continuous-deployment.md)
1371
1380
1372
1381
##### [Ad-hoc code deployment](#tab/ad-hoc-code)
1373
1382
1374
1383
You can use these tools to acheive a one-off deployment of your code project to your new plan:
1375
1384
1376
-
+[Visual Studio Code](../functions-develop-vs-code.md#deploy-project-files)
1385
+
+[Visual Studio Code](../functions-develop-vs-code.md#republish-project-files)
0 commit comments