mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-21 13:23:02 +01:00
add ggr-ui
This commit is contained in:
17
ggr-ui/Dockerfile
Normal file
17
ggr-ui/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Dockerfile for ggr-ui
|
||||
#
|
||||
|
||||
FROM golang:alpine
|
||||
RUN apk add --no-cache git
|
||||
RUN go get -v github.com/kelseyhightower/confd
|
||||
|
||||
FROM aerokube/ggr-ui:latest-release
|
||||
RUN apk add --no-cache curl libxml2-utils supervisor
|
||||
COPY --from=0 /go/bin/confd /usr/bin/
|
||||
COPY data/confd /etc/confd
|
||||
COPY data/supervisor.d /etc/supervisor.d
|
||||
COPY data/grid-router /etc/grid-router
|
||||
EXPOSE 8888
|
||||
ENTRYPOINT ["supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||
HEALTHCHECK CMD ["curl", "-f", "http://127.0.0.1:8888/ping"]
|
||||
23
ggr-ui/README.md
Normal file
23
ggr-ui/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
ggr-ui
|
||||
======
|
||||
|
||||
[Ggr UI][1] 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.
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
$ docker run --rm -it alpine sh
|
||||
>>> apk update
|
||||
>>> apk add bind-tools
|
||||
>>> dig tasks.selenoid
|
||||
```
|
||||
|
||||
```bash
|
||||
$ curl http://127.0.0.1:8888/ping
|
||||
$ curl http://127.0.0.1:8888/status
|
||||
```
|
||||
|
||||
[1]: https://github.com/aerokube/ggr-ui
|
||||
|
||||
6
ggr-ui/data/confd/conf.d/ggr-ui.toml
Normal file
6
ggr-ui/data/confd/conf.d/ggr-ui.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[template]
|
||||
src = "guest.xml.tmpl"
|
||||
dest = "/etc/grid-router/quota/guest.xml"
|
||||
keys = ["/"]
|
||||
check_cmd = "xmllint --noout /etc/grid-router/quota/guest.xml"
|
||||
reload_cmd = "supervisorctl signal HUP ggr-ui"
|
||||
11
ggr-ui/data/confd/templates/guest.xml.tmpl
Normal file
11
ggr-ui/data/confd/templates/guest.xml.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
<qa:browsers xmlns:qa="urn:config.gridrouter.qatools.ru">
|
||||
<browser name="{{getenv "BROWSER_NAME" "chrome"}}" defaultVersion="{{getenv "BROWSER_VERSION" "78.0"}}">
|
||||
<version number="{{getenv "BROWSER_VERSION" "78.0"}}">
|
||||
<region name="{{getenv "BROWSER_REGION" "1"}}">
|
||||
{{range lookupIP (getenv "BROWSER_HOSTS" "tasks.selenoid")}}
|
||||
<host name="{{.}}" port="{{getenv "BROWSER_PORT" "5555"}}" count="{{getenv "BROWSER_COUNT" "1"}}" vnc="vnc://{{.}}:5900"/>
|
||||
{{end}}
|
||||
</region>
|
||||
</version>
|
||||
</browser>
|
||||
</qa:browsers>
|
||||
8
ggr-ui/data/grid-router/quota/guest.xml
Normal file
8
ggr-ui/data/grid-router/quota/guest.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<qa:browsers xmlns:qa="urn:config.gridrouter.qatools.ru">
|
||||
<browser name="chrome" defaultVersion="78.0">
|
||||
<version number="78.0">
|
||||
<region name="1">
|
||||
</region>
|
||||
</version>
|
||||
</browser>
|
||||
</qa:browsers>
|
||||
7
ggr-ui/data/supervisor.d/confd.ini
Normal file
7
ggr-ui/data/supervisor.d/confd.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
[program:confd]
|
||||
command = confd -watch -backend file -file /dev/null
|
||||
redirect_stderr = true
|
||||
|
||||
[program:null]
|
||||
command = sh -c 'while true; do date > /dev/null; sleep 60; done'
|
||||
redirect_stderr = true
|
||||
3
ggr-ui/data/supervisor.d/ggr-ui.ini
Normal file
3
ggr-ui/data/supervisor.d/ggr-ui.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
[program:ggr-ui]
|
||||
command = ggr-ui -listen 8888 -limit 10 -quota-dir /etc/grid-router/quota
|
||||
redirect_stderr = true
|
||||
28
ggr-ui/docker-compose.yml
Normal file
28
ggr-ui/docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
|
||||
ggr-ui:
|
||||
image: vimagick/ggr-ui
|
||||
ports:
|
||||
- "8888:8888"
|
||||
environment:
|
||||
- BROWSER_NAME=chrome
|
||||
- BROWSER_VERSION=78.0
|
||||
- BROWSER_REGION=1
|
||||
- BROWSER_HOSTS=tasks.selenoid
|
||||
- BROWSER_PORT=4444
|
||||
- BROWSER_COUNT=10
|
||||
extra_hosts:
|
||||
- tasks.selenoid:1.2.3.4
|
||||
- tasks.selenoid:4.3.2.1
|
||||
restart: unless-stopped
|
||||
|
||||
selenoid-ui:
|
||||
image: aerokube/selenoid-ui:latest-release
|
||||
command: --selenoid-uri=http://ggr-ui:8888
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- ggr-ui
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user