我是否需要 SSH 隧道来使用完整 CI/CD 管道从 Windows Server 2016 部署 Docker 容器

Do I need SSH tunnel to deploy Docker containers from Windows Server 2016 using Full CI/CD pipeline

非常感谢您对前面问题的帮助

我正在继续我的研究,但有些停滞不前,因为我尝试按照以下文章的说明进行操作,该文章解释了如何创建 CI/CD 管道以部署多容器应用程序。

https://docs.microsoft.com/en-us/azure/container-service/dcos-swarm/container-service-docker-swarm-setup-ci-cd

此处引用的代码示例是为 Linux 应用程序构建的,我无法 运行 它或从中创建 Docker 容器。

因此,我有以下问题(这些问题可能到处都是,对此我深表歉意)

  1. 当我在 Windows 2016 服务器上创建 .Net Core Web API 时,我是否有可能创建一个可以部署到 Linux环境? (便携式 .NET Core Web API 应用程序)

  2. 当我想利用 Visual Studio Team Services 的 CI/CD 管道时,我真的需要使用 Docker Swarm 创建 Azure 容器服务吗?据我了解,ACS 是一个基于 Linux 的环境,而我会在 Windows Server 2016

  3. 上创建基于 Windows 的 docker 容器
  4. 如果我可以轻松地将这些容器部署到 Kubernetes 集群,那么在处理基于 Windows Server 2016 的 docker 容器时,我真的需要关心 ACS 和 SSH 隧道吗有 Windows 个节点

  5. 我是否可以使用完整的 CI/CD 管道将 docker 在 Windows Server 2016 上创建的容器部署到 Visual Studio Team Services不使用基于 Linux 的 SSH tunnel/ACS

非常感谢您的慷慨投入

米哈伊尔

1.When I create a .Net Core Web API on Windows 2016 server, is there any possibility for me to create an application that I could deploy to a Linux environment?

是的,.Net 核心是 Microsoft 和 GitHub 上的 .NET 社区维护的通用开发平台。它是跨平台的,支持Windows、macOS和Linux,可用于设备、云和embedded/IoT场景。所以我们可以在 Linux 环境中部署 .net core web api 应用程序。

也许我们可以参考这个link

2.When I would like to take advantage of CI/CD pipeline using Visual Studio Team Services, do I really need to create Azure Container Service with Docker Swarm?

不,可以使用 kubernetes 和 visual studio 团队服务在 Azure 容器服务上创建 CI/CD 管道。更多关于VSTS和ACS k8s的内容,请参考这个link.

3.Do I really need to be concerned with ACS and SSH tunnel when dealing with Windows Server 2016 based docker containers if I could easily deploy those containers to a Kubernetes cluster with Windows nodes

如果你想使用 VSTS 来部署你的 .net 核心容器,我认为我们应该连接到 ACS 集群。

如果要使用ACS k8s,需要添加kubernetes连接:

4.Is there an alternative way for me to deploy docker containers created on Windows Server 2016 using Full CI/CD pipeline to Visual Studio Team Services without using the Linux based SSH tunnel/ACS

您的意思是您想要使用 ACS,但不想连接基于 Linux 的 SSH 隧道?如果我是对的,我们可以在你的本地网络和 Azure Vnet 之间部署一个站点到站点的 VPN,这样我们就可以像连接本地一样连接 k8s。