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
ad3623b8
Commit
ad3623b8
authored
Sep 20, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #267 from edx/jarv/refactor-collectstatic
collectstatic cleanup
parents
b114737c
c2bbd625
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
96 deletions
+12
-96
playbooks/roles/edxapp/tasks/collect_static.yml
+0
-74
playbooks/roles/edxapp/tasks/deploy.yml
+12
-22
No files found.
playbooks/roles/edxapp/tasks/collect_static.yml
deleted
100644 → 0
View file @
b114737c
# Gather lms assets using rake if possible
-
name
:
gather lms static assets with rake
shell
:
executable=/bin/bash chdir={{ edx_platform_code_dir }} SERVICE_VARIANT={{ lms_variant }} rake lms:gather_assets:aws
when
:
grep_gather_assets.rc == 0
notify
:
-
restart edxapp
sudo
:
yes
sudo_user
:
www-data
environment
:
"
{{
deploy_environment
}}"
tags
:
-
lms
-
lms-preview
-
lms-xml
-
deploy
# Gather lms assets using django if necessary(When rake doesn't know how)
-
name
:
gather lms static assets with django
shell
:
SERVICE_VARIANT={{ lms_variant }} django-admin.py collectstatic --pythonpath={{ edx_platform_code_dir }} --settings=lms.envs.aws --noinput --verbosity=0
when
:
grep_gather_assets.rc != 0 and check_lms_collect_static.rc == 0
notify
:
-
restart edxapp
sudo
:
yes
sudo_user
:
www-data
environment
:
"
{{
deploy_environment
}}"
tags
:
-
lms
-
lms-preview
-
lms-xml
-
deploy
# Gather cms assets using rake if possible
-
name
:
gather cms static assets with rake
# script: gather_assets.sh
shell
:
executable=/bin/bash chdir={{ edx_platform_code_dir }} SERVICE_VARIANT={{ cms_variant }} rake cms:gather_assets:aws
when
:
grep_gather_assets.rc == 0
notify
:
-
restart edxapp
sudo
:
yes
sudo_user
:
www-data
environment
:
"
{{
deploy_environment
}}"
tags
:
-
cms
-
deploy
-
name
:
gather cms static assets with django
shell
:
SERVICE_VARIANT={{ cms_variant }} django-admin.py collectstatic --pythonpath={{ edx_platform_code_dir }} --settings=lms.envs.aws --noinput --verbosity=0
when
:
grep_gather_assets.rc != 0 and check_cms_collect_static.rc == 0
notify
:
-
restart edxapp
sudo
:
yes
sudo_user
:
www-data
environment
:
"
{{
deploy_environment
}}"
tags
:
-
cms
-
deploy
# Add failure checks for if no static assets were deployed.
-
name
:
lms asset static failure check
shell
:
/bin/false
when
:
grep_gather_assets.rc != 0 and check_lms_collect_static.rc != 0
tags
:
-
lms
-
lms-preview
-
lms-xml
-
deploy
-
name
:
cms asset static failure check
shell
:
/bin/false
when
:
grep_gather_assets.rc != 0 and check_cms_collect_static.rc != 0
tags
:
-
cms
-
deploy
playbooks/roles/edxapp/tasks/deploy.yml
View file @
ad3623b8
...
...
@@ -158,45 +158,35 @@
-
name
:
changing group ownership to www-data for everything in the venv (workaround)
shell
:
chgrp -R www-data {{ venv_dir }}
# This check needs to be run to see if rake can be used but its failure should not stop the run.
-
name
:
check if rake gather_assets is available
shell
:
executable=/bin/bash chdir={{ edx_platform_code_dir }} rake -T | grep gather_assets
environment
:
"
{{
deploy_environment
}}"
register
:
grep_gather_assets
ignore_errors
:
yes
tags
:
-
lms
-
lms-preview
-
lms-xml
-
cms
-
deploy
-
name
:
check if django can collect lms static data
shell
:
SERVICE_VARIANT={{ lms_variant }} django-admin.py help collectstatic --pythonpath={{ edx_platform_code_dir }} --settings=lms.envs.aws
register
:
check_lms_collect_static
# Gather lms assets using rake if possible
-
name
:
gather lms static assets with rake
shell
:
executable=/bin/bash chdir={{ edx_platform_code_dir }} SERVICE_VARIANT={{ lms_variant }} rake lms:gather_assets:aws
notify
:
-
restart edxapp
sudo
:
yes
sudo_user
:
www-data
when
:
celery_worker is not defined
environment
:
"
{{
deploy_environment
}}"
ignore_errors
:
yes
tags
:
-
lms
-
lms-preview
-
lms-xml
-
deploy
-
name
:
check if django can collect cms static data
shell
:
SERVICE_VARIANT={{ lms_variant }} django-admin.py help collectstatic --pythonpath={{ edx_platform_code_dir }} --settings=cms.envs.aws
register
:
check_cms_collect_static
# Gather cms assets using rake if possible
-
name
:
gather cms static assets with rake
shell
:
executable=/bin/bash chdir={{ edx_platform_code_dir }} SERVICE_VARIANT={{ cms_variant }} rake cms:gather_assets:aws
notify
:
-
restart edxapp
sudo
:
yes
sudo_user
:
www-data
when
:
celery_worker is not defined
environment
:
"
{{
deploy_environment
}}"
ignore_errors
:
yes
tags
:
-
cms
-
deploy
-
include
:
collect_static.yml
when
:
celery_worker is not defined
# https://code.launchpad.net/~wligtenberg/django-openid-auth/mysql_fix/+merge/22726
# This is necessary for when syncdb is run and the django_openid_auth module is installed,
...
...
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