Commit c9a72fcf by John Jarvis

updating task labels on edxapp, static root directory for nginx

parent 39bc53b9
...@@ -182,6 +182,7 @@ edxapp_generic_auth_config: &edxapp_generic_auth ...@@ -182,6 +182,7 @@ edxapp_generic_auth_config: &edxapp_generic_auth
CELERY_BROKER_PASSWORD: $EDXAPP_CELERY_PASSWORD CELERY_BROKER_PASSWORD: $EDXAPP_CELERY_PASSWORD
generic_env_config: &edxapp_generic_env generic_env_config: &edxapp_generic_env
STATIC_ROOT: $edxapp_data_dir
LMS_BASE: $EDXAPP_LMS_BASE LMS_BASE: $EDXAPP_LMS_BASE
CMS_BASE: $EDXAPP_CMS_BASE CMS_BASE: $EDXAPP_CMS_BASE
BOOK_URL: $EDXAPP_BOOK_URL BOOK_URL: $EDXAPP_BOOK_URL
...@@ -313,7 +314,7 @@ edxapp_theme_version: 'HEAD' ...@@ -313,7 +314,7 @@ edxapp_theme_version: 'HEAD'
edx_platform_repo: "https://{{ GIT_MIRROR }}/edx/edx-platform.git" edx_platform_repo: "https://{{ GIT_MIRROR }}/edx/edx-platform.git"
# `edx_platform_commit` can be anything that git recognizes as a commit # `edx_platform_commit` can be anything that git recognizes as a commit
# reference, including a tag, a branch name, or a commit hash # reference, including a tag, a branch name, or a commit hash
edx_platform_commit: 'release' edx_platform_commit: 'jarv/static-root'
local_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/local.txt" local_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/local.txt"
pre_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/pre.txt" pre_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/pre.txt"
post_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/post.txt" post_requirements_file: "{{ edxapp_code_dir }}/requirements/edx/post.txt"
......
# Stop all services. # Stop all services.
- name: stop edxapp services - name: edxapp | stop edxapp services
service: name=edxapp state=stopped service: name=edxapp state=stopped
when: celery_worker is not defined when: celery_worker is not defined
tags: tags:
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- cms - cms
- deploy - deploy
- name: stop edx workers - name: edxapp | stop edx workers
service: name=edx-workers state=stopped service: name=edx-workers state=stopped
when: celery_worker is defined when: celery_worker is defined
tags: tags:
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
tags: tags:
- deploy - deploy
- name: git clean after checking out edx-platform - name: edxapp | git clean after checking out edx-platform
shell: cd {{edxapp_code_dir}} && git clean -xdf shell: cd {{edxapp_code_dir}} && git clean -xdf
when: edx_platform_checkout.changed when: edx_platform_checkout.changed
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
- deploy - deploy
- name: checkout theme - name: edxapp | checkout theme
git: dest={{app_dir}}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}} git: dest={{app_dir}}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}}
when: edxapp_theme_name != '' when: edxapp_theme_name != ''
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
- deploy - deploy
# Node play that need to be run after platform updates. # Node play that need to be run after platform updates.
- name: Install edx-platform npm dependencies - name: edxapp | Install edx-platform npm dependencies
shell: npm install chdir={{ edxapp_code_dir }} shell: npm install chdir={{ edxapp_code_dir }}
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: tags:
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
# Substitute github mirror in all requirements files # Substitute github mirror in all requirements files
# #
- name: Updating requirement files for git mirror - name: edxapp | Updating requirement files for git mirror
command: | command: |
/bin/sed -i -e 's/github\.com/{{ GIT_MIRROR }}/g' {{ item }} /bin/sed -i -e 's/github\.com/{{ GIT_MIRROR }}/g' {{ item }}
with_items: with_items:
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
- deploy - deploy
# Install the python pre requirements into {{ edxapp_venv_dir }} # Install the python pre requirements into {{ edxapp_venv_dir }}
- name : install python pre-requirements - name : edxapp | install python pre-requirements
pip: > pip: >
requirements="{{pre_requirements_file}}" requirements="{{pre_requirements_file}}"
virtualenv="{{edxapp_venv_dir}}" virtualenv="{{edxapp_venv_dir}}"
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
- deploy - deploy
# Install the python modules into {{ edxapp_venv_dir }} # Install the python modules into {{ edxapp_venv_dir }}
- name : install python base-requirements - name : edxapp | install python base-requirements
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
- deploy - deploy
# Install the python post requirements into {{ edxapp_venv_dir }} # Install the python post requirements into {{ edxapp_venv_dir }}
- name : install python post-requirements - name : edxapp | install python post-requirements
pip: > pip: >
requirements="{{post_requirements_file}}" requirements="{{post_requirements_file}}"
virtualenv="{{edxapp_venv_dir}}" virtualenv="{{edxapp_venv_dir}}"
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
- deploy - deploy
# Install the final python modules into {{ edxapp_venv_dir }} # Install the final python modules into {{ edxapp_venv_dir }}
- name : install python post-post requirements - name : edxapp | install python post-post requirements
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
# Install the sandbox python modules into {{ edxapp_venv_dir }} # Install the sandbox python modules into {{ edxapp_venv_dir }}
- name : install sandbox requirements into regular venv - name : edxapp | 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 # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
...@@ -161,14 +161,14 @@ ...@@ -161,14 +161,14 @@
# This is necessary for when syncdb is run and the django_openid_auth module is installed, # This is necessary for when syncdb is run and the django_openid_auth module is installed,
# not sure if this fix will ever get merged # not sure if this fix will ever get merged
# We should never do this in production # We should never do this in production
- name: openid workaround - NOT FOR PRODUCTION - name: edxapp | openid workaround - NOT FOR PRODUCTION
shell: sed -i -e 's/claimed_id = models.TextField(max_length=2047, unique=True/claimed_id = models.TextField(max_length=2047/' {{ edxapp_venv_dir }}/lib/python2.7/site-packages/django_openid_auth/models.py shell: sed -i -e 's/claimed_id = models.TextField(max_length=2047, unique=True/claimed_id = models.TextField(max_length=2047/' {{ edxapp_venv_dir }}/lib/python2.7/site-packages/django_openid_auth/models.py
when: openid_workaround is defined when: openid_workaround is defined
tags: tags:
- deploy - deploy
- name: syncdb and migrate - name: edxapp | syncdb and migrate
shell: sudo -u {{ edxapp_user }} SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }} shell: sudo -u {{ edxapp_user }} SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when: migrate_db is defined and migrate_db|lower == "yes" when: migrate_db is defined and migrate_db|lower == "yes"
tags: tags:
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
- deploy - deploy
# Gather lms assets using rake if possible # Gather lms assets using rake if possible
- name: gather lms static assets with rake - name: edxapp | gather lms static assets with rake
shell: SERVICE_VARIANT={{ edxapp_lms_variant }} rake lms:gather_assets:aws shell: SERVICE_VARIANT={{ edxapp_lms_variant }} rake lms:gather_assets:aws
executable=/bin/bash executable=/bin/bash
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
- deploy - deploy
# Gather cms assets using rake if possible # Gather cms assets using rake if possible
- name: gather cms static assets with rake - name: edxapp | gather cms static assets with rake
shell: executable=/bin/bash chdir={{ edxapp_code_dir }} SERVICE_VARIANT={{ edxapp_cms_variant }} rake cms:gather_assets:aws shell: executable=/bin/bash chdir={{ edxapp_code_dir }} SERVICE_VARIANT={{ edxapp_cms_variant }} rake cms:gather_assets:aws
notify: notify:
- edxapp | restart edxapp - edxapp | restart edxapp
...@@ -205,13 +205,13 @@ ...@@ -205,13 +205,13 @@
- deploy - deploy
- name: restart edxapp - name: edxapp | restart edxapp
service: name=edxapp state=restarted service: name=edxapp state=restarted
when: celery_worker is not defined when: celery_worker is not defined
tags: tags:
- deploy - deploy
- name: restart workers - name: edxapp | restart workers
service: name=edx-workers state=restarted service: name=edx-workers state=restarted
when: celery_worker is defined when: celery_worker is defined
tags: tags:
......
...@@ -50,7 +50,7 @@ server { ...@@ -50,7 +50,7 @@ server {
# Check security on this # Check security on this
location ~ /static/(?P<file>.*) { location ~ /static/(?P<file>.*) {
root {{app_dir}}; root {{ edxapp_data_dir }};
try_files /staticfiles/$file /course_static/$file =404; try_files /staticfiles/$file /course_static/$file =404;
# return a 403 for static files that shouldn't be # return a 403 for static files that shouldn't be
......
...@@ -50,7 +50,7 @@ server { ...@@ -50,7 +50,7 @@ server {
# Check security on this # Check security on this
location ~ /static/(?P<file>.*) { location ~ /static/(?P<file>.*) {
root {{app_dir}}; root {{ edxapp_data_dir }};
try_files /staticfiles/$file /course_static/$file =404; try_files /staticfiles/$file /course_static/$file =404;
# return a 403 for static files that shouldn't be # return a 403 for static files that shouldn't be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment