@@ -9,18 +9,18 @@ Docker + Swarm + Netplugin == Awesome!!
9
9
10
10
Checkout netplugin tree and bringup vagrant setup
11
11
```
12
- mkdir -p github.com/contiv/
13
- cd github/contiv
12
+ mkdir -p src/ github.com/contiv/
13
+ cd src/ github/contiv
14
14
git clone -b demo https://github.com/contiv/netplugin.git
15
15
CONTIV_NODES=2 make build demo
16
16
```
17
17
This brings up two VM cluster with docker, swarm and netplugin/netmaster running.
18
18
19
- To make docker commands start using swarm instead of docker, set the following environment variable.
19
+ Set the following environment variable to make docker client talk to Swarm
20
20
```
21
21
export DOCKER_HOST=tcp://192.168.2.10:2375
22
22
```
23
- Now, you should be able to see the information about the cluster
23
+ Now, you should be able to see the information about the swarm cluster
24
24
```
25
25
$ docker info
26
26
Containers: 0
@@ -52,7 +52,7 @@ $ docker ps
52
52
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
53
53
```
54
54
55
- When netplugin/netmaster start up, they create two networks as below
55
+ Netmaster creates two networks by default
56
56
```
57
57
$ contivctl network list
58
58
Listing all networks for tenant default
@@ -61,13 +61,13 @@ private No vxlan 10.1.0.0/16 10.1.254.254
61
61
public Yes vlan 192.168.1.0/24 192.168.1.254
62
62
```
63
63
64
- you can run containers and attach them to one of these networks as below.
64
+ You can run containers and attach them to one of these networks as below.
65
65
```
66
66
$ docker run -itd --publish-service foo.private ubuntu bash
67
67
f291e269b45a5877f6fc952317feb329e12a99bda3a44a740b4c3307ef87954c
68
68
```
69
69
70
- you can verify its running and has the correct service name
70
+ You can verify its running and has the correct service name
71
71
72
72
```
73
73
$ docker ps
@@ -78,7 +78,7 @@ $ docker inspect f291e269b45a | grep -i "net\|ip\|mac\|service"
78
78
"NetworkSettings": {
79
79
"GlobalIPv6Address": "",
80
80
"GlobalIPv6PrefixLen": 0,
81
- "IPAddress": "10.1.0.1",
81
+ "IPAddress": "10.1.0.1", <<<<<< IP address allocated by netplugin
82
82
"IPPrefixLen": 16,
83
83
"IPv6Gateway": "",
84
84
"LinkLocalIPv6Address": "",
@@ -92,7 +92,7 @@ $ docker inspect f291e269b45a | grep -i "net\|ip\|mac\|service"
92
92
"Name": "netplugin-node2",
93
93
"NetworkMode": "default",
94
94
"IpcMode": "",
95
- "PublishService": "foo.private",
95
+ "PublishService": "foo.private", <<<<<< Service name for the container
96
96
"NetworkDisabled": false,
97
97
"MacAddress": "",
98
98
```
0 commit comments