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
ebae3a74
Commit
ebae3a74
authored
Oct 12, 2016
by
e0d
Committed by
Kevin Falcone
Nov 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring supervisor for 12.04 through 16.04 and docker
parent
2227e664
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
playbooks/roles/edxapp/tasks/main.yml
+3
-1
playbooks/roles/supervisor/tasks/main.yml
+17
-4
No files found.
playbooks/roles/edxapp/tasks/main.yml
View file @
ebae3a74
...
@@ -77,13 +77,15 @@
...
@@ -77,13 +77,15 @@
-
install:base
-
install:base
# adding chris-lea nodejs repo
# adding chris-lea nodejs repo
# TODO: 16.04
-
name
:
add ppas for current versions of nodejs
-
name
:
add ppas for current versions of nodejs
apt_repository
:
apt_repository
:
repo
:
"
{{
edxapp_chrislea_ppa
}}"
repo
:
"
{{
edxapp_chrislea_ppa
}}"
tags
:
tags
:
-
install
-
install
-
install:base
-
install:base
when
:
ansible_distribution_release == 'precise'
-
name
:
install system packages on which LMS and CMS rely
-
name
:
install system packages on which LMS and CMS rely
apt
:
apt
:
name
:
"
{{
item
}}"
name
:
"
{{
item
}}"
...
...
playbooks/roles/supervisor/tasks/main.yml
View file @
ebae3a74
...
@@ -115,13 +115,14 @@
...
@@ -115,13 +115,14 @@
-
install
-
install
-
install:base
-
install:base
# 12.04, 14.04, etc.
-
name
:
Create supervisor upstart job
-
name
:
Create supervisor upstart job
template
:
template
:
src
:
"
etc/init/supervisor-upstart.conf.j2"
src
:
"
etc/init/supervisor-upstart.conf.j2"
dest
:
"
/etc/init/{{
supervisor_service
}}.conf"
dest
:
"
/etc/init/{{
supervisor_service
}}.conf"
owner
:
root
owner
:
root
group
:
root
group
:
root
when
:
ansible_distribution
== 'Ubuntu' and ansible_distribution_major_version|int < 16
when
:
ansible_distribution
_release == 'precise' or ansible_distribution_release == 'trusty'
tags
:
tags
:
-
install
-
install
-
install:base
-
install:base
...
@@ -129,6 +130,8 @@
...
@@ -129,6 +130,8 @@
# This script is aws specific and looks up instances
# This script is aws specific and looks up instances
# tags and enables services based on the 'services' tag
# tags and enables services based on the 'services' tag
# on instance startup.
# on instance startup.
# TODO: 16.04 this cannot simply be dropped, enabling needs to be moved somewhere
# also should not be here, should be in the aws role if it's aws specific
-
name
:
create pre_supervisor upstart job
-
name
:
create pre_supervisor upstart job
template
:
template
:
src
:
"
etc/init/pre_supervisor.conf.j2"
src
:
"
etc/init/pre_supervisor.conf.j2"
...
@@ -137,7 +140,7 @@
...
@@ -137,7 +140,7 @@
group
:
root
group
:
root
when
:
>
when
:
>
supervisor_service == "supervisor" and disable_edx_services and not devstack
supervisor_service == "supervisor" and disable_edx_services and not devstack
and
ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 16
and
(ansible_distribution_release == 'precise' or ansible_distribution_release == 'trusty')
tags
:
tags
:
-
to-remove
-
to-remove
-
aws-specfic
-
aws-specfic
...
@@ -149,7 +152,7 @@
...
@@ -149,7 +152,7 @@
dest
:
"
/etc/systemd/system/{{
supervisor_service
}}.service"
dest
:
"
/etc/systemd/system/{{
supervisor_service
}}.service"
owner
:
root
owner
:
root
group
:
root
group
:
root
when
:
not (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 16)
when
:
ansible_distribution_release == 'xenial'
tags
:
tags
:
-
install
-
install
-
install:base
-
install:base
...
@@ -213,11 +216,21 @@
...
@@ -213,11 +216,21 @@
-
install
-
install
-
install:configuration
-
install:configuration
# This command and the subsequent check in the when condition are related
# to this bug: https://github.com/ansible/ansible-modules-core/issues/593
-
name
:
Are we in a Docker container
shell
:
echo $(egrep -q 'docker' /proc/self/cgroup && echo 'yes' || echo 'no')
ignore_errors
:
yes
register
:
docker_container
tags
:
-
install
-
install:base
-
name
:
Enable supervisor to start on boot
-
name
:
Enable supervisor to start on boot
service
:
service
:
name
:
"
{{
supervisor_service
}}.service"
name
:
"
{{
supervisor_service
}}.service"
enabled
:
yes
enabled
:
yes
when
:
not (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 16)
when
:
ansible_distribution_release == 'xenial' and docker_container.stdout != 'yes'
tags
:
tags
:
-
install
-
install
-
install:base
-
install:base
...
...
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