{
  "path": "/3mathzjifuqec",
  "site": "at://did:plc:s5wwr2ccjuqricdxiyiuspfv/site.standard.publication/3m7zleg5tyc2b",
  "$type": "site.standard.document",
  "title": "Multi-host Docker Networking",
  "content": {
    "$type": "pub.leaflet.content",
    "pages": [
      {
        "id": "3mathzjiei7jg",
        "$type": "pub.leaflet.pages.linearDocument",
        "blocks": [
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "index": {
                    "byteEnd": 85,
                    "byteStart": 57
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#italic"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 116,
                    "byteStart": 96
                  },
                  "features": [
                    {
                      "uri": "/posts/cm-infra-2.html",
                      "$type": "pub.leaflet.richtext.facet#link"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 190,
                    "byteStart": 176
                  },
                  "features": [
                    {
                      "uri": "https://docs.docker.com/v1.8/compose/",
                      "$type": "pub.leaflet.richtext.facet#link"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 275,
                    "byteStart": 258
                  },
                  "features": [
                    {
                      "uri": "https://docs.docker.com/engine/userguide/networking/get-started-overlay/",
                      "$type": "pub.leaflet.richtext.facet#link"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 299,
                    "byteStart": 285
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 306,
                    "byteStart": 301
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 550,
                    "byteStart": 542
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#italic"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 575,
                    "byteStart": 569
                  },
                  "features": [
                    {
                      "uri": "https://fr.wikipedia.org/wiki/Utilisateur:Hashar",
                      "$type": "pub.leaflet.richtext.facet#link"
                    }
                  ]
                }
              ],
              "plaintext": "A while ago I grew the desire to experiment implementing multi-host docker networking to deploy Capital Match system. This system is made of several interlinked containers and docker-compose does not (did not?) work across several hosts. It seemed to me the official solution based on docker-machine, swarm and service registry was a bit complicated: Our configuration is mostly static, e.g. number, distribution and relationship between containers in known at deploy time. Hence I looked for a simpler solution, something that would be more networky: I am indebted to hashar for suggesting a GRE-based solution and to  the following references for actual technical details:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.unorderedList",
              "children": [
                {
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "index": {
                          "byteEnd": 83,
                          "byteStart": 0
                        },
                        "features": [
                          {
                            "uri": "https://goldmann.pl/blog/2014/01/21/connecting-docker-containers-on-multiple-hosts/",
                            "$type": "pub.leaflet.richtext.facet#link"
                          }
                        ]
                      }
                    ],
                    "plaintext": "https://goldmann.pl/blog/2014/01/21/connecting-docker-containers-on-multiple-hosts/"
                  },
                  "children": []
                },
                {
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "index": {
                          "byteEnd": 54,
                          "byteStart": 0
                        },
                        "features": [
                          {
                            "uri": "https://wiredcraft.com/blog/multi-host-docker-network/",
                            "$type": "pub.leaflet.richtext.facet#link"
                          }
                        ]
                      }
                    ],
                    "plaintext": "https://wiredcraft.com/blog/multi-host-docker-network/"
                  },
                  "children": []
                }
              ]
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [],
              "plaintext": "I did some experiment in shell, jotted down a couple of notes in my journal and moved on to other, more urgent duties. I had a couple of hours left on Friday last week and I stumbled on those notes which were sitting there, on my hard disk, and I decided it was a good time to write a blog post about this experiment."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "index": {
                    "byteEnd": 862,
                    "byteStart": 852
                  },
                  "features": [
                    {
                      "uri": "https://github.com/abailly/multi-host-docker",
                      "$type": "pub.leaflet.richtext.facet#link"
                    }
                  ]
                }
              ],
              "plaintext": "I started writing this post embedding script fragments but I quickly wanted to check what I wrote actually worked, so I began running those scripts fragment. But then it made this experiment non repeatable which is definitely annoying if you make a mistake, want to restart from scratch, change some parameters... So I decided this stuff would warrant a minor project of its own where I could provide all the needed code to configure multi-host networking in docker based on GRE tunnels. I have done quite a share of system configuration and operations management and have been able to use or create some useful tools to streamline ops in Haskell, so it quickly became obvious I would need to write some Haskell code. So what started as a mundane journal cleanup ended up being a full-blown yak-shaving session whose result can be found in this github repository."
            }
          }
        ]
      }
    ]
  },
  "publishedAt": "2016-05-30T00:00:00Z"
}