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

Commit e83d8e5

Browse files
authored
Merge pull request #367 from vania-pooh/master
Better docs
2 parents c00a21c + 57717f3 commit e83d8e5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

ci/docker-push.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
docker build -t $GITHUB_REPOSITORY .
5+
docker build --pull -t $GITHUB_REPOSITORY .
66
docker tag $GITHUB_REPOSITORY $GITHUB_REPOSITORY:$1
77
mkdir -p watch
88
cp ggr-watch watch/ggr

docs/quota-files.adoc

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
== Creating Quota Files
22

3-
. Quota files define available browsers for each user. All quota files should be placed to the same directory.
3+
. Quota files define available browsers for each user. All quota files should be placed to the same directory.
44
. For user ```username``` quota file should be named ```username.xml```.
55
. Each quota file contains the following XML:
66
+
@@ -21,7 +21,7 @@
2121
</version>
2222
<version number="60.0">
2323
...
24-
</version>
24+
</version>
2525
</browser>
2626
<browser name="chrome" defaultVersion="67.0">
2727
...
@@ -32,11 +32,11 @@
3232
+
3333
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.
3434
+
35-
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.
36-
37-
. 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.
35+
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.
36+
37+
. 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.
3838
. 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`.
39-
. 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.
39+
. 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.
4040
. 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:
4141
+
4242
.Adding platform information to quota file
@@ -49,7 +49,7 @@ NOTE: A frequent question being asked is the meaning of `count` attribute becaus
4949
</version>
5050
<version number="61.0" platform="WINDOWS">
5151
...
52-
</version>
52+
</version>
5353
</browser>
5454
...
5555
</qa:browsers>
@@ -65,14 +65,14 @@ ws://ggr-host.example.com:4444/vnc/<session-id>
6565
----
6666
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...
6767
[source,xml]
68-
----
68+
----
6969
<host name="host1.example.com" port="4444" count="1"/>
7070
----
7171

7272
...Ggr proxies all traffic from `host1.example.com:5900`. You can customize this by adding an optional `vnc` attribute to a host:
7373

7474
[source,xml]
75-
----
75+
----
7676
<host name="host1.example.com" port="4444" count="1" vnc="vnc://host1.example.com:6900"/>
7777
----
7878

@@ -121,5 +121,5 @@ With these flags specified any browsers declared in `test.xml` file will be acce
121121
You may want to show lists of available browsers in the user interface. To fetch this information from Ggr just use the following request:
122122

123123
$ curl -s http://test:[email protected]:4444/quota
124-
124+
125125
This request returns quota file contents as JSON for specified user.

0 commit comments

Comments
 (0)