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
8804b6ba
Commit
8804b6ba
authored
Oct 15, 2015
by
Morgan Robertson
Committed by
Edward Zarecor
Nov 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add lifecycle tags for analytics_api role.
parent
9063eded
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
playbooks/roles/analytics_api/tasks/main.yml
+38
-0
No files found.
playbooks/roles/analytics_api/tasks/main.yml
View file @
8804b6ba
...
@@ -39,12 +39,18 @@
...
@@ -39,12 +39,18 @@
owner={{ analytics_api_user }}
owner={{ analytics_api_user }}
group={{ analytics_api_user }}
group={{ analytics_api_user }}
mode=0644
mode=0644
tags
:
-
install
-
install:configuration
-
name
:
"
add
gunicorn
configuration
file"
-
name
:
"
add
gunicorn
configuration
file"
template
:
>
template
:
>
src=edx/app/analytics_api/analytics_api_gunicorn.py.j2
src=edx/app/analytics_api/analytics_api_gunicorn.py.j2
dest={{ analytics_api_home }}/analytics_api_gunicorn.py
dest={{ analytics_api_home }}/analytics_api_gunicorn.py
sudo_user
:
"
{{
analytics_api_user
}}"
sudo_user
:
"
{{
analytics_api_user
}}"
tags
:
-
install
-
install:configuration
-
name
:
install application requirements
-
name
:
install application requirements
pip
:
>
pip
:
>
...
@@ -53,6 +59,9 @@
...
@@ -53,6 +59,9 @@
state=present
state=present
sudo_user
:
"
{{
analytics_api_user
}}"
sudo_user
:
"
{{
analytics_api_user
}}"
with_items
:
analytics_api_requirements
with_items
:
analytics_api_requirements
tags
:
-
install
-
install:app-requirements
-
name
:
migrate
-
name
:
migrate
shell
:
>
shell
:
>
...
@@ -63,6 +72,9 @@
...
@@ -63,6 +72,9 @@
sudo_user
:
"
{{
analytics_api_user
}}"
sudo_user
:
"
{{
analytics_api_user
}}"
environment
:
"
{{
analytics_api_environment
}}"
environment
:
"
{{
analytics_api_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 collectstatic
-
name
:
run collectstatic
shell
:
>
shell
:
>
...
@@ -70,6 +82,9 @@
...
@@ -70,6 +82,9 @@
{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}/bin/python manage.py collectstatic --noinput
{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}/bin/python manage.py collectstatic --noinput
sudo_user
:
"
{{
analytics_api_user
}}"
sudo_user
:
"
{{
analytics_api_user
}}"
environment
:
"
{{
analytics_api_environment
}}"
environment
:
"
{{
analytics_api_environment
}}"
tags
:
-
assets
-
assets:gather
-
name
:
create api users
-
name
:
create api users
shell
:
>
shell
:
>
...
@@ -78,18 +93,27 @@
...
@@ -78,18 +93,27 @@
sudo_user
:
"
{{
analytics_api_user
}}"
sudo_user
:
"
{{
analytics_api_user
}}"
environment
:
"
{{
analytics_api_environment
}}"
environment
:
"
{{
analytics_api_environment
}}"
with_dict
:
ANALYTICS_API_USERS
with_dict
:
ANALYTICS_API_USERS
tags
:
-
manage
-
manage:app-users
-
name
:
write out the supervisor wrapper
-
name
:
write out the supervisor wrapper
template
:
>
template
:
>
src=edx/app/analytics_api/analytics_api.sh.j2
src=edx/app/analytics_api/analytics_api.sh.j2
dest={{ analytics_api_home }}/{{ analytics_api_service_name }}.sh
dest={{ analytics_api_home }}/{{ analytics_api_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/analytics_api.conf.j2
src=edx/app/supervisor/conf.d.available/analytics_api.conf.j2
dest="{{ supervisor_available_dir }}/{{ analytics_api_service_name }}.conf"
dest="{{ supervisor_available_dir }}/{{ analytics_api_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
:
>
...
@@ -98,10 +122,16 @@
...
@@ -98,10 +122,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
:
>
...
@@ -112,6 +142,9 @@
...
@@ -112,6 +142,9 @@
-
python
-
python
-
pip
-
pip
-
django-admin.py
-
django-admin.py
tags
:
-
install
-
install:base
-
name
:
create symlinks from the repo dir
-
name
:
create symlinks from the repo dir
file
:
>
file
:
>
...
@@ -120,6 +153,9 @@
...
@@ -120,6 +153,9 @@
state=link
state=link
with_items
:
with_items
:
-
manage.py
-
manage.py
tags
:
-
install
-
install:base
-
name
:
restart analytics_api
-
name
:
restart analytics_api
supervisorctl
:
>
supervisorctl
:
>
...
@@ -129,3 +165,5 @@
...
@@ -129,3 +165,5 @@
name={{ analytics_api_service_name }}
name={{ analytics_api_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