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
20fab764
Commit
20fab764
authored
9 years ago
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create config file for Python New Relic Agent.
parent
537ad1dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
10 deletions
+50
-10
playbooks/roles/edxapp/tasks/deploy.yml
+20
-9
playbooks/roles/edxapp/templates/lms.conf.j2
+1
-1
playbooks/roles/edxapp/templates/newrelic.ini.j2
+29
-0
No files found.
playbooks/roles/edxapp/tasks/deploy.yml
View file @
20fab764
...
...
@@ -6,7 +6,7 @@
tags
:
-
install
-
install:configuration
-
name
:
create edxapp configuration dir
file
:
>
path="{{ EDXAPP_CFG_DIR }}" state=directory
...
...
@@ -14,7 +14,18 @@
tags
:
-
install
-
install:configuration
-
name
:
setup the newrelic python agent config
template
:
src
:
"
newrelic.ini.j2"
dest
:
"
{{
edxapp_app_dir
}}/newrelic.ini"
owner
:
"
{{
edxapp_user
}}"
group
:
"
{{
common_web_user
}}"
mode
:
"
0644"
tags
:
-
install
-
install:configuration
# Optional auth for git
-
name
:
create ssh script for git (not authenticated)
template
:
>
...
...
@@ -24,7 +35,7 @@
tags
:
-
install
-
install:base
-
name
:
create ssh script for git (authenticated)
template
:
>
src=git_ssh_auth.sh.j2 dest={{ edxapp_git_ssh }}
...
...
@@ -229,7 +240,7 @@
tags
:
-
install
-
install:app-requirements
# If using CAS and you have a function for mapping attributes, install
# the module here. The next few tasks set up the python code sandbox
-
name
:
install CAS attribute module
...
...
@@ -243,7 +254,7 @@
tags
:
-
install
-
install:app-requirements
# Install the sandbox python modules into {{ edxapp_venv_dir }}
-
name
:
install sandbox requirements into regular venv
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some
...
...
@@ -261,7 +272,7 @@
tags
:
-
install
-
install:app-requirements
# The next few tasks set up the python code sandbox
# need to disable this profile, otherwise the pip inside the sandbox venv has no permissions
...
...
@@ -317,7 +328,7 @@
tags
:
-
install
-
install:code
# alternative would be to give {{ common_web_user }} read access
# to the virtualenv but that permission change will require
# root access.
...
...
@@ -337,7 +348,7 @@
tags
:
-
install
-
install:code
# creates the supervisor jobs for the
# service variants configured, runs
# gather_assets and db migrations
...
...
@@ -415,7 +426,7 @@
-
install
-
install:configuration
-
install:code
-
include
:
tag_ec2.yml tags=deploy
when
:
COMMON_TAG_EC2_INSTANCE
tags
:
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/edxapp/templates/lms.conf.j2
View file @
20fab764
...
...
@@ -10,7 +10,7 @@ command={{ executable }} -c {{ edxapp_app_dir }}/lms_gunicorn.py lms.wsgi
user={{ common_web_user }}
directory={{ edxapp_code_dir }}
environment={% if COMMON_ENABLE_NEWRELIC_APP %}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",PATH="{{ edxapp_deploy_path }}"
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_LMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},
NEW_RELIC_CONFIG_FILE={{ edxapp_app_dir }}/newrelic.ini,
{% endif -%} PORT={{ edxapp_lms_gunicorn_port }},ADDRESS={{ edxapp_lms_gunicorn_host }},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ EDXAPP_LMS_ENV }},SERVICE_VARIANT="lms",PATH="{{ edxapp_deploy_path }}"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/edxapp/templates/newrelic.ini.j2
0 → 100644
View file @
20fab764
# ---------------------------------------------------------------------------
# edX Note
#
# New Relic allows us to specify the Python Agent config options in a number of
# places. For most functionality, you can get away with a combination of
# environment variables (see the lms.conf.j2 in the configuration repo) and New
# Relic's server-side configuration (the "settings" on your app in their
# monitoring web interface). That being said, some advanced settings can only
# be set in this file or manually in code. That's why this config file is so
# bare -- it specifies only what you *can't* specify in the other two places.
#
# Note that you can always get an up to date snapshot of your combined config
# by going to New Relic's web interface and selecting your app's:
# Settings > Environment > Agent Initialization
[newrelic]
# Turns on or turns off all attributes for browser monitoring. This is the data
# that gets sent to the PageView destination in New Relic Insights. If
# attributes.enabled is false, no attributes will be sent to browser monitoring
# regardless of how this configuration setting is set.
#
# Enabling browser_monitoring.attributes.enabled=true means that we can add a
# custom parameter in our Python code via newrelic.agent.add_custom_parameter()
# and have that show up in PageViews (by default, it only shows up in
# Transactions). This lets us do things like facet front end load time by
# `course_id`.
#
browser_monitoring.attributes.enabled=true
This diff is collapsed.
Click to expand it.
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