BJ
BJ
Jul 27, 2017 · 1 min read

We ended up running consul inside the same container as the app. This was due to the use of macvlan, which doesn’t seem to work with registrator. Each container gets assigned it’s own IP, which is bridged to a parent interface on the host (you’ll have a bunch of vlan interfaces on the hosts for whatever subnets you want to be able to hop on). We just needed to make sure leave_on_terminate was set and also in the entrypoint script, we used exec when running something, so it was assigned PID 1. It needs PID 1 in order to receive the SIGTERMs successfully when you scale down or terminate the containers for whatever reason. Seems to work well.

    BJ

    Written by

    BJ