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
2c2a033a
Commit
2c2a033a
authored
Jun 11, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use variables instead of hardcoding paths.
parent
e0219e5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
playbooks/roles/deploy/tasks/main.yml
+10
-10
playbooks/roles/deploy/vars/main.yml
+5
-4
No files found.
playbooks/roles/deploy/tasks/main.yml
View file @
2c2a033a
...
...
@@ -25,13 +25,13 @@
# Do the checkout.
# Already done via the edxapp role.
#
Include that here?
#
TODO: Move it here.
# Do Post Checkout Tasks.
# This checks 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=
/opt/wwc/edx-platform rake -T | grep --quiet gather_assets_xxx
shell
:
executable=/bin/bash chdir=
{{ platform_code_dir }} rake -T | grep --quiet gather_assets
environment
:
"
{{
deploy_environment
}}"
register
:
grep_gather_assets
ignore_errors
:
yes
...
...
@@ -43,7 +43,7 @@
-
deploy
-
name
:
check if django can collect lms static data
shell
:
SERVICE_VARIANT={{ LMS_VARIANT }} django-admin.py help collectstatic --pythonpath=
/opt/wwc/edx-platform
--settings=lms.envs.aws
shell
:
SERVICE_VARIANT={{ LMS_VARIANT }} django-admin.py help collectstatic --pythonpath=
{{ platform_code_dir }}
--settings=lms.envs.aws
register
:
check_lms_collect_static
sudo
:
yes
sudo_user
:
www-data
...
...
@@ -55,7 +55,7 @@
-
deploy
-
name
:
check if django can collect cms static data
shell
:
SERVICE_VARIANT={{ LMS_VARIANT }} django-admin.py help collectstatic --pythonpath=
/opt/wwc/edx-platform
--settings=cms.envs.aws
shell
:
SERVICE_VARIANT={{ LMS_VARIANT }} django-admin.py help collectstatic --pythonpath=
{{ platform_code_dir }}
--settings=cms.envs.aws
register
:
check_cms_collect_static
sudo
:
yes
sudo_user
:
www-data
...
...
@@ -65,7 +65,7 @@
-
deploy
-
name
:
check if django can update cms templates
shell
:
SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py help update_templates --pythonpath=
/opt/wwc/edx-platform
--settings=cms.envs.aws
shell
:
SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py help update_templates --pythonpath=
{{ platform_code_dir }}
--settings=cms.envs.aws
register
:
check_cms_update_templates
sudo
:
yes
sudo_user
:
www-data
...
...
@@ -76,7 +76,7 @@
# Gather lms assets using rake if possible
-
name
:
gather lms static assets with rake
shell
:
executable=/bin/bash chdir=
/opt/wwc/edx-platform
SERVICE_VARIANT={{ LMS_VARIANT }} rake lms:gather_assets:aws
shell
:
executable=/bin/bash chdir=
{{ platform_code_dir }}
SERVICE_VARIANT={{ LMS_VARIANT }} rake lms:gather_assets:aws
when
:
grep_gather_assets.rc == 0
notify
:
-
restart lms
...
...
@@ -93,7 +93,7 @@
# 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=
/opt/wwc/edx-platform --settings=lms.envs.aws
shell
:
SERVICE_VARIANT={{ LMS_VARIANT }} django-admin.py collectstatic --pythonpath=
{{ 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 lms
...
...
@@ -112,7 +112,7 @@
# Gather cms assets using rake if possible
-
name
:
gather cms static assets with rake
# script: gather_assets.sh
shell
:
executable=/bin/bash chdir=
/opt/wwc/edx-platform
SERVICE_VARIANT={{ CMS_VARIANT }} rake cms:gather_assets:aws
shell
:
executable=/bin/bash chdir=
{{ platform_code_dir }}
SERVICE_VARIANT={{ CMS_VARIANT }} rake cms:gather_assets:aws
when
:
grep_gather_assets.rc == 0
notify
:
-
restart cms
...
...
@@ -124,7 +124,7 @@
-
deploy
-
name
:
gather cms static assets with django
shell
:
SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py collectstatic --pythonpath=
/opt/wwc/edx-platform
--settings=lms.envs.aws --noinput --verbosity=0
shell
:
SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py collectstatic --pythonpath=
{{ 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 cms
...
...
@@ -136,7 +136,7 @@
-
deploy
-
name
:
update cms templates
shell
:
SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py update_templates --pythonpath=
/opt/wwc/edx-platform
--settings=cms.envs.aws
shell
:
SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py update_templates --pythonpath=
{{ platform_code_dir }}
--settings=cms.envs.aws
when
:
check_cms_update_templates.rc == 0
notify
:
-
restart cms
...
...
playbooks/roles/deploy/vars/main.yml
View file @
2c2a033a
...
...
@@ -2,11 +2,12 @@
LMS_VARIANT
:
lms
CMS_VARIANT
:
cms
#PATH: /opt/www/.rbenv/shims:/opt/www/.rbenv/bin:/opt/wwc/edx-platfgorm/bin:$$PATH
rbenv_dir
:
/opt/www/.rbenv
gem_home
:
/opt/www/.gem
deploy_environment
:
NO_PREREQ_INSTALL
:
1
SKIP_WS_MIGRATIONS
:
1
RBENV_ROOT
:
/opt/www/.rbenv
GEM_HOME
:
/opt/www/.gem
PATH
:
/opt/edx/bin:/opt/wwc/edx-platform/bin:/opt/www/.rbenv/bin:/opt/www/.rbenv/shims:/opt/www/.gem/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
RBENV_ROOT
:
"
{{
rbenv_dir
}}"
GEM_HOME
:
"
{{
gem_home
}}"
PATH
:
"
{{
venv_dir
}}/bin:{{
platform_code_dir
}}/bin:{{
rbenv_dir
}}/bin:{{
rbenv_dir
}}/shims:{{
gem_home
}}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
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