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
17414a6e
Commit
17414a6e
authored
Jan 27, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #700 from edx/jarv/stop-services-role
Jarv/stop services role
parents
2cd75156
5e551d86
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
2 deletions
+144
-2
playbooks/edx-east/stop_all_edx_services.yml
+6
-0
playbooks/roles/stop_all_edx_services/defaults/main.yml
+17
-0
playbooks/roles/stop_all_edx_services/handlers/main.yml
+56
-0
playbooks/roles/stop_all_edx_services/tasks/main.yml
+62
-0
util/vpc-tools/abbey.py
+3
-2
No files found.
playbooks/edx-east/stop_all_edx_services.yml
0 → 100644
View file @
17414a6e
-
name
:
Stop all services
hosts
:
all
sudo
:
True
gather_facts
:
False
roles
:
-
stop_all_edx_services
playbooks/roles/stop_all_edx_services/defaults/main.yml
0 → 100644
View file @
17414a6e
---
#
# 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
#
##
# Defaults for role stop_all_edx_services
#
#
# vars are namespace with the module name.
#
stop_all_edx_services_role_name
:
stop_all_edx_services
playbooks/roles/stop_all_edx_services/handlers/main.yml
0 → 100644
View file @
17414a6e
---
#
# 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 stop_all_edx_services
#
# Overview:
#
# This stops all services on an edX server
# so that everything is shutdown prior to creating
# an AMI.
#
#
-
name
:
stop supervisor
service
:
name=supervisor state=stopped
-
name
:
stop supervisor.devpi
service
:
name=supervisor.devpi state=stopped
-
name
:
stop nginx
service
:
name=nginx state=stopped
-
name
:
stop rabbitmq-server
service
:
name=rabbitmq-server state=stopped
-
name
:
stop mysql
service
:
name=mysql state=stopped
-
name
:
stop memcached
service
:
name=memcached state=stopped
-
name
:
stop supervisor.devpi
service
:
name=supervisor.devpi state=stopped
-
name
:
stop nginx
service
:
name=nginx state=stopped
-
name
:
stop rabbitmq-server
service
:
name=rabbitmq-server state=stopped
-
name
:
stop mongodb
service
:
name=mongodb state=stopped
-
name
:
kill processes by user
shell
:
pkill -u {{ item }} ||
true
with_items
:
-
www-data
-
devpi.supervisor
-
rabbitmq
playbooks/roles/stop_all_edx_services/tasks/main.yml
0 → 100644
View file @
17414a6e
---
#
# 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
#
#
#
# Tasks for role stop_all_edx_services
#
# Overview:
#
# This stops all services on an edX server
# so that everything is shutdown prior to creating
# an AMI.
#
# Example play:
# roles:
# - stop_all_edx_services
#
#
-
name
:
stop supervisor
stat
:
path=/etc/init/supervisor.conf
register
:
stat_out
changed_when
:
stat_out.stat.exists
notify
:
stop supervisor
-
name
:
stop supervisor.devpi
stat
:
path=/etc/init/supervisor.devpi.conf
register
:
stat_out
changed_when
:
stat_out.stat.exists
notify
:
stop supervisor
-
name
:
stop nginx
stat
:
path=/etc/init.d/nginx
register
:
stat_out
changed_when
:
stat_out.stat.exists
notify
:
stop nginx
-
name
:
stop rabbitmq-server
stat
:
path=/etc/init.d/rabbitmq-server
register
:
stat_out
changed_when
:
stat_out.stat.exists
notify
:
stop rabbitmq-server
-
name
:
stop memcached
stat
:
path=/etc/init.d/memcached
register
:
stat_out
changed_when
:
stat_out.stat.exists
notify
:
stop memcached
-
name
:
stop mongodb
stat
:
path=/etc/init.d/mongodb
register
:
stat_out
changed_when
:
stat_out.stat.exists
notify
:
stop mongodb
-
shell
:
"
true"
notify
:
kill processes by user
util/vpc-tools/abbey.py
View file @
17414a6e
...
...
@@ -23,7 +23,7 @@ AMI_TIMEOUT = 600 # time to wait for AMIs to complete
EC2_RUN_TIMEOUT
=
180
# time to wait for ec2 state transition
EC2_STATUS_TIMEOUT
=
300
# time to wait for ec2 system status checks
NUM_TASKS
=
5
# number of tasks for time summary report
NUM_PLAYBOOKS
=
3
NUM_PLAYBOOKS
=
4
class
MongoConnection
:
...
...
@@ -348,6 +348,7 @@ cd $playbook_dir
ansible-playbook -vvvv -c local -i "localhost," $play.yml -e@$extra_vars -e@$common_vars_file
ansible-playbook -vvvv -c local -i "localhost," datadog.yml -e@$extra_vars -e@$common_vars_file
ansible-playbook -vvvv -c local -i "localhost," splunkforwarder.yml -e@$extra_vars -e@$common_vars_file
ansible-playbook -vvvv -c local -i "localhost," stop_all_edx_services.yml -e@$extra_vars -e@$common_vars_file
rm -rf $base_dir
...
...
@@ -547,7 +548,7 @@ def launch_and_configure(ec2_args):
res
=
ec2
.
run_instances
(
**
ec2_args
)
inst
=
res
.
instances
[
0
]
instance_id
=
inst
.
id
print
"{:<40}"
.
format
(
"Waiting for instance {} to reach running status:"
.
format
(
instance_id
)),
status_start
=
time
.
time
()
...
...
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