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
c73eec0d
Commit
c73eec0d
authored
Jun 24, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding handlers to restart analytics
parent
a6d5f306
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletions
+29
-1
playbooks/roles/analytics-api/handlers/main.yml
+23
-0
playbooks/roles/analytics-api/tasks/deploy.yml
+6
-1
No files found.
playbooks/roles/analytics-api/handlers/main.yml
0 → 100644
View file @
c73eec0d
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Handlers for role analytics-api
#
# Overview:
#
#
-
name
:
"
restart
the
analytics
service"
supervisorctl_local
:
>
name={{ analytics_api_service_name }}
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=restarted
playbooks/roles/analytics-api/tasks/deploy.yml
View file @
c73eec0d
...
...
@@ -11,6 +11,7 @@
accept_hostkey=yes
ssh_opts="{{ analytics_api_git_ssh_opts }}"
register
:
analytics_api_code_checkout
notify
:
"
restart
the
analytics
service"
sudo_user
:
"
{{
analytics_api_user
}}"
-
name
:
run collectstatic
...
...
@@ -20,13 +21,13 @@
sudo_user
:
"
{{
analytics_api_user
}}"
environment
:
ANALYTICS_API_CFG
:
"
{{
COMMON_CFG_DIR
}}/{{
analytics_api_service_name
}}.yaml"
tags
:
tst
-
name
:
install application requirements
pip
:
>
requirements="{{ analytics_api_requirements_base }}/{{ item }}"
virtualenv="{{ analytics_api_venv_dir }}" state=present
sudo_user
:
"
{{
analytics_api_user
}}"
notify
:
restart the analytics service
with_items
:
analytics_api_requirements
-
name
:
write out app config file
...
...
@@ -34,18 +35,21 @@
src=edx/app/analytics-api/analytics-api.yaml.j2
dest={{ COMMON_CFG_DIR }}/{{ analytics_api_service_name }}.yaml
mode=0644 owner={{ analytics_api_user }} group={{ analytics_api_user }}
notify
:
restart the analytics service
-
name
:
write out the supervisior wrapper
template
:
>
src=edx/app/analytics-api/analytics-api.sh.j2
dest={{ analytics_api_app_dir }}/{{ analytics_api_service_name }}.sh
mode=0650 owner={{ supervisor_user }} group={{ common_web_user }}
notify
:
restart the analytics service
-
name
:
write supervisord config
template
:
>
src=edx/app/supervisor/conf.d.available/analytics-api.conf.j2
dest="{{ supervisor_available_dir }}/{{ analytics_api_service_name }}.conf"
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
notify
:
restart the analytics service
-
name
:
enable supervisor script
file
:
>
...
...
@@ -53,6 +57,7 @@
dest={{ supervisor_cfg_dir }}/{{ analytics_api_service_name }}.conf
state=link
force=yes
notify
:
restart the analytics service
when
:
not disable_edx_services
-
name
:
update supervisor configuration
...
...
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