mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-28 09:08:50 +02:00
add ggr
This commit is contained in:
parent
fdd9fff144
commit
a92a4daac7
@ -65,6 +65,7 @@ A collection of delicious docker recipes.
|
|||||||
- [x] drone-scp-arm
|
- [x] drone-scp-arm
|
||||||
- [x] drone-ssh-arm
|
- [x] drone-ssh-arm
|
||||||
- [x] errbot :octocat:
|
- [x] errbot :octocat:
|
||||||
|
- [x] ggr
|
||||||
- [x] hubot :octocat:
|
- [x] hubot :octocat:
|
||||||
- [x] jenkins-arm :beetle:
|
- [x] jenkins-arm :beetle:
|
||||||
|
|
||||||
|
15
ggr/Dockerfile
Normal file
15
ggr/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for ggr
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM golang:alpine
|
||||||
|
RUN apk add --no-cache git
|
||||||
|
RUN go get -v github.com/kelseyhightower/confd
|
||||||
|
|
||||||
|
FROM aerokube/ggr
|
||||||
|
RUN apk add --no-cache 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
|
||||||
|
ENTRYPOINT ["supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
8
ggr/README.md
Normal file
8
ggr/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
ggr
|
||||||
|
===
|
||||||
|
|
||||||
|
Go Grid Router (aka [Ggr][1]) is a lightweight active load balancer used to
|
||||||
|
create scalable and highly-available Selenium clusters.
|
||||||
|
|
||||||
|
[1]: https://github.com/aerokube/ggr
|
||||||
|
|
6
ggr/data/confd/conf.d/ggr.toml
Normal file
6
ggr/data/confd/conf.d/ggr.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"
|
11
ggr/data/confd/templates/guest.xml.tmpl
Normal file
11
ggr/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.chrome")}}
|
||||||
|
<host name="{{.}}" port="{{getenv "BROWSER_PORT" "5555"}}" count="{{getenv "BROWSER_COUNT" "1"}}"/>
|
||||||
|
{{end}}
|
||||||
|
</region>
|
||||||
|
</version>
|
||||||
|
</browser>
|
||||||
|
</qa:browsers>
|
8
ggr/data/grid-router/quota/guest.xml
Normal file
8
ggr/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>
|
0
ggr/data/grid-router/users.htpasswd
Normal file
0
ggr/data/grid-router/users.htpasswd
Normal file
2
ggr/data/supervisor.d/confd.ini
Normal file
2
ggr/data/supervisor.d/confd.ini
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[program:confd]
|
||||||
|
command = confd -watch -backend file -file /dev/null
|
2
ggr/data/supervisor.d/ggr.ini
Normal file
2
ggr/data/supervisor.d/ggr.ini
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[program:ggr]
|
||||||
|
command = ggr -listen :4444 -users /etc/grid-router/users.htpasswd -quotaDir /etc/grid-router/quota -guests-allowed
|
18
ggr/docker-compose.yml
Normal file
18
ggr/docker-compose.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
ggr:
|
||||||
|
image: vimagick/ggr
|
||||||
|
ports:
|
||||||
|
- "4444:4444"
|
||||||
|
volumes:
|
||||||
|
- ./data/grid-router:/etc/grid-router
|
||||||
|
environment:
|
||||||
|
- BROWSER_NAME=chrome
|
||||||
|
- BROWSER_VERSION=78.0
|
||||||
|
- BROWSER_REGION=1
|
||||||
|
- BROWSER_HOSTS=tasks.chrome
|
||||||
|
- BROWSER_PORT=5555
|
||||||
|
- BROWSER_COUNT=10
|
||||||
|
restart: unless-stopped
|
Loading…
Reference in New Issue
Block a user