stone2083

          docker overlay network

          * docker overlay network
          ** multi host deploy arch
              +-------------------- VM1 ------------------+                +-------------------- VM2 ------------------+
              |    +-------+      +-------+  +-------+    |                |    +-------+      +-------+  +-------+    |
              |    |  KV   |      | App 1 |  | App 2 |    |                |    |  KV   |      | App 1 |  | App 2 |    |
              |    +-------+      +-------+  +-------+    |                |    +-------+      +-------+  +-------+    |
              |    +---------------------------------+    |                |    +---------------------------------+    |
              |    |            docker               |    |                |    |            docker               |    |
              |    +---------------------------------+    |                |    +---------------------------------+    |
              +----------------- region 1 ----------------+                +----------------- region 2 ----------------+
              *** distributed kv (consul, etcd, zookeeper etc.) for storing vxlan information
              *** using public network ip for cross region / using private network ip for same region
          ** docker overlay network arch
              +------------------------------  VM  ----------------------------------+
              |    +------------------- container  adapter ---------------------+    |
              |    |  +-----------------------+      +-----------------------+  |    |
              |    |  |         eth1          |      |          eth0         |  |    |
              |    |  |     192.168.16.6      |      |        10.0.0.2       |  |    |
              |    |  +----------|------------+      +------------|----------+  |    |
              |    +-------------|--------------------------------|-------------+    |
              |                  |                                |                  |
              |    +-------------|------ virtual  adapter --------V-------------+    |
              |    |             V                           +-- veth --+       |    |
              |    |  +---------- vm ---------+      +---------- ns ---------+  |    |
              |    |  |    docker_gwbridge    |      |           br0         |  |    |
              |    |  |    192.168.16.1/20    |      |       10.0.0.1        |  |    |
              |    |  +----------|------------+      +-----------|-----------+  |    |
              |    |             |                   +-------- vxlan --------+  |    |
              |    +-------------|-------------------------------|--------------+    |
              |             NAT  |                               |                   |
              |                  |------------------------------ |                   |
              |                                                  |                   |
              |    +-------------------- physical adapter -------V--------------+    |
              |    |  +-----------------------+      +-----------------------+  |    |
              |    |  |         eth0          |      |         eth1          |  |    |
              |    |  |     10.251.22.206     |      |     121.42.163.81     |  |    |
              |    |  +-----------------------+      +-----------------------+  |    |
              |    +------------------------------------------------------------+    |
              +----------------------------------------------------------------------+
          ** using docker overlay network in aliyun ecs
             *** upgrade linux kernel to > 3.16
                      sudo apt-get install linux-generic-lts-vivid
             *** install distributed kv (consul, etcd, zookeeper etc. ) and run
                      curl -OL https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip
             *** docker create overlay network
                  docker network create -d overlay prod
             *** docker run with overlay network
                  docker run -t -t --net prod ubuntu /bin/bash
             *** set namespace bridge and arp
                  ip netns exec 1-63e4c396fe bridge fdb add 02:42:0a:00:00:03 dev vxlan1 dst 121.42.163.81
                  ip netns exec ca993c48d217 arp -s 10.0.0.3 02:42:0a:00:00:03
          ** reference docs
              http://115.28.140.124:8000
              https://github.com/docker/libnetwork/blob/master/docs/overlay.md
              http://askubuntu.com/questions/636221/ubuntu-14-04-with-3-19-kernel-wants-to-update-to-3-16
              http://hustcat.github.io/docker-overlay-network-practice/
              http://hustcat.github.io/overlay-network-base-ovs/
              http://www.slideshare.net/neependra/docker-multi-host-networking-rachit-arora-ibm
              http://sirile.github.io/2015/09/30/cassandra-cluster-on-docker-swarm-and-overlay-networking-using-docker-experimental-1.9.html
              https://github.com/docker/docker/releases
          

          posted on 2015-10-21 15:14 stone2083 閱讀(5769) 評(píng)論(0)  編輯  收藏 所屬分類: linux

          主站蜘蛛池模板: 内丘县| 新化县| 渝北区| 宜兰县| 岑巩县| 岑溪市| 阳泉市| 原阳县| 新闻| 浦县| 新安县| 汤阴县| 鸡泽县| 友谊县| 通榆县| 邹平县| 邓州市| 青阳县| 睢宁县| 且末县| 洛扎县| 大丰市| 车致| 新丰县| 土默特左旗| 湟中县| 洱源县| 湖口县| 巩留县| 开封市| 元江| 长丰县| 巩义市| 新宁县| 城口县| 南充市| 苍溪县| 宜州市| 汝城县| 贵定县| 海丰县|