Tool for selenoid and ggr configs management.
Automatically generating directories and browsers.json
, docker-compose.yaml
, users.htpasswd
and quota
files for selenoid and ggr.
- ggr
- config (browsers.json)
- quota (user.xml)
- docker-compose.yaml
- users.htpasswd
- selenoid
- config (browsers.json)
- docker-compose.yaml
- teams-quota / users-quota
- htpasswd
- hosts config
- standart parameters for selenoid (image, port, path)
- optional parameters for selenoid (env, tmpfs, volumes, hosts, labels, sysctl, shmSize, cpu, mem)
- shell-script for pull browsers images from browsers-config
- Dockerfile (for usage tool into docker)
- ??? Automatic deployment to tests servers via ssh
- ??? Ansible playbooks
.
├── ...
├── results # Directory with results
│ ├── ggr # Directory with ggr configs
│ │ ├── 111.111.111.111 # Example IP
│ │ │ ├── config
│ │ │ │ └── browsers.json
│ │ │ │
│ │ │ ├── quota
│ │ │ │ ├── dev_team.xml
│ │ │ │ ├── qa_team.xml
│ │ │ │ └── test_user.xml
│ │ │ │
│ │ │ ├── docker-compose.yaml
│ │ │ └── users.htpasswd
│ │ │
│ │ ├── ggr-balancer.dev.example.com # Example Host
│ │ └── localhost
│ │
│ └── selenoid # Directory with selenoid configs
│ │ ├── 111.111.111.112 # Example IP
│ │ │ ├── config
│ │ │ │ └── browsers.json
│ │ │ │
│ │ │ └── docker-compose.yaml
│ │ │
│ │ ├── selenoid-us.dev.example.com # Example Host
│ │ └── localhost
│ │
└── ...
- Clone repository
cd ~
git clone [email protected]:woyow/selenoid-config-tool.git
- Go to folder with tool
cd ~/selenoid-config-tool
cd ~/selenoid-config-tool/config
touch ./config.yaml
browsers:
- type: {{ image_name }}
use: {{ bool }}
vnc-image: # [optional]
enable: {{ bool }}
versions:
# You can specify an array of the browsers you need using the `array` key
array: {{ [array] }} # [float] array
# OR
# You can specify the range of versions you need in increments of 1 using the `range` key
range:
min: {{ min_value }} # float
max: {{ max_value }} # float or latest
ignore: {{ [array] }} # [optional] - [float] array
# OR
# You can specify the highest version from the docker registry using the `highest` key
highest: true
default-version:
# You can specify the highest version from your version array using the `highest` key
highest: true
# OR
# You can specify a custom version from your version array using the `custom` key.
custom: {{ custom_value }} # float
# OR
# You can specify the minimal version from your version array using the `minimal` key
minimal: true
versions:
# You can specify an array of the browsers you need using the `array` key
array: {{ [array] }} # [float] array
# OR
# You can specify the range of versions you need in increments of 1 using the `range` key
range:
min: {{ min_value }} # float
max: {{ max_value }} # float or latest
ignore: {{ [array] }} # [optional] - [float] array
# OR
# You can specify the latest version from the docker registry using the `latest` key
latest: true
aerokube:
selenoid:
image-version: {{ image_version }} # float or latest
host-port: {{ port_value }}
selenoid-ui: # [optional]
image-version: {{ image_version }} # float or latest
host-port: {{ port_value }}
ggr: # [optional]
image-version: {{ image_version }} # float or latest
host-port: {{ port_value }}
ggr-ui: # [optional]
image-version: {{ image_version }} # float or latest
host-port: {{ port_value }}
hosts:
ggr:
ip: {{ ip_value }}
# OR/AND
domain: {{ domain_value }}
selenoid:
# Array with regions
- region:
name: {{ region_name_value }}
hosts: # array with hosts dictionaries
- ip: {{ ip_value }}
domain: {{ domain_value }} # [optional] - domain takes precedence over ip
count: {{ count_value }} # [optional] - [default - 1]
cpu-limit: {{ cpu_limit_value }} # [optional] - [default - 1]
teams-quota: {{ [array] }} # [array] with team/user-name for quota
teams-quota: # [optional] - if use ggr balancer
- name: {{ team_name_value }}
password: {{ password_value }}
cd ~/selenoid-config-tool
chmod u+x ./sctool
python3 -m pip install -r requirements.txt
./sctool
./sctool --help
./sctool --results-dir ./your-results-dir --config-dir ./your-config-dir
# or
./sctool -r ./your-results-dir -c ./your-config-dir
cd ~/selenoid-config-tool/config
touch ./config.yaml
cd ~/selenoid-config-tool
mkdir ./results
cd ~/selenoid-config-tool
docker build -t 'sctool' .
docker run --rm -v ~/selenoid-config-tool/config/config.yaml:/app/config/config.yaml -v ~/selenoid-config-tool/results/:/app/results/ sctool:latest
cd ~/selenoid-config-tool/results
The tool uses caching for http-responses. Therefore, in rare cases, you may not receive up-to-date information on browser versions. The cache is stored in the default folder for your user - ~/.cache/
rm ~/.cache/selenoid_config_tool_requests_cache.sqlite