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
195c41fe
Commit
195c41fe
authored
Oct 15, 2015
by
Morgan Robertson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add lifecycle tags for insights role.
parent
78ba8aef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
playbooks/roles/insights/tasks/main.yml
+47
-0
No files found.
playbooks/roles/insights/tasks/main.yml
View file @
195c41fe
...
...
@@ -28,6 +28,9 @@
owner={{ insights_user }}
group={{ insights_user }}
mode=0644
tags
:
-
install
-
install:configuration
-
name
:
install application requirements
pip
:
>
...
...
@@ -36,22 +39,34 @@
state=present extra_args="--exists-action w"
sudo_user
:
"
{{
insights_user
}}"
with_items
:
insights_requirements
tags
:
-
install
-
install:app-requirements
-
name
:
create nodeenv
shell
:
>
creates={{ insights_nodeenv_dir }}
{{ insights_home }}/venvs/{{ insights_service_name }}/bin/nodeenv {{ insights_nodeenv_dir }} --prebuilt
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
install
-
install:base
-
name
:
install node dependencies
npm
:
executable={{ insights_nodeenv_bin }}/npm path={{ insights_code_dir }} production=yes
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
install bower dependencies
shell
:
>
chdir={{ insights_code_dir }}
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/bower install --production --config.interactive=false
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
migrate
shell
:
>
...
...
@@ -62,12 +77,18 @@
sudo_user
:
"
{{
insights_user
}}"
environment
:
"
{{
insights_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
tags
:
-
migrate
-
migrate:db
-
name
:
run r.js optimizer
shell
:
>
chdir={{ insights_code_dir }}
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/r.js -o build.js
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
assets
-
assets:gather
-
name
:
run collectstatic
shell
:
>
...
...
@@ -78,24 +99,36 @@
with_items
:
-
"
collectstatic
--noinput"
-
"
compress"
tags
:
-
assets
-
assets:gather
-
name
:
compile translations
shell
:
>
chdir={{ insights_code_dir }}/analytics_dashboard
. {{ insights_home }}/venvs/{{ insights_service_name }}/bin/activate && i18n_tool generate -v
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
assets
-
assets:gather
-
name
:
write out the supervisior wrapper
template
:
>
src=edx/app/insights/insights.sh.j2
dest={{ insights_app_dir }}/{{ insights_service_name }}.sh
mode=0650 owner={{ supervisor_user }} group={{ common_web_user }}
tags
:
-
install
-
install:configuration
-
name
:
write supervisord config
template
:
>
src=edx/app/supervisor/conf.d.available/insights.conf.j2
dest="{{ supervisor_available_dir }}/{{ insights_service_name }}.conf"
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
tags
:
-
install
-
install:configuration
-
name
:
enable supervisor script
file
:
>
...
...
@@ -104,10 +137,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
:
-
install
-
install:configuration
-
name
:
create symlinks from the venv bin dir
file
:
>
...
...
@@ -118,12 +157,18 @@
-
python
-
pip
-
django-admin.py
tags
:
-
install
-
install:base
-
name
:
create manage.py symlink
file
:
>
src="{{ insights_manage }}"
dest="{{ COMMON_BIN_DIR }}/manage.{{ insights_service_name }}"
state=link
tags
:
-
install
-
install:base
-
name
:
restart insights
supervisorctl
:
>
...
...
@@ -133,3 +178,5 @@
name={{ insights_service_name }}
when
:
not disable_edx_services
sudo_user
:
"
{{
supervisor_service_user
}}"
tags
:
-
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