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
b54ea9b0
Commit
b54ea9b0
authored
Mar 02, 2015
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes and updates to get the role running.
Mostly from wiring issues I discovered while testing this vagrant image.
parent
92af97e0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
19 deletions
+32
-19
playbooks/roles/edx_ecommerce/defaults/main.yml
+7
-9
playbooks/roles/edx_ecommerce/tasks/main.yml
+14
-6
playbooks/roles/edx_ecommerce/templates/edx/app/edx_ecommerce/edx_ecommerce.sh.j2
+2
-2
playbooks/roles/edx_ecommerce/templates/edx/app/edx_ecommerce/edx_ecommerce_env.j2
+7
-0
playbooks/roles/edx_ecommerce/templates/edx/app/supervisor/conf.d.available/edx_ecommerce.conf.j2
+2
-2
No files found.
playbooks/roles/edx_ecommerce/defaults/main.yml
View file @
b54ea9b0
...
...
@@ -31,7 +31,7 @@ EDX_ECOMMERCE_DATABASES:
EDX_ECOMMERCE_VERSION
:
"
master"
EDX_DJANGO_OSCAR_VERSION
:
"
master"
EDX_DJANGO_OSCAR_EXTENSION_VERSION
:
"
master"
EDX_DJANGO_OSCAR_EXTENSION
S
_VERSION
:
"
master"
# Default dummy user, override this!!
EDX_ECOMMERCE_USERS
:
...
...
@@ -57,7 +57,8 @@ EDX_ECOMMERCE_SERVICE_CONFIG:
EMAIL_HOST_USER
:
'
{{
EDX_ECOMMERCE_EMAIL_HOST_USER
}}'
EMAIL_PORT
:
$EDX_ECOMMERCE_EMAIL_PORT
API_AUTH_TOKEN
:
'
{{
EDX_ECOMMERCE_AUTH_TOKEN
}}'
STATICFILES_DIRS
:
[
'
static'
]
STATICFILES_DIRS
:
[]
# STATICFILES_DIRS: ['{{ edx_ecommerce_static_path }}']
STATIC_ROOT
:
"
{{
COMMON_DATA_DIR
}}/{{
edx_ecommerce_service_name
}}/staticfiles"
# db config
DATABASE_OPTIONS
:
...
...
@@ -96,25 +97,23 @@ EDX_ECOMMERCE_GUNICORN_EXTRA_CONF: ""
# vars are namespace with the module name.
#
edx_ecommerce_environment
:
DJANGO_SETTINGS_MODULE
:
"
settings.production"
EDX_ECOMMERCE_
SERVICE_CONFI
G
:
"
{{
COMMON_CFG_DIR
}}/{{
edx_ecommerce_service_name
}}.yml"
DJANGO_SETTINGS_MODULE
:
"
ecommerce.
settings.production"
EDX_ECOMMERCE_
CF
G
:
"
{{
COMMON_CFG_DIR
}}/{{
edx_ecommerce_service_name
}}.yml"
edx_ecommerce_service_name
:
"
edx_ecommerce"
edx_ecommerce_user
:
"
{{
edx_ecommerce_service_name
}}"
edx_ecommerce_home
:
"
{{
COMMON_APP_DIR
}}/{{
edx_ecommerce_service_name
}}"
edx_ecommerce_code_dir
:
"
{{
edx_ecommerce_home
}}/{{
edx_ecommerce_service_name
}}"
edx_ecommerce_static_path
:
"
{{
edx_ecommerce_code_dir
}}/ecommerce/static"
edx_ecommerce_gunicorn_host
:
"
127.0.0.1"
edx_ecommerce_gunicorn_port
:
"
8130"
edx_ecommerce_gunicorn_timeout
:
"
300"
edx_ecommerce_django_settings
:
"
production"
edx_ecommerce_log_dir
:
"
{{
COMMON_LOG_DIR
}}/{{
edx_ecommerce_service_name
}}"
edx_ecommerce_requirements_base
:
"
{{
edx_ecommerce_code_dir
}}/requirements"
edx_ecommerce_requirements
:
-
base.txt
-
production.txt
#- optional.txt
...
...
@@ -126,4 +125,4 @@ edx_ecommerce_debian_pkgs:
-
'
libmysqlclient-dev'
-
'
libjpeg-dev'
edx_ecommerce_redhat_pkgs
:
[]
\ No newline at end of file
edx_ecommerce_redhat_pkgs
:
[]
playbooks/roles/edx_ecommerce/tasks/main.yml
View file @
b54ea9b0
...
...
@@ -45,12 +45,12 @@
environment
:
"
{{
edx_ecommerce_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
#
- name: run collectstatic
#
shell: >
#
chdir={{ edx_ecommerce_code_dir }}
#
{{ edx_ecommerce_home }}/venvs/{{ edx_ecommerce_service_name }}/bin/python manage.py collectstatic --noinput
#
sudo_user: "{{ edx_ecommerce_user }}"
#
environment: "{{ edx_ecommerce_environment }}"
-
name
:
run collectstatic
shell
:
>
chdir={{ edx_ecommerce_code_dir }}
{{ edx_ecommerce_home }}/venvs/{{ edx_ecommerce_service_name }}/bin/python manage.py collectstatic --noinput
sudo_user
:
"
{{
edx_ecommerce_user
}}"
environment
:
"
{{
edx_ecommerce_environment
}}"
-
name
:
write out the supervisor wrapper
template
:
>
...
...
@@ -64,6 +64,14 @@
dest="{{ supervisor_available_dir }}/{{ edx_ecommerce_service_name }}.conf"
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
-
name
:
setup the ecommence env file
template
:
>
src="./{{ edx_ecommerce_home }}/{{ edx_ecommerce_service_name }}_env.j2"
dest="{{ edx_ecommerce_home }}/edx_ecommerce_env"
owner={{ edx_ecommerce_user }}
group={{ edx_ecommerce_user }}
mode=0644
-
name
:
enable supervisor script
file
:
>
src={{ supervisor_available_dir }}/{{ edx_ecommerce_service_name }}.conf
...
...
playbooks/roles/edx_ecommerce/templates/edx/app/edx_ecommerce/edx_ecommerce.sh.j2
View file @
b54ea9b0
...
...
@@ -2,7 +2,7 @@
{{
ansible_managed
}}
{
%
set
edx_ecommerce_venv_bin
=
edx_ecommerce_home +
"/venvs/"
+ edx_ecommerce_service_name +
"/bin
/
"
%
}
{
%
set
edx_ecommerce_venv_bin
=
edx_ecommerce_home +
"/venvs/"
+ edx_ecommerce_service_name +
"/bin"
%
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
edx_ecommerce_venv_bin +
'/newrelic-admin run-program '
+ edx_ecommerce_venv_bin +
'/gunicorn'
%
}
{
%
else
%
}
...
...
@@ -16,4 +16,4 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"
source
{{
edx_ecommerce_home
}}
/edx_ecommerce_env
# TODO fix application
{{
executable
}}
-c
{{
edx_ecommerce_home
}}
/edx_ecommerce_gunicorn.py
{{
EDX_ECOMMERCE_GUNICORN_EXTRA
}}
wsgi:application
{{
executable
}}
-c
{{
edx_ecommerce_home
}}
/edx_ecommerce_gunicorn.py
{{
EDX_ECOMMERCE_GUNICORN_EXTRA
}}
ecommerce.
wsgi:application
playbooks/roles/edx_ecommerce/templates/edx/app/edx_ecommerce/edx_ecommerce_env.j2
0 → 100644
View file @
b54ea9b0
# {{ ansible_managed }}
{% for name,value in edx_ecommerce_environment.items() -%}
{%- if value -%}
export {{ name }}="{{ value }}"
{% endif %}
{%- endfor %}
playbooks/roles/edx_ecommerce/templates/edx/app/supervisor/conf.d.available/edx_ecommerce.conf.j2
View file @
b54ea9b0
...
...
@@ -6,7 +6,7 @@
command={{ edx_ecommerce_home }}/{{ edx_ecommerce_service_name }}.sh
user={{ common_web_user }}
directory={{ edx_ecommerce_code_dir }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
stdout_logfile={{ supervisor_log_dir }}/%(program_name)
s
-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)
s
-stderr.log
killasgroup=true
stopasgroup=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