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
a38d87ef
Commit
a38d87ef
authored
Nov 24, 2015
by
Edward Zarecor
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2509 from edx/e0d/edxapp-tags
E0d/edxapp tags
parents
86c0af33
38573310
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
13 deletions
+85
-13
playbooks/roles/edxapp/tasks/deploy.yml
+0
-0
playbooks/roles/edxapp/tasks/main.yml
+38
-8
playbooks/roles/edxapp/tasks/service_variant_config.yml
+44
-5
playbooks/roles/edxapp_common/tasks/main.yml
+3
-0
No files found.
playbooks/roles/edxapp/tasks/deploy.yml
View file @
a38d87ef
This diff is collapsed.
Click to expand it.
playbooks/roles/edxapp/tasks/main.yml
View file @
a38d87ef
...
...
@@ -6,6 +6,9 @@
user
:
>
name="{{ edxapp_user }}" home="{{ edxapp_app_dir }}"
createhome=no shell=/bin/false
tags
:
-
install
-
install:base
-
name
:
create edxapp user dirs
file
:
>
...
...
@@ -20,12 +23,18 @@
-
"
{{
edxapp_staticfile_dir
}}"
-
"
{{
edxapp_course_static_dir
}}"
-
"
{{
edxapp_course_data_dir
}}"
tags
:
-
install
-
install:base
# var should have more permissive permissions than the rest
-
name
:
create edxapp var dir
file
:
>
path={{ edxapp_data_dir }} state=directory mode=0775
owner="{{ edxapp_user }}" group="{{ common_web_group }}"
tags
:
-
install
-
install:base
# directory to import the courses from github
-
name
:
create directory to import the courses from github
...
...
@@ -43,12 +52,18 @@
state=link
owner="{{ edxapp_user }}"
group="{{ common_web_group }}"
tags
:
-
install
-
install:base
-
name
:
create edxapp log dir
file
:
>
path="{{ edxapp_log_dir }}" state=directory
owner="{{ common_log_user }}" group="{{ common_log_user }}"
tags
:
-
install
-
install:base
-
name
:
create web-writable edxapp data dirs
file
:
>
path="{{ item }}" state=directory
...
...
@@ -58,27 +73,42 @@
-
"
{{
edxapp_course_data_dir
}}"
-
"
{{
edxapp_upload_dir
}}"
-
"
{{
edxapp_media_dir
}}"
tags
:
-
install
-
install:base
# adding chris-lea nodejs repo
-
name
:
add ppas for current versions of nodejs
apt_repository
:
repo="{{ edxapp_chrislea_ppa }}"
tags
:
-
install
-
install:base
-
name
:
install system packages on which LMS and CMS rely
apt
:
pkg={{','.join(edxapp_debian_pkgs)}} state=present update_cache=yes
tags
:
-
install
-
install:base
-
name
:
set up edxapp .npmrc
template
:
src=.npmrc.j2 dest={{ edxapp_app_dir }}/.npmrc
owner={{ edxapp_user }} group={{ common_web_group }}
mode=0600
tags
:
-
install
-
install:base
-
name
:
create log directories for service variants
file
:
>
path={{ edxapp_log_dir }}/{{ item }} state=directory
owner={{ common_log_user }} group={{ common_log_user }}
mode=0750
with_items
:
service_variants_enabled
tags
:
-
install
-
install:base
# Set up the python sandbox execution environment
-
include
:
python_sandbox_env.yml tags=deploy
when
:
EDXAPP_PYTHON_SANDBOX
...
...
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
a38d87ef
...
...
@@ -3,33 +3,44 @@
src={{ item }}.env.json.j2
dest={{ edxapp_app_dir }}/{{ item }}.env.json
sudo_user
:
"
{{
edxapp_user
}}"
tags
:
edxapp_cfg
with_items
:
service_variants_enabled
tags
:
-
install
-
install:configuration
-
edxapp_cfg
-
name
:
"
create
{{
item
}}
auth
file"
template
:
>
src={{ item }}.auth.json.j2
dest={{ edxapp_app_dir }}/{{ item }}.auth.json
sudo_user
:
"
{{
edxapp_user
}}"
tags
:
edxapp_cfg
with_items
:
service_variants_enabled
tags
:
-
install
-
install:configuration
-
edxapp_cfg
-
name
:
"
create
{{
item
}}
yaml
application
config"
template
:
>
src={{ item }}.env.yaml.j2
dest={{ EDXAPP_CFG_DIR }}/{{ item }}.env.yaml
sudo_user
:
"
{{
edxapp_user
}}"
tags
:
edxapp_cfg
with_items
:
service_variants_enabled
tags
:
-
install
-
install:configuration
-
edxapp_cfg
-
name
:
"
create
{{
item
}}
yaml
auth
file"
template
:
>
src={{ item }}.auth.yaml.j2
dest={{ EDXAPP_CFG_DIR }}/{{ item }}.auth.yaml
sudo_user
:
"
{{
edxapp_user
}}"
tags
:
edxapp_cfg
with_items
:
service_variants_enabled
tags
:
-
install
-
install:configuration
-
edxapp_cfg
# write the supervisor scripts for the service variants
...
...
@@ -40,6 +51,9 @@
group={{ supervisor_user }}
with_items
:
service_variants_enabled
sudo_user
:
"
{{
supervisor_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
writing edxapp supervisor script
template
:
>
...
...
@@ -47,12 +61,18 @@
owner={{ supervisor_user }}
group={{ supervisor_user }}
sudo_user
:
"
{{
supervisor_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
"
add
gunicorn
configuration
files"
template
:
>
src={{ item }}_gunicorn.py.j2 dest={{ edxapp_app_dir }}/{{ item }}_gunicorn.py
with_items
:
service_variants_enabled
sudo_user
:
"
{{
edxapp_user
}}"
tags
:
-
install
-
install:configuration
# write the supervisor script for celery workers
...
...
@@ -62,6 +82,9 @@
owner={{ supervisor_user }}
group={{ supervisor_user }}
sudo_user
:
"
{{
supervisor_user
}}"
tags
:
-
install
-
install:configuration
# Enable the supervisor jobs
-
name
:
"
enable
{{
item
}}
supervisor
script"
...
...
@@ -73,6 +96,9 @@
with_items
:
service_variants_enabled
when
:
celery_worker is not defined and not disable_edx_services
sudo_user
:
"
{{
supervisor_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
"
enable
edxapp
supervisor
script"
file
:
>
...
...
@@ -82,6 +108,9 @@
force=yes
when
:
celery_worker is not defined and not disable_edx_services
sudo_user
:
"
{{
supervisor_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
"
enable
celery
worker
supervisor
script"
file
:
>
...
...
@@ -91,6 +120,9 @@
force=yes
when
:
celery_worker is defined and not disable_edx_services
sudo_user
:
"
{{
supervisor_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
create helper scripts for managing edxapp
template
:
>
...
...
@@ -101,6 +133,9 @@
with_nested
:
-
edxapp_helper_scripts
-
service_variants_enabled
tags
:
-
install
-
install:configuration
# Syncdb with migrate when the migrate user is overridden in extra vars
-
name
:
migrate
...
...
@@ -111,6 +146,8 @@
DB_MIGRATION_PASS
:
"
{{
COMMON_MYSQL_MIGRATE_PASS
}}"
EDX_PLATFORM_SETTINGS_OVERRIDE
:
"
aws_migrate"
with_items
:
service_variants_enabled
tags
:
-
migrate
# Gather assets using paver if possible
...
...
@@ -119,3 +156,5 @@
when
:
celery_worker is not defined and not devstack and item != "lms-preview"
tags
:
gather_static_assets
with_items
:
service_variants_enabled
tags
:
-
assets
playbooks/roles/edxapp_common/tasks/main.yml
View file @
a38d87ef
...
...
@@ -3,3 +3,6 @@
-
name
:
Install system packages
apt
:
pkg={{','.join(edxapp_common_debian_pkgs)}}
state=present update_cache=yes
tags
:
-
install
-
install:base
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