Azure ASEv3环境中标准逻辑应用的工作流部署失败问题
未关联ASE的标准逻辑应用情况
未关联ASE的Standard Logic App,其工作流、映射、架构等内容会存储在关联存储账户的FileShare中(路径为site\wwwroot)。更新或创建工作流操作简单:
- 直接修改
workflow.json文件,或新增包含该文件的文件夹 - 也可通过Azure CLI命令上传包含所有工作流及工件的压缩包:
az logicapp deployment source config-zip --name $LogicApp --resource-group $RG --subscription $Subscription --src $artifactszip
以上方式均可正常运行。
关联ASE的标准逻辑应用部署问题
将上述方式用于关联ASE的App Service Plan中的Standard Logic App时,出现以下问题:
- 该Standard Logic App未关联文件存储;
- 执行
az logicapp deployment source config-zip命令时触发错误:
az : WARNING: Getting scm site credentials for zip deployment
WARNING: Starting zip deployment. This operation can take a while to complete ...
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: HTTPSConnectionPool(host='mylaname.scm.myasename.appserviceenvironment.net', port=443): Max retries exceeded with url:
/api/zipdeploy?isAsync=true (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x068F51C0>: Failed to establish a new connection: [Errno
11001] getaddrinfo failed'))
注:两种场景下的目标Logic App均为无状态(stateless)类型。
已尝试的其他部署方式
尝试使用az deployment group create命令部署ARM模板:
az deployment group create --resource-group $RG --template-file .\myarmfile.json
该命令可正常部署以下资源:
- App Service Environment(
Microsoft.Web/hostingEnvironments) - App Service Plan(
Microsoft.Web/serverfarms) - Standard Logic App(
Microsoft.Web/sites)
但无法部署Standard Logic App中的工作流(Microsoft.Web/sites/workflow)。
另外,使用ARMCLIENT获取了工作流的ARM模板示例:
armclient.exe get https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{LAresourceGroup}/providers/Microsoft.Web/sites/la-main-dev/workflows/wf-main-dev?api-version=2018-11-01
命令返回了可用的ARM模板,但目前找不到将其上传至Azure的有效方法。
内容的提问来源于stack exchange,提问作者Muriel

