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
edx
configuration
Commits
45274b3e
Commit
45274b3e
authored
May 16, 2018
by
Fred Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move lms and cms to bash based wrapper scripts
parent
0f435d49
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
15 deletions
+68
-15
playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2
+33
-0
playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2
+33
-0
playbooks/roles/edxapp/templates/edx/app/supervisor/conf.d.available/cms.conf.j2
+1
-7
playbooks/roles/edxapp/templates/edx/app/supervisor/conf.d.available/lms.conf.j2
+1
-8
No files found.
playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2
0 → 100644
View file @
45274b3e
#!/usr/bin/env bash
# {{ ansible_managed }}
{
%
set
edxapp_venv_bin
=
edxapp_venv_dir +
"/bin"
%
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
edxapp_venv_bin +
'/newrelic-admin run-program '
+ edxapp_venv_bin +
'/gunicorn'
%
}
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/gunicorn'
%
}
{
% endif %
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
export
NEW_RELIC_APP_NAME
=
"{{ EDXAPP_NEWRELIC_CMS_APPNAME }}"
export
NEW_RELIC_CONFIG_FILE
=
"{{ edxapp_app_dir }}/newrelic.ini"
,
if
command
-v
ec2metadata
>
/dev/null 2>&1
;
then
INSTANCEID
=
$(
ec2metadata
--instance-id
)
;
HOSTNAME
=
$(
hostname
)
export
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME
=
"
$HOSTNAME
-
$INSTANCEID
"
fi
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
% endif -%
}
export
PORT
=
"{{ edxapp_cms_gunicorn_port }}"
export
ADDRESS
=
"{{ edxapp_cms_gunicorn_host }}"
export
LANG
=
"{{ EDXAPP_LANG }}"
export
DJANGO_SETTINGS_MODULE
=
"{{ EDXAPP_CMS_ENV }}"
export
SERVICE_VARIANT
=
"cms"
export
PATH
=
"{{ edxapp_deploy_path }}"
export
BOTO_CONFIG
=
"{{ edxapp_app_dir }}/.boto"
source
{{
edxapp_app_dir
}}
/edxapp_env
{{
executable
}}
-c
{{
edxapp_app_dir
}}
/cms_gunicorn.py
{{
EDXAPP_CMS_GUNICORN_EXTRA
}}
cms.wsgi
playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2
0 → 100644
View file @
45274b3e
#!/usr/bin/env bash
# {{ ansible_managed }}
{
%
set
edxapp_venv_bin
=
edxapp_venv_dir +
"/bin"
%
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
edxapp_venv_bin +
'/newrelic-admin run-program '
+ edxapp_venv_bin +
'/gunicorn'
%
}
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/gunicorn'
%
}
{
% endif %
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
export
NEW_RELIC_APP_NAME
=
"{{ EDXAPP_NEWRELIC_LMS_APPNAME }}"
export
NEW_RELIC_CONFIG_FILE
=
"{{ edxapp_app_dir }}/newrelic.ini"
,
if
command
-v
ec2metadata
>
/dev/null 2>&1
;
then
INSTANCEID
=
$(
ec2metadata
--instance-id
)
;
HOSTNAME
=
$(
hostname
)
export
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME
=
"
$HOSTNAME
-
$INSTANCEID
"
fi
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
% endif -%
}
export
PORT
=
"{{ edxapp_lms_gunicorn_port }}"
export
ADDRESS
=
"{{ edxapp_lms_gunicorn_host }}"
export
LANG
=
"{{ EDXAPP_LANG }}"
export
DJANGO_SETTINGS_MODULE
=
"{{ EDXAPP_LMS_ENV }}"
export
SERVICE_VARIANT
=
"lms"
export
PATH
=
"{{ edxapp_deploy_path }}"
export
BOTO_CONFIG
=
"{{ edxapp_app_dir }}/.boto"
source
{{
edxapp_app_dir
}}
/edxapp_env
{{
executable
}}
-c
{{
edxapp_app_dir
}}
/lms_gunicorn.py lms.wsgi
playbooks/roles/edxapp/templates/cms.conf.j2
→
playbooks/roles/edxapp/templates/
edx/app/supervisor/conf.d.available/
cms.conf.j2
View file @
45274b3e
[program:cms]
[program:cms]
{% if COMMON_ENABLE_NEWRELIC_APP -%}
{% set executable = edxapp_venv_dir + '/bin/newrelic-admin run-program ' + edxapp_venv_dir + '/bin/gunicorn' -%}
{% else -%}
{% set executable = edxapp_venv_dir + '/bin/gunicorn' -%}
{% endif -%}
command={{ e
xecutable }} -c {{ edxapp_app_dir }}/cms_gunicorn.py {{ EDXAPP_CMS_GUNICORN_EXTRA }} cms.wsgi
command={{ e
dxapp_app_dir }}/cms.sh
user={{ common_web_user }}
user={{ common_web_user }}
directory={{ edxapp_code_dir }}
directory={{ edxapp_code_dir }}
environment={% if COMMON_ENABLE_NEWRELIC_APP %}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",BOTO_CONFIG="{{ edxapp_app_dir }}/.boto"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true
killasgroup=true
...
...
playbooks/roles/edxapp/templates/lms.conf.j2
→
playbooks/roles/edxapp/templates/
edx/app/supervisor/conf.d.available/
lms.conf.j2
View file @
45274b3e
[program:lms]
[program:lms]
{% if COMMON_ENABLE_NEWRELIC_APP -%}
command={{ edxapp_app_dir }}/lms.sh
{% set executable = edxapp_venv_dir + '/bin/newrelic-admin run-program ' + edxapp_venv_dir + '/bin/gunicorn' -%}
{% else -%}
{% set executable = edxapp_venv_dir + '/bin/gunicorn' -%}
{% endif -%}
command={{ executable }} -c {{ edxapp_app_dir }}/lms_gunicorn.py lms.wsgi
user={{ common_web_user }}
user={{ common_web_user }}
directory={{ edxapp_code_dir }}
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 }},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 }}",BOTO_CONFIG="{{ edxapp_app_dir }}/.boto"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true
killasgroup=true
...
...
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