From 2011683da519cfdf4332843fae4844756f4b50be Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 4 Nov 2019 10:46:53 +0800 Subject: [PATCH] trigge confd to reconfig ggr by null.ini --- ggr/README.md | 68 ++++++++++++++++++++++++++++++++-- ggr/data/supervisor.d/null.ini | 2 + 2 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 ggr/data/supervisor.d/null.ini diff --git a/ggr/README.md b/ggr/README.md index 021a0e2..f9cb2e3 100644 --- a/ggr/README.md +++ b/ggr/README.md @@ -5,9 +5,71 @@ Go Grid Router (aka [Ggr][1]) is a lightweight active load balancer used to create scalable and highly-available Selenium clusters. ```bash -$ curl -X POST http://localhost:4444/wd/hub -$ curl http://localhost:4444/ping -$ curl http://localhost:4444/quota +$ curl http://127.0.0.1:4444/ping +{ + "uptime": "29h48m31.005125621s", + "lastReloadTime": "2019-11-02T20:27:53Z", + "numRequests": 859704, + "numSessions": 8241, + "version": "1.6.6" +} + +$ curl http://127.0.0.1:4444/quota +[ + { + "Name": "chrome", + "DefaultVersion": "78.0", + "DefaultPlatform": "", + "Versions": [ + { + "Number": "78.0", + "Platform": "", + "Regions": [ + { + "Name": "1", + "Hosts": [ + { + "Name": "10.0.108.8", + "Port": 5555, + "Count": 10, + "Username": "", + "Password": "", + "VNC": "", + "Scheme": "" + } + ] + } + ] + } + ] + } +] + +$ curl -X POST http://127.0.0.1:4444/wd/hub/session -d '{"desiredCapabilities":{"browserName": "chrome"}}' +{ + "sessionId": "1d84d09822d2d54371e9bc1f3b98264536022f4ccf5ae1756a9fac0a05defd6b", + "status": 0, + "value": { + "acceptInsecureCerts": false, + "browserName": "chrome", + "browserVersion": "78.0.3904.70", + "chrome": { + "chromedriverVersion": "78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800})", + "userDataDir": "/tmp/.com.google.Chrome.HhulSt" + } + } +} + +$ curl http://127.0.0.1:4444/host/1d84d09822d2d54371e9bc1f3b98264536022f4ccf5ae1756a9fac0a05defd6b +{ + "Name": "10.0.108.8", + "Port": 5555, + "Count": 10, + "Username": "", + "Password": "", + "VNC": "", + "Scheme": "" +} ``` [1]: https://github.com/aerokube/ggr diff --git a/ggr/data/supervisor.d/null.ini b/ggr/data/supervisor.d/null.ini new file mode 100644 index 0000000..fae2b8c --- /dev/null +++ b/ggr/data/supervisor.d/null.ini @@ -0,0 +1,2 @@ +[program:null] +command = sh -c 'while true; do date > /dev/null; sleep 60; done'