카타코더 Weave - Create Multi-Host Networks Using Weave Net

1 개요[ | ]

카타코더 Weave - Create Multi-Host Networks Using Weave Net
카타코더 Weave - Weave Net
카타코더 Weave
# 🔗 제목
카타코더 Weave e
🡵 카타코더 Weave - Create Multi-Host Networks Using Weave Net
🡵 카타코더 Weave - Visualise Containers Using Weave Scope
🡵 카타코더 Weave - Installing Weave Scope on Kubernetes

2 Link Two Docker Hosts[ | ]

host01
root@host01:~# ip a | grep ens
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet 172.17.0.25/16 brd 172.17.255.255 scope global ens3
host02
root@host02:~# ip a | grep ens
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet 172.17.0.36/16 brd 172.17.255.255 scope global ens3
host01
root@host01:~# curl -sL https://github.com/weaveworks/weave/releases/download/v2.3.0/weave -o /usr/bin/weave
root@host01:~# chmod +x /usr/bin/weave
root@host01:~#
host02
root@host02:~# curl -sL https://github.com/weaveworks/weave/releases/download/v2.3.0/weave -o /usr/bin/weave
root@host02:~# chmod +x /usr/bin/weave
root@host02:~#
host01
root@host01:~# weave launch
2.3.0: Pulling from weaveworks/weave
88286f41530e: Pull complete
ad4e50ed2c08: Pull complete
b3f4c952e7c2: Pull complete
5e27cb7f1c2b: Pull complete
f9dfb03c1d7b: Pull complete
Digest: sha256:02914df933ffd52c6daf8c4ced33e48dad36e4d4fd9e684d5004cd72236ced60
Status: Downloaded newer image for weaveworks/weave:2.3.0
latest: Pulling from weaveworks/weavedb
9b0681f946a1: Pull complete
Digest: sha256:c280cf4e7208f4ca0d2514539e0f476dd12db70beacdc368793b7736de023d8d
Status: Downloaded newer image for weaveworks/weavedb:latest
Unable to find image 'weaveworks/weaveexec:2.3.0' locally
2.3.0: Pulling from weaveworks/weaveexec
88286f41530e: Already exists
ad4e50ed2c08: Already exists
b3f4c952e7c2: Already exists
5e27cb7f1c2b: Already exists
f9dfb03c1d7b: Already exists
21771db04786: Pull complete
5fbda086495f: Pull complete
80427f885b22: Pull complete
0c4698905755: Pull complete
Digest: sha256:eb8eb1d83fc58716b20621d397d63737a18f86cbed1fedb1d71671cfc486517b
Status: Downloaded newer image for weaveworks/weaveexec:2.3.0
5dc41e164069515142517c7a29a732b2386ac07636f06787037aab9175b6e23b
host02
root@host02:~# weave launch 172.17.0.25
2.3.0: Pulling from weaveworks/weave
88286f41530e: Pull complete
ad4e50ed2c08: Pull complete
b3f4c952e7c2: Pull complete
5e27cb7f1c2b: Pull complete
f9dfb03c1d7b: Pull complete
Digest: sha256:02914df933ffd52c6daf8c4ced33e48dad36e4d4fd9e684d5004cd72236ced60
Status: Downloaded newer image for weaveworks/weave:2.3.0
latest: Pulling from weaveworks/weavedb
9b0681f946a1: Pull complete
Digest: sha256:c280cf4e7208f4ca0d2514539e0f476dd12db70beacdc368793b7736de023d8d
Status: Downloaded newer image for weaveworks/weavedb:latest
Unable to find image 'weaveworks/weaveexec:2.3.0' locally
2.3.0: Pulling from weaveworks/weaveexec
88286f41530e: Already exists
ad4e50ed2c08: Already exists
b3f4c952e7c2: Already exists
5e27cb7f1c2b: Already exists
f9dfb03c1d7b: Already exists
21771db04786: Pull complete
5fbda086495f: Pull complete
80427f885b22: Pull complete
0c4698905755: Pull complete
Digest: sha256:eb8eb1d83fc58716b20621d397d63737a18f86cbed1fedb1d71671cfc486517b
Status: Downloaded newer image for weaveworks/weaveexec:2.3.0
3f8509091c6f4b4543b590ad7bb5763ecbf08071d87e9e2b9970e2e2916456a5
host01
root@host01:~# weave status

        Version: 2.3.0 (version 2.5.1 available - please upgrade!)

        Service: router
       Protocol: weave 1..2
           Name: a2:30:17:d8:17:f8(host01)
     Encryption: disabled
  PeerDiscovery: enabled
        Targets: 0
    Connections: 1 (1 established)
          Peers: 2 (with 2 established connections)
 TrustedSubnets: none

        Service: ipam
         Status: idle
          Range: 10.32.0.0/12
  DefaultSubnet: 10.32.0.0/12

        Service: dns
         Domain: weave.local.
       Upstream: 62.210.16.6, 62.210.16.7
            TTL: 1
        Entries: 0

        Service: proxy
        Address: unix:///var/run/weave/weave.sock

        Service: plugin (legacy)
     DriverName: weave

3 Configure Hosts[ | ]

host01
root@host01:~# weave env
export DOCKER_HOST=unix:///var/run/weave/weave.sock
root@host01:~# eval $(weave env)
root@host01:~#
host02
root@host02:~# weave env
export DOCKER_HOST=unix:///var/run/weave/weave.sock
root@host02:~# eval $(weave env)
root@host02:~#

4 Start Service on Host 1[ | ]

host01
root@host01:~# docker run --name ws -d katacoda/docker-http-server
Unable to find image 'katacoda/docker-http-server:latest' locally
latest: Pulling from katacoda/docker-http-server
f139eb4721ae: Pull complete
Digest: sha256:76dc8a47fd019f80f2a3163aba789faf55b41b2fb06397653610c754cb12d3ee
Status: Downloaded newer image for katacoda/docker-http-server:latest
735b01e5c17ba720891917eee7eccbf9b537cc701774d76114f628c5582e4608

5 Access Service from Host 2[ | ]

host02
root@host02:~# docker run alpine ping -c1 ws
PING ws (10.32.0.1): 56 data bytes
64 bytes from 10.32.0.1: seq=0 ttl=64 time=1.291 ms

--- ws ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 1.291/1.291/1.291 ms
root@host02:~# docker run benhall/curl curl -sS ws
Unable to find image 'benhall/curl:latest' locally
latest: Pulling from benhall/curl
12b41071e6ce: Pull complete
fb1cef6edba2: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:637b3e063550593071b172916c896ea3590d4ecd67ae2399e54672b5770e114e
Status: Downloaded newer image for benhall/curl:latest
<h1>This request was processed by host: ws.weave.local</h1>
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}