Commit 0c2b158e by John Jarvis

Merge pull request #1151 from edx/jarv/dd-var

changing common dd var
parents 9b6976f4 44e37c28
...@@ -48,10 +48,10 @@ COMMON_MYSQL_MIGRATE_PASS: !!null ...@@ -48,10 +48,10 @@ COMMON_MYSQL_MIGRATE_PASS: !!null
COMMON_MONGO_READ_ONLY_USER: 'read_only' COMMON_MONGO_READ_ONLY_USER: 'read_only'
COMMON_MONGO_READ_ONLY_PASS: !!null COMMON_MONGO_READ_ONLY_PASS: !!null
COMMON_ENABLE_DATADOG: False COMMON_ENABLE_DATADOG: False
COMMON_DATADOG_API_KEY: "PUT_YOUR_API_KEY_HERE"
COMMON_ENABLE_SPLUNKFORWARDER: False COMMON_ENABLE_SPLUNKFORWARDER: False
COMMON_ENABLE_NEWRELIC: False COMMON_ENABLE_NEWRELIC: False
NEWRELIC_LICENSE: "YOUR LICENSE" COMMON_NEWRELIC_LICENSE: "YOUR LICENSE"
common_debian_pkgs: common_debian_pkgs:
- ntp - ntp
- ack-grep - ack-grep
......
--- ---
DATADOG_API_KEY: "PUT_YOUR_API_KEY_HERE"
datadog_apt_key: "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x226AE980C7A7DA52" datadog_apt_key: "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x226AE980C7A7DA52"
datadog_debian_pkgs: datadog_debian_pkgs:
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
lineinfile: > lineinfile: >
dest="/etc/dd-agent/datadog.conf" dest="/etc/dd-agent/datadog.conf"
regexp="^api_key:.*" regexp="^api_key:.*"
line="api_key:{{ DATADOG_API_KEY }}" line="api_key:{{ COMMON_DATADOG_API_KEY }}"
notify: notify:
- restart the datadog service - restart the datadog service
tags: tags:
......
...@@ -212,10 +212,8 @@ EDXAPP_XML_FROM_GIT: false ...@@ -212,10 +212,8 @@ EDXAPP_XML_FROM_GIT: false
EDXAPP_XML_S3_BUCKET: !!null EDXAPP_XML_S3_BUCKET: !!null
EDXAPP_XML_S3_KEY: !!null EDXAPP_XML_S3_KEY: !!null
EDXAPP_NEWRELIC_LICENSE: "YOUR LICENSE"
EDXAPP_NEWRELIC_LMS_APPNAME: "edX-LMS" EDXAPP_NEWRELIC_LMS_APPNAME: "edX-LMS"
EDXAPP_NEWRELIC_CMS_APPNAME: "edX-CMS" EDXAPP_NEWRELIC_CMS_APPNAME: "edX-CMS"
edxapp_newrelic_executable: "{{ edxapp_venv_dir }}/bin/newrelic-admin"
#-------- Everything below this line is internal to the role ------------ #-------- Everything below this line is internal to the role ------------
#Use YAML references (& and *) and hash merge <<: to factor out shared settings #Use YAML references (& and *) and hash merge <<: to factor out shared settings
......
[program:cms] [program:cms]
{% if COMMON_ENABLE_NEWRELIC %} {% if COMMON_ENABLE_NEWRELIC %}
{% set executable = edxapp_newrelic_executable + ' run-program ' + edxapp_venv_dir + '/bin/gunicorn' %} {% set executable = edxapp_venv_dir + '/bin/newrelic-admin run-program ' + edxapp_venv_dir + '/bin/gunicorn' %}
{% else %} {% else %}
{% set executable = edxapp_venv_dir + '/bin/gunicorn' %} {% set executable = edxapp_venv_dir + '/bin/gunicorn' %}
{% endif %} {% endif %}
...@@ -14,7 +14,7 @@ command={{ executable }} --preload -b {{ edxapp_cms_gunicorn_host }}:{{ edxapp_c ...@@ -14,7 +14,7 @@ command={{ executable }} --preload -b {{ edxapp_cms_gunicorn_host }}:{{ edxapp_c
user={{ common_web_user }} user={{ common_web_user }}
directory={{ edxapp_code_dir }} directory={{ edxapp_code_dir }}
environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_CMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ EDXAPP_NEWRELIC_LICENSE }},{% endif -%}PORT={{edxapp_cms_gunicorn_port}},ADDRESS={{edxapp_cms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_cms_env }},SERVICE_VARIANT="cms" environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_CMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ COMMON_NEWRELIC_LICENSE }},{% endif -%}PORT={{edxapp_cms_gunicorn_port}},ADDRESS={{edxapp_cms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_cms_env }},SERVICE_VARIANT="cms"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true killasgroup=true
......
[program:lms] [program:lms]
{% if COMMON_ENABLE_NEWRELIC %} {% if COMMON_ENABLE_NEWRELIC %}
{% set executable = edxapp_newrelic_executable + ' run-program ' + edxapp_venv_dir + '/bin/gunicorn' %} {% set executable = edxapp_venv_dir + '/bin/newrelic-admin run-program ' + edxapp_venv_dir + '/bin/gunicorn' %}
{% else %} {% else %}
{% set executable = edxapp_venv_dir + '/bin/gunicorn' %} {% set executable = edxapp_venv_dir + '/bin/gunicorn' %}
{% endif %} {% endif %}
...@@ -14,7 +14,7 @@ command={{ executable }} --preload -b {{ edxapp_lms_gunicorn_host }}:{{ edxapp_l ...@@ -14,7 +14,7 @@ command={{ executable }} --preload -b {{ edxapp_lms_gunicorn_host }}:{{ edxapp_l
user={{ common_web_user }} user={{ common_web_user }}
directory={{ edxapp_code_dir }} directory={{ edxapp_code_dir }}
environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_LMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ EDXAPP_NEWRELIC_LICENSE }},{% endif -%} PORT={{edxapp_lms_gunicorn_port}},ADDRESS={{edxapp_lms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_lms_env }},SERVICE_VARIANT="lms" environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_LMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ COMMON_NEWRELIC_LICENSE }},{% endif -%} PORT={{edxapp_lms_gunicorn_port}},ADDRESS={{edxapp_lms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_lms_env }},SERVICE_VARIANT="lms"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true killasgroup=true
......
...@@ -89,7 +89,7 @@ notifier_env_vars: ...@@ -89,7 +89,7 @@ notifier_env_vars:
CS_API_KEY: "{{ NOTIFIER_COMMENT_SERVICE_API_KEY }}" CS_API_KEY: "{{ NOTIFIER_COMMENT_SERVICE_API_KEY }}"
US_URL_BASE: "{{ NOTIFIER_USER_SERVICE_BASE }}" US_URL_BASE: "{{ NOTIFIER_USER_SERVICE_BASE }}"
US_API_KEY: "{{ NOTIFIER_USER_SERVICE_API_KEY }}" US_API_KEY: "{{ NOTIFIER_USER_SERVICE_API_KEY }}"
DATADOG_API_KEY: "{{ DATADOG_API_KEY }}" DATADOG_API_KEY: "{{ COMMON_DATADOG_API_KEY }}"
LOG_LEVEL: "{{ NOTIFIER_LOG_LEVEL }}" LOG_LEVEL: "{{ NOTIFIER_LOG_LEVEL }}"
RSYSLOG_ENABLED: "{{ NOTIFIER_RSYSLOG_ENABLED }}" RSYSLOG_ENABLED: "{{ NOTIFIER_RSYSLOG_ENABLED }}"
BROKER_URL: "{{ NOTIFIER_CELERY_BROKER_URL }}" BROKER_URL: "{{ NOTIFIER_CELERY_BROKER_URL }}"
......
...@@ -30,6 +30,7 @@ XQUEUE_MYSQL_USER: 'xqueue001' ...@@ -30,6 +30,7 @@ XQUEUE_MYSQL_USER: 'xqueue001'
XQUEUE_MYSQL_PASSWORD: 'password' XQUEUE_MYSQL_PASSWORD: 'password'
XQUEUE_MYSQL_HOST: 'localhost' XQUEUE_MYSQL_HOST: 'localhost'
XQUEUE_MYSQL_PORT: '3306' XQUEUE_MYSQL_PORT: '3306'
XQUEUE_NEWRELIC_APPNAME: "edX-xqueue"
# Internal vars below this line # Internal vars below this line
############################################# #############################################
......
[program:xqueue] [program:xqueue]
{% if COMMON_ENABLE_NEWRELIC %} {% if COMMON_ENABLE_NEWRELIC %}
{% set executable = edxapp_newrelic_executable + ' run-program ' + edxapp_venv_dir + '/bin/gunicorn' %} {% set executable = xqueue_venv_dir + '/bin/newrelic-admin run-program ' + xqueue_venv_dir + '/bin/gunicorn' %}
{% else %} {% else %}
{% set executable = edxapp_venv_dir + '/bin/gunicorn' %} {% set executable = xqueue_venv_dir + '/bin/gunicorn' %}
{% endif %} {% endif %}
{% if ansible_processor|length > 0 %} {% if ansible_processor|length > 0 %}
...@@ -15,7 +15,7 @@ command={{ xqueue_venv_bin }}/gunicorn --preload -b {{ xqueue_gunicorn_host }}:{ ...@@ -15,7 +15,7 @@ command={{ xqueue_venv_bin }}/gunicorn --preload -b {{ xqueue_gunicorn_host }}:{
user={{ common_web_user }} user={{ common_web_user }}
directory={{ xqueue_code_dir }} directory={{ xqueue_code_dir }}
environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_LMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ EDXAPP_NEWRELIC_LICENSE }},{% endif -%}PID=/var/tmp/xqueue.pid,PORT={{ xqueue_gunicorn_port }},ADDRESS={{ xqueue_gunicorn_host }},LANG={{ XQUEUE_LANG }},DJANGO_SETTINGS_MODULE=xqueue.aws_settings,SERVICE_VARIANT="xqueue" environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ XQUEUE_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ COMMON_NEWRELIC_LICENSE }},{% endif -%}PID=/var/tmp/xqueue.pid,PORT={{ xqueue_gunicorn_port }},ADDRESS={{ xqueue_gunicorn_host }},LANG={{ XQUEUE_LANG }},DJANGO_SETTINGS_MODULE=xqueue.aws_settings,SERVICE_VARIANT="xqueue"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
......
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