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
edx
configuration
Commits
58548fc4
Commit
58548fc4
authored
Jun 05, 2014
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install course requirements
parent
d20895c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
playbooks/roles/xqwatcher/tasks/code_jail.yml
+20
-7
playbooks/roles/xqwatcher/templates/edx/app/xqwatcher/data/requirements.txt.j2
+5
-0
No files found.
playbooks/roles/xqwatcher/tasks/code_jail.yml
View file @
58548fc4
...
...
@@ -32,11 +32,30 @@
mode=0440 owner=root group=root validate='visudo -c -f %s'
with_items
:
XQWATCHER_COURSES
-
name
:
put code jail into aa-complain
command
:
/usr/sbin/aa-complain "/etc/apparmor.d/code.jail.{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}"
when
:
CODE_JAIL_COMPLAIN
with_items
:
XQWATCHER_COURSES
-
name
:
create jail virtualenv
shell
:
>
/usr/sbin/aa-complain "/etc/apparmor.d/code.jail.{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}" && /usr/local/bin/virtualenv --no-site-packages {{ xqwatcher_venv_base }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}
/usr/local/bin/virtualenv --no-site-packages {{ xqwatcher_venv_base }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}
with_items
:
XQWATCHER_COURSES
-
name
:
write out requirements.txt
template
:
>
src=edx/app/xqwatcher/data/requirements.txt.j2
dest={{ xqwatcher_data_dir }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}-requirements.txt
mode=0440 owner=root group=root
with_items
:
XQWATCHER_COURSES
-
name
:
install course specific python requirements
pip
:
>
requirements="{{ xqwatcher_data_dir }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}-requirements.txt"
virtualenv="{{ xqwatcher_venv_base }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}"
state=present
extra_args="{{ XQWATCHER_PIP_EXTRA_ARGS }}"
-
name
:
give other read permissions to the virtualenv
shell
:
>
chown -R {{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.user }} {{ xqwatcher_venv_base }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}
...
...
@@ -49,11 +68,6 @@
command
:
apparmor_parser -r "/etc/apparmor.d/code.jail.{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}"
with_items
:
XQWATCHER_COURSES
-
name
:
put code jail into aa-complain
command
:
/usr/sbin/aa-complain "/etc/apparmor.d/code.jail.{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}"
when
:
CODE_JAIL_COMPLAIN
with_items
:
XQWATCHER_COURSES
-
name
:
put code sandbox into aa-enforce
command
:
/usr/sbin/aa-enforce "/etc/apparmor.d/code.jail.{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}"
when
:
not CODE_JAIL_COMPLAIN
\ No newline at end of file
playbooks/roles/xqwatcher/templates/edx/app/xqwatcher/data/requirements.txt.j2
0 → 100644
View file @
58548fc4
# {{ ansible_managed }}
{% for name,version in item.PYTHON_REQUIREMENTS.items() %}
{{ name }}=={{ value }}
{% endfor %}
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