Commit 63cada15 by John Jarvis

Merge remote-tracking branch 'origin' into jarv/no-deploy

parents e0ce3587 34b40720
---
NOTIFIER_USER: "notifier"
NOTIFIER_WEB_USER: "www-user"
NOTIFIER_WEB_USER: "www-data"
NOTIFIER_HOME: "{{ COMMON_APP_DIR }}/notifier"
NOTIFIER_VENV_DIR: "{{ NOTIFIER_HOME }}/virtualenvs/notifier"
NOTIFIER_DB_DIR: "{{ NOTIFIER_HOME }}/db"
......@@ -44,7 +44,7 @@ NOTIFIER_USER_SERVICE_API_KEY: "PUT_YOUR_API_KEY_HERE"
NOTIFIER_USER_SERVICE_HTTP_AUTH_USER: !!null
NOTIFIER_USER_SERVICE_HTTP_AUTH_PASS: !!null
NOTIFIER_CELERY_BROKER_URL: "django://"
NOTIFIER_LOGO_IMAGE_URL: "{{ NOTIFIER_LMS_URL_BASE }}/static/images/header-logo.png"
NOTIFIER_SUPERVISOR_LOG_DEST: "{{ COMMON_DATA_DIR }}/log/supervisor"
NOTIFER_REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt"
......@@ -97,3 +97,4 @@ notifier_env_vars:
US_HTTP_AUTH_USER: $NOTIFIER_USER_SERVICE_HTTP_AUTH_USER
US_HTTP_AUTH_PASS: $NOTIFIER_USER_SERVICE_HTTP_AUTH_PASS
FORUM_DIGEST_TASK_INTERVAL: $NOTIFIER_DIGEST_TASK_INTERVAL
LOGO_IMAGE_URL: $NOTIFIER_LOGO_IMAGE_URL
......@@ -30,11 +30,26 @@
tags:
- deploy
# Syncdb for whatever reason always creates the file owned by www-data:www-data, and then
# complains it can't write because it's running as notifier. So this is to touch the file into
# place with proper perms first.
- name: notifier | fix permissions on notifer db file
file: >
path={{ NOTIFIER_DB_DIR }}/notifier.db state=touch owner={{ NOTIFIER_USER }} group={{ NOTIFIER_WEB_USER }}
mode=0664
sudo: true
notify:
- notifier | restart notifier-scheduler
- notifier | restart notifier-celery-workers
tags:
- deploy
- name: notifier | syncdb
shell: >
cd {{ NOTIFIER_CODE_DIR }} && {{ NOTIFIER_VENV_DIR }}/bin/python manage.py syncdb
sudo: true
sudo: true
sudo_user: "{{ NOTIFIER_USER }}"
environment: notifier_env_vars
notify:
- notifier | restart notifier-scheduler
- notifier | restart notifier-celery-workers
......
......@@ -79,11 +79,11 @@
- name: notifier | create notifier DB directory
file:
path="{{ NOTIFIER_DB_DIR }}" mode=2775 state=directory
path="{{ NOTIFIER_DB_DIR }}" mode=2775 state=directory owner={{ NOTIFIER_USER }} group={{ NOTIFIER_WEB_USER }}
- name: notifier | create notifier/bin directory
file:
path="{{ NOTIFIER_HOME }}/bin" mode=2775 state=directory
path="{{ NOTIFIER_HOME }}/bin" mode=2775 state=directory owner={{ NOTIFIER_USER }} group={{ NOTIFIER_USER }}
- name: notifier | supervisord config for celery workers
template: >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment