Skip to content

Install and run selenoid and selenoid-ui on a single host with ansible and systemd

License

Notifications You must be signed in to change notification settings

vv-p/selenoid-systemd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenoid with Systemd and Ansible

License Build Status

Before you start

Selenoid doesn't download docker images by himself, so this playbook does it. Therefore you need to install docker-py python package before running it (I don't know how is you manage your python modules, so I don't want to install something in unusual way in your environment). Look at the docker_image ansible module documentation to more information about how this playbook manage docker images.

How to install it ?

You can install this role with ansible-galaxy:

ansible-galaxy install -c vv-p.selenoid-systemd -p ./

Or just download it with git as usual:

git clone https://github.com/vv-p/selenoid-systemd.git

How to use it ?

Just create your own playbook file, check environment variables in defaults/main.yml and run:

cat > selenoid.yml << EOF
---
- hosts: selenoid

  roles:
    - selenoid-systemd
EOF
ansible-playbook -b -i hosts selenoid.yml

Variables

All default variable values stored in defaults/main.yml file:

selenoid_ui: false
selenoid_vnc: false
selenoid_shmSize: 268435456
selenoid_tmpSize: 512m
selenoid_varSize: 128m
selenoid_timezone: "Europe/Moscow"
selenoid_port: 4444
selenoid_ui_port: 8080
selenoid_browsers:
  - name: "chrome"
    default: "66.0"
    versions:
      - "66.0"
      - "65.0"
  - name: "firefox"
    default: "59.0"
    versions:
      - "59.0"
      - "58.0"
  - name: "opera"
    default: "52.0"
    versions:
      - "52.0"
      - "51.0"

Look at the official selenoid page to more information - Selenoid Documentation

You can overwrite it in your playbook file:

- hosts: all
  vars:
    selenoid_ui: true
    selenoid_vnc: true
      - name: "chrome"
        default: "66.0"
        versions:
          - "66.0"
          - "65.0"

  roles:
    - selenoid-systemd

or pass it as command-line arguments:

ansible-playbool -b -i hosts selenoid.yml --extra-vars "selenoid_vnc=true"

Look at the Ansible documentation for details.

Q&A:

How to check selenoid (or selenoid-ui) status ?

systemctl status selenoid

How to start or stop selenoid (selenoid-ui) ?

systemctl start selenoid
systemctl stop selenoid

Where is selenoid logs ?

journalctl -u selenoid -f

About

Install and run selenoid and selenoid-ui on a single host with ansible and systemd

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published