我正在Azure上使用azure容器服务在mesos集群上设置一个多容器应用程序,并且当前卡在链接容器中。
我的设置简介: - 使用Azure容器服务在Azure上部署Mesos集群 - 它是一个3容器应用程序 - A,B和C - B依赖于A和C依赖于A和B- - A目前已部署
如何链接上述容器?
谢谢,Suraj
I am setting up a multi container application on mesos cluster on Azure using azure container service and currently stuck in linking containers.
My setup brief info: - Mesos cluster is deployed on Azure using Azure container service - It's a 3 container application - A, B and C - B is dependent on A and C is dependent on A & B- - A is deployed currently
How can I link the above containers?
Thanks, Suraj
最满意答案
如果通过链接你的意思是Docker的--link那么那些弃用的练习和容器间通信应该使用Docker网络和端口映射来完成。
对于DC / OS - 您有一些不同的方法来实现这一点(也称为服务发现)。 我写了一篇博文,通过示例解释这些不同的工具: http : //blog.itaysk.com/2017/04/28/dcos-service-discovery-and-load-balancing-by-example
如果您不想阅读该长篇文章并寻求建议:尝试使用VIP。
创建应用程序时(从Marathon或DC / OS UI),请查找“VIP”设置。 在那里输入IP(可以是组成的IP)和端口。 您可以在此IP:端口下发现您的服务。
有关VIP的更多信息: https : //dcos.io/docs/1.9/networking/load-balancing-vips/virtual-ip-addresses/
If by linking you mean Docker's --link then thats deprecated practice and inter-container communication should be done using Docker networks and port mappings.
For DC/OS - you have some different ways to achieve this (also called Service Discovery). I have written a blog post explaining these different tools by examples: http://blog.itaysk.com/2017/04/28/dcos-service-discovery-and-load-balancing-by-example
If you don't want to read through that long post and looking for a recommendation: Try using VIPs.
When creating the application (either from Marathon or DC/OS UI), look for the 'VIP' setting. Enter an IP there (it can be a made up IP) and port. Your service will be discoverable under this IP:Port.
More on VIPs: https://dcos.io/docs/1.9/networking/load-balancing-vips/virtual-ip-addresses/
更多推荐
发布评论