为Docker Swarm应用程序设置与Azure容器注册表的持续集成 [英] Setting up continuous integration with Azure Container Registry for a Docker Swarm application

查看:107
本文介绍了为Docker Swarm应用程序设置与Azure容器注册表的持续集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我们目前有一个构建管道,用于构建各种Docker swarm Windows容器并将它们上传到Azure容器注册表。我正在试图弄清楚如何设置一个发布管道,以便我们可以将我们的应用程序部署到公共的
站点,以便在QA测试人员面前快速而经常地测试并获取版本。


我一直在阅读有关Azure容器实例的一些内容,我不确定这是否有助于我们使用docker swarm。我们有YAML文件编排我们容器的构建过程,但它是从构建容器到部署软件的路径,我只是b $ b。任何帮助将不胜感激。



更新:由于我们正在运行Windows容器,我发现只能执行CI单个容器实例。现在,说我有10个容器。我是否会启动每个容器的实例,每个容器都有自己的CI管道?我如何获得
网络设置,以便他们可以相互交谈?

解决方案


ACI提供了一种快速简便的方法来部署和运行独立容器。


您可以在容器组中为Linux容器提供多个容器。但是对于Windows容器,我们每个容器组只能运行一个容器。


如果你有多个Windows容器并希望在ACI上部署,他们必须通过DNS标签或公共ip进行通信 您还可以考虑部署

VNET中的ACI
使他们通过私人IP地址进行通信。  


但ACI不会提供服务发现链接kubernetes或Docker swarm。 根据ACI,所有容器都是独立的,我们可以在它们之间建立关系。


因此,如果您需要服务发现,那么最好选择Docker swarm over ACI。当然,如果您愿意迁移,kubernetes将是更好的选择。 AKS使用ACI为windows容器提供支持。



对于发布管道,您可以考虑使用Azure devops。



链接
介绍了如何为docker swarm设置CI CD。 不推荐将Docker swarm部署为Azure中的托管服务。但该文档适用于使用Azure devops为docker swarm设置CI CD。



试试这个并告诉我你是否还有更多的问题。


Hi everybody, we currently have a build pipeline set up to build various Docker swarm Windows containers and upload them to the Azure Container Registry. I am trying to figure out how to set up a release pipeline so that we can deploy our app to a public site for testing and getting versions out in front of QA testers quickly and often.

I have been doing some reading on Azure Container Instances and I'm not sure if that will help us with docker swarm. We have YAML files orchestrating the build process of our containers but it is the path from built containers to deployed software that I am hazy on. Any help would be greatly appreciated.

Update: Since we are running Windows containers, I have discovered that it is only possible to do CI on a single container instance. Now, say I have 10 containers. Do I spin up an instance of each container, each with its own CI pipeline? How do I get the networking set up so that they can talk to each other?

解决方案

Hi,

ACI provides a quick and easy way deploy and run standalone containers.

You can have multiple containers in a container group for linux container. But for windows containers we can run only one container per container group.

If you have multiple windows containers and want to deploy on ACI, They have to communicate via the DNS label or public ip only.  You can also consider deploying the ACI in a VNET to make them communicate over the private ip address.  

But ACI wont provider service discovery link kubernetes or Docker swarm.  As per ACI, All containers are standalone and we can create a relation between them.

So if you need service discovery, Then its better to choose Docker swarm over ACI. Of course kubernetes will be the better option if you are willing to migrate. AKS provides support for windows containers using ACI.

For the release pipeline, You can consider using Azure devops.

This link describes about setting up a CI CD for docker swarm.  Deploying Docker swarm as a managed service in Azure is deprecated. But the doc holds good for setting up CI CD for docker swarm with Azure devops.

Try this out and let me know if you have more questions.


这篇关于为Docker Swarm应用程序设置与Azure容器注册表的持续集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆