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
f880c77f
Commit
f880c77f
authored
May 22, 2015
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2024 from edx/zoldak/install-phantomjs
Install phantomjs in the browser role TE-884
parents
962999da
2898ffbb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
5 deletions
+43
-5
playbooks/roles/browsers/defaults/main.yml
+5
-0
playbooks/roles/browsers/tasks/main.yml
+38
-5
No files found.
playbooks/roles/browsers/defaults/main.yml
View file @
f880c77f
...
@@ -19,4 +19,9 @@ browser_s3_deb_pkgs:
...
@@ -19,4 +19,9 @@ browser_s3_deb_pkgs:
chromedriver_version
:
2.6
chromedriver_version
:
2.6
chromedriver_url
:
"
http://chromedriver.storage.googleapis.com/{{
chromedriver_version
}}/chromedriver_linux64.zip"
chromedriver_url
:
"
http://chromedriver.storage.googleapis.com/{{
chromedriver_version
}}/chromedriver_linux64.zip"
# PhantomJS
phantomjs_version
:
"
phantomjs-1.9.8-linux-x86_64"
phantomjs_tarfile
:
"
{{
phantomjs_version
}}.tar.bz2"
phantomjs_url
:
"
https://bitbucket.org/ariya/phantomjs/downloads/{{
phantomjs_tarfile
}}"
browser_xvfb_display
:
"
:1"
browser_xvfb_display
:
"
:1"
playbooks/roles/browsers/tasks/main.yml
View file @
f880c77f
...
@@ -15,20 +15,54 @@
...
@@ -15,20 +15,54 @@
when
:
download_deb.changed
when
:
download_deb.changed
with_items
:
browser_s3_deb_pkgs
with_items
:
browser_s3_deb_pkgs
-
name
:
Install
ChromeDriver
-
name
:
download
ChromeDriver
get_url
:
get_url
:
url={{ chromedriver_url }}
url={{ chromedriver_url }}
dest=/var/tmp/chromedriver_{{ chromedriver_version }}.zip
dest=/var/tmp/chromedriver_{{ chromedriver_version }}.zip
register
:
download_chromedriver
-
name
:
Install ChromeDriver 2
-
name
:
unzip ChromeDriver tarfile
shell
:
unzip /var/tmp/chromedriver_{{ chromedriver_version }}.zip
shell
:
unzip /var/tmp/chromedriver_{{ chromedriver_version }}.zip
chdir=/var/tmp
chdir=/var/tmp
when
:
download_chromedriver.changed
-
name
:
Install ChromeDriver 3
-
name
:
move ChromeDriver binary to /usr/local
shell
:
mv /var/tmp/chromedriver /usr/local/bin/chromedriver
shell
:
mv /var/tmp/chromedriver /usr/local/bin/chromedriver
when
:
download_chromedriver.changed
-
name
:
Install Chromedriver 4
-
name
:
make ChromeDriver binary executable
file
:
path=/usr/local/bin/chromedriver mode=0755
file
:
path=/usr/local/bin/chromedriver mode=0755
when
:
download_chromedriver.changed
-
name
:
verify ChromeDriver location and mode
stat
:
path=/usr/local/bin/chromedriver
register
:
chromedriver
-
assert
:
that
:
-
"
chromedriver.stat.exists"
-
"
chromedriver.stat.mode
==
'0755'"
-
name
:
download PhantomJS
get_url
:
>
url={{ phantomjs_url }}
dest=/var/tmp/{{ phantomjs_tarfile }}
register
:
download_phantom_js
-
name
:
unpack the PhantomJS tarfile
shell
:
>
tar -xjf /var/tmp/{{ phantomjs_tarfile }}
chdir=/var/tmp
when
:
download_phantom_js.changed
-
name
:
move PhantomJS binary to /usr/local
shell
:
mv /var/tmp/{{ phantomjs_version }}/bin/phantomjs /usr/local/bin/phantomjs
when
:
download_phantom_js.changed
-
name
:
verify phantomjs location
stat
:
path=/usr/local/bin/phantomjs
register
:
phantomjs
-
assert
:
that
:
"
phantomjs.stat.exists"
-
name
:
create xvfb upstart script
-
name
:
create xvfb upstart script
template
:
src=xvfb.conf.j2 dest=/etc/init/xvfb.conf owner=root group=root
template
:
src=xvfb.conf.j2 dest=/etc/init/xvfb.conf owner=root group=root
...
@@ -36,4 +70,3 @@
...
@@ -36,4 +70,3 @@
-
name
:
start xvfb
-
name
:
start xvfb
shell
:
start xvfb
shell
:
start xvfb
ignore_errors
:
yes
ignore_errors
:
yes
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