WebPagetest Forums
one vps, multiple docker images? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: one vps, multiple docker images? (/showthread.php?tid=15273)



one vps, multiple docker images? - ch604 - 03-09-2018 01:59 AM

Im currently running WPT agents in docker containers on VPSes at a remote location, but am only able to start one docker container per VPS. Here is the command I used to create the original container:

Code:
docker run -d --restart always -e SERVER_URL="http://mydomain.com/work/" -e LOCATION="Europe" -e NAME="Docker Test" --cap-add=NET_ADMIN wptagent

This is working great, and is persistent on reboot. I have three VPSes and one container each, so three test nodes. But, if I start a second container on each server with the same command, the /install/ info page on the master server (mydomain.com/install) still only lists the original number of VPSes I have set up (3) as listening for the Europe location. I tried redirecting a different port to 80 by adding:

Code:
-p 4000:80

... to the container create command, but this doesn't affect the /install/ count of listeners. I even altered the NAME variable, to no effect.

It seems such a waste to have these relatively beefy VPSes (4 core 4G RAM) set up and only have one worker per VPS; I feel they should be able to handle at least three or four apiece. How can I start several wptagent docker images on the same server and have them be unique listeners?


RE: one vps, multiple docker images? - ch604 - 03-16-2018 02:24 AM

i also attempted to assign a specific ip address to each docker container, passing ports 80 and 443 though

Code:
docker run -d --restart always -p 123.45.67.89:80:80 -p 123.45.67.89:443:443 ...

... and a different ip for the second container. this also has had no effect on the install page, are there ports other than 80 and 443 i should be passing? does the install count by respondent ips as i assumed for this test, or by hostnames, or by something else?