From 7987b31d35f34068533371d83cd8f6a83e15fb4a Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Mon, 30 May 2022 10:51:38 +0300 Subject: [PATCH 1/2] Building Docker images with --pull flag --- ci/docker-push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker-push.sh b/ci/docker-push.sh index e9af8cd..35912ab 100755 --- a/ci/docker-push.sh +++ b/ci/docker-push.sh @@ -2,7 +2,7 @@ set -e -docker build -t $GITHUB_REPOSITORY . +docker build --pull -t $GITHUB_REPOSITORY . docker tag $GITHUB_REPOSITORY $GITHUB_REPOSITORY:$1 mkdir -p watch cp ggr-watch watch/ggr From 57717f3e9977d7c26448a99325c72ead045cea6e Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Mon, 30 May 2022 10:52:24 +0300 Subject: [PATCH 2/2] Added appium:deviceName to docs --- docs/quota-files.adoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/quota-files.adoc b/docs/quota-files.adoc index 5ad1c57..8b087a6 100644 --- a/docs/quota-files.adoc +++ b/docs/quota-files.adoc @@ -1,6 +1,6 @@ == Creating Quota Files -. Quota files define available browsers for each user. All quota files should be placed to the same directory. +. Quota files define available browsers for each user. All quota files should be placed to the same directory. . For user ```username``` quota file should be named ```username.xml```. . Each quota file contains the following XML: + @@ -21,7 +21,7 @@ ... - + ... @@ -32,11 +32,11 @@ + Here we define a list of browser names, their versions and default version for each browser. Each version has one or more regions (in cloud term, i.e. data centers). Every region contains one or more hosts. Each host defined in XML should have Selenium listening on specified port. The XML namespace is needed to be fully compatible with http://github.com/seleniumkit/gridrouter[original] Java GridRouter implementation. + -NOTE: A frequent question being asked is the meaning of `count` attribute because the name for historical questions is a bit confusing. You can have hosts with different number of CPU and memory allowing to run different number of browsers simultaneously. So `count` is the relative host weight allowing to adjust the load to every host depending on its capacity. For example if your quota contains two hosts with `count = 1` and `count = 3` then new session requests will be distributed as `1:3` between these hosts. The easiest way to deliver uniform load distribution is to set `count` equal to total number of browsers available on the host. This is what we always recommend to do by default. - -. Browser name is matched against `browserName` capability. Values are compared as strings and should be exactly equal. When testing mobile applications (e.g. with http://github.com/appium/appium[Appium]) `browserName` capability makes no sense and can be replaced by `deviceName` capability. Ggr will try to match both against browser name specified in XML. +NOTE: A frequent question being asked is the meaning of `count` attribute because the name for historical questions is a bit confusing. You can have hosts with different number of CPU and memory allowing to run different number of browsers simultaneously. So `count` is the relative host weight allowing to adjust the load to every host depending on its capacity. For example if your quota contains two hosts with `count = 1` and `count = 3` then new session requests will be distributed as `1:3` between these hosts. The easiest way to deliver uniform load distribution is to set `count` equal to total number of browsers available on the host. This is what we always recommend to do by default. + +. Browser name is matched against `browserName` capability. Values are compared as strings and should be exactly equal. When testing mobile applications (e.g. with http://github.com/appium/appium[Appium]) `browserName` capability makes no sense and can be replaced by `deviceName` or `appium:deviceName` capability. Ggr will try to match both against browser name specified in XML. . Version `number` is matched against `version` or `browserVersion` capability by prefix. For example both `61` and `61.0` in version capability (i.e. in your code) will match version number `61.0`. -. Similarly version `platform` attribute is matched against `platform` or `platformName` capability by prefix. When platform from capabilities equals to `ANY` - default platform will be chosen. +. Similarly version `platform` attribute is matched against `platform` or `platformName` capability by prefix. When platform from capabilities equals to `ANY` - default platform will be chosen. . Sometimes you may need to have the same browser name and version on different platforms, e.g. Firefox on both Linux and Windows. To achieve this you need to add `defaultPlatform` and `platform` attributes to quota file as follows: + .Adding platform information to quota file @@ -49,7 +49,7 @@ NOTE: A frequent question being asked is the meaning of `count` attribute becaus ... - + ... @@ -65,14 +65,14 @@ ws://ggr-host.example.com:4444/vnc/ ---- Browser VNC clients like https://github.com/novnc/noVNC[noVNC] work with such URLs out of the box. By default having an XML host entry like this... [source,xml] ----- +---- ---- ...Ggr proxies all traffic from `host1.example.com:5900`. You can customize this by adding an optional `vnc` attribute to a host: [source,xml] ----- +---- ---- @@ -121,5 +121,5 @@ With these flags specified any browsers declared in `test.xml` file will be acce You may want to show lists of available browsers in the user interface. To fetch this information from Ggr just use the following request: $ curl -s http://test:test-password@example.com:4444/quota - + This request returns quota file contents as JSON for specified user.