This reference covers version: latest

Ggr UI is a standalone daemon that automatically collects /status information from multiple Selenoid instances and returns it as a single /status API. When this daemon is running you can use Selenoid UI to see the state of the entire cluster.

1. Getting Started

1.1. Quick Start Guide

  1. Prerequisites:

  2. Start Ggr UI binary or container:

    $ ./ggr-ui -quota-dir /path/to/quota/dir # As a binary
    
    $ docker run -d --name ggr-ui -p 8888:8888 -v /path/to/quota/dir:/etc/grid-router/quota:ro aerokube/ggr-ui:latest-release

    Binaries as usually can be downloaded from releases page.

  3. Now start Selenoid UI and point it to http://localhost:8888. It should start showing sessions running anywhere in Selenium cluster behind Ggr.

    If you are linking Selenoid UI and Ggr UI containers, then URI should be http://<ggr-ui-container-name>:8888, e.g. http://ggr-ui:8888.
  4. You can also use /status API similarly to Selenoid /status API:

    $ curl -s http://localhost:8888/status

1.2. Quota Reloading

To reload quota files just send SIGHUP to process or Docker container:

# kill -HUP <pid>
# docker kill -s HUP <container-id-or-name>
Use only one of these commands depending on whether you have Docker installed.

1.3. CLI Flags

The following flags are supported by ggr-ui command:

  -grace-period duration
    	graceful shutdown period (default 5m0s)
  -limit int
    	simultaneous http requests (default 10)
  -listen string
    	host and port to listen to (default ":8888")
  -quota-dir string
    	quota directory (default "quota")
  -response-time duration
    	response time limit (default 2s)
  -timeout duration
    	request timeout (default 30s)
  -version
    	Show version and exit

2. Contributing & Development

To build Ggr UI:

  1. Install Golang

  2. Setup $GOPATH properly

  3. Get Ggr UI source:

    $ go get -d github.com/aerokube/ggr-ui
  4. Go to project directory:

    $ cd $GOPATH/src/github.com/aerokube/ggr-ui
  5. Checkout dependencies

    $ go get -u github.com/golang/dep/cmd/dep && dep ensure
  6. Build source:

    $ go build
  7. Run Ggr UI:

    $ ./ggr-ui --help

To build Docker container type:

$ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build
$ docker build -t ggr-ui:latest .

2.1. Documentation

Locally can be generated with:

$ docker run --rm -v `pwd`/docs/:/documents/      \
    asciidoctor/docker-asciidoctor                \
    asciidoctor -D /documents/output/ index.adoc