Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
be714f99
Commit
be714f99
authored
Dec 15, 2016
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'george/xenial-devstack' into ned/test-ficus-1
parents
86ad69b2
b7c6a238
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
45 deletions
+39
-45
playbooks/roles/browsers/defaults/main.yml
+7
-12
playbooks/roles/browsers/tasks/main.yml
+16
-21
playbooks/roles/browsers/templates/xvfb.conf.j2
+0
-6
playbooks/roles/browsers/templates/xvfb.service.j2
+9
-0
vagrant/base/devstack/Vagrantfile
+7
-6
No files found.
playbooks/roles/browsers/defaults/main.yml
View file @
be714f99
browser_deb_pkgs
:
-
xvfb
-
dbus-x11
-
firefox=45.0.2+build1-0ubuntu1
-
google-chrome-stable
-
libcurl3
-
libgconf2-4
-
libxss1
-
libnss3-1d
-
lib
curl3
-
lib
xss1
-
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
...
...
playbooks/roles/browsers/tasks/main.yml
View file @
be714f99
# 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
playbooks/roles/browsers/templates/xvfb.conf.j2
deleted
100644 → 0
View file @
86ad69b2
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
playbooks/roles/browsers/templates/xvfb.service.j2
0 → 100644
View file @
be714f99
[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/base/devstack/Vagrantfile
View file @
be714f99
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
=
"vv
vv
"
ansible
.
verbose
=
"vv"
ansible
.
extra_vars
=
{}
VERSION_VARS
.
each
do
|
var
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment