-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating Docker output and curl for sticky sessions #2150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution 👍
docs/user-guide/swarm-mode.md
Outdated
@@ -1,20 +1,24 @@ | |||
# Docker Swarm (mode) cluster | |||
|
|||
This section explains how to create a multi-host docker cluster with swarm mode using [docker-machine](https://docs.docker.com/machine) and how to deploy Træfik on it. | |||
This section explains how to create a multi-host docker cluster with swarm mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't split line: one sentence on line.
docs/user-guide/swarm-mode.md
Outdated
Let's deploy Træfik as a docker service in our cluster. | ||
The only requirement for Træfik to work with swarm mode is that it needs to run on a manager node — we are going to use a | ||
[constraint](https://docs.docker.com/engine/reference/commandline/service_create/#/specify-service-constraints-constraint) for that. | ||
Let's deploy Træfik as a docker service in our cluster. The only requirement for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sentence on line
docs/user-guide/swarm-mode.md
Outdated
## Deploy your apps | ||
|
||
We can now deploy our app on the cluster, here [whoami](https://github.com/emilevauge/whoami), a simple web server in Go. | ||
We start 2 services, on the `traefik-net` network. | ||
We can now deploy our app on the cluster, here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sentence on line
docs/user-guide/swarm-mode.md
Outdated
We'll demonstrate that later. | ||
|
||
!!! note | ||
If using `docker stack deploy`, there is [a specific way that the labels must be defined in the docker-compose file](https://github.com/containous/traefik/issues/994#issuecomment-269095109). | ||
If using `docker stack deploy`, there is [a specific way that the labels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sentence on line
docs/user-guide/swarm-mode.md
Outdated
Repeat the following command multiple times and note that the Hostname changes each time as Traefik load balances each request against the 5 tasks: | ||
## Access to your `whoami0` through Træfik multiple times. | ||
|
||
Repeat the following command multiple times and note that the Hostname changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sentence on line
docs/user-guide/swarm-mode.md
Outdated
Traefik relies on a cookie to maintain stickyness so you'll need to test this with a browser. | ||
|
||
First you need to add `whoami1.traefik` to your hosts file: | ||
Because the sticky sessions require cookies to work, we used the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sentence on line
docs/user-guide/swarm-mode.md
Outdated
``` | ||
|
||
Now open your browser and go to http://whoami1.traefik/ | ||
If you load the cookies file (`-b cookies.txt`) for the next request, you will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sentence on line
docs/user-guide/swarm-mode.md
Outdated
|
||
The cluster consists of: | ||
|
||
- 3 servers | ||
- 1 manager | ||
- 2 workers | ||
- 1 [overlay](https://docs.docker.com/engine/userguide/networking/dockernetworks/#an-overlay-network) network | ||
(multi-host networking) | ||
- 1 [overlay](https://docs.docker.com/engine/userguide/networking/dockernetworks/#an-overlay-network) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't split line: one sentence on line.
docs/user-guide/swarm-mode.md
Outdated
``` | ||
|
||
!!! note | ||
As Træfik is published, you can access it from any machine and not only the manager. | ||
As Træfik is published, you can access it from any machine and not only the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't split line: one sentence on line.
Note: it's the documentation for Docker Swarm mode not for Docker Swarm. |
63712df
to
e1c01f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 📖 🐳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e1c01f2
to
b8f5796
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
b8f5796
to
3ec1b10
Compare
Description
This PR is updating the Docker Swarm Mode documentation with examples created with latest version of Docker. It also updates the section describing the access via sticky session by using
curl
command only instead of requiring to amend the/etc/hosts
file and perform the test via web browser.