[Swift-commit] r7636 - SwiftApps/cloud
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Thu Mar 6 12:10:49 CST 2014
Author: ketan
Date: 2014-03-06 12:10:49 -0600 (Thu, 06 Mar 2014)
New Revision: 7636
Modified:
SwiftApps/cloud/addnodes
Log:
add nodes by ip working now
Modified: SwiftApps/cloud/addnodes
===================================================================
--- SwiftApps/cloud/addnodes 2014-03-06 16:39:07 UTC (rev 7635)
+++ SwiftApps/cloud/addnodes 2014-03-06 18:10:49 UTC (rev 7636)
@@ -2,17 +2,6 @@
#set -x
-#env vars needed from start-coaster-service
-#WORKER_USERNAME="root" #FIXME
-#LOCALPORT="50001"
-#WORKERURL="http://140.221.8.75:50001"
-#SSH_TUNNELING="yes"
-#WORKER_LOCATION="/root"
-#WORKER_LOGGING_LEVEL="NONE"
-#WORKER_LOG_DIR="/root/workerlog"
-#LOG="/tmp/worker.log"
-#PID_FILE="/tmp/worker.pid"
-
# Import settings
if [ -f "coaster-service.conf" ]; then
CONFIG_FILE="coaster-service.conf"
@@ -21,7 +10,6 @@
fi
echo "Configuration: $CONFIG_FILE"
-sleep 1
source $CONFIG_FILE
WORKER=$(\which worker.pl)
@@ -45,7 +33,7 @@
echo $! >> $PID_FILE
}
-start-worker-ssh() {
+start_worker_ssh() {
MACHINE=$1
# Enable ssh tunneling if needed
if [ "$SSH_TUNNELING" == "yes" ]; then
@@ -61,18 +49,20 @@
addbyip (){
echo "$@"
- #nodeid="stomp"
+ for i in "$@" ; do
+ start_worker_ssh $i
+ done
}
addbynum (){
echo "$1"
- #ec2-run-instance -k <key-name> -n 1 <ami-id>
+ #ec2-run-instance -k <key-name> -n 1 -g <groupname> --instance-type <type> <ami-id>
runinst=$(ec2-run-instance -k "$KEYPAIR" -g all -n "$1" --instance-type t1.micro "$AMI")
echo "Waiting for instances to start"
sleep 90
for i in $(echo $runinst | grep -o '\bi-........\b'); do
ip=$(ec2din $i | grep 'running' | awk '{print $15}')
- start-worker-ssh $ip
+ start_worker_ssh $ip
done
}
@@ -93,9 +83,3 @@
esac
done
-# Add cloud resources to existing pool
-#1. Start the number of instances requested by user
-#2. scp worker to remote host
-#scp worker.pl username@${nodeid}:~/
-#3. Start worker manually
-# WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL $WORKER_LOCATION/worker.pl http://$IPADDR:$LOCAL_PORT $MACHINE $WORKER_LOG_DIR
More information about the Swift-commit
mailing list