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
50750f4b
Commit
50750f4b
authored
Nov 05, 2013
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring to support new supervisor config.
parent
5d0c6d09
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
61 deletions
+39
-61
playbooks/roles/notifier/defaults/main.yml
+1
-1
playbooks/roles/notifier/handlers/main.yml
+10
-14
playbooks/roles/notifier/tasks/deploy.yml
+20
-8
playbooks/roles/notifier/tasks/main.yml
+8
-4
playbooks/roles/notifier/templates/edx/app/supervisor/conf.d/notifier-celery-workers.conf.j2
+0
-1
playbooks/roles/notifier/templates/edx/app/supervisor/conf.d/notifier-scheduler.conf.j2
+0
-1
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-scheduler.conf.j2
+0
-32
No files found.
playbooks/roles/notifier/defaults/main.yml
View file @
50750f4b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
NOTIFIER_USER
:
"
notifier"
NOTIFIER_USER
:
"
notifier"
NOTIFIER_WEB_USER
:
"
www-user"
NOTIFIER_WEB_USER
:
"
www-user"
NOTIFIER_HOME
:
"
/opt/wwc
/notifier"
NOTIFIER_HOME
:
"
{{
COMMON_APP_DIR
}}
/notifier"
NOTIFIER_VENV_DIR
:
"
{{
NOTIFIER_HOME
}}/virtualenvs/notifier"
NOTIFIER_VENV_DIR
:
"
{{
NOTIFIER_HOME
}}/virtualenvs/notifier"
NOTIFIER_DB_DIR
:
"
{{
NOTIFIER_HOME
}}/db"
NOTIFIER_DB_DIR
:
"
{{
NOTIFIER_HOME
}}/db"
NOTIFIER_SOURCE_REPO
:
"
https://github.com/edx/notifier.git"
NOTIFIER_SOURCE_REPO
:
"
https://github.com/edx/notifier.git"
...
...
playbooks/roles/notifier/handlers/main.yml
View file @
50750f4b
...
@@ -4,20 +4,16 @@
...
@@ -4,20 +4,16 @@
## for future compliance, when the API comes on line.
## for future compliance, when the API comes on line.
##
##
-
name
:
notifier | install notifier-scheduler
supervisorctl
:
name=notifier-scheduler state=present
-
name
:
notifier | install notifier-celery-workers
supervisorctl
:
name=notifier-celery-workers state=present
-
name
:
notifier | restart notifier
supervisorctl
:
name=notifier-scheduler state=restarted
notify
:
-
notifier | install notifier-celery-workers
-
notifier | install notifier-scheduler
-
name
:
notifier | restart notifier-scheduler
-
name
:
notifier | restart notifier-scheduler
supervisorctl
:
name=notifier-scheduler state=restarted
supervisorctl
:
>
name=notifier-scheduler
state=restarted
config={{ supervisor_cfg }}
supervisorctl_path={{ supervisor_ctl }}
-
name
:
notifier | restart notifier-celery-workers
-
name
:
notifier | restart notifier-celery-workers
supervisorctl
:
name=notifier-celery-workers state=restarted
supervisorctl
:
>
name=notifier-celery-workers
state=restarted
config={{ supervisor_cfg }}
supervisorctl_path={{ supervisor_ctl }}
playbooks/roles/notifier/tasks/deploy.yml
View file @
50750f4b
---
---
-
name
:
notifier | stop notifier-celery-beat
supervisorctl
:
name=notifier-celery-beat state=restarted
ignore_errors
:
yes
-
name
:
notifier | stop notifier-celery-workers
-
name
:
notifier | stop notifier-celery-beat
supervisorctl
:
name=notifier-celery-workers state=restarted
supervisorctl
:
>
name="{{ item }}"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=present
ignore_errors
:
yes
ignore_errors
:
yes
sudo_user
:
"
{{
common_web_user
}}"
with_items
:
[
'
notifier-scheduler'
,
'
notifier-celery-workers'
]
tags
:
-
deploy
-
name
:
notifier | checkout code
-
name
:
notifier | checkout code
git
:
git
:
dest={{ NOTIFIER_CODE_DIR }} repo={{ NOTIFIER_SOURCE_REPO }}
dest={{ NOTIFIER_CODE_DIR }} repo={{ NOTIFIER_SOURCE_REPO }}
version={{ NOTIFIER_VERSION }}
version={{ NOTIFIER_VERSION }}
sudo
:
true
sudo_user
:
"
{{
NOTIFIER_USER
}}"
notify
:
notify
:
-
notifier | restart notifier
-
notifier | restart notifier
tags
:
tags
:
...
@@ -35,20 +42,25 @@
...
@@ -35,20 +42,25 @@
sudo
:
true
sudo
:
true
sudo_user
:
"
{{
NOTIFIER_USER
}}"
sudo_user
:
"
{{
NOTIFIER_USER
}}"
notify
:
notify
:
-
notifier | restart notifier
-
notifier | restart notifier-scheduler
-
notifier | restart notifier-celery-workers
tags
:
tags
:
-
notifier
-
notifier
-
deploy
-
deploy
-
install
-
install
-
update
-
update
-
name
:
notifier | debug
debug
:
msg="supervisorctl is defined as {{ supervisor_ctl }}"
-
name
:
notifier | syncdb
-
name
:
notifier | syncdb
shell
:
>
shell
:
>
cd {{ NOTIFIER_CODE_DIR }} && {{ NOTIFIER_VENV_DIR }}/bin/python manage.py syncdb
cd {{ NOTIFIER_CODE_DIR }} && {{ NOTIFIER_VENV_DIR }}/bin/python manage.py syncdb
sudo
:
true
sudo
:
true
sudo_user
:
"
{{
NOTIFIER_USER
}}"
sudo_user
:
"
{{
NOTIFIER_USER
}}"
notify
:
notify
:
-
notifier | restart notifier
-
notifier | restart notifier-scheduler
-
notifier | restart notifier-celery-workers
tags
:
tags
:
-
notifier
-
notifier
-
deploy
-
deploy
...
...
playbooks/roles/notifier/tasks/main.yml
View file @
50750f4b
...
@@ -90,13 +90,17 @@
...
@@ -90,13 +90,17 @@
path={{NOTIFIER_SUPERVISOR_LOG_DEST }} mode=2750 state=directory
path={{NOTIFIER_SUPERVISOR_LOG_DEST }} mode=2750 state=directory
-
name
:
notifier | supervisord config for celery workers
-
name
:
notifier | supervisord config for celery workers
template
:
template
:
>
src=etc/supervisor/conf.d/notifier-celery-workers.conf.j2 dest=/etc/supervisor/conf.d/notifier-celery-workers.conf
src=edx/app/supervisor/conf.d/notifier-celery-workers.conf.j2
dest=/edx/app/supervisor/conf.d/notifier-celery-workers.conf
sudo_user
:
"
{{
supervisor_user
}}"
notify
:
notifier | restart notifier-celery-workers
notify
:
notifier | restart notifier-celery-workers
-
name
:
notifier | supervisord config for scheduler
-
name
:
notifier | supervisord config for scheduler
template
:
template
:
>
src=etc/supervisor/conf.d/notifier-scheduler.conf.j2 dest=/etc/supervisor/conf.d/notifier-scheduler.conf
src=edx/app/supervisor/conf.d/notifier-scheduler.conf.j2
dest=/edx/app/supervisor/conf.d/notifier-scheduler.conf
sudo_user
:
"
{{
supervisor_user
}}"
notify
:
notifier | restart notifier-scheduler
notify
:
notifier | restart notifier-scheduler
-
include
:
deploy.yml
-
include
:
deploy.yml
playbooks/roles/notifier/templates/e
tc
/supervisor/conf.d/notifier-celery-workers.conf.j2
→
playbooks/roles/notifier/templates/e
dx/app
/supervisor/conf.d/notifier-celery-workers.conf.j2
View file @
50750f4b
...
@@ -16,7 +16,6 @@ startretries=3
...
@@ -16,7 +16,6 @@ startretries=3
exitcodes=0,2
exitcodes=0,2
stopsignal=TERM
stopsignal=TERM
stopwaitsecs=10
stopwaitsecs=10
user=notifier
redirect_stderr=false
redirect_stderr=false
stdout_logfile={{NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-celery-workers-stdout.log
stdout_logfile={{NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-celery-workers-stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_maxbytes=1MB
...
...
playbooks/roles/notifier/templates/e
tc/supervisor/conf.d/notifier-celery
-scheduler.conf.j2
→
playbooks/roles/notifier/templates/e
dx/app/supervisor/conf.d/notifier
-scheduler.conf.j2
View file @
50750f4b
...
@@ -16,7 +16,6 @@ startretries=3
...
@@ -16,7 +16,6 @@ startretries=3
exitcodes=0,2
exitcodes=0,2
stopsignal=TERM
stopsignal=TERM
stopwaitsecs=10
stopwaitsecs=10
user=notifier
redirect_stderr=false
redirect_stderr=false
stdout_logfile={{ NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-scheduler-stdout.log
stdout_logfile={{ NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-scheduler-stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_maxbytes=1MB
...
...
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-scheduler.conf.j2
deleted
100644 → 0
View file @
5d0c6d09
;
; {{ ansible_managed }}
;
[program:notifier-scheduler]
command={{ NOTIFIER_VENV_DIR }}/bin/python manage.py scheduler
process_name=%(program_name)s
numprocs=1
directory={{ NOTIFIER_CODE_DIR }}
umask=022
autostart=true
autorestart=true
startsecs=10
startretries=3
exitcodes=0,2
stopsignal=TERM
stopwaitsecs=10
user=notifier
redirect_stderr=false
stdout_logfile={{ NOTIFIER_SUPERVISOR_LOG_DEST }}/notifier-scheduler-stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
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,
{%- for name,value in notifier_env_vars.items() -%}
{{name}}="{{value}}"{%- if not loop.last -%},{%- endif -%}
{%- 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