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
a8191306
Commit
a8191306
authored
Jun 09, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1180 from edx/jarv/newrelic-sandboxes
Jarv/newrelic sandboxes
parents
e41be5ff
b8d9b773
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
42 additions
and
37 deletions
+42
-37
playbooks/roles/common/defaults/main.yml
+0
-2
playbooks/roles/datadog/defaults/main.yml
+1
-1
playbooks/roles/datadog/tasks/main.yml
+1
-1
playbooks/roles/edxapp/templates/cms.conf.j2
+1
-1
playbooks/roles/edxapp/templates/lms.conf.j2
+1
-1
playbooks/roles/newrelic/defaults/main.yml
+1
-1
playbooks/roles/newrelic/tasks/main.yml
+0
-0
playbooks/roles/notifier/defaults/main.yml
+1
-1
playbooks/roles/xqueue/templates/xqueue.conf.j2
+1
-1
playbooks/roles/xqwatcher/defaults/main.yml
+1
-1
playbooks/roles/xqwatcher/templates/edx/app/supervisor/conf.d/xqwatcher.conf.j2
+2
-3
util/jenkins/ansible-provision.sh
+32
-24
No files found.
playbooks/roles/common/defaults/main.yml
View file @
a8191306
...
...
@@ -48,10 +48,8 @@ COMMON_MYSQL_MIGRATE_PASS: !!null
COMMON_MONGO_READ_ONLY_USER
:
'
read_only'
COMMON_MONGO_READ_ONLY_PASS
:
!!null
COMMON_ENABLE_DATADOG
:
False
COMMON_DATADOG_API_KEY
:
"
PUT_YOUR_API_KEY_HERE"
COMMON_ENABLE_SPLUNKFORWARDER
:
False
COMMON_ENABLE_NEWRELIC
:
False
COMMON_NEWRELIC_LICENSE
:
"
YOUR_NEWRELIC_LICENSE"
common_debian_pkgs
:
-
ntp
-
ack-grep
...
...
playbooks/roles/datadog/defaults/main.yml
View file @
a8191306
---
DATADOG_API_KEY
:
"
SPECIFY_KEY_HERE"
datadog_apt_key
:
"
http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x226AE980C7A7DA52"
datadog_debian_pkgs
:
-
apparmor-utils
-
build-essential
...
...
playbooks/roles/datadog/tasks/main.yml
View file @
a8191306
...
...
@@ -45,7 +45,7 @@
lineinfile
:
>
dest="/etc/dd-agent/datadog.conf"
regexp="^api_key:.*"
line="api_key:{{
COMMON_
DATADOG_API_KEY }}"
line="api_key:{{ DATADOG_API_KEY }}"
notify
:
-
restart the datadog service
tags
:
...
...
playbooks/roles/edxapp/templates/cms.conf.j2
View file @
a8191306
...
...
@@ -14,7 +14,7 @@ command={{ executable }} --preload -b {{ edxapp_cms_gunicorn_host }}:{{ edxapp_c
user={{ common_web_user }}
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
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
...
...
playbooks/roles/edxapp/templates/lms.conf.j2
View file @
a8191306
...
...
@@ -14,7 +14,7 @@ command={{ executable }} --preload -b {{ edxapp_lms_gunicorn_host }}:{{ edxapp_l
user={{ common_web_user }}
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
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
...
...
playbooks/roles/newrelic/defaults/main.yml
View file @
a8191306
...
...
@@ -19,7 +19,7 @@ newrelic_role_name: newrelic
NEWRELIC_REPO
:
'
deb
http://apt.newrelic.com/debian/
newrelic
non-free'
NEWRELIC_KEY_ID
:
'
548C16BF'
NEWRELIC_KEY_URL
:
'
https://download.newrelic.com/{{
NEWRELIC_KEY_ID
}}.gpg'
NEWRELIC_LICENSE_KEY
:
'
NEW-RELIC-KEY'
NEWRELIC_LICENSE_KEY
:
"
SPECIFY_KEY_HERE"
#
# OS packages
...
...
playbooks/roles/newrelic/tasks/main.yml
View file @
a8191306
playbooks/roles/notifier/defaults/main.yml
View file @
a8191306
...
...
@@ -89,7 +89,7 @@ notifier_env_vars:
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
:
"
{{
COMMON_
DATADOG_API_KEY
}}"
DATADOG_API_KEY
:
"
{{
DATADOG_API_KEY
}}"
LOG_LEVEL
:
"
{{
NOTIFIER_LOG_LEVEL
}}"
RSYSLOG_ENABLED
:
"
{{
NOTIFIER_RSYSLOG_ENABLED
}}"
BROKER_URL
:
"
{{
NOTIFIER_CELERY_BROKER_URL
}}"
...
...
playbooks/roles/xqueue/templates/xqueue.conf.j2
View file @
a8191306
...
...
@@ -15,7 +15,7 @@ command={{ executable }} --preload -b {{ xqueue_gunicorn_host }}:{{ xqueue_gunic
user={{ common_web_user }}
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
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
...
...
playbooks/roles/xqwatcher/defaults/main.yml
View file @
a8191306
...
...
@@ -55,7 +55,7 @@ XQWATCHER_GIT_IDENTITY: |
-----END RSA PRIVATE KEY-----
# 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_PIP_EXTRA_ARGS
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
#
...
...
playbooks/roles/xqwatcher/templates/edx/app/supervisor/conf.d/xqwatcher.conf.j2
View file @
a8191306
...
...
@@ -7,14 +7,13 @@
{% set executable = xqwatcher_venv_dir + '/bin/python' %}
{% endif %}
[program:
{{ xqwatcher_service_name }}
]
[program:
xqwatcher_service_name
]
command={{ executable }} -m {{ xqwatcher_module }} -d {{ xqwatcher_conf_dir }}
process_name=%(program_name)s
user={{ xqwatcher_user }}
directory={{ xqwatcher_code_dir }}
stdout_logfile={{ xqwatcher_supervisor_log_dir }}/%(program_name)-stdout.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
stopasgroup=true
util/jenkins/ansible-provision.sh
View file @
a8191306
...
...
@@ -17,7 +17,7 @@
# - dns_name
# - environment
# - name_tag
env
export
PYTHONUNBUFFERED
=
1
export
BOTO_CONFIG
=
/var/lib/jenkins/
${
aws_account
}
.boto
...
...
@@ -82,6 +82,10 @@ if [[ -z $instance_type ]]; then
instance_type
=
"m1.medium"
fi
if
[[
-z
$enable_monitoring
]]
;
then
enable_monitoring
=
"false"
fi
deploy_host
=
"
${
dns_name
}
.
${
dns_zone
}
"
ssh-keygen
-f
"/var/lib/jenkins/.ssh/known_hosts"
-R
"
$deploy_host
"
...
...
@@ -109,7 +113,6 @@ rabbitmq_refresh: True
COMMON_HOSTNAME:
$dns_name
COMMON_DEPLOYMENT: edx
COMMON_ENVIRONMENT: sandbox
# User provided extra vars
$extra_vars
EOF
...
...
@@ -124,6 +127,33 @@ XQUEUE_BASIC_AUTH_PASSWORD: $auth_pass
EOF_AUTH
fi
if
[[
$edx_internal
==
"true"
]]
;
then
# if this isn't a public server add the github
# user and set edx_internal to True so that
# xserver is installed
cat
<<
EOF
>>
$extra_vars_file
EDXAPP_PREVIEW_LMS_BASE: preview.
${
deploy_host
}
EDXAPP_LMS_BASE:
${
deploy_host
}
EDXAPP_CMS_BASE: studio.
${
deploy_host
}
EDXAPP_SITE_NAME:
${
deploy_host
}
CERTS_DOWNLOAD_URL: "http://
${
deploy_host
}
:18090"
CERTS_VERIFY_URL: "http://
${
deploy_host
}
:18090"
edx_internal: True
COMMON_USER_INFO:
- name:
${
github_username
}
github: true
type: admin
USER_CMD_PROMPT: '[
$name_tag
] '
COMMON_ENABLE_NEWRELIC:
$enable_monitoring
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
XQUEUE_NEWRELIC_APPNAME: sandbox-
${
dns_name
}
-xqueue
FORUM_NEW_RELIC_APP_NAME: sandbox-
${
dns_name
}
-forums
EOF
fi
if
[[
$recreate
==
"true"
]]
;
then
# vars specific to provisioning added to $extra-vars
...
...
@@ -149,28 +179,6 @@ rabbitmq_refresh: True
elb:
$elb
EOF
if
[[
$edx_internal
==
"true"
]]
;
then
# if this isn't a public server add the github
# user and set edx_internal to True so that
# xserver is installed
cat
<<
EOF
>>
$extra_vars_file
EDXAPP_PREVIEW_LMS_BASE: preview.
${
deploy_host
}
EDXAPP_LMS_BASE:
${
deploy_host
}
EDXAPP_CMS_BASE: studio.
${
deploy_host
}
EDXAPP_SITE_NAME:
${
deploy_host
}
CERTS_DOWNLOAD_URL: "http://
${
deploy_host
}
:18090"
CERTS_VERIFY_URL: "http://
${
deploy_host
}
:18090"
edx_internal: True
COMMON_USER_INFO:
- name:
${
github_username
}
github: true
type: admin
dns_zone:
$dns_zone
rabbitmq_refresh: True
USER_CMD_PROMPT: '[
$name_tag
] '
elb:
$elb
EOF
fi
# run the tasks to launch an ec2 instance from AMI
...
...
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