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
2917a087
Commit
2917a087
authored
Jun 05, 2014
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Installs course specific requirements
parent
27b22280
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
playbooks/roles/xqwatcher/tasks/code_jail.yml
+12
-2
playbooks/roles/xqwatcher/templates/edx/app/xqwatcher/data/requirements.txt.j2
+2
-2
No files found.
playbooks/roles/xqwatcher/tasks/code_jail.yml
View file @
2917a087
...
...
@@ -34,9 +34,8 @@
-
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/local/bin/virtualenv --no-site-packages {{ xqwatcher_venv_base }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}
...
...
@@ -55,6 +54,7 @@
virtualenv="{{ xqwatcher_venv_base }}/{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}"
state=present
extra_args="{{ XQWATCHER_PIP_EXTRA_ARGS }}"
with_items
:
XQWATCHER_COURSES
-
name
:
give other read permissions to the virtualenv
shell
:
>
...
...
@@ -68,6 +68,15 @@
command
:
apparmor_parser -r "/etc/apparmor.d/code.jail.{{ item.QUEUE_CONFIG.HANDLERS[0].CODEJAIL.name }}"
with_items
:
XQWATCHER_COURSES
#
# Leaves aa in either complain or enforce depending upon the value of the
# CODE_JAIL_COMPLAIN var. Complain mode should never be run in an
# environment where untrusted users can submit code
-
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
View file @
2917a087
# {{ ansible_managed }}
{% for
name,version in item.PYTHON_REQUIREMENTS.items()
%}
{{
name }}=={{ value
}}
{% for
requirement in item.PYTHON_REQUIREMENTS
%}
{{
requirement.name }}=={{ requirement.version
}}
{% 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