Add advertise-addr info + small fixups for mentor week

This commit is contained in:
Jerome Petazzoni
2016-11-01 17:10:36 -07:00
parent e1968beefa
commit ad29a45191

View File

@@ -97,7 +97,7 @@ class: title
Docker <br/> Orchestration <br/> Workshop
---
???
## Intros
@@ -117,7 +117,7 @@ on time, it's a good idea to have a breakfast with the attendees
at e.g. 9am, and start at 9:30.
-->
---
???
## Agenda
@@ -191,8 +191,6 @@ grep '^# ' index.html | grep -v '<br' | tr '#' '-'
## Chapter 4: deeper in Swarm
(Additional/optional/bonus content!)
- Dealing with stateful services
- Scripting image building and pushing
- Distributed Application Bundles
@@ -935,6 +933,55 @@ You can refer to the [NOMENCLATURE](https://github.com/docker/swarmkit/blob/mast
]
If Docker tells you that it `could not choose an IP address to advertise`, see next slide!
---
## IP address to advertise
- When running in Swarm mode, each node *advertises* its address to the others
<br/>
(i.e. it tells them *"you can contact me on 10.1.2.3:2377"*)
- If the node has only one IP address (other than 127.0.0.1), it is used automatically
- If the node has multiple IP addresses, you **must** specify which one to use
<br/>
(Docker refuses to pick one randomly)
- You can specify an IP address or an interface name
<br/>(in the latter case, Docker will read the IP address of the interface and use it)
- You can also specify a port number
<br/>(otherwise, the default port 2377 will be used)
---
## Which IP address should be advertised?
- If your nodes have only one IP address, it's safe to let autodetection do the job
.small[(Except if your instances have different private and public addresses, e.g.
on EC2, and you are building a Swarm involving nodes inside and outside the
private network: then you should advertise the public address.)]
- If your nodes have multiple IP addresses, pick an address which is reachable
*by every other node* of the Swarm
- If you are using [play-with-docker](http://play-with-docker.com/), use the IP
address shown next to the node name
.small[(This is the address of your node on your private internal overlay network.
The other address that you might see is the address of your node on the
`docker_gwbridge` network, which is used for outbound traffic.)]
Examples:
```bash
docker swarm init --advertise-addr 10.0.9.2
docker swarm init --advertise-addr eth0:23777
```
---
## Token generation
@@ -4645,7 +4692,9 @@ class: title
## [@jpetazzo](https://twitter.com/jpetazzo) <br/> [@docker](https://twitter.com/docker)
-->
<!--
## AJ ([@s0ulshake](https://twitter.com/s0ulshake)) <br/> Jérôme ([@jpetazzo](https://twitter.com/jpetazzo)) <br/> Tiffany ([@tiffanyfayj](https://twitter.com/tiffanyfayj))
-->
</textarea>
<script src="remark-0.13.min.js" type="text/javascript">