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
8139e302
Commit
8139e302
authored
Dec 09, 2013
by
Carson Gee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This converts lms-preview variant to supervisor
and adds a clause to rake not to gather assets as it fails
parent
1de45c54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
36 deletions
+11
-36
playbooks/roles/edxapp/tasks/service_variant_config.yml
+1
-1
playbooks/roles/edxapp/templates/lms-preview.conf.j2
+10
-35
No files found.
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
8139e302
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
executable=/bin/bash
executable=/bin/bash
chdir={{ edxapp_code_dir }}
chdir={{ edxapp_code_dir }}
sudo_user
:
"
{{
edxapp_user
}}"
sudo_user
:
"
{{
edxapp_user
}}"
when
:
celery_worker is not defined and not devstack
when
:
celery_worker is not defined and not devstack
and item != "lms-preview"
with_items
:
service_variants_enabled
with_items
:
service_variants_enabled
notify
:
notify
:
-
"
edxapp
|
restart
edxapp"
-
"
edxapp
|
restart
edxapp"
...
...
playbooks/roles/edxapp/templates/lms-preview.conf.j2
View file @
8139e302
# gunicorn
[program:lms-preview]
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
{% if ansible_processor|length > 0 %}
{% 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 %}
{% 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 %}
{% 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_gunicorn_port}},ADDRESS={{edxapp_lms_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
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