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
6d25a769
Commit
6d25a769
authored
Jul 15, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for worker upstart scripts.
parent
460724f6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
10 deletions
+90
-10
playbooks/roles/edxapp/tasks/cms.yml
+2
-0
playbooks/roles/edxapp/tasks/lms-preview.yml
+2
-0
playbooks/roles/edxapp/tasks/lms-xml.yml
+2
-0
playbooks/roles/edxapp/tasks/lms.yml
+4
-0
playbooks/roles/edxapp/templates/cms.conf.j2
+29
-5
playbooks/roles/edxapp/templates/lms-xml.conf.j2
+26
-2
playbooks/roles/edxapp/templates/lms.conf.j2
+25
-3
No files found.
playbooks/roles/edxapp/tasks/cms.yml
View file @
6d25a769
...
...
@@ -18,8 +18,10 @@
-
update
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=cms
when
:
celery_worker is not defined
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=cms-backend
when
:
celery_worker is not defined
-
name
:
Create CMS log target directory
file
:
path={{log_base_dir}}/cms state=directory owner=syslog group=adm mode=2770
...
...
playbooks/roles/edxapp/tasks/lms-preview.yml
View file @
6d25a769
...
...
@@ -24,8 +24,10 @@
-
update
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms-preview
when
:
celery_worker is not defined
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms-preview-backend
when
:
celery_worker is not defined
# Creates LMS Preview upstart file
-
include
:
upstart.yml service_variant=lms-preview
playbooks/roles/edxapp/tasks/lms-xml.yml
View file @
6d25a769
...
...
@@ -26,8 +26,10 @@
-
update
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms-xml
when
:
celery_worker is not defined
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms-xml-backend
when
:
celery_worker is not defined
# Creates upstart file
-
include
:
upstart.yml service_variant=lms-xml
playbooks/roles/edxapp/tasks/lms.yml
View file @
6d25a769
...
...
@@ -22,6 +22,10 @@
-
update
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms
when
:
celery_worker is not defined
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms-backend
when
:
celery_worker is not defined
# Creates LMS upstart file
-
include
:
upstart.yml service_variant=lms
playbooks/roles/edxapp/templates/cms.conf.j2
View file @
6d25a769
# gunicorn
# Templated and placed by ansible from jinja2 source
description "gunicorn server"
author "Calen Pennington <cpennington@mitx.mit.edu>"
{% if celery_worker %}
# CMS Celery Worker Upstart Script
description "cms celery worker"
stop on stopping edx-workers
respawn
instance edx.${SERVICE_VARIANT}.core.${QUEUE}
#env NEW_RELIC_CONFIG_FILE=/opt/wwc/newrelic.ini
#env NEWRELIC={{venv_dir}}/bin/newrelic-admin
env CONCURRENCY=${CONCURRENCY}
env LOGLEVEL=info
env DJANGO_SETTINGS_MODULE=cms.envs.aws
env PYTHONPATH={{edx_platform_code_dir}}
env SERVICE_VARIANT=${SERVICE_VARIANT}
setuid www-data
chdir {{edx_platform_code_dir}}
exec {{venv_dir}}/bin/django-admin.py celery worker --settings=$DJANGO_SETTINGS_MODULE --pythonpath=$PYTHONPATH --loglevel=$LOGLEVEL --queues=edx.${SERVICE_VARIANT}.core.${QUEUE} --hostname=edx.${SERVICE_VARIANT}.core.${QUEUE}.`hostname` --concurrency=$CONCURRENCY
{% else %}
description "cms gunicorn"
# CMS Upstart Script
start on started edxapp
stop on stopped edxapp
...
...
@@ -27,5 +50,6 @@ env SERVICE_VARIANT="cms"
chdir {{edx_platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn_django -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{edx_platform_code_dir}} --settings=cms.envs.aws
{% endif %}
playbooks/roles/edxapp/templates/lms-xml.conf.j2
View file @
6d25a769
# gunicorn
# Templated and placed by ansible from jinja2 source
{% if celery_worker %}
# lms-xml Celery Worker Upstart Script
description "cms celery worker"
stop on stopping edx-workers
respawn
instance edx.${SERVICE_VARIANT}.core.${QUEUE}
#env NEW_RELIC_CONFIG_FILE=/opt/wwc/newrelic.ini
#env NEWRELIC={{venv_dir}}/bin/newrelic-admin
env CONCURRENCY=${CONCURRENCY}
env LOGLEVEL=info
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env PYTHONPATH={{edx_platform_code_dir}}
env SERVICE_VARIANT=${SERVICE_VARIANT}
setuid www-data
chdir {{edx_platform_code_dir}}
exec {{venv_dir}}/bin/django-admin.py celery worker --settings=$DJANGO_SETTINGS_MODULE --pythonpath=$PYTHONPATH --loglevel=$LOGLEVEL --queues=edx.${SERVICE_VARIANT}.core.${QUEUE} --hostname=edx.${SERVICE_VARIANT}.core.${QUEUE}.`hostname` --concurrency=$CONCURRENCY
{% else %}
description "gunicorn server"
author "Calen Pennington <cpennington@mitx.mit.edu>"
start on started edxapp
stop on stopped edxapp
...
...
@@ -39,4 +63,4 @@ post-start script
fi
done
end script
{% endif %}
playbooks/roles/edxapp/templates/lms.conf.j2
View file @
6d25a769
# gunicorn
# Templated and placed by ansible from jinja2 source
{% if celery_worker %}
# CMS Celery Worker Upstart Script
description "lms celery worker"
description "gunicorn server"
author "Calen Pennington <cpennington@mitx.mit.edu>"
stop on stopping edx-workers
respawn
instance edx.${SERVICE_VARIANT}.core.${QUEUE}
#env NEW_RELIC_CONFIG_FILE=/opt/wwc/newrelic.ini
#env NEWRELIC={{venv_dir}}/bin/newrelic-admin
env CONCURRENCY=${CONCURRENCY}
env LOGLEVEL=info
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env PYTHONPATH={{edx_platform_code_dir}}
env SERVICE_VARIANT=${SERVICE_VARIANT}
setuid www-data
chdir {{edx_platform_code_dir}}
exec {{venv_dir}}/bin/django-admin.py celery worker --settings=$DJANGO_SETTINGS_MODULE --pythonpath=$PYTHONPATH --loglevel=$LOGLEVEL --queues=edx.${SERVICE_VARIANT}.core.${QUEUE} --hostname=edx.${SERVICE_VARIANT}.core.${QUEUE}.`hostname` --concurrency=$CONCURRENCY
{% else %}
start on started edxapp
stop on stopped edxapp
...
...
@@ -39,4 +61,4 @@ post-start script
fi
done
end script
{% endif %}
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