本文介绍了使用ARM模板更新Azure Function App时,设置FUNCTIONS_EXTENSION_VERSION是否足够?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用这样的ARM模板为我的Function App部署资源时

When deploying the resources for my Function App with an ARM template like this

{
  "type": "Microsoft.Web/sites",
  "kind": "functionapp",
  "name": "[parameters('appNameFunctions')]",
  "apiVersion": "2015-08-01",
  "location": "West Europe",
  "tags": {},
  "properties": {
    "name": "[parameters('appNameFunctions')]",
    "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('aspNameFunctions'))]"
  },
  "resources": [
    {
      "name": "appsettings",
      "type": "config",
      "apiVersion": "2015-08-01",
      "dependsOn": [
        "[concat('Microsoft.Web/sites/', parameters('appNameFunctions'))]"
      ],
      "tags": {
        "displayName": "fnAppSettings"
      },
      "properties": {
        "AzureWebJobsStorage":"[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountNameFunctions'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions')), '2015-05-01-preview').key1)]",
        "AzureWebJobsDashboard":"[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountNameFunctions'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions')), '2015-05-01-preview').key1)]",
        "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING":"[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountNameFunctions'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions')), '2015-05-01-preview').key1)]",
        "WEBSITE_CONTENTSHARE":"[parameters('appNameFunctions')]",
        "FUNCTIONS_EXTENSION_VERSION":"~0.8",
        "AZUREJOBS_EXTENSION_VERSION":"beta",
        "WEBSITE_NODE_DEFAULT_VERSION":"6.5.0"
      }
    }
  ],
  "dependsOn": [
    "[resourceId('Microsoft.Web/serverfarms', parameters('aspNameFunctions'))]",
    "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions'))]"
  ]
}

仅将 FUNCTIONS_EXTENSION_VERSION 设置为所需版本就足够了,App Service会自动调整/加载正确的运行时,还是还有其他需要调整或执行的内容?

is it sufficient to just set FUNCTIONS_EXTENSION_VERSION to the desired version and App Service automatically adjusts / loads the correct runtime or is there something else that needs to be adjusted or executed?

推荐答案

是的,这已经足够了,这正是您单击按钮升级应用程序时Portal所做的事情.

Yes, it is sufficient, and is exactly what the Portal does when you click the button to upgrade your app.

另一个选项是将其设置为最新",这意味着它将始终使用最新的.尽管这样做的风险会受到变更的影响.

Another option is to set it to "latest", which means it will always use the very latest. Though the risk in doing that is to be affected by breaking changes.

这篇关于使用ARM模板更新Azure Function App时,设置FUNCTIONS_EXTENSION_VERSION是否足够?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 15:11