The edX notifier is a python django application that interacts with the LMS and the comments service to send digest emails to forum users who have opted in and are following a discussion. Currently the notifier runs on a single server. It is not idempotent and does not currently have a method for distributing jobs that allows redundancy, although this is planned. Building a new server from scratch takes about 15 minutes with ansible.
Since the notifier runs on a single machine and can't be turned into an AMI, the easiest way to provision and update the notifier is by running ansible directly against the machine. A sample of how to do that can be found below.
ansible-playbook -i ec2.py -l tag_Name_loadtest-edx-notifier notifier.yml -e@/home/feanil/src/edx-internal/ansible/vars/edx.yml -e@/home/feanil/src/edx-internal/ansible/vars/loadtest-edx.yml -e@/home/feanil/src/edx-secure/ansible/vars/edx.yml -e@/home/feanil/src/edx-secure/ansible/vars/loadtest-edx.yml -D
Make sure the user you are testing with has opted into receiving digests: Instructions
To generate a test digest for yourself you can do something like this (Make sure to update the date to be in the future.):
$ ssh notifier-box.edx.org
$ source /edx/app/notifier/notifier_env
$ sudo -E /edx/app/notifier/virtualenvs/notifier/bin/python /edx/app/notifier/src/manage.py forums_digest --users=5182021 --to_datetime=2015-09-03 --show-html
To manually test on Stage:
- Follow instructions above to receive digests
- Make a change in Discussions that would be sent through the digest
- Verify the following: