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
ac2b3668
Commit
ac2b3668
authored
Aug 09, 2013
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Builds the env definition via iteration.
parent
5d70d116
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
35 deletions
+40
-35
playbooks/roles/notifier/templates/notifier_env.j2
+7
-32
playbooks/roles/notifier/vars/main.yml
+33
-3
No files found.
playbooks/roles/notifier/templates/notifier_env.j2
View file @
ac2b3668
# Application Environment
# {{ ansible_managed }}
export NOTIFIER_ENV="{{ notifier_env }}"
# email settings independent of transport
{% for name,value in notifier_env_vars.items() %}
export EMAIL_BACKEND="{{ notifier_email_backend }}"
{% if value %}
export EMAIL_HOST="{{ notifier_email_host }}"
export {{ name }}="{{ value }}"
export EMAIL_PORT="{{ notifer_email_port }}"
{% endif %}
export EMAIL_HOST_USER="{{ notifer_email_user }}"
{% endfor %}
export EMAIL_HOST_PASSWORD="{{ notifier_email_pass }}"
\ No newline at end of file
export EMAIL_DOMAIN="{{ notifier_email_domain }}"
export EMAIL_REWRITE_RECIPIENT="{{ notifer_email_rewrite_recipient }}"
# LMS links, images, etc
export LMS_URL_BASE="{{ notifier_lms_url_base }}"
export SECRET_KEY="{{ notifier_lms_secret_key }}"
# Comments Service Endpoint, for digest pulls
export CS_URL_BASE="{{ notifier_comment_service_base }}"
export CS_API_KEY="{{ notifier_comment_service_api_key }}"
# User Service Endpoint, for notification prefs
export US_URL_BASE="{{ notifier_user_service_base }}"
export US_API_KEY="{{ notifier_user_service_api_key }}"
# celery
export BROKER_URL="{{ notifier_celery_broker_url }}"
# have requests use the OS ca certs
export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
# basic auth credentils
export US_HTTP_AUTH_USER="{{ notifier_user_service_http_auth_user }}"
export US_HTTP_AUTH_PASS="{{ notifier_user_service_http_auth_pass }}"
playbooks/roles/notifier/vars/main.yml
View file @
ac2b3668
...
@@ -7,8 +7,11 @@ notifier_venv_dir: "{{ notifier_home }}/virtualenvs/notifier"
...
@@ -7,8 +7,11 @@ notifier_venv_dir: "{{ notifier_home }}/virtualenvs/notifier"
notifier_source_repo
:
"
git@github.com:edx/notifier.git"
notifier_source_repo
:
"
git@github.com:edx/notifier.git"
notifier_code_dir
:
"
{{
notifier_home
}}/src"
notifier_code_dir
:
"
{{
notifier_home
}}/src"
notifier_version
:
"
rc/digests"
notifier_version
:
"
rc/digests"
#notifier_version: "d98ad359c1e61cabc7ded3c81b03c5dc01dddd71"
notifier_git_identity_path
:
"
{{
secure_dir
}}/files/git-identity"
notifier_git_identity_path
:
"
{{
secure_dir
}}/files/git-identity"
notifier_requirements_file
:
"
{{
notifier_code_dir
}}/requirements.txt"
notifier_requirements_file
:
"
{{
notifier_code_dir
}}/requirements.txt"
notifier_log_level
:
"
INFO"
notifier_rsyslog_enabled
:
"
yes"
notifier_env
:
"
Development"
notifier_env
:
"
Development"
...
@@ -27,7 +30,7 @@ notifier_lms_url_base: "http://localhost:8000"
...
@@ -27,7 +30,7 @@ notifier_lms_url_base: "http://localhost:8000"
notifier_lms_secret_key
:
"
PUT_YOUR_SECRET_KEY_HERE"
notifier_lms_secret_key
:
"
PUT_YOUR_SECRET_KEY_HERE"
notifier_comment_service_base
:
"
http://localhost:4567"
notifier_comment_service_base
:
"
http://localhost:4567"
2
notifier_comment_service_api_key
:
"
PUT_YOUR_API_KEY_HERE"
notifier_comment_service_api_key
:
"
PUT_YOUR_API_KEY_HERE"
notifier_user_service_base
:
"
http://localhost:8000"
notifier_user_service_base
:
"
http://localhost:8000"
notifier_user_service_api_key
:
"
PUT_YOUR_API_KEY_HERE"
notifier_user_service_api_key
:
"
PUT_YOUR_API_KEY_HERE"
...
@@ -35,6 +38,8 @@ notifier_user_service_http_auth_user: "guido"
...
@@ -35,6 +38,8 @@ notifier_user_service_http_auth_user: "guido"
notifier_user_service_http_auth_pass
:
"
vanrossum"
notifier_user_service_http_auth_pass
:
"
vanrossum"
notifier_celery_broker_url
:
"
django://"
notifier_celery_broker_url
:
"
django://"
notifer_requests_ca_bundle
:
"
/etc/ssl/certs/ca-certificates.crt"
notifier_debian_pkgs
:
notifier_debian_pkgs
:
-
apparmor-utils
-
apparmor-utils
-
build-essential
-
build-essential
...
@@ -43,4 +48,30 @@ notifier_debian_pkgs:
...
@@ -43,4 +48,30 @@ notifier_debian_pkgs:
-
gcc
-
gcc
-
ipython
-
ipython
-
pkg-config
-
pkg-config
-
rsyslog
-
rsyslog
\ No newline at end of file
-
supervisor
#
# This structure is iterated over in order to build both
# the environment file for the notifier which is sourced
# into the applications's environment and for building
# the env variable for the supervisor job definition.
#
notifier_env_vars
:
NOTIFIER_ENV
:
"
{{
notifier_env
}}"
EMAIL_BACKEND
:
"
{{
notifier_email_backend
}}"
EMAIL_DOMAIN
:
"
{{
notifier_email_domain
}}"
EMAIL_REWRITE_RECIPIENT
:
"
{{
notifier_email_rewrite_recipient
}}"
LMS_URL_BASE
:
"
{{
notifier_lms_url_base
}}"
SECRET_KEY
:
"
{{
notifier_lms_secret_key
}}"
CS_URL_BASE
:
"
{{
notifier_comment_service_base
}}"
CS_API_KEY
:
"
{{
notifier_comment_service_api_key
}}"
US_URL_BASE
:
"
{{
notifier_user_service_base
}}"
US_API_KEY
:
"
{{
notifier_user_service_api_key
}}"
DATADOG_API_KEY
:
"
{{
notifier_dd_api_key
}}"
LOG_LEVEL
:
"
{{
notifier_log_level
}}"
RSYSLOG_ENABLED
:
"
{{
notifier_rsyslog_enabled
}}"
BROKER_URL
:
"
{{
notifier_celery_broker_url
}}"
REQUESTS_CA_BUNDLE
:
"
{{
notifer_requests_ca_bundle
}}"
US_HTTP_AUTH_USER
:
"
{{
notifier_user_service_http_auth_user
}}"
US_HTTP_AUTH_PASS
:
"
{{
notifier_user_service_http_auth_pass
}}"
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