我目前正在尝试通过 ARM 模板将 Web 作业部署为我的应用服务的一部分。有没有人有通过 zip 部署执行此操作的示例?
我在这里和那里看到了有关为计划作业创建手臂模板的链接问题,但是对于如何为连续的网络作业执行此操作/如何利用 zip deploy 来部署他们的文件并不完全清楚。
我目前有这样的部分
{
"comments": "Defines an Azure Web App.",
"type": "Microsoft.Web/sites",
"name": "[parameters('siteName')]",
"apiVersion": "2015-08-01",
"location": "[variables('siteLocation')]",
"kind": "appservice",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]",
"ConfigJson",
"MdsConfigXml",
],
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]": "empty"
},
"properties": {
"sourcePlatform": "Unknown",
"targetPlatform": "Unknown",
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('appServicePlanResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",
"siteConfig": {
"phpVersion": "off",
"scmType": null,
"netFrameworkVersion": "v4.0",
"use32BitWorkerProcess": false,
"webSocketsEnabled": false,
"alwaysOn": "[parameters('alwaysOn')]",
"httpLoggingEnabled": true,
"logsDirectorySizeLimit": 50,
"appSettings": [
{
"name": "APPINSIGHTS_PROFILERFEATURE_VERSION",
"value": "1.0.0",
"slotSetting": true
}
]
}
},
"resources": [
{
"apiVersion": "2018-02-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"name": "ZipDeploy",
"properties": {
"packageUri": "[parameters('deployPackageUrl')]"
},
"type": "extensions"
}
]
}
将 deployPackageURL 链接到我的 zip 文件,其中包含我的 webjob 项目。但是,在检查应用服务资源时,没有部署任何 webjob。谁能指出我的 ARM 模板中可能存在的错误?谢谢!