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) 評論(0)  編輯  收藏 所屬分類: linux

          主站蜘蛛池模板: 江陵县| 拜城县| 从化市| 五莲县| 伊宁市| 通许县| 镇远县| 南陵县| 青铜峡市| 昌邑市| 日土县| 佛教| 桐城市| 宣城市| 洛宁县| 砚山县| 红河县| 蕲春县| 襄城县| 东山县| 河间市| 外汇| 崇左市| 资兴市| 鱼台县| 洞口县| 黄山市| 双柏县| 平湖市| 新竹县| 六枝特区| 垦利县| 体育| 三明市| 张家界市| 日土县| 洛川县| 河东区| 湘潭县| 碌曲县| 酉阳|