【问题标题】:Deploying to App Service Environment from Azure DevOps从 Azure DevOps 部署到应用服务环境
【发布时间】:2019-03-13 14:01:01
【问题描述】:

子网中有 1 个内部 ASE。在同一网络的不同子网中,我们部署了一个虚拟机,充当Azure DevOps Agent Windows v2

我们能够从访问此虚拟网络的机器手动部署 Web 应用程序(使用 Visual Studio),但无法从 Azure DevOps 进行部署。

这就是我们所做的

  • 存在默认 NSG 规则,因此在 80/443 端口上启用流量。更新了 NSG 以允许进出以下流量:13.107.6.18313.107.9.183(检查所有端口)
  • 管道任务添加标志-allowUntrusted

我们在部署过程中得到的错误是:

More Information: Could not connect to the remote computer ("{myapp}.scm.{customdomain}.com"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: Unable to connect to the remote server
Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xx.xx.xx.xx:443
Error count: 1.

我们是否遗漏了 NSG 规则中的任何内容?

【问题讨论】:

    标签: azure azure-devops azure-deployment azure-app-service-envrmnt


    【解决方案1】:

    如果构建代理可通过 Internet 访问并且与 ILB ASE 位于同一网络上,则基于 Internet 的 CI 系统(例如 GitHub 和 Azure DevOps)仍可与 ILB ASE 一起使用。因此,对于 Azure DevOps,如果构建代理是在与 ILB ASE 相同的 VNET 上创建的(不同的子网也可以),它将能够从 Azure DevOps git 中提取代码并部署到 ILB ASE。

    https://docs.microsoft.com/en-us/azure/app-service/environment/create-ilb-ase

    您也可以按照this文章中的详细步骤进行操作

    希望这会有所帮助!

    【讨论】:

    • 以上都是真的。 CI 代理可通过 Internet 访问,与 ILB ASE 在同一网络中,代理上的 hosts 文件具有将 ILB IP 映射到每个 Web 应用程序的 ASE url (ASE + SCM) 的条目。但仍然出现此错误
    • 您可以尝试从 webapp 的 Kudu 控制台 tcpping 到 VM 并检查是否成功?
    • 解决了这个问题。有 2 个 NSG - 一个在 Agent VM subnet,另一个在 ASE subnet。应该允许Port 80/443 上的流量
    猜你喜欢
    • 2020-04-16
    • 2018-05-26
    • 1970-01-01
    • 2019-01-18
    • 2020-05-18
    • 1970-01-01
    • 1970-01-01
    • 2020-01-25
    • 1970-01-01
    相关资源
    最近更新 更多