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
105c4bc8
Commit
105c4bc8
authored
Jul 07, 2016
by
Michael Roytman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add life-cycle tags to ecommerce tasks yaml file
parent
1c6261cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
playbooks/roles/ecommerce/tasks/main.yml
+54
-0
No files found.
playbooks/roles/ecommerce/tasks/main.yml
View file @
105c4bc8
...
...
@@ -25,6 +25,9 @@
src
:
"
edx/app/ecommerce/ecommerce_gunicorn.py.j2"
dest
:
"
{{
ecommerce_home
}}/ecommerce_gunicorn.py"
become_user
:
"
{{
ecommerce_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
Install application requirements
pip
:
...
...
@@ -33,12 +36,18 @@
state
:
present
become_user
:
"
{{
ecommerce_user
}}"
with_items
:
"
{{
ecommerce_requirements
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
Create nodeenv
shell
:
"
{{
ecommerce_venv_dir
}}/bin/nodeenv
{{
ecommerce_nodeenv_dir
}}
--prebuilt"
args
:
creates
:
"
{{
ecommerce_nodeenv_dir
}}"
become_user
:
"
{{
ecommerce_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
Install node dependencies
npm
:
...
...
@@ -47,12 +56,18 @@
production
:
yes
become_user
:
"
{{
ecommerce_user
}}"
environment
:
"
{{
ecommerce_environment
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
Install bower dependencies
shell
:
"
.
{{
ecommerce_nodeenv_bin
}}/activate
&&
{{
ecommerce_node_bin
}}/bower
install
--production
--config.interactive=false"
args
:
chdir
:
"
{{
ecommerce_code_dir
}}"
become_user
:
"
{{
ecommerce_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
Migrate
shell
:
>
...
...
@@ -64,6 +79,9 @@
become_user
:
"
{{
ecommerce_user
}}"
environment
:
"
{{
ecommerce_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
tags
:
-
migrate
-
migrate:db
-
name
:
Populate countries
shell
:
>
...
...
@@ -81,6 +99,9 @@
failed_when
:
-
"
'You
already
have
countries
in
your
database'
not
in
command_result.stderr"
-
"
command_result.rc
!=
0"
tags
:
-
migrate
-
migrate:db
-
name
:
compile sass
shell
:
"
{{
ecommerce_venv_dir
}}/bin/python
manage.py
{{
item
}}"
...
...
@@ -91,6 +112,9 @@
with_items
:
-
"
update_assets
--skip-collect"
when
:
not devstack
tags
:
-
assets
-
assets:gather
-
name
:
Run r.js optimizer
shell
:
"
.
{{
ecommerce_nodeenv_bin
}}/activate
&&
{{
ecommerce_node_bin
}}/r.js
-o
build.js"
...
...
@@ -98,6 +122,9 @@
chdir
:
"
{{
ecommerce_code_dir
}}"
become_user
:
"
{{
ecommerce_user
}}"
when
:
not devstack
tags
:
-
assets
-
assets:gather
-
name
:
Run collectstatic
shell
:
"
{{
ecommerce_venv_dir
}}/bin/python
manage.py
{{
item
}}"
...
...
@@ -109,6 +136,9 @@
-
"
collectstatic
--noinput"
-
"
compress"
when
:
not devstack
tags
:
-
assets
-
assets:gather
-
name
:
Write out the supervisor wrapper
template
:
...
...
@@ -117,6 +147,9 @@
mode
:
"
0650"
owner
:
"
{{
supervisor_user
}}"
group
:
"
{{
common_web_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
Write supervisord config
template
:
...
...
@@ -125,6 +158,9 @@
owner
:
"
{{
supervisor_user
}}"
group
:
"
{{
common_web_user
}}"
mode
:
"
0644"
tags
:
-
install
-
install:configuration
-
name
:
Setup the ecommence env file
template
:
...
...
@@ -133,6 +169,9 @@
owner
:
"
{{
ecommerce_user
}}"
group
:
"
{{
ecommerce_user
}}"
mode
:
"
0644"
tags
:
-
install
-
install:configuration
-
name
:
Enable supervisor script
file
:
...
...
@@ -141,10 +180,16 @@
state
:
link
force
:
yes
when
:
not disable_edx_services
tags
:
-
install
-
install:configuration
-
name
:
Update supervisor configuration
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
when
:
not disable_edx_services
tags
:
-
manage
-
manage:start
-
name
:
Create symlinks from the-er venv bin dir
file
:
...
...
@@ -155,6 +200,9 @@
-
python
-
pip
-
django-admin.py
tags
:
-
install
-
install:app-requirements
-
name
:
Create symlinks from the repo dir
file
:
...
...
@@ -163,6 +211,9 @@
state
:
link
with_items
:
-
manage.py
tags
:
-
install
-
install:app-requirements
-
name
:
Restart the applicaton
supervisorctl
:
...
...
@@ -172,3 +223,6 @@
config
:
"
{{
supervisor_cfg
}}"
when
:
not disable_edx_services
become_user
:
"
{{
supervisor_service_user
}}"
tags
:
-
manage
-
manage:start
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