1

I'm using Serf to instead of linking containers together so I can restart Docker containers without links breaking. On each server I run one container with the Serf ports exposed that every other local container links to and then uses Serf to discover other local containers. This works fine one a single server, but I'd like to link the two servers and make them discover the services running on both of them, so I could eventually bring in another slave server if I want.

The problem is that once I connect both of them by running serf join with the other servers IP, they get in contact but then immediately see the other server and its containers as failing, which is logical.

Is there anything I can do just use one cluster for both containers and servers? Or is there anything else I can use for communication between servers and containers instead of my own hacked up solution?

  • Do you already know about [kubernetes](http://kubernetes.io)? – dawud Jul 13 '15 at 12:55
  • If you are just looking to orchestrate Docker containers do have a look at Swarm. Another option would be Weave which creates an overlay network to interconnect the containers. – milosgajdos Jul 14 '15 at 09:55
  • 1
    Looking around, reading articles about Weaver, it seems that Flannel would solve my problem, while still being reasonably fast. But, instead of coding yet something else, it seems worthwhile to just go straight to Kubernetes. Thanks for the pointers! – Vincent den Boer Jul 15 '15 at 09:19

1 Answers1

0

What you're looking for is the counterpart for Serf, also by Hashicorp, called Consul. In fact, Consul uses the Serf library for some of its baser functionality, but it is used for this higher-level orchestration, specifically of Serf-managed clusters. In my experience, Serf is great for orchestrating containers on a single host, and Consul is great for orchestrating the hosts themselves, effectively connecting your Serf instances in the way you imagine (the term Consul documentation uses for this is "datacenter aware" behavior).

L0j1k
  • 133
  • 5