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
95743a82
Commit
95743a82
authored
Dec 19, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one full run through the stage-app playbook
parent
678809bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
42 deletions
+16
-42
playbooks/roles/edxapp/defaults/main.yml
+1
-1
playbooks/roles/edxapp/tasks/deploy.yml
+3
-3
playbooks/roles/edxapp/tasks/service_variant_config.yml
+1
-2
playbooks/roles/edxapp/templates/lms-preview.conf.j2
+10
-35
playbooks/roles/nginx/tasks/main.yml
+1
-1
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
95743a82
...
...
@@ -108,7 +108,7 @@ EDXAPP_MKTG_URL_LINK_MAP: {}
# whether to setup the python sandbox or not
EDXAPP_PYTHON_SANDBOX
:
false
EDXAPP_SANDBOX_VENV_DIR
:
'
/opt/edx
-sandbox'
EDXAPP_SANDBOX_VENV_DIR
:
'
{{
edxapp_venvs_dir
}}/edxapp
-sandbox'
EDXAPP_SANDBOX_USER
:
'
sandbox'
EDXAPP_SANDBOX_GROUP
:
'
sandbox'
# this next setting, if true, turns on actual sandbox enforcement. If not true,
...
...
playbooks/roles/edxapp/tasks/deploy.yml
View file @
95743a82
...
...
@@ -205,9 +205,9 @@
-
name
:
Install sandbox requirements into sandbox venv
shell
:
>
cd {{ edxapp_
app
_dir }} &&
{{ EDXAPP_SANDBOX_VENV_DIR }}/bin/pip install -i {{
COMMON_PYPI_MIRROR_URL
}} --exists-action w --use-mirrors
-
-upgrade --no-deps -
r {{ item }}
cd {{ edxapp_
code
_dir }} &&
{{ EDXAPP_SANDBOX_VENV_DIR }}/bin/pip install -i {{
edxapp_pypi_local_mirror
}} --exists-action w --use-mirrors
-r {{ item }}
with_items
:
-
"
{{
sandbox_base_requirements
}}"
-
"
{{
sandbox_local_requirements
}}"
...
...
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
95743a82
...
...
@@ -63,7 +63,7 @@
executable=/bin/bash
chdir={{ edxapp_code_dir }}
sudo_user
:
"
{{
edxapp_user
}}"
when
:
celery_worker is not defined
when
:
celery_worker is not defined
and not devstack and item != "lms-preview"
with_items
:
service_variants_enabled
notify
:
-
"
edxapp
|
restart
edxapp"
...
...
@@ -72,7 +72,6 @@
tags
:
-
deploy
-
name
:
edxapp | syncdb and migrate
shell
:
SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when
:
migrate_db is defined and migrate_db|lower == "yes"
...
...
playbooks/roles/edxapp/templates/lms-preview.conf.j2
View file @
95743a82
# gunicorn
description "gunicorn server"
author "Calen Pennington <cpennington@mitx.mit.edu>"
start on started edxapp
stop on stopped edxapp
respawn
respawn limit 3 30
env PID=/var/tmp/lms.pid
[program:lms-preview]
{% if ansible_processor|length > 0 %}
env WORKERS={{ ansible_processor|length * worker_core_mult.lms_preview }}
command={{ edxapp_venv_dir }}/bin/gunicorn --preload -b {{ edxapp_lms_preview_gunicorn_host }}:{{ edxapp_lms_preview_gunicorn_port }} -w {{ ansible_processor|length * worker_core_mult.lms_preview }} --timeout=300 --pythonpath={{ edxapp_code_dir }} lms.wsgi
{% else %}
env WORKERS={{ worker_core_mult.lms_preview }}
command={{ edxapp_venv_dir }}/bin/gunicorn --preload -b {{ edxapp_lms_preview_gunicorn_host }}:{{ edxapp_lms_preview_gunicorn_port }} -w {{ worker_core_mult.lms_preview }} --timeout=300 --pythonpath={{ edxapp_code_dir }} lms.wsgi
{% endif %}
env PORT={{edxapp_lms_preview_gunicorn_port}}
env ADDRESS={{edxapp_lms_preview_gunicorn_host}}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env SERVICE_VARIANT="lms-preview"
chdir {{edxapp_code_dir}}
setuid www-data
exec {{edxapp_venv_dir}}/bin/gunicorn --preload -b $ADDRESS:$PORT -w $WORKERS --timeout=300 --pythonpath={{edxapp_code_dir}} lms.wsgi
post-start script
while true
do
if $(curl -s -i localhost:$PORT/heartbeat | egrep -q '200 OK'); then
break;
else
sleep 1;
fi
done
end script
user={{ common_web_user }}
directory={{ edxapp_code_dir }}
environment=PORT={{edxapp_lms_preview_gunicorn_port}},ADDRESS={{edxapp_lms_preview_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_lms_env }},SERVICE_VARIANT="lms-preview"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
playbooks/roles/nginx/tasks/main.yml
View file @
95743a82
...
...
@@ -49,7 +49,7 @@
notify
:
nginx | reload nginx
-
name
:
nginx | Copying nginx configs for {{ nginx_sites }}
template
:
src={{
nginx_template_directory}}{{ item }}.j2 dest=/etc/nginx/sites-available
/{{ item }} owner=root group=root mode=0600
template
:
src={{
nginx_template_directory }}{{ item }}.j2 dest={{ nginx_sites_available_dir }}
/{{ item }} owner=root group=root mode=0600
notify
:
nginx | reload nginx
with_items
:
nginx_sites
...
...
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