Skip to content

Commit 8ba7474

Browse files
authored
Improve documentation on starting up grid (#1268)
* add Swarm full grid setup * Remove /wd/hub endpoint reference
1 parent 653c863 commit 8ba7474

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ $ docker run -d -p 4444:4444 -p 7900:7900 --shm-size 2g selenium/standalone-fire
3636
$ docker run -d -p 4444:4444 -p 7900:7900 -v /dev/shm:/dev/shm selenium/standalone-firefox:4.0.0-beta-3-prerelease-20210422
3737
```
3838

39-
2. Point your WebDriver tests to http://localhost:4444/wd/hub
39+
2. Point your WebDriver tests to http://localhost:4444 *
4040

4141
3. That's it!
4242

4343
4. (Optional) To see what is happening inside the container, head to http://localhost:7900 (password is `secret`).
4444

45+
* Grid 3 used "/wd/hub", while it should also work, it is no longer required
46+
4547
More details about visualising the container activity, check the [Debugging](#debugging) section.
4648

4749
:point_up: When executing `docker run` for an image that contains a browser please either mount

docker-compose-v3-full-grid-swarm.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# To start Docker in Swarm mode, you need to run `docker swarm init`
2+
# To deploy the Grid, `docker stack deploy -c docker-compose-v3-swarm.yml grid`
3+
# Stop with `docker stack rm grid`
4+
# Stop swarm mode `docker swarm leave --force`
5+
6+
version: '3.7'
7+
8+
services:
9+
chrome:
10+
image: selenium/node-chrome:4.0.0-beta-3-prerelease-20210422
11+
volumes:
12+
- /dev/shm:/dev/shm
13+
environment:
14+
- SE_EVENT_BUS_HOST=selenium-hub
15+
- SE_EVENT_BUS_PUBLISH_PORT=4442
16+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
17+
deploy:
18+
replicas: 1
19+
entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh'
20+
21+
edge:
22+
image: selenium/node-edge:4.0.0-beta-3-prerelease-20210422
23+
volumes:
24+
- /dev/shm:/dev/shm
25+
environment:
26+
- SE_EVENT_BUS_HOST=selenium-hub
27+
- SE_EVENT_BUS_PUBLISH_PORT=4442
28+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
29+
deploy:
30+
replicas: 1
31+
entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh'
32+
33+
firefox:
34+
image: selenium/node-firefox:4.0.0-beta-3-prerelease-20210422
35+
volumes:
36+
- /dev/shm:/dev/shm
37+
environment:
38+
- SE_EVENT_BUS_HOST=selenium-hub
39+
- SE_EVENT_BUS_PUBLISH_PORT=4442
40+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
41+
deploy:
42+
replicas: 1
43+
entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh'
44+
45+
opera:
46+
image: selenium/node-opera:4.0.0-beta-3-prerelease-20210422
47+
volumes:
48+
- /dev/shm:/dev/shm
49+
environment:
50+
- SE_EVENT_BUS_HOST=selenium-hub
51+
- SE_EVENT_BUS_PUBLISH_PORT=4442
52+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
53+
deploy:
54+
replicas: 1
55+
entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh'
56+
57+
selenium-hub:
58+
image: selenium/hub:4.0.0-beta-3-prerelease-20210422
59+
ports:
60+
- "4442:4442"
61+
- "4443:4443"
62+
- "4444:4444"

0 commit comments

Comments
 (0)