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
Show 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 @@
...
@@ -28,6 +28,9 @@
owner={{ insights_user }}
owner={{ insights_user }}
group={{ insights_user }}
group={{ insights_user }}
mode=0644
mode=0644
tags
:
-
install
-
install:configuration
-
name
:
install application requirements
-
name
:
install application requirements
pip
:
>
pip
:
>
...
@@ -36,22 +39,34 @@
...
@@ -36,22 +39,34 @@
state=present extra_args="--exists-action w"
state=present extra_args="--exists-action w"
sudo_user
:
"
{{
insights_user
}}"
sudo_user
:
"
{{
insights_user
}}"
with_items
:
insights_requirements
with_items
:
insights_requirements
tags
:
-
install
-
install:app-requirements
-
name
:
create nodeenv
-
name
:
create nodeenv
shell
:
>
shell
:
>
creates={{ insights_nodeenv_dir }}
creates={{ insights_nodeenv_dir }}
{{ insights_home }}/venvs/{{ insights_service_name }}/bin/nodeenv {{ insights_nodeenv_dir }} --prebuilt
{{ insights_home }}/venvs/{{ insights_service_name }}/bin/nodeenv {{ insights_nodeenv_dir }} --prebuilt
sudo_user
:
"
{{
insights_user
}}"
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
install
-
install:base
-
name
:
install node dependencies
-
name
:
install node dependencies
npm
:
executable={{ insights_nodeenv_bin }}/npm path={{ insights_code_dir }} production=yes
npm
:
executable={{ insights_nodeenv_bin }}/npm path={{ insights_code_dir }} production=yes
sudo_user
:
"
{{
insights_user
}}"
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
install bower dependencies
-
name
:
install bower dependencies
shell
:
>
shell
:
>
chdir={{ insights_code_dir }}
chdir={{ insights_code_dir }}
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/bower install --production --config.interactive=false
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/bower install --production --config.interactive=false
sudo_user
:
"
{{
insights_user
}}"
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
migrate
-
name
:
migrate
shell
:
>
shell
:
>
...
@@ -62,12 +77,18 @@
...
@@ -62,12 +77,18 @@
sudo_user
:
"
{{
insights_user
}}"
sudo_user
:
"
{{
insights_user
}}"
environment
:
"
{{
insights_environment
}}"
environment
:
"
{{
insights_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
when
:
migrate_db is defined and migrate_db|lower == "yes"
tags
:
-
migrate
-
migrate:db
-
name
:
run r.js optimizer
-
name
:
run r.js optimizer
shell
:
>
shell
:
>
chdir={{ insights_code_dir }}
chdir={{ insights_code_dir }}
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/r.js -o build.js
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/r.js -o build.js
sudo_user
:
"
{{
insights_user
}}"
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
assets
-
assets:gather
-
name
:
run collectstatic
-
name
:
run collectstatic
shell
:
>
shell
:
>
...
@@ -78,24 +99,36 @@
...
@@ -78,24 +99,36 @@
with_items
:
with_items
:
-
"
collectstatic
--noinput"
-
"
collectstatic
--noinput"
-
"
compress"
-
"
compress"
tags
:
-
assets
-
assets:gather
-
name
:
compile translations
-
name
:
compile translations
shell
:
>
shell
:
>
chdir={{ insights_code_dir }}/analytics_dashboard
chdir={{ insights_code_dir }}/analytics_dashboard
. {{ insights_home }}/venvs/{{ insights_service_name }}/bin/activate && i18n_tool generate -v
. {{ insights_home }}/venvs/{{ insights_service_name }}/bin/activate && i18n_tool generate -v
sudo_user
:
"
{{
insights_user
}}"
sudo_user
:
"
{{
insights_user
}}"
tags
:
-
assets
-
assets:gather
-
name
:
write out the supervisior wrapper
-
name
:
write out the supervisior wrapper
template
:
>
template
:
>
src=edx/app/insights/insights.sh.j2
src=edx/app/insights/insights.sh.j2
dest={{ insights_app_dir }}/{{ insights_service_name }}.sh
dest={{ insights_app_dir }}/{{ insights_service_name }}.sh
mode=0650 owner={{ supervisor_user }} group={{ common_web_user }}
mode=0650 owner={{ supervisor_user }} group={{ common_web_user }}
tags
:
-
install
-
install:configuration
-
name
:
write supervisord config
-
name
:
write supervisord config
template
:
>
template
:
>
src=edx/app/supervisor/conf.d.available/insights.conf.j2
src=edx/app/supervisor/conf.d.available/insights.conf.j2
dest="{{ supervisor_available_dir }}/{{ insights_service_name }}.conf"
dest="{{ supervisor_available_dir }}/{{ insights_service_name }}.conf"
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
tags
:
-
install
-
install:configuration
-
name
:
enable supervisor script
-
name
:
enable supervisor script
file
:
>
file
:
>
...
@@ -104,10 +137,16 @@
...
@@ -104,10 +137,16 @@
state=link
state=link
force=yes
force=yes
when
:
not disable_edx_services
when
:
not disable_edx_services
tags
:
-
install
-
install:configuration
-
name
:
update supervisor configuration
-
name
:
update supervisor configuration
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
when
:
not disable_edx_services
when
:
not disable_edx_services
tags
:
-
install
-
install:configuration
-
name
:
create symlinks from the venv bin dir
-
name
:
create symlinks from the venv bin dir
file
:
>
file
:
>
...
@@ -118,12 +157,18 @@
...
@@ -118,12 +157,18 @@
-
python
-
python
-
pip
-
pip
-
django-admin.py
-
django-admin.py
tags
:
-
install
-
install:base
-
name
:
create manage.py symlink
-
name
:
create manage.py symlink
file
:
>
file
:
>
src="{{ insights_manage }}"
src="{{ insights_manage }}"
dest="{{ COMMON_BIN_DIR }}/manage.{{ insights_service_name }}"
dest="{{ COMMON_BIN_DIR }}/manage.{{ insights_service_name }}"
state=link
state=link
tags
:
-
install
-
install:base
-
name
:
restart insights
-
name
:
restart insights
supervisorctl
:
>
supervisorctl
:
>
...
@@ -133,3 +178,5 @@
...
@@ -133,3 +178,5 @@
name={{ insights_service_name }}
name={{ insights_service_name }}
when
:
not disable_edx_services
when
:
not disable_edx_services
sudo_user
:
"
{{
supervisor_service_user
}}"
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