Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit dde467e

Browse files
authored
Docs for using Dynamic Grid on different VMs
[skip ci]
1 parent 8b43efb commit dde467e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,51 @@ docker run --rm --name selenium-docker -p 4444:4444 \
293293
selenium/standalone-docker:4.0.0-20211102
294294
```
295295

296+
### Using Dynamic Grid in different machines/VMs
297+
298+
Hub - Machine/VM 1
299+
``` bash
300+
$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:4.0.0-20211102
301+
```
302+
303+
Node Chrome - Machine/VM 2
304+
``` bash
305+
$ docker run -d -p 5555:5555 \
306+
-e SE_EVENT_BUS_HOST=<ip-from-machine-1> \
307+
-e SE_EVENT_BUS_PUBLISH_PORT=4442 \
308+
-e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \
309+
-v ${PWD}/config.toml:/opt/bin/config.toml \
310+
-v ${PWD}/assets:/opt/selenium/assets \
311+
selenium/node-docker:4.0.0-20211102
312+
```
313+
314+
Complete the `[server]` section in the `config.toml` file.
315+
```toml
316+
[docker]
317+
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
318+
# start a container with the given image.
319+
configs = [
320+
"selenium/standalone-firefox:4.0.0-20211102", "{\"browserName\": \"firefox\"}",
321+
"selenium/standalone-chrome:4.0.0-20211102", "{\"browserName\": \"chrome\"}",
322+
"selenium/standalone-edge:4.0.0-20211102", "{\"browserName\": \"MicrosoftEdge\"}"
323+
]
324+
325+
# URL for connecting to the docker daemon
326+
# host.docker.internal works for macOS and Windows.
327+
# Linux could use --net=host in the `docker run` instruction or 172.17.0.1 in the URI below.
328+
# To have Docker listening through tcp on macOS, install socat and run the following command
329+
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
330+
url = "http://host.docker.internal:2375"
331+
# Docker imagee used for video recording
332+
video-image = "selenium/video:ffmpeg-4.3.1-20211102"
333+
334+
# Uncomment the following section if you are running the node on a separate VM
335+
# Fill out the placeholders with appropriate values
336+
[server]
337+
host = <ip-from-node-machine>
338+
port = <port-from-node-machine>
339+
```
340+
296341
To have the assets saved on your host, please mount your host path to `/opt/selenium/assets`.
297342

298343
### Execution with Docker Compose

0 commit comments

Comments
 (0)