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
d19a3ab7
Commit
d19a3ab7
authored
Nov 03, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #405 from antoviaque/edxapp-perm-fixes
Fixes for edxapp: Permissions & supervisor startup/configuration
parents
189668db
bbbaef30
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
playbooks/roles/edxapp/tasks/deploy.yml
+13
-8
playbooks/roles/edxapp/tasks/main.yml
+1
-0
playbooks/roles/edxapp/tasks/service_variant_config.yml
+19
-0
No files found.
playbooks/roles/edxapp/tasks/deploy.yml
View file @
d19a3ab7
...
@@ -39,10 +39,6 @@
...
@@ -39,10 +39,6 @@
sudo_user
:
"
{{
edxapp_user
}}"
sudo_user
:
"
{{
edxapp_user
}}"
tags
:
deploy
tags
:
deploy
-
name
:
edxapp | compiling all py files in the edx-platform repo
shell
:
"
{{
edxapp_venv_bin
}}/python
-m
compileall
{{
edxapp_code_dir
}}"
tags
:
deploy
-
name
:
edxapp | checkout theme
-
name
:
edxapp | checkout theme
git
:
dest={{ edxapp_app_dir }}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}}
git
:
dest={{ edxapp_app_dir }}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}}
when
:
edxapp_theme_name != ''
when
:
edxapp_theme_name != ''
...
@@ -169,11 +165,20 @@
...
@@ -169,11 +165,20 @@
when
:
not inst.stat.exists or new.stat.md5 != inst.stat.md5
when
:
not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags
:
deploy
tags
:
deploy
# For pip packages which create group-restricted venv files (httplib2)
-
name
:
edxapp | ensure all files are readable by any user
shell
:
chmod -R go+r {{ edxapp_venv_dir }}
when
:
not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags
:
deploy
-
name
:
edxapp | create checksum for installed requirements
-
name
:
edxapp | create checksum for installed requirements
shell
:
cp /var/tmp/edxapp.req.new /var/tmp/edxapp.req.installed
shell
:
cp /var/tmp/edxapp.req.new /var/tmp/edxapp.req.installed
sudo_user
:
"
{{
edxapp_user
}}"
sudo_user
:
"
{{
edxapp_user
}}"
tags
:
deploy
tags
:
deploy
-
name
:
edxapp | compiling all py files in the edx-platform repo
shell
:
"
{{
edxapp_venv_bin
}}/python
-m
compileall
{{
edxapp_code_dir
}}"
tags
:
deploy
# https://code.launchpad.net/~wligtenberg/django-openid-auth/mysql_fix/+merge/22726
# 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,
# This is necessary for when syncdb is run and the django_openid_auth module is installed,
...
@@ -190,23 +195,23 @@
...
@@ -190,23 +195,23 @@
# gather_assets and db migrations
# gather_assets and db migrations
-
include
:
service_variant_config.yml
-
include
:
service_variant_config.yml
-
name
:
edxapp |
re
start the edxapp services (supervisor)
-
name
:
edxapp | start the edxapp services (supervisor)
supervisorctl
:
>
supervisorctl
:
>
name="edxapp:{{ item }}"
name="edxapp:{{ item }}"
supervisorctl_path={{ supervisor_ctl }}
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
config={{ supervisor_cfg }}
state=
re
started
state=started
when
:
celery_worker is not defined
when
:
celery_worker is not defined
with_items
:
service_variants_enabled
with_items
:
service_variants_enabled
tags
:
tags
:
-
deploy
-
deploy
-
name
:
edxapp |
re
start the celery worker services (supervisor)
-
name
:
edxapp | start the celery worker services (supervisor)
supervisorctl
:
>
supervisorctl
:
>
name="edxapp_worker:{{ item.service_variant }}_{{ item.queue }}_{{ item.concurrency }}"
name="edxapp_worker:{{ item.service_variant }}_{{ item.queue }}_{{ item.concurrency }}"
supervisorctl_path={{ supervisor_ctl }}
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
config={{ supervisor_cfg }}
state=
re
started
state=started
when
:
celery_worker is defined
when
:
celery_worker is defined
with_items
:
edxapp_workers
with_items
:
edxapp_workers
tags
:
tags
:
...
...
playbooks/roles/edxapp/tasks/main.yml
View file @
d19a3ab7
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
-
"
{{
edxapp_app_dir
}}"
-
"
{{
edxapp_app_dir
}}"
-
"
{{
edxapp_venvs_dir
}}"
-
"
{{
edxapp_venvs_dir
}}"
-
"
{{
edxapp_theme_dir
}}"
-
"
{{
edxapp_theme_dir
}}"
-
"
{{
edxapp_staticfile_dir
}}"
-
name
:
edxapp | create edxapp log dir
-
name
:
edxapp | create edxapp log dir
file
:
>
file
:
>
...
...
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
d19a3ab7
...
@@ -38,6 +38,15 @@
...
@@ -38,6 +38,15 @@
tags
:
tags
:
-
deploy
-
deploy
-
name
:
"
edxapp
|
ensuring
edxapp
is
activated
in
supervisor"
supervisorctl
:
>
name="edxapp"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=present
when
:
celery_worker is not defined
tags
:
-
deploy
# write the supervisor script for celery workers
# write the supervisor script for celery workers
...
@@ -50,6 +59,16 @@
...
@@ -50,6 +59,16 @@
tags
:
tags
:
-
deploy
-
deploy
-
name
:
edxapp | ensuring edxapp_worker is activated in supervisor
supervisorctl
:
>
name="edxapp_worker"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=present
when
:
celery_worker is defined
tags
:
-
deploy
# Gather assets using rake if possible
# Gather assets using rake if possible
-
name
:
edxapp | gather {{ item }} static assets with rake
-
name
:
edxapp | gather {{ item }} static assets with rake
...
...
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