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
9e43b89f
Commit
9e43b89f
authored
Sep 09, 2014
by
Fred Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify notifier environment config
parent
742fed85
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
12 deletions
+37
-12
playbooks/roles/notifier/tasks/main.yml
+12
-0
playbooks/roles/notifier/templates/edx/app/supervisor/conf.d/notifier-celery-workers.conf.j2
+1
-6
playbooks/roles/notifier/templates/edx/app/supervisor/conf.d/notifier-scheduler.conf.j2
+1
-6
playbooks/roles/notifier/templates/notifier-celery-workers-supervisor.sh.j2
+10
-0
playbooks/roles/notifier/templates/notifier-scheduler-supervisor.sh.j2
+10
-0
playbooks/roles/notifier/templates/notifier_env.j2
+3
-0
No files found.
playbooks/roles/notifier/tasks/main.yml
View file @
9e43b89f
...
...
@@ -85,6 +85,18 @@
file
:
path="{{ NOTIFIER_HOME }}/bin" mode=2775 state=directory owner={{ NOTIFIER_USER }} group={{ NOTIFIER_USER }}
-
name
:
write supervisord wrapper for celery workers
template
:
>
src=notifier-celery-workers-supervisor.sh.j2
dest="{{ NOTIFIER_HOME }}/notifier-celery-workers-supervisor.sh"
sudo_user
:
"
{{
supervisor_user
}}"
-
name
:
write supervisord wrapper for scheduler
template
:
>
src=notifier-scheduler-supervisor.sh.j2
dest="{{ supervisor_available_dir }}/notifier-scheduler-supervisor.sh"
sudo_user
:
"
{{
supervisor_user
}}"
-
name
:
write supervisord config for celery workers
template
:
>
src=edx/app/supervisor/conf.d/notifier-celery-workers.conf.j2
...
...
playbooks/roles/notifier/templates/edx/app/supervisor/conf.d/notifier-celery-workers.conf.j2
View file @
9e43b89f
...
...
@@ -3,7 +3,7 @@
;
[program:notifier-celery-workers]
command={{ NOTIFIER_
VENV_DIR }}/bin/python manage.py celery worker -l {{ NOTIFIER_LOG_LEVEL }}
command={{ NOTIFIER_
HOME }}/notifier-celery-workers-supervisor.sh
process_name=%(program_name)s
numprocs=1
...
...
@@ -25,8 +25,3 @@ stderr_logfile={{ NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-celery-workers-stderr
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
environment=PID='/var/tmp/notifier-celery-workers.pid',LANG=en_US.UTF-8,
{%- do notifier_env_vars.update(NOTIFIER_ENV_EXTRA) -%}
{%- for name,value in notifier_env_vars.items() -%}
{%- if value -%}{{name}}="{{value}}"{%- if not loop.last -%},{%- endif -%}{%- endif -%}
{%- endfor -%}
playbooks/roles/notifier/templates/edx/app/supervisor/conf.d/notifier-scheduler.conf.j2
View file @
9e43b89f
...
...
@@ -3,7 +3,7 @@
;
[program:notifier-scheduler]
command={{ NOTIFIER_
VENV_DIR }}/bin/python manage.py scheduler
command={{ NOTIFIER_
HOME }}/notifier-scheduler-supervisor.sh
process_name=%(program_name)s
numprocs=1
...
...
@@ -25,8 +25,3 @@ stderr_logfile={{ NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-scheduler-stderr.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
environment=PID='/var/tmp/notifier-scheduler.pid',LANG=en_US.UTF-8,
{%- do notifier_env_vars.update(NOTIFIER_ENV_EXTRA) -%}
{%- for name,value in notifier_env_vars.items() -%}
{%- if value -%}{{name}}="{{value}}"{%- if not loop.last -%},{%- endif -%}{%- endif -%}
{%- endfor -%}
playbooks/roles/notifier/templates/notifier-celery-workers-supervisor.sh.j2
0 → 100644
View file @
9e43b89f
#!/bin/bash
source
{{
NOTIFIER_HOME
}}
/notifier_env
cd
{{
NOTIFIER_CODE_DIR
}}
export
PID
=
'/var/tmp/notifier-scheduler.pid'
export
LANG
=
en_US.UTF-8
{{
NOTIFIER_VENV_DIR
}}
/bin/python manage.py celery worker
-l
{{
NOTIFIER_LOG_LEVEL
}}
playbooks/roles/notifier/templates/notifier-scheduler-supervisor.sh.j2
0 → 100644
View file @
9e43b89f
#!/bin/bash
source
{{
NOTIFIER_HOME
}}
/notifier_env
cd
{{
NOTIFIER_CODE_DIR
}}
export
PID
=
'/var/tmp/notifier-celery-workers.pid'
export
LANG
=
en_US.UTF-8
{{
NOTIFIER_VENV_DIR
}}
/bin/python manage.py scheduler
playbooks/roles/notifier/templates/notifier_env.j2
View file @
9e43b89f
...
...
@@ -6,3 +6,6 @@
export {{ name }}="{{ value }}"
{% endif %}
{% endfor %}
{% if NOTIFIER_THEME_NAME != "" %}
export DJANGO_SETTINGS_MODULE=notifier.settings_local
{% 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