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
0a991949
Commit
0a991949
authored
Jun 19, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing the edx_platform var name
parent
23d2e8f5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
34 deletions
+37
-34
playbooks/roles/common/templates/edx-update.sh.j2
+1
-1
playbooks/roles/edxapp/handlers/main.yml
+14
-14
playbooks/roles/edxapp/tasks/deploy.yml
+4
-4
playbooks/roles/edxapp/templates/cms.conf.j2
+2
-2
playbooks/roles/edxapp/templates/lms-preview.conf.j2
+2
-2
playbooks/roles/edxapp/templates/lms-xml.conf.j2
+2
-2
playbooks/roles/edxapp/templates/lms.conf.j2
+2
-2
playbooks/roles/edxapp/vars/main.yml
+10
-7
No files found.
playbooks/roles/common/templates/edx-update.sh.j2
View file @
0a991949
...
...
@@ -46,7 +46,7 @@ source /etc/profile
source
{{
venv_dir
}}
/bin/activate
export
PATH
=
$PATH
:/opt/www/.gem/bin
cd
{{
platform_code_dir
}}
cd
{{
edx_
platform_code_dir
}}
BRANCH
=
"origin/feature/edx-west/stanford-theme"
...
...
playbooks/roles/edxapp/handlers/main.yml
View file @
0a991949
...
...
@@ -32,14 +32,14 @@
# Ruby plays that need to be run after platform updates.
-
name
:
gem | gem install bundler
shell
:
RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ rbenv_root }}/shims/gem install bundle chdir={{ platform_code_dir }}
shell
:
RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ rbenv_root }}/shims/gem install bundle chdir={{
edx_
platform_code_dir }}
tags
:
-
ruby
-
deploy
-
install
-
name
:
bundle | bundle install
shell
:
RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ gem_home }}/bin/bundle install --binstubs chdir={{ platform_code_dir }}
shell
:
RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ gem_home }}/bin/bundle install --binstubs chdir={{
edx_
platform_code_dir }}
tags
:
-
ruby
-
deploy
...
...
@@ -47,7 +47,7 @@
# Node play that need to be run after platform updates.
-
name
:
Install edx-platform npm dependencies
shell
:
npm install chdir={{ platform_code_dir }}
shell
:
npm install chdir={{
edx_
platform_code_dir }}
tags
:
-
npm
-
update
...
...
@@ -69,7 +69,7 @@
# 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
# installs everything into that virtual environment.
shell
:
cd {{ platform_code_dir }} && {{ venv_dir }}/bin/pip install --use-mirrors -r {{ base_requirements_file }}
shell
:
cd {{
edx_
platform_code_dir }} && {{ venv_dir }}/bin/pip install --use-mirrors -r {{ base_requirements_file }}
tags
:
-
lms
-
cms
...
...
@@ -90,7 +90,7 @@
# 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
# installs everything into that virtual environment.
shell
:
cd {{ platform_code_dir }} && {{ venv_dir }}/bin/pip install --use-mirrors -r {{ item }}
shell
:
cd {{
edx_
platform_code_dir }} && {{ venv_dir }}/bin/pip install --use-mirrors -r {{ item }}
with_items
:
-
"
{{
repo_requirements_file
}}"
-
"
{{
github_requirements_file
}}"
...
...
@@ -103,7 +103,7 @@
# 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={{ platform_code_dir }} rake -T | grep gather_assets
shell
:
executable=/bin/bash chdir={{
edx_
platform_code_dir }} rake -T | grep gather_assets
environment
:
"
{{
deploy_environment
}}"
register
:
grep_gather_assets
ignore_errors
:
yes
...
...
@@ -115,7 +115,7 @@
-
deploy
-
name
:
check if django can collect lms static data
shell
:
SERVICE_VARIANT={{ lms_variant }} django-admin.py help collectstatic --pythonpath={{ platform_code_dir }} --settings=lms.envs.aws
shell
:
SERVICE_VARIANT={{ lms_variant }} django-admin.py help collectstatic --pythonpath={{
edx_
platform_code_dir }} --settings=lms.envs.aws
register
:
check_lms_collect_static
sudo
:
yes
sudo_user
:
www-data
...
...
@@ -127,7 +127,7 @@
-
deploy
-
name
:
check if django can collect cms static data
shell
:
SERVICE_VARIANT={{ lms_variant }} django-admin.py help collectstatic --pythonpath={{ platform_code_dir }} --settings=cms.envs.aws
shell
:
SERVICE_VARIANT={{ lms_variant }} django-admin.py help collectstatic --pythonpath={{
edx_
platform_code_dir }} --settings=cms.envs.aws
register
:
check_cms_collect_static
sudo
:
yes
sudo_user
:
www-data
...
...
@@ -137,7 +137,7 @@
-
deploy
-
name
:
check if django can update cms templates
shell
:
SERVICE_VARIANT={{ cms_variant }} django-admin.py help update_templates --pythonpath={{ platform_code_dir }} --settings=cms.envs.aws
shell
:
SERVICE_VARIANT={{ cms_variant }} django-admin.py help update_templates --pythonpath={{
edx_
platform_code_dir }} --settings=cms.envs.aws
register
:
check_cms_update_templates
sudo
:
yes
sudo_user
:
www-data
...
...
@@ -148,7 +148,7 @@
# Gather lms assets using rake if possible
-
name
:
gather lms static assets with rake
shell
:
executable=/bin/bash chdir={{ platform_code_dir }} SERVICE_VARIANT={{ lms_variant }} rake lms:gather_assets:aws
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
:
-
stop edxapp
...
...
@@ -164,7 +164,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={{ platform_code_dir }} --settings=lms.envs.aws --noinput --verbosity=0
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
:
-
stop edxapp
...
...
@@ -182,7 +182,7 @@
# Gather cms assets using rake if possible
-
name
:
gather cms static assets with rake
# script: gather_assets.sh
shell
:
executable=/bin/bash chdir={{ platform_code_dir }} SERVICE_VARIANT={{ cms_variant }} rake cms:gather_assets:aws
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
:
-
stop edxapp
...
...
@@ -195,7 +195,7 @@
-
deploy
-
name
:
gather cms static assets with django
shell
:
SERVICE_VARIANT={{ cms_variant }} django-admin.py collectstatic --pythonpath={{ platform_code_dir }} --settings=lms.envs.aws --noinput --verbosity=0
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
:
-
stop edxapp
...
...
@@ -208,7 +208,7 @@
-
deploy
-
name
:
update cms templates
shell
:
SERVICE_VARIANT={{ cms_variant }} django-admin.py update_templates --pythonpath={{ platform_code_dir }} --settings=cms.envs.aws
shell
:
SERVICE_VARIANT={{ cms_variant }} django-admin.py update_templates --pythonpath={{
edx_
platform_code_dir }} --settings=cms.envs.aws
when
:
check_cms_update_templates.rc == 0
notify
:
-
stop edxapp
...
...
playbooks/roles/edxapp/tasks/deploy.yml
View file @
0a991949
...
...
@@ -10,7 +10,7 @@
# Do A Checkout
-
name
:
git checkout edx-platform repo into $app_base_dir
git
:
dest={{platform_code_dir}} repo={{lms_source_repo}} version={{lms_version}}
git
:
dest={{
edx_
platform_code_dir}} repo={{lms_source_repo}} version={{lms_version}}
environment
:
GIT_SSH
:
/tmp/git_ssh.sh
tags
:
...
...
@@ -21,7 +21,7 @@
# Do Post Checkout Tasks.
-
name
:
create platform code dir
file
:
path={{platform_code_dir}} state=directory owner=www-data group=www-data mode=755
file
:
path={{
edx_
platform_code_dir}} state=directory owner=www-data group=www-data mode=755
tags
:
-
lms
-
cms
...
...
@@ -43,8 +43,8 @@
# portions of the deploy needs to be incorporated here.
-
name
:
sets permissions on platform code dir and contents
file
:
path={{platform_code_dir}} state=directory owner=www-data group=www-data recurse=yes
# Post Checkout tasks will get run as handlers when the {{ platform_code_dir }} is ready.
file
:
path={{
edx_
platform_code_dir}} state=directory owner=www-data group=www-data recurse=yes
# Post Checkout tasks will get run as handlers when the {{
edx_
platform_code_dir }} is ready.
# Look at the handlers/main.yml in this role for a description of the tasks stated below.
tags
:
-
lms
...
...
playbooks/roles/edxapp/templates/cms.conf.j2
View file @
0a991949
...
...
@@ -19,7 +19,7 @@ env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=cms.envs.aws
env SERVICE_VARIANT="cms"
chdir {{platform_code_dir}}
chdir {{
edx_
platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn_django -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{platform_code_dir}} --settings=cms.envs.aws
exec {{venv_dir}}/bin/gunicorn_django -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{
edx_
platform_code_dir}} --settings=cms.envs.aws
playbooks/roles/edxapp/templates/lms-preview.conf.j2
View file @
0a991949
...
...
@@ -18,10 +18,10 @@ env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env SERVICE_VARIANT="lms-preview"
chdir {{platform_code_dir}}
chdir {{
edx_
platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{platform_code_dir}} lms.wsgi
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{
edx_
platform_code_dir}} lms.wsgi
post-start script
while true
...
...
playbooks/roles/edxapp/templates/lms-xml.conf.j2
View file @
0a991949
...
...
@@ -18,10 +18,10 @@ env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env SERVICE_VARIANT="lms-xml"
chdir {{platform_code_dir}}
chdir {{
edx_
platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{platform_code_dir}} lms.wsgi
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{
edx_
platform_code_dir}} lms.wsgi
post-start script
while true
...
...
playbooks/roles/edxapp/templates/lms.conf.j2
View file @
0a991949
...
...
@@ -18,10 +18,10 @@ env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=lms.envs.aws
env SERVICE_VARIANT="lms"
chdir {{platform_code_dir}}
chdir {{
edx_
platform_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{platform_code_dir}} lms.wsgi
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{
edx_
platform_code_dir}} lms.wsgi
post-start script
while true
...
...
playbooks/roles/edxapp/vars/main.yml
View file @
0a991949
...
...
@@ -2,6 +2,9 @@
# when the role is included
---
# install dir for the edx-platform repo
edx_platform_code_dir
:
"
{{
app_base_dir
}}/edx-platform"
# Default nginx listen ports
# These should be overrided if you want
# to serve all content on port 80
...
...
@@ -44,12 +47,12 @@ edxapp_theme_version: 'HEAD'
# make this the public URL instead of writable
lms_source_repo
:
git://github.com/edx/edx-platform.git
lms_version
:
'
HEAD'
local_requirements_file
:
"
{{
platform_code_dir
}}/requirements/edx/local.txt"
pre_requirements_file
:
"
{{
platform_code_dir
}}/requirements/edx/pre.txt"
post_requirements_file
:
"
{{
platform_code_dir
}}/requirements/edx/post.txt"
base_requirements_file
:
"
{{
platform_code_dir
}}/requirements/edx/base.txt"
github_requirements_file
:
"
{{
platform_code_dir
}}/requirements/edx/github.txt"
repo_requirements_file
:
"
{{
platform_code_dir
}}/requirements/edx/repo.txt"
local_requirements_file
:
"
{{
edx_
platform_code_dir
}}/requirements/edx/local.txt"
pre_requirements_file
:
"
{{
edx_
platform_code_dir
}}/requirements/edx/pre.txt"
post_requirements_file
:
"
{{
edx_
platform_code_dir
}}/requirements/edx/post.txt"
base_requirements_file
:
"
{{
edx_
platform_code_dir
}}/requirements/edx/base.txt"
github_requirements_file
:
"
{{
edx_
platform_code_dir
}}/requirements/edx/github.txt"
repo_requirements_file
:
"
{{
edx_
platform_code_dir
}}/requirements/edx/repo.txt"
lms_debian_pkgs
:
-
apparmor-utils
...
...
@@ -140,4 +143,4 @@ deploy_environment:
SKIP_WS_MIGRATIONS
:
1
RBENV_ROOT
:
"
{{
rbenv_root
}}"
GEM_HOME
:
"
{{
gem_home
}}"
PATH
:
"
{{
venv_dir
}}/bin:{{
platform_code_dir
}}/bin:{{
rbenv_root
}}/bin:{{
rbenv_root
}}/shims:{{
gem_home
}}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
PATH
:
"
{{
venv_dir
}}/bin:{{
edx_
platform_code_dir
}}/bin:{{
rbenv_root
}}/bin:{{
rbenv_root
}}/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