From bccd7f775d7cffa1ff14624eda192da120ca6c22 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 18:21:02 +0300 Subject: [PATCH 01/10] Up selenoid version, up cm version, add video support --- defaults/main.yml | 9 +++++---- tasks/main.yml | 12 +++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4099900..e78fd47 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,8 +1,7 @@ --- -selenoid_version: 1.4.0 # Install selenoid version -selenoid_cm_version: 1.3.1 # Install configuration manager version -selenoid_docker_api_version: 1.24 # Docker api version (for Selenoid) -selenoid_limit: 4 # Total number of simultaneously running containers http://aerokube.com/selenoid/latest/#_recommended_docker_settings +selenoid_version: 1.6.0 # Install selenoid version +selenoid_cm_version: 1.4.2 # Install configuration manager version +selenoid_limit: 5 # Total number of simultaneously running containers http://aerokube.com/selenoid/latest/#_recommended_docker_settings selenoid_tmpfs: 128 # Add in-memory filesystem (tmpfs) to container http://aerokube.com/selenoid/latest/#_other_optional_fields selenoid_config_dir: /etc/selenoid # Selenoid configuration dir selenoid_listen_port: 4444 # Listen port @@ -12,3 +11,5 @@ selenoid_browsers: # What browsers to download - firefox - opera - chrome +selenoid_video_host_output_dir: /var/lib/selenoid/video # Dir for save video in host path +selenoid_video_container_output_dir: /opt/selenoid/video # Dir for save video in container (default: /opt/selenoid/video) diff --git a/tasks/main.yml b/tasks/main.yml index e64b5b6..229fbe9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,6 +16,12 @@ with_items: '{{ found_containers.results }}' when: item.stdout +- name: Selenoid | Create video folder + file: + path: "{{ selenoid_video_host_output_dir }}" + state: directory + mode: 0755 + - name: Selenoid | Run CM container, download browser images and run selenoid docker_container: name: cm @@ -23,17 +29,17 @@ volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "/root:/root" + - "{{ selenoid_video_host_output_dir }}:{{ selenoid_video_container_output_dir }}" env: TZ: "{{ selenoid_time_zone }}" OVERRIDE_HOME: "/root" - DOCKER_API_VERSION: "{{ selenoid_docker_api_version }}" command: > selenoid start --config-dir {{ selenoid_config_dir }} --version {{ selenoid_version }} --tmpfs {{ selenoid_tmpfs }} - --env DOCKER_API_VERSION={{ selenoid_docker_api_version }} --browsers {% for browser in selenoid_browsers -%}{{ browser }}{%- if not loop.last -%},{%- endif -%}{%- endfor %} --last-versions {{ selenoid_browsers_last_versions }} --force - --args "-limit {{ selenoid_limit }} -listen :{{ selenoid_listen_port }} -conf {{ selenoid_config_dir }}/browsers.json" + --vnc + --args "-limit {{ selenoid_limit }} -listen :{{ selenoid_listen_port }} -video-output-dir={{ selenoid_video_container_output_dir }} -conf {{ selenoid_config_dir }}/browsers.json" From dda6e19e83e459dc21c70588be8a72b9a8593098 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 18:21:13 +0300 Subject: [PATCH 02/10] Update variables --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a252792..4c6ca15 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,9 @@ Set up [selenoid](https://github.com/aerokube/selenoid) in docker #### Variables ```yaml -selenoid_version: 1.4.0 -selenoid_cm_version: 1.3.1 -selenoid_docker_api_version: 1.24 -selenoid_limit: 4 +selenoid_version: 1.6.0 +selenoid_cm_version: 1.4.2 +selenoid_limit: 5 selenoid_tmpfs: 128 selenoid_config_dir: /etc/selenoid selenoid_listen_port: 4444 @@ -25,6 +24,8 @@ selenoid_browsers: - firefox - opera - chrome +selenoid_video_host_output_dir: /var/lib/selenoid/video +selenoid_video_container_output_dir: /opt/selenoid/video ``` #### Example From 2f2876ec3df9fff2dccc24b7290e3396d00a6d0e Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 18:43:36 +0300 Subject: [PATCH 03/10] Up python ver --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3b39682..a8bdb0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ --- language: python -python: "2.7" +python: "3.6" sudo: required dist: trusty services: @@ -8,6 +8,7 @@ services: before_install: - sudo apt-get update -qq + - sudo apt-get install -y libffi-dev libssl-dev install: - sudo pip install docker-py From 39b644456120b1f3438bac2de87e5f4c7344bccf Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 18:54:01 +0300 Subject: [PATCH 04/10] Add install valid pyhton docker --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8bdb0a..7c82eab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ --- language: python -python: "3.6" +python: "2.7" sudo: required dist: trusty services: @@ -8,10 +8,9 @@ services: before_install: - sudo apt-get update -qq - - sudo apt-get install -y libffi-dev libssl-dev install: - - sudo pip install docker-py + - sudo pip install docker - sudo apt-get install -y sshpass software-properties-common python-software-properties - sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-get update -qq From 4c42524bdccd5be7b04f260c0e23341022de28cd Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 18:57:54 +0300 Subject: [PATCH 05/10] Up python --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c82eab..988db6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ --- language: python -python: "2.7" +python: "3.6" sudo: required dist: trusty services: @@ -10,7 +10,7 @@ before_install: - sudo apt-get update -qq install: - - sudo pip install docker + - sudo pip install dockerc - sudo apt-get install -y sshpass software-properties-common python-software-properties - sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-get update -qq From 31a227d2b639b3b2e0fd48f4f38f15faec507a4d Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 19:10:26 +0300 Subject: [PATCH 06/10] Up python --- .travis.yml | 2 +- tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 988db6c..7a2dd91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ --- language: python -python: "3.6" +python: "2.7" sudo: required dist: trusty services: diff --git a/tasks/main.yml b/tasks/main.yml index 229fbe9..b2cde8a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ pip: name: "{{ item.name }}" with_items: - - { name: docker-py } + - { name: docker } - name: Selenoid | Check selenoid container exist shell: 'docker ps -aq --filter "name={{ item }}"' From 4f2bbbc5977a0f5e16b6e37258ee5f997cd87ecb Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 19:14:16 +0300 Subject: [PATCH 07/10] Up python --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7a2dd91..7c82eab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_install: - sudo apt-get update -qq install: - - sudo pip install dockerc + - sudo pip install docker - sudo apt-get install -y sshpass software-properties-common python-software-properties - sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-get update -qq From 6b75c6199e1d88ce812a5885ffda7677d8a0a06c Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 19:16:53 +0300 Subject: [PATCH 08/10] Usage pip tls --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7c82eab..20596d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_install: - sudo apt-get update -qq install: - - sudo pip install docker + - sudo pip install docker[tls] - sudo apt-get install -y sshpass software-properties-common python-software-properties - sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-get update -qq From 10c9eb10068e972582d72c6b764f8e8bce5aa378 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Mon, 16 Apr 2018 19:20:35 +0300 Subject: [PATCH 09/10] Usage pip tls --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20596d4..96147bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,10 @@ services: before_install: - sudo apt-get update -qq + - sudo apt-get install -y libffi-dev libssl-dev install: - - sudo pip install docker[tls] + - sudo pip install urllib3 docker - sudo apt-get install -y sshpass software-properties-common python-software-properties - sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-get update -qq From ae7b8b22e0733dffb8a056271c5c71a682963481 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Tue, 17 Apr 2018 13:52:15 +0300 Subject: [PATCH 10/10] Revert --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96147bf..7c82eab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,9 @@ services: before_install: - sudo apt-get update -qq - - sudo apt-get install -y libffi-dev libssl-dev install: - - sudo pip install urllib3 docker + - sudo pip install docker - sudo apt-get install -y sshpass software-properties-common python-software-properties - sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-get update -qq