Commit 9623a574 by George Song

Xenial browser requirements

* Remove OS version conditionals
* Pin Firefox to v45.*
parent 80d7fc1e
browser_deb_pkgs: browser_deb_pkgs:
- dbus-x11 - dbus-x11
- firefox
- gdebi - gdebi
- libcurl3 - libcurl3
- libgconf2-4 - libgconf2-4
...@@ -9,15 +8,18 @@ browser_deb_pkgs: ...@@ -9,15 +8,18 @@ browser_deb_pkgs:
- xdg-utils - xdg-utils
- xvfb - xvfb
# Debian packages we host in S3 to ensure correct browser version # Firefox for Xenial
# Both Chrome and FireFox update their apt repos with the latest version,
# which often causes spurious acceptance test failures.
browser_s3_deb_pkgs:
- { name: "google-chrome-stable_55.0.2883.87-1_amd64.deb", url: "https://s3.amazonaws.com/vagrant.testeng.edx.org/google-chrome-stable_55.0.2883.87-1_amd64.deb" }
# Firefox
firefox_version: version 45.* firefox_version: version 45.*
# Packages we host in S3 to ensure correct browser version Both Chrome and
# FireFox update their apt repos with the latest version, which often causes
# spurious acceptance test failures.
browser_s3_deb_pkgs:
- name: firefox_45.0.2+build1-0ubuntu1_amd64
url: https://s3.amazonaws.com/vagrant.testeng.edx.org/firefox_45.0.2%2Bbuild1-0ubuntu1_amd64.deb
- name: google-chrome-stable_55.0.2883.87-1_amd64.deb
url: https://s3.amazonaws.com/vagrant.testeng.edx.org/google-chrome-stable_55.0.2883.87-1_amd64.deb
# ChromeDriver # ChromeDriver
chromedriver_version: 2.27 chromedriver_version: 2.27
chromedriver_url: "http://chromedriver.storage.googleapis.com/{{ chromedriver_version }}/chromedriver_linux64.zip" chromedriver_url: "http://chromedriver.storage.googleapis.com/{{ chromedriver_version }}/chromedriver_linux64.zip"
......
...@@ -14,21 +14,24 @@ ...@@ -14,21 +14,24 @@
- name: install system packages - name: install system packages
apt: apt:
pkg: "{{ ','.join(browser_deb_pkgs) }}" name: "{{ item }}"
update_cache: yes update_cache: yes
with_items: "{{ browser_deb_pkgs }}"
tags: tags:
- install - install
- install:system-requirements - install:system-requirements
- name: download browser debian packages from S3 - name: download browser packages from S3
get_url: dest="/tmp/{{ item.name }}" url="{{ item.url }}" get_url:
dest: /tmp/{{ item.name }}
url: "{{ item.url }}"
register: download_deb register: download_deb
with_items: "{{ browser_s3_deb_pkgs }}" with_items: "{{ browser_s3_deb_pkgs }}"
tags: tags:
- install - install
- install:system-requirements - install:system-requirements
- name: install browser debian packages - name: install browser packages
shell: gdebi -nq /tmp/{{ item.name }} shell: gdebi -nq /tmp/{{ item.name }}
when: download_deb.changed when: download_deb.changed
with_items: "{{ browser_s3_deb_pkgs }}" with_items: "{{ browser_s3_deb_pkgs }}"
...@@ -36,16 +39,6 @@ ...@@ -36,16 +39,6 @@
- install - install
- install:system-requirements - install:system-requirements
# Because the source location has been deprecated, we need to
# ensure it does not interfere with subsequent apt commands
- name: remove google chrome debian source list
file:
path: /etc/apt/sources.list.d/google-chrome.list
state: absent
tags:
- install
- install:system-requirements
- name: download ChromeDriver - name: download ChromeDriver
get_url: get_url:
url: "{{ chromedriver_url }}" url: "{{ chromedriver_url }}"
...@@ -134,42 +127,21 @@ ...@@ -134,42 +127,21 @@
- install - install
- install:system-requirements - install:system-requirements
- name: create xvfb upstart script for Precise and Trusty (12.04 and 14.04) - name: create xvfb systemd service
template:
src: xvfb.conf.j2
dest: /etc/init/xvfb.conf
owner: root
group: root
when: ansible_distribution_release in ['precise', 'trusty']
tags:
- install
- install:configuration
- name: start xvfb upstart script for Precise and Trusty (12.04 and 14.04)
shell: start xvfb
ignore_errors: yes
when: ansible_distribution_release in ['precise', 'trusty']
tags:
- install
- install:configuration
- name: create xvfb systemd service for Xenial (16.04)
template: template:
src: xvfb.service.j2 src: xvfb.service.j2
dest: /etc/systemd/system/xvfb.service dest: /etc/systemd/system/xvfb.service
owner: root owner: root
group: root group: root
when: ansible_distribution_release == 'xenial'
tags: tags:
- install - install
- install:configuration - install:configuration
- name: enable and start xvfb systemd service for Xenial (16.04) - name: enable and start xvfb systemd service
systemd: systemd:
name: xvfb name: xvfb
enabled: yes enabled: yes
state: started state: started
when: ansible_distribution_release == 'xenial'
tags: tags:
- install - install
- install:configuration - install:configuration
description "Xvfb X Server"
start on (net-device-up and local-filesystems and runlevel [2345])
stop on runlevel [016]
exec /usr/bin/Xvfb {{ browser_xvfb_display }} -screen 0 1024x768x24
respawn
respawn limit 15 5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Description=Xvfb X Server Description=Xvfb X Server
After=network.target After=network.target
[Service] [Service]
ExecStart=/usr/bin/Xvfb {{ browser_xvfb_display }} -screen 0 1024x768x24 ExecStart=/usr/bin/Xvfb {{ browser_xvfb_display }} -screen 0 1024x768x24
[Install] [Install]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment