简体   繁体   中英

Setting up multiple machines to be in selenium grid using Docker compose

I am having trouble creating a selenium grid using 2 machines.

I am trying to use docker compose, and host the hub on one machine with the 2 machine just connecting nodes and ultimately some load balancing.

seleniumhub:
 image: selenium/hub
 ports:
  - 4444:4444

chrome:
image: selenium/node-chrome
links:
 - seleniumhub:hub

above is my yml file and this runs fine and I am able to scale it easily with the following command

docker-compose up -d --scale chrome=5

but my question is if I had the 2nd machine how would I spin a node up on that machine and hook/link it to the hub on the 1st machine.

I have seen forums using links, networks, and environments but nothing is working from my end.

Does anyone know of a decent guide to get this going?

我会说要使用docker-swarm,所以您的第二台计算机将成为第一台计算机的 群集工作程序节点, 是一个示例,也是这个示例

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM