Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- USERNAME=#Fill this in!
- function startVM {
- echo "Starting $2 on $1"
- printf -v __ %q "$2"
- ssh ${USERNAME}@$1 "~/courses/seng462/scripts/vm-reg-start.sh $__"
- echo "" # padding
- }
- function stopVM {
- echo "Stopping $2 on $1"
- printf -v __ %q "$2"
- ssh ${USERNAME}@$1 "VBoxManage controlvm $__ acpipowerbutton"
- echo ""
- }
- if [ "$1" = "start" ]; then
- ACTION=startVM
- elif [ "$1" = "stop" ]; then
- ACTION=stopVM
- else
- echo "Usage: $0 [start|stop]"
- exit 1
- fi
- # Doesn't really matter which order the VMs are started but we'll mirror
- # the service startup process
- # Begin with RMQ
- ${ACTION} b149 RMQ
- # Supporting services
- ${ACTION} b144 quote_manager
- ${ACTION} b143 audit_logger
- # Workers
- ${ACTION} b130 WORKER_1
- ${ACTION} b131 WORKER_2
- ${ACTION} b132 WORKER_3
- ${ACTION} b133 WORKER_4
- ${ACTION} b134 WORKER_5
- ${ACTION} b135 WORKER_6
- ${ACTION} b136 WORKER_7
- ${ACTION} b137 WORKER_8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement