Commit a57b8e1b by George Song Committed by GitHub

Merge pull request #3629 from edx/george/xenial-lize

Xenial browser requirements
parents 80d7fc1e 9623a574
browser_deb_pkgs:
- dbus-x11
- firefox
- gdebi
- libcurl3
- libgconf2-4
......@@ -9,15 +8,18 @@ browser_deb_pkgs:
- xdg-utils
- xvfb
# Debian 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: "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 for Xenial
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_version: 2.27
chromedriver_url: "http://chromedriver.storage.googleapis.com/{{ chromedriver_version }}/chromedriver_linux64.zip"
......
......@@ -14,21 +14,24 @@
- name: install system packages
apt:
pkg: "{{ ','.join(browser_deb_pkgs) }}"
name: "{{ item }}"
update_cache: yes
with_items: "{{ browser_deb_pkgs }}"
tags:
- install
- install:system-requirements
- name: download browser debian packages from S3
get_url: dest="/tmp/{{ item.name }}" url="{{ item.url }}"
- name: download browser packages from S3
get_url:
dest: /tmp/{{ item.name }}
url: "{{ item.url }}"
register: download_deb
with_items: "{{ browser_s3_deb_pkgs }}"
tags:
- install
- install:system-requirements
- name: install browser debian packages
- name: install browser packages
shell: gdebi -nq /tmp/{{ item.name }}
when: download_deb.changed
with_items: "{{ browser_s3_deb_pkgs }}"
......@@ -36,16 +39,6 @@
- install
- 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
get_url:
url: "{{ chromedriver_url }}"
......@@ -134,42 +127,21 @@
- install
- install:system-requirements
- name: create xvfb upstart script for Precise and Trusty (12.04 and 14.04)
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)
- name: create xvfb systemd service
template:
src: xvfb.service.j2
dest: /etc/systemd/system/xvfb.service
owner: root
group: root
when: ansible_distribution_release == 'xenial'
tags:
- install
- install:configuration
- name: enable and start xvfb systemd service for Xenial (16.04)
- name: enable and start xvfb systemd service
systemd:
name: xvfb
enabled: yes
state: started
when: ansible_distribution_release == 'xenial'
tags:
- install
- 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 @@
Description=Xvfb X Server
After=network.target
[Service]
[Service]
ExecStart=/usr/bin/Xvfb {{ browser_xvfb_display }} -screen 0 1024x768x24
[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