Commit bd759109 by John Jarvis

renaming newrelic and datadog key vars

parent dd2b0a2d
...@@ -48,10 +48,8 @@ COMMON_MYSQL_MIGRATE_PASS: !!null ...@@ -48,10 +48,8 @@ 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
COMMON_NEWRELIC_LICENSE: "YOUR_NEWRELIC_LICENSE"
common_debian_pkgs: common_debian_pkgs:
- ntp - ntp
- ack-grep - ack-grep
......
DATADOG_API_KEY: "SPECIFY_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"
......
...@@ -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:{{ COMMON_DATADOG_API_KEY }}" line="api_key:{{ DATADOG_API_KEY }}"
notify: notify:
- restart the datadog service - restart the datadog service
tags: tags:
......
...@@ -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={{ 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" environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_CMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% 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
......
...@@ -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={{ 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" environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_LMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% 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
......
...@@ -19,7 +19,7 @@ newrelic_role_name: newrelic ...@@ -19,7 +19,7 @@ newrelic_role_name: newrelic
NEWRELIC_REPO: 'deb http://apt.newrelic.com/debian/ newrelic non-free' NEWRELIC_REPO: 'deb http://apt.newrelic.com/debian/ newrelic non-free'
NEWRELIC_KEY_ID: '548C16BF' NEWRELIC_KEY_ID: '548C16BF'
NEWRELIC_KEY_URL: 'https://download.newrelic.com/{{ NEWRELIC_KEY_ID }}.gpg' NEWRELIC_KEY_URL: 'https://download.newrelic.com/{{ NEWRELIC_KEY_ID }}.gpg'
NEWRELIC_LICENSE_KEY: "{{ COMMON_NEWRELIC_LICENSE }}" NEWRELIC_LICENSE_KEY: "SPECIFY_KEY_HERE"
# #
# OS packages # OS packages
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT # license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
# #
# Tasks for role newrelic # Tasks for role newrelic
# #
# Overview: # Overview:
# #
# Installs and configures the newrelic system monitoring agent. The server # Installs and configures the newrelic system monitoring agent. The server
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
- name: Install newrelic related system packages. - name: Install newrelic related system packages.
apt: pkg={{ item }} install_recommends=yes state=present apt: pkg={{ item }} install_recommends=yes state=present
with_items: newrelic_debian_pkgs with_items: newrelic_debian_pkgs
- name: configure the agent with the license key - name: configure the agent with the license key
shell: > shell: >
nrsysmond-config --set license_key="{{ NEWRELIC_LICENSE_KEY }}" nrsysmond-config --set license_key="{{ NEWRELIC_LICENSE_KEY }}"
ssl=true ssl=true
- name: ensure started and enabled - name: ensure started and enabled
service: name=newrelic-sysmond state=restarted enabled=yes service: name=newrelic-sysmond state=restarted enabled=yes
\ No newline at end of file
...@@ -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: "{{ COMMON_DATADOG_API_KEY }}" DATADOG_API_KEY: "{{ 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 }}"
......
...@@ -15,7 +15,7 @@ command={{ executable }} --preload -b {{ xqueue_gunicorn_host }}:{{ xqueue_gunic ...@@ -15,7 +15,7 @@ command={{ executable }} --preload -b {{ xqueue_gunicorn_host }}:{{ xqueue_gunic
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={{ 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" environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ XQUEUE_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% 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
......
...@@ -55,7 +55,7 @@ XQWATCHER_GIT_IDENTITY: | ...@@ -55,7 +55,7 @@ XQWATCHER_GIT_IDENTITY: |
-----END RSA PRIVATE KEY----- -----END RSA PRIVATE KEY-----
# depends upon Newrelic being enabled via COMMON_ENABLE_NEWRELIC # depends upon Newrelic being enabled via COMMON_ENABLE_NEWRELIC
# and a key being provided via COMMON_NEWRELIC_LICENSE # and a key being provided via NEWRELIC_LICENSE_KEY
XQWATCHER_NEWRELIC_APPNAME: "your Newrelic appname" XQWATCHER_NEWRELIC_APPNAME: "your Newrelic appname"
XQWATCHER_PIP_EXTRA_ARGS: "-i {{ COMMON_PYPI_MIRROR_URL }}" XQWATCHER_PIP_EXTRA_ARGS: "-i {{ COMMON_PYPI_MIRROR_URL }}"
# #
...@@ -103,4 +103,4 @@ xqwatcher_supervisor_available_dir: "{{ xqwatcher_supervisor_app_dir }}/conf.ava ...@@ -103,4 +103,4 @@ xqwatcher_supervisor_available_dir: "{{ xqwatcher_supervisor_app_dir }}/conf.ava
xqwatcher_debian_pkgs: xqwatcher_debian_pkgs:
- apparmor-utils - apparmor-utils
xqwatcher_redhat_pkgs: [] xqwatcher_redhat_pkgs: []
\ No newline at end of file
...@@ -7,14 +7,13 @@ ...@@ -7,14 +7,13 @@
{% set executable = xqwatcher_venv_dir + '/bin/python' %} {% set executable = xqwatcher_venv_dir + '/bin/python' %}
{% endif %} {% endif %}
[program:{{ xqwatcher_service_name }}] [program:xqwatcher]
command={{ executable }} -m {{ xqwatcher_module }} -d {{ xqwatcher_conf_dir }} command={{ executable }} -m {{ xqwatcher_module }} -d {{ xqwatcher_conf_dir }}
process_name=%(program_name)s process_name=%(program_name)s
user={{ xqwatcher_user }} user={{ xqwatcher_user }}
directory={{ xqwatcher_code_dir }} directory={{ xqwatcher_code_dir }}
stdout_logfile={{ xqwatcher_supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ xqwatcher_supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ xqwatcher_supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ xqwatcher_supervisor_log_dir }}/%(program_name)-stderr.log
environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ XQWATCHER_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ COMMON_NEWRELIC_LICENSE }},{% endif %} environment={% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ XQWATCHER_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}
killasgroup=true killasgroup=true
stopasgroup=true stopasgroup=true
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