Commit be714f99 by Ned Batchelder

Merge branch 'george/xenial-devstack' into ned/test-ficus-1

parents 86ad69b2 b7c6a238
browser_deb_pkgs:
- xvfb
- dbus-x11
- firefox=45.0.2+build1-0ubuntu1
- google-chrome-stable
- libcurl3
- libgconf2-4
- libxss1
- libnss3-1d
- libcurl3
- libxss1
- xdg-utils
- gdebi
# 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_30.0.1599.114-1_amd64.deb", url: "https://s3.amazonaws.com/vagrant.testeng.edx.org/google-chrome-stable_30.0.1599.114-1_amd64.deb" }
- { name: "firefox-mozilla-build_42.0-0ubuntu1_amd64.deb", url: "https://s3.amazonaws.com/vagrant.testeng.edx.org/firefox-mozilla-build_42.0-0ubuntu1_amd64.deb" }
- xvfb
# Chrome and ChromeDriver
chromedriver_version: 2.6
chrome_repo: "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
chromedriver_version: 2.25
chromedriver_url: "http://chromedriver.storage.googleapis.com/{{ chromedriver_version }}/chromedriver_linux64.zip"
# PhantomJS
......
# Install browsers required to run the JavaScript
# and acceptance test suite locally without a display
---
- name: install Google public key for apt
apt_key:
url: "https://dl-ssl.google.com/linux/linux_signing_key.pub"
state: present
- name: add Google Chrome repo to the sources list
apt_repository:
repo: "{{ chrome_repo }}"
state: present
- name: install system packages
apt: pkg={{','.join(browser_deb_pkgs)}}
state=present update_cache=yes
- name: download browser debian packages from S3
get_url: dest="/tmp/{{ item.name }}" url="{{ item.url }}"
register: download_deb
with_items: "{{ browser_s3_deb_pkgs }}"
- name: install browser debian packages
shell: gdebi -nq /tmp/{{ item.name }}
when: download_deb.changed
with_items: "{{ browser_s3_deb_pkgs }}"
# 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
- name: download ChromeDriver
get_url:
url={{ chromedriver_url }}
......@@ -71,9 +64,11 @@
- assert:
that: "phantomjs.stat.exists"
- name: create xvfb upstart script
template: src=xvfb.conf.j2 dest=/etc/init/xvfb.conf owner=root group=root
- name: create xvfb systemd service
template: src=xvfb.service.j2 dest=/etc/systemd/system/xvfb.service owner=root group=root
- name: register xvfb systemd service
shell: systemctl enable /etc/systemd/system/xvfb.service
- name: start xvfb
shell: start xvfb
ignore_errors: yes
service: name=xvfb state=started
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
[Unit]
Description=X Virtual Frame Buffer Service
After=network.target
[Service]
ExecStart=/usr/bin/Xvfb {{ browser_xvfb_display }} -screen 0 1024x768x24
[Install]
WantedBy=multi-user.target
Vagrant.require_version ">= 1.5.3"
Vagrant.require_version ">= 1.8.7"
unless Vagrant.has_plugin?("vagrant-vbguest")
raise "Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`"
end
......@@ -31,9 +31,8 @@ VERSION_VARS = [
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Creates a devstack from a base Ubuntu 12.04 image for virtualbox
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
# Creates a devstack from a base Ubuntu 16.04 image for virtualbox
config.vm.box = "boxcutter/ubuntu1604"
config.vm.network :private_network, ip: vm_guest_ip, nic_type: "virtio"
......@@ -72,18 +71,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
# Make LC_ALL default to en_US.UTF-8 instead of en_US.
# See: https://github.com/mitchellh/vagrant/issues/1188
config.vm.provision "shell", inline: 'echo \'LC_ALL="en_US.UTF-8"\' > /etc/default/locale'
# Get ready for ansible on this box.
config.vm.provision "shell", path: '../../../util/install/ansible-bootstrap.sh'
# Use vagrant-vbguest plugin to make sure Guest Additions are in sync
config.vbguest.auto_reboot = true
config.vbguest.auto_update = true
config.vm.provision :ansible do |ansible|
ansible.playbook = "../../../playbooks/vagrant-devstack.yml"
ansible.verbose = "vvvv"
ansible.verbose = "vv"
ansible.extra_vars = {}
VERSION_VARS.each do |var|
......
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