运行同一个ARM模板,为什么Azure App Service Environment又做长部署?

Why does Azure App Service Environment do the long deployment again when running the same ARM template?

我使用了 quick start template 201-web-app-ase-ilb-create to start creating my ASE (in West Europe). I let it run overnight. At some point in time it timed out. The next morning - looking at the portal - the deployment seemed to have succeeded. Before continuing adding the certificate for the ILB with the quick start template 201-web-app-ase-ilb-configure-default-ssl 我重新运行了第一个模板(只是为了确定)。尽管第一个模板没有对配置进行明显的更改,但长时间的部署再次开始 - 可能还要持续几个小时。

每次我们使用 ARM 模板部署 ASE 时,我都看到过这种行为。即使 Front-End 和工作池、应用服务计划和应用服务没有改变,它们仍然需要几个小时。我们通常做的是使用增量部署并将 ASE 放在不同的模板中。这并不理想,但我们还没有找到任何其他方法来避免 long-running 部署。

HTH

我还看到了一些非常长的 运行 ASE 部署。通常最后会失败。我发现这些长期部署存在两个常见问题。

  1. 最常见的是我忘记了 pre-requisite 让端口 454 和 455 对所有的 ASE 子网开放。这就是让 azure 发挥其魔力并使用证书确保安全的原因。如果您看到部署时间超过 2 小时,请确保您已在 NSG 中制定此规则。

  2. 我的dependson block放错地方了,等了很久

关于从 Visual Studio 部署时的 "access token expiry",即使 Visual Studio 告诉您它已超时,部署仍然可以在 Azure 中完成。基本上,您已经将 ARM 模板发送到 Azure,因此超时仅意味着有关 VS 中部署的轮询信息停止工作。