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
OpenEdx
configuration
Commits
5739cdf0
Commit
5739cdf0
authored
Mar 19, 2015
by
Max Rothman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1910 from edx/max/newrelic-for-workers
Add newrelic monitoring for edxapp workers
parents
c3bce3df
c17e3d32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
playbooks/roles/edxapp/defaults/main.yml
+8
-0
playbooks/roles/edxapp/templates/workers.conf.j2
+2
-2
util/jenkins/ansible-provision.sh
+1
-0
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
5739cdf0
...
...
@@ -341,6 +341,7 @@ EDXAPP_XML_S3_KEY: !!null
EDXAPP_NEWRELIC_LMS_APPNAME
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}-edxapp-lms"
EDXAPP_NEWRELIC_CMS_APPNAME
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}-edxapp-cms"
EDXAPP_NEWRELIC_WORKERS_APPNAME
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}-edxapp-workers"
EDXAPP_AWS_STORAGE_BUCKET_NAME
:
'
edxuploads'
...
...
@@ -386,24 +387,31 @@ EDXAPP_CELERY_WORKERS:
-
queue
:
low
service_variant
:
cms
concurrency
:
3
monitor
:
True
-
queue
:
default
service_variant
:
cms
concurrency
:
4
monitor
:
True
-
queue
:
high
service_variant
:
cms
concurrency
:
1
monitor
:
True
-
queue
:
low
service_variant
:
lms
concurrency
:
1
monitor
:
True
-
queue
:
default
service_variant
:
lms
concurrency
:
3
monitor
:
True
-
queue
:
high
service_variant
:
lms
concurrency
:
4
monitor
:
True
-
queue
:
high_mem
service_variant
:
lms
concurrency
:
2
monitor
:
False
EDXAPP_DEFAULT_CACHE_VERSION
:
"
1"
EDXAPP_OAUTH_ENFORCE_SECURE
:
True
...
...
playbooks/roles/edxapp/templates/workers.conf.j2
View file @
5739cdf0
{% for w in edxapp_workers %}
[program:{{ w.service_variant }}_{{ w.queue }}_{{ w.concurrency }}]
environment=CONCURRENCY={{ w.concurrency }},LOGLEVEL=info,DJANGO_SETTINGS_MODULE=aws,PYTHONPATH={{ edxapp_code_dir }},SERVICE_VARIANT={{ w.service_variant }}
environment=
{% if COMMON_ENABLE_NEWRELIC %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_WORKERS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}
CONCURRENCY={{ w.concurrency }},LOGLEVEL=info,DJANGO_SETTINGS_MODULE=aws,PYTHONPATH={{ edxapp_code_dir }},SERVICE_VARIANT={{ w.service_variant }}
user={{ common_web_user }}
directory={{ edxapp_code_dir }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
command={{ edxapp_venv_
bin
}}/python {{ edxapp_code_dir }}/manage.py {{ w.service_variant }} --settings=aws celery worker --loglevel=info --queues=edx.{{ w.service_variant }}.core.{{ w.queue }} --hostname=edx.{{ w.service_variant }}.core.{{ w.queue }}.%%h --concurrency={{ w.concurrency }}
command={{ edxapp_venv_
dir + '/bin/newrelic-admin run-program ' if w.monitor and COMMON_ENABLE_NEWRELIC else ''}}{{ edxapp_venv_bin
}}/python {{ edxapp_code_dir }}/manage.py {{ w.service_variant }} --settings=aws celery worker --loglevel=info --queues=edx.{{ w.service_variant }}.core.{{ w.queue }} --hostname=edx.{{ w.service_variant }}.core.{{ w.queue }}.%%h --concurrency={{ w.concurrency }}
killasgroup=true
stopasgroup=true
stopwaitsecs=432000
...
...
util/jenkins/ansible-provision.sh
View file @
5739cdf0
...
...
@@ -185,6 +185,7 @@ COMMON_ENABLE_DATADOG: $enable_monitoring
FORUM_NEW_RELIC_ENABLE:
$enable_monitoring
EDXAPP_NEWRELIC_LMS_APPNAME: sandbox-
${
dns_name
}
-edxapp-lms
EDXAPP_NEWRELIC_CMS_APPNAME: sandbox-
${
dns_name
}
-edxapp-cms
EDXAPP_NEWRELIC_WORKERS_APPNAME: sandbox-
${
dns_name
}
-edxapp-workers
XQUEUE_NEWRELIC_APPNAME: sandbox-
${
dns_name
}
-xqueue
FORUM_NEW_RELIC_APP_NAME: sandbox-
${
dns_name
}
-forums
SANDBOX_USERNAME:
$github_username
...
...
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