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
c0432e74
Commit
c0432e74
authored
9 years ago
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update references to the 'edx_ecommerce' vars.
parent
c780c651
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
130 additions
and
130 deletions
+130
-130
playbooks/edx-east/ecommerce.yml
+2
-2
playbooks/roles/ecommerce/defaults/main.yml
+58
-58
playbooks/roles/ecommerce/meta/main.yml
+8
-8
playbooks/roles/ecommerce/tasks/main.yml
+31
-31
playbooks/roles/ecommerce/templates/edx/app/ecommerce/ecommerce.sh.j2
+6
-6
playbooks/roles/ecommerce/templates/edx/app/ecommerce/ecommerce_env.j2
+1
-1
playbooks/roles/ecommerce/templates/edx/app/ecommerce/ecommerce_gunicorn.py.j2
+5
-5
playbooks/roles/ecommerce/templates/edx/app/supervisor/conf.d.available/ecommerce.conf.j2
+3
-3
playbooks/roles/edxlocal/tasks/main.yml
+9
-9
playbooks/roles/nginx/defaults/main.yml
+1
-1
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/edx_ecommerce.j2
+6
-6
No files found.
playbooks/edx-east/e
dx_e
commerce.yml
→
playbooks/edx-east/ecommerce.yml
View file @
c0432e74
...
...
@@ -9,9 +9,9 @@
roles
:
-
role
:
nginx
nginx_sites
:
-
e
dx_e
commerce
-
ecommerce
-
aws
-
e
dx_e
commerce
-
ecommerce
-
role
:
datadog
when
:
COMMON_ENABLE_DATADOG
-
role
:
splunkforwarder
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/ecommerce/defaults/main.yml
View file @
c0432e74
...
...
@@ -8,114 +8,114 @@
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Defaults for role e
dx_e
commerce
# Defaults for role ecommerce
#
E
DX_E
COMMERCE_GIT_IDENTITY
:
!!null
ECOMMERCE_GIT_IDENTITY
:
!!null
# depends upon Newrelic being enabled via COMMON_ENABLE_NEWRELIC
# and a key being provided via NEWRELIC_LICENSE_KEY
E
DX_ECOMMERCE_NEWRELIC_APPNAME
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}-{{
edx_
ecommerce_service_name
}}"
E
DX_E
COMMERCE_PIP_EXTRA_ARGS
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
E
DX_E
COMMERCE_NGINX_PORT
:
"
18130"
E
COMMERCE_NEWRELIC_APPNAME
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}-{{
ecommerce_service_name
}}"
ECOMMERCE_PIP_EXTRA_ARGS
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
ECOMMERCE_NGINX_PORT
:
"
18130"
E
DX_ECOMMERCE_DEFAULT_DB_NAME
:
'
edx_
ecommerce'
E
COMMERCE_DEFAULT_DB_NAME
:
'
ecommerce'
E
DX_E
COMMERCE_DATABASES
:
ECOMMERCE_DATABASES
:
# rw user
default
:
ENGINE
:
'
django.db.backends.mysql'
NAME
:
'
{{
E
DX_E
COMMERCE_DEFAULT_DB_NAME
}}'
NAME
:
'
{{
ECOMMERCE_DEFAULT_DB_NAME
}}'
USER
:
'
ecomm001'
PASSWORD
:
'
password'
HOST
:
'
localhost'
PORT
:
'
3306'
E
DX_E
COMMERCE_VERSION
:
"
master"
ECOMMERCE_VERSION
:
"
master"
EDX_DJANGO_OSCAR_VERSION
:
"
master"
EDX_DJANGO_OSCAR_EXTENSIONS_VERSION
:
"
master"
# Default dummy user, override this!!
E
DX_E
COMMERCE_USERS
:
ECOMMERCE_USERS
:
"
dummy-api-user"
:
"
changeme"
E
DX_E
COMMERCE_SECRET_KEY
:
'
Your
secret
key
here'
E
DX_E
COMMERCE_TIME_ZONE
:
'
UTC'
E
DX_E
COMMERCE_LANGUAGE_CODE
:
'
en-us'
E
DX_E
COMMERCE_EMAIL_HOST
:
'
localhost'
E
DX_E
COMMERCE_EMAIL_HOST_USER
:
'
mail_user'
E
DX_E
COMMERCE_EMAIL_HOST_PASSWORD
:
'
mail_password'
E
DX_E
COMMERCE_EMAIL_PORT
:
587
E
DX_E
COMMERCE_AUTH_TOKEN
:
'
put-your-api-token-here'
E
DX_E
COMMERCE_SERVICE_CONFIG
:
E
DX_E
COMMERCE_DATABASE
:
'
reports'
SECRET_KEY
:
'
{{
E
DX_E
COMMERCE_SECRET_KEY
}}'
TIME_ZONE
:
'
{{
E
DX_E
COMMERCE_TIME_ZONE
}}'
LANGUAGE_CODE
:
'
{{E
DX_E
COMMERCE_LANGUAGE_CODE
}}'
ECOMMERCE_SECRET_KEY
:
'
Your
secret
key
here'
ECOMMERCE_TIME_ZONE
:
'
UTC'
ECOMMERCE_LANGUAGE_CODE
:
'
en-us'
ECOMMERCE_EMAIL_HOST
:
'
localhost'
ECOMMERCE_EMAIL_HOST_USER
:
'
mail_user'
ECOMMERCE_EMAIL_HOST_PASSWORD
:
'
mail_password'
ECOMMERCE_EMAIL_PORT
:
587
ECOMMERCE_AUTH_TOKEN
:
'
put-your-api-token-here'
ECOMMERCE_SERVICE_CONFIG
:
ECOMMERCE_DATABASE
:
'
reports'
SECRET_KEY
:
'
{{
ECOMMERCE_SECRET_KEY
}}'
TIME_ZONE
:
'
{{
ECOMMERCE_TIME_ZONE
}}'
LANGUAGE_CODE
:
'
{{ECOMMERCE_LANGUAGE_CODE
}}'
# email config
EMAIL_HOST
:
'
{{
E
DX_E
COMMERCE_EMAIL_HOST
}}'
EMAIL_HOST_PASSWORD
:
'
{{
E
DX_E
COMMERCE_EMAIL_HOST_PASSWORD
}}'
EMAIL_HOST_USER
:
'
{{
E
DX_E
COMMERCE_EMAIL_HOST_USER
}}'
EMAIL_PORT
:
$E
DX_E
COMMERCE_EMAIL_PORT
API_AUTH_TOKEN
:
'
{{
E
DX_E
COMMERCE_AUTH_TOKEN
}}'
EMAIL_HOST
:
'
{{
ECOMMERCE_EMAIL_HOST
}}'
EMAIL_HOST_PASSWORD
:
'
{{
ECOMMERCE_EMAIL_HOST_PASSWORD
}}'
EMAIL_HOST_USER
:
'
{{
ECOMMERCE_EMAIL_HOST_USER
}}'
EMAIL_PORT
:
$ECOMMERCE_EMAIL_PORT
API_AUTH_TOKEN
:
'
{{
ECOMMERCE_AUTH_TOKEN
}}'
STATICFILES_DIRS
:
[]
# STATICFILES_DIRS: ['{{ e
dx_e
commerce_static_path }}']
STATIC_ROOT
:
"
{{
COMMON_DATA_DIR
}}/{{
e
dx_e
commerce_service_name
}}/staticfiles"
# STATICFILES_DIRS: ['{{ ecommerce_static_path }}']
STATIC_ROOT
:
"
{{
COMMON_DATA_DIR
}}/{{
ecommerce_service_name
}}/staticfiles"
# db config
DATABASE_OPTIONS
:
connect_timeout
:
10
DATABASES
:
'
{{
E
DX_E
COMMERCE_DATABASES
}}'
DATABASES
:
'
{{
ECOMMERCE_DATABASES
}}'
E
DX_E
COMMERCE_REPOS
:
ECOMMERCE_REPOS
:
-
PROTOCOL
:
"
{{
COMMON_GIT_PROTOCOL
}}"
DOMAIN
:
"
{{
COMMON_GIT_MIRROR
}}"
PATH
:
"
{{
COMMON_GIT_PATH
}}"
REPO
:
edx-ecommerce.git
VERSION
:
"
{{
E
DX_E
COMMERCE_VERSION
}}"
DESTINATION
:
"
{{
e
dx_e
commerce_code_dir
}}"
SSH_KEY
:
"
{{
E
DX_E
COMMERCE_GIT_IDENTITY
}}"
VERSION
:
"
{{
ECOMMERCE_VERSION
}}"
DESTINATION
:
"
{{
ecommerce_code_dir
}}"
SSH_KEY
:
"
{{
ECOMMERCE_GIT_IDENTITY
}}"
-
PROTOCOL
:
"
{{
COMMON_GIT_PROTOCOL
}}"
DOMAIN
:
"
{{
COMMON_GIT_MIRROR
}}"
PATH
:
"
{{
COMMON_GIT_PATH
}}"
REPO
:
django-oscar.git
VERSION
:
"
{{
EDX_DJANGO_OSCAR_VERSION
}}"
DESTINATION
:
"
{{
e
dx_e
commerce_home
}}/depends/django-oscar"
SSH_KEY
:
"
{{
E
DX_E
COMMERCE_GIT_IDENTITY
}}"
DESTINATION
:
"
{{
ecommerce_home
}}/depends/django-oscar"
SSH_KEY
:
"
{{
ECOMMERCE_GIT_IDENTITY
}}"
-
PROTOCOL
:
"
{{
COMMON_GIT_PROTOCOL
}}"
DOMAIN
:
"
{{
COMMON_GIT_MIRROR
}}"
PATH
:
"
{{
COMMON_GIT_PATH
}}"
REPO
:
django-oscar-extensions.git
VERSION
:
"
{{
EDX_DJANGO_OSCAR_EXTENSIONS_VERSION
}}"
DESTINATION
:
"
{{
e
dx_e
commerce_home
}}/depends/django-oscar-extensions"
SSH_KEY
:
"
{{
E
DX_E
COMMERCE_GIT_IDENTITY
}}"
DESTINATION
:
"
{{
ecommerce_home
}}/depends/django-oscar-extensions"
SSH_KEY
:
"
{{
ECOMMERCE_GIT_IDENTITY
}}"
E
DX_E
COMMERCE_GUNICORN_WORKERS
:
"
2"
E
DX_E
COMMERCE_GUNICORN_EXTRA
:
"
"
E
DX_E
COMMERCE_GUNICORN_EXTRA_CONF
:
"
"
ECOMMERCE_GUNICORN_WORKERS
:
"
2"
ECOMMERCE_GUNICORN_EXTRA
:
"
"
ECOMMERCE_GUNICORN_EXTRA_CONF
:
"
"
#
# vars are namespace with the module name.
#
e
dx_e
commerce_environment
:
ecommerce_environment
:
DJANGO_SETTINGS_MODULE
:
"
ecommerce.settings.production"
E
DX_ECOMMERCE_CFG
:
"
{{
COMMON_CFG_DIR
}}/{{
edx_
ecommerce_service_name
}}.yml"
E
COMMERCE_CFG
:
"
{{
COMMON_CFG_DIR
}}/{{
ecommerce_service_name
}}.yml"
e
dx_ecommerce_service_name
:
"
edx_
ecommerce"
e
dx_ecommerce_user
:
"
{{
edx_
ecommerce_service_name
}}"
e
dx_ecommerce_home
:
"
{{
COMMON_APP_DIR
}}/{{
edx_
ecommerce_service_name
}}"
e
dx_ecommerce_code_dir
:
"
{{
edx_ecommerce_home
}}/{{
edx_
ecommerce_service_name
}}"
e
dx_ecommerce_static_path
:
"
{{
edx_
ecommerce_code_dir
}}/ecommerce/static"
e
commerce_service_name
:
"
ecommerce"
e
commerce_user
:
"
{{
ecommerce_service_name
}}"
e
commerce_home
:
"
{{
COMMON_APP_DIR
}}/{{
ecommerce_service_name
}}"
e
commerce_code_dir
:
"
{{
ecommerce_home
}}/{{
ecommerce_service_name
}}"
e
commerce_static_path
:
"
{{
ecommerce_code_dir
}}/ecommerce/static"
e
dx_e
commerce_gunicorn_host
:
"
127.0.0.1"
e
dx_e
commerce_gunicorn_port
:
"
8130"
e
dx_e
commerce_gunicorn_timeout
:
"
300"
ecommerce_gunicorn_host
:
"
127.0.0.1"
ecommerce_gunicorn_port
:
"
8130"
ecommerce_gunicorn_timeout
:
"
300"
e
dx_ecommerce_log_dir
:
"
{{
COMMON_LOG_DIR
}}/{{
edx_
ecommerce_service_name
}}"
e
commerce_log_dir
:
"
{{
COMMON_LOG_DIR
}}/{{
ecommerce_service_name
}}"
e
dx_ecommerce_requirements_base
:
"
{{
edx_
ecommerce_code_dir
}}/requirements"
e
dx_e
commerce_requirements
:
e
commerce_requirements_base
:
"
{{
ecommerce_code_dir
}}/requirements"
ecommerce_requirements
:
-
production.txt
#- optional.txt
...
...
@@ -123,8 +123,8 @@ edx_ecommerce_requirements:
# OS packages
#
e
dx_e
commerce_debian_pkgs
:
ecommerce_debian_pkgs
:
-
libmysqlclient-dev
-
libjpeg-dev
e
dx_e
commerce_redhat_pkgs
:
[]
ecommerce_redhat_pkgs
:
[]
This diff is collapsed.
Click to expand it.
playbooks/roles/ecommerce/meta/main.yml
View file @
c0432e74
...
...
@@ -8,16 +8,16 @@
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Role includes for role e
dx_e
commerce
# Role includes for role ecommerce
#
dependencies
:
-
role
:
edx_service
edx_service_name
:
"
{{
e
dx_e
commerce_service_name
}}"
edx_service_config
:
"
{{
E
DX_E
COMMERCE_SERVICE_CONFIG
}}"
edx_service_repos
:
"
{{
E
DX_E
COMMERCE_REPOS
}}"
edx_service_user
:
"
{{
e
dx_e
commerce_user
}}"
edx_service_home
:
"
{{
e
dx_e
commerce_home
}}"
edx_service_name
:
"
{{
ecommerce_service_name
}}"
edx_service_config
:
"
{{
ECOMMERCE_SERVICE_CONFIG
}}"
edx_service_repos
:
"
{{
ECOMMERCE_REPOS
}}"
edx_service_user
:
"
{{
ecommerce_user
}}"
edx_service_home
:
"
{{
ecommerce_home
}}"
edx_service_packages
:
debian
:
"
{{
e
dx_e
commerce_debian_pkgs
}}"
redhat
:
"
{{
e
dx_e
commerce_redhat_pkgs
}}"
debian
:
"
{{
ecommerce_debian_pkgs
}}"
redhat
:
"
{{
ecommerce_redhat_pkgs
}}"
-
supervisor
This diff is collapsed.
Click to expand it.
playbooks/roles/ecommerce/tasks/main.yml
View file @
c0432e74
...
...
@@ -9,7 +9,7 @@
#
#
#
# Tasks for role e
dx_e
commerce
# Tasks for role ecommerce
#
# Overview:
#
...
...
@@ -23,59 +23,59 @@
-
name
:
"
add
gunicorn
configuration
file"
template
:
>
src=edx/app/e
dx_ecommerce/edx_
ecommerce_gunicorn.py.j2
dest={{ e
dx_ecommerce_home }}/edx_
ecommerce_gunicorn.py
sudo_user
:
"
{{
e
dx_e
commerce_user
}}"
src=edx/app/e
commerce/
ecommerce_gunicorn.py.j2
dest={{ e
commerce_home }}/
ecommerce_gunicorn.py
sudo_user
:
"
{{
ecommerce_user
}}"
-
name
:
install application requirements
pip
:
>
requirements="{{ e
dx_e
commerce_requirements_base }}/{{ item }}"
virtualenv="{{ e
dx_ecommerce_home }}/venvs/{{ edx_
ecommerce_service_name }}"
requirements="{{ ecommerce_requirements_base }}/{{ item }}"
virtualenv="{{ e
commerce_home }}/venvs/{{
ecommerce_service_name }}"
state=present
sudo_user
:
"
{{
e
dx_e
commerce_user
}}"
with_items
:
e
dx_e
commerce_requirements
sudo_user
:
"
{{
ecommerce_user
}}"
with_items
:
ecommerce_requirements
-
name
:
migrate
shell
:
>
chdir={{ e
dx_e
commerce_code_dir }}
chdir={{ ecommerce_code_dir }}
DB_MIGRATION_USER={{ COMMON_MYSQL_MIGRATE_USER }}
DB_MIGRATION_PASS={{ COMMON_MYSQL_MIGRATE_PASS }}
{{ e
dx_ecommerce_home }}/venvs/{{ edx_
ecommerce_service_name }}/bin/python ./manage.py migrate --noinput
sudo_user
:
"
{{
e
dx_e
commerce_user
}}"
environment
:
"
{{
e
dx_e
commerce_environment
}}"
{{ e
commerce_home }}/venvs/{{
ecommerce_service_name }}/bin/python ./manage.py migrate --noinput
sudo_user
:
"
{{
ecommerce_user
}}"
environment
:
"
{{
ecommerce_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
-
name
:
run collectstatic
shell
:
>
chdir={{ e
dx_e
commerce_code_dir }}
{{ e
dx_ecommerce_home }}/venvs/{{ edx_
ecommerce_service_name }}/bin/python manage.py collectstatic --noinput
sudo_user
:
"
{{
e
dx_e
commerce_user
}}"
environment
:
"
{{
e
dx_e
commerce_environment
}}"
chdir={{ ecommerce_code_dir }}
{{ e
commerce_home }}/venvs/{{
ecommerce_service_name }}/bin/python manage.py collectstatic --noinput
sudo_user
:
"
{{
ecommerce_user
}}"
environment
:
"
{{
ecommerce_environment
}}"
-
name
:
write out the supervisor wrapper
template
:
>
src=edx/app/e
dx_ecommerce/edx_
ecommerce.sh.j2
dest={{ e
dx_ecommerce_home }}/{{ edx_
ecommerce_service_name }}.sh
src=edx/app/e
commerce/
ecommerce.sh.j2
dest={{ e
commerce_home }}/{{
ecommerce_service_name }}.sh
mode=0650 owner={{ supervisor_user }} group={{ common_web_user }}
-
name
:
write supervisord config
template
:
>
src=edx/app/supervisor/conf.d.available/e
dx_e
commerce.conf.j2
dest="{{ supervisor_available_dir }}/{{ e
dx_e
commerce_service_name }}.conf"
src=edx/app/supervisor/conf.d.available/ecommerce.conf.j2
dest="{{ supervisor_available_dir }}/{{ ecommerce_service_name }}.conf"
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
-
name
:
setup the ecommence env file
template
:
>
src="./{{ e
dx_ecommerce_home }}/{{ edx_
ecommerce_service_name }}_env.j2"
dest="{{ e
dx_ecommerce_home }}/edx_
ecommerce_env"
owner={{ e
dx_e
commerce_user }}
group={{ e
dx_e
commerce_user }}
src="./{{ e
commerce_home }}/{{
ecommerce_service_name }}_env.j2"
dest="{{ e
commerce_home }}/
ecommerce_env"
owner={{ ecommerce_user }}
group={{ ecommerce_user }}
mode=0644
-
name
:
enable supervisor script
file
:
>
src={{ supervisor_available_dir }}/{{ e
dx_e
commerce_service_name }}.conf
dest={{ supervisor_cfg_dir }}/{{ e
dx_e
commerce_service_name }}.conf
src={{ supervisor_available_dir }}/{{ ecommerce_service_name }}.conf
dest={{ supervisor_cfg_dir }}/{{ ecommerce_service_name }}.conf
state=link
force=yes
when
:
not disable_edx_services
...
...
@@ -86,8 +86,8 @@
-
name
:
create symlinks from the-er venv bin dir
file
:
>
src="{{ e
dx_ecommerce_home }}/venvs/{{ edx_
ecommerce_service_name }}/bin/{{ item }}"
dest="{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.e
dx_e
commerce"
src="{{ e
commerce_home }}/venvs/{{
ecommerce_service_name }}/bin/{{ item }}"
dest="{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.ecommerce"
state=link
with_items
:
-
python
...
...
@@ -96,8 +96,8 @@
-
name
:
create symlinks from the repo dir
file
:
>
src="{{ e
dx_e
commerce_code_dir }}/{{ item }}"
dest="{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.e
dx_e
commerce"
src="{{ ecommerce_code_dir }}/{{ item }}"
dest="{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.ecommerce"
state=link
with_items
:
-
manage.py
...
...
@@ -107,6 +107,6 @@
state=restarted
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
name={{ e
dx_e
commerce_service_name }}
name={{ ecommerce_service_name }}
when
:
not disable_edx_services
sudo_user
:
"
{{
supervisor_service_user
}}"
This diff is collapsed.
Click to expand it.
playbooks/roles/ecommerce/templates/edx/app/ecommerce/ecommerce.sh.j2
View file @
c0432e74
...
...
@@ -2,18 +2,18 @@
{{
ansible_managed
}}
{
%
set
e
dx_ecommerce_venv_bin
=
edx_ecommerce_home +
"/venvs/"
+ edx_
ecommerce_service_name +
"/bin"
%
}
{
%
set
e
commerce_venv_bin
=
ecommerce_home +
"/venvs/"
+
ecommerce_service_name +
"/bin"
%
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
e
dx_ecommerce_venv_bin +
'/newrelic-admin run-program '
+ edx_
ecommerce_venv_bin +
'/gunicorn'
%
}
{
%
set
executable
=
e
commerce_venv_bin +
'/newrelic-admin run-program '
+
ecommerce_venv_bin +
'/gunicorn'
%
}
{
%
else
%
}
{
%
set
executable
=
e
dx_e
commerce_venv_bin +
'/gunicorn'
%
}
{
%
set
executable
=
ecommerce_venv_bin +
'/gunicorn'
%
}
{
% endif %
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
export
NEW_RELIC_APP_NAME
=
"{{ E
DX_E
COMMERCE_NEWRELIC_APPNAME }}"
export
NEW_RELIC_APP_NAME
=
"{{ ECOMMERCE_NEWRELIC_APPNAME }}"
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
% endif -%
}
source
{{
e
dx_ecommerce_home
}}
/edx_
ecommerce_env
source
{{
e
commerce_home
}}
/
ecommerce_env
# TODO fix application
{{
executable
}}
-c
{{
e
dx_ecommerce_home
}}
/edx_ecommerce_gunicorn.py
{{
EDX_
ECOMMERCE_GUNICORN_EXTRA
}}
ecommerce.wsgi:application
{{
executable
}}
-c
{{
e
commerce_home
}}
/ecommerce_gunicorn.py
{{
ECOMMERCE_GUNICORN_EXTRA
}}
ecommerce.wsgi:application
This diff is collapsed.
Click to expand it.
playbooks/roles/ecommerce/templates/edx/app/ecommerce/ecommerce_env.j2
View file @
c0432e74
# {{ ansible_managed }}
{% for name,value in e
dx_e
commerce_environment.items() -%}
{% for name,value in ecommerce_environment.items() -%}
{%- if value -%}
export {{ name }}="{{ value }}"
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/ecommerce/templates/edx/app/ecommerce/ecommerce_gunicorn.py.j2
View file @
c0432e74
...
...
@@ -3,9 +3,9 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
timeout = {{ e
dx_e
commerce_gunicorn_timeout }}
bind = "{{ e
dx_ecommerce_gunicorn_host }}:{{ edx_
ecommerce_gunicorn_port }}"
pythonpath = "{{ e
dx_e
commerce_code_dir }}"
workers = {{ E
DX_E
COMMERCE_GUNICORN_WORKERS }}
timeout = {{ ecommerce_gunicorn_timeout }}
bind = "{{ e
commerce_gunicorn_host }}:{{
ecommerce_gunicorn_port }}"
pythonpath = "{{ ecommerce_code_dir }}"
workers = {{ ECOMMERCE_GUNICORN_WORKERS }}
{{ E
DX_E
COMMERCE_GUNICORN_EXTRA_CONF }}
{{ ECOMMERCE_GUNICORN_EXTRA_CONF }}
This diff is collapsed.
Click to expand it.
playbooks/roles/ecommerce/templates/edx/app/supervisor/conf.d.available/ecommerce.conf.j2
View file @
c0432e74
#
# {{ ansible_managed }}
#
[program:{{ e
dx_e
commerce_service_name }}]
[program:{{ ecommerce_service_name }}]
command={{ e
dx_ecommerce_home }}/{{ edx_
ecommerce_service_name }}.sh
command={{ e
commerce_home }}/{{
ecommerce_service_name }}.sh
user={{ common_web_user }}
directory={{ e
dx_e
commerce_code_dir }}
directory={{ ecommerce_code_dir }}
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/edxlocal/tasks/main.yml
View file @
c0432e74
...
...
@@ -102,19 +102,19 @@
encoding=utf8
when
:
INSIGHTS_DATABASES is defined
-
name
:
create database for e
dx_e
commerce
-
name
:
create database for ecommerce
mysql_db
:
>
db="{{ E
DX_E
COMMERCE_DEFAULT_DB_NAME }}"
db="{{ ECOMMERCE_DEFAULT_DB_NAME }}"
state=present
encoding=utf8
when
:
E
DX_E
COMMERCE_DEFAULT_DB_NAME is defined
when
:
ECOMMERCE_DEFAULT_DB_NAME is defined
-
name
:
setup users for e
dx_e
commerce
-
name
:
setup users for ecommerce
mysql_user
:
>
name="{{ E
DX_E
COMMERCE_DEFAULT_DB_NAME }}"
password="{{ E
DX_E
COMMERCE_DATABASES.default.PASSWORD }}"
priv='{{ E
DX_E
COMMERCE_DEFAULT_DB_NAME }}.*:SELECT,INSERT,UPDATE,DELETE'
when
:
E
DX_E
COMMERCE_DEFAULT_DB_NAME is defined
name="{{ ECOMMERCE_DEFAULT_DB_NAME }}"
password="{{ ECOMMERCE_DATABASES.default.PASSWORD }}"
priv='{{ ECOMMERCE_DEFAULT_DB_NAME }}.*:SELECT,INSERT,UPDATE,DELETE'
when
:
ECOMMERCE_DEFAULT_DB_NAME is defined
-
name
:
create api user for the analytics api
mysql_user
:
>
...
...
@@ -159,7 +159,7 @@
-
"
{{
ANALYTICS_API_DEFAULT_DB_NAME|default('None')
}}"
-
"
{{
ANALYTICS_API_REPORTS_DB_NAME|default('None')
}}"
-
"
{{
INSIGHTS_DATABASE_NAME|default('None')
}}"
-
"
{{
E
DX_E
COMMERCE_DEFAULT_DB_NAME|default('None')
}}"
-
"
{{
ECOMMERCE_DEFAULT_DB_NAME|default('None')
}}"
-
name
:
setup the read-only db user
mysql_user
:
>
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/nginx/defaults/main.yml
View file @
c0432e74
...
...
@@ -93,7 +93,7 @@ nginx_gitreload_gunicorn_hosts:
-
127.0.0.1
nginx_edx_notes_api_gunicorn_hosts
:
-
127.0.0.1
nginx_e
dx_e
commerce_gunicorn_hosts
:
nginx_ecommerce_gunicorn_hosts
:
-
127.0.0.1
nginx_cfg
:
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/edx_ecommerce.j2
View file @
c0432e74
#
# {{ ansible_managed }}
#
upstream e
dx_e
commerce_app_server {
{% for host in nginx_e
dx_e
commerce_gunicorn_hosts %}
server {{ host }}:{{ e
dx_e
commerce_gunicorn_port }} fail_timeout=0;
upstream ecommerce_app_server {
{% for host in nginx_ecommerce_gunicorn_hosts %}
server {{ host }}:{{ ecommerce_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
listen {{ E
DX_E
COMMERCE_NGINX_PORT }} default_server;
listen {{ ECOMMERCE_NGINX_PORT }} default_server;
location ~ ^/static/(?P<file>.*) {
root {{ COMMON_DATA_DIR }}/{{ e
dx_e
commerce_service_name }};
root {{ COMMON_DATA_DIR }}/{{ ecommerce_service_name }};
try_files /staticfiles/$file =404;
}
...
...
@@ -28,7 +28,7 @@ location @proxy_to_app {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://e
dx_e
commerce_app_server;
proxy_pass http://ecommerce_app_server;
}
}
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