[Swift-commit] r7657 - SwiftApps/cloud
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Sat Mar 8 17:22:20 CST 2014
Author: ketan
Date: 2014-03-08 17:22:20 -0600 (Sat, 08 Mar 2014)
New Revision: 7657
Added:
SwiftApps/cloud/README
SwiftApps/cloud/remnodes
Removed:
SwiftApps/cloud/rem
Modified:
SwiftApps/cloud/coaster-service.conf
SwiftApps/cloud/runme.sh
Log:
adding a readme
Added: SwiftApps/cloud/README
===================================================================
--- SwiftApps/cloud/README (rev 0)
+++ SwiftApps/cloud/README 2014-03-08 23:22:20 UTC (rev 7657)
@@ -0,0 +1,19 @@
+Toolkit to run Swift applications over Amazon EC2 cloud
+========================================================
+
+0. Installation and setup of EC2 commandline tools is assumed. If you do not have already, please find instructions of getting EC2 api from here:
+http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html
+
+1. Install Swift
+
+2. Configure coaster-service.conf
+
+3. Start coaster service
+
+4. Start Swift run
+
+5. Manage resources:
+ a. Add EC2 compute instances
+ b. Remove EC2 compute instances
+ c. Monitor resources
+
Modified: SwiftApps/cloud/coaster-service.conf
===================================================================
--- SwiftApps/cloud/coaster-service.conf 2014-03-08 23:21:38 UTC (rev 7656)
+++ SwiftApps/cloud/coaster-service.conf 2014-03-08 23:22:20 UTC (rev 7657)
@@ -16,14 +16,14 @@
# Worker logging setting passed to worker.pl for sites.xml
export WORKER_LOGGING_LEVEL=NONE
-export SSH_TUNNELING=no
+export SSH_TUNNELING=yes
# User name to use for all systems
export WORKER_USERNAME=root
# Worker host names for ssh
-export WORKER_HOSTS="54.243.24.154"
-#export WORKER_HOSTS="ip-10-36-196-96.eu-west-1.compute.internal ip-10-36-195-69.eu-west-1.compute.internal"
+#export WORKER_HOSTS="54.243.24.154"
+export WORKER_HOSTS=
# Directory to keep log files, relative to working directory when launching start-coaster-service
export LOG_DIR=logs
@@ -38,21 +38,20 @@
# start-coaster-service tries to automatically detect IP address.
# Specify here if auto detection is not working correctly
#trounce
-#export IPADDR="140.221.8.80"
export IPADDR=
# Below are various settings to give information about how to create sites.xml
export WORK=/tmp/ketan
-export JOBS_PER_NODE=1
-export JOBSPERNODE=1
-#export JOBTHROTTLE=$( echo "scale=5; ($JOBS_PER_NODE * $( echo $WORKER_HOSTS | wc -w ))/100 - 0.00001"|bc )
-export JOBTHROTTLE=20
+export JOBS_PER_NODE=2
+export JOBSPERNODE=2
+export JOBTHROTTLE=$( echo "scale=5; ( $JOBS_PER_NODE * $(echo $WORKER_HOSTS | wc -w ))/100 - 0.00001 + 10.0 "|bc )
+#export JOBTHROTTLE=20
# Swift applications
#app cat=/bin/cat
#app bash=/bin/bash
#app echo=/bin/echo
-export WORKERURL="http://140.221.9.216:50001"
+export WORKERURL="http://localhost:50003"
export PID_FILE="/homes/ketan/.swift/.coaster-service-pids"
export LOG="start-coaster-service.log"
-export LOCAL_PORT="50001"
+export LOCAL_PORT="50003"
Deleted: SwiftApps/cloud/rem
===================================================================
--- SwiftApps/cloud/rem 2014-03-08 23:21:38 UTC (rev 7656)
+++ SwiftApps/cloud/rem 2014-03-08 23:22:20 UTC (rev 7657)
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-#set -x
-
-usage (){
- printf "Usage: %s -a \"<space separated ip addresses in quotes>\" | -n <nodecount> \n" "${0}"
-}
-
-rem_instance() {
- MACHINE=$1
- #ec2din | grep 54.243.24.154 | awk '{print $2}'
- instanceid=$(ec2din | grep $1 | awk '{print $2}')
- ec2kill $instanceid
- # Connect directly
- return 0
-}
-
-rembyip (){
- echo "$@"
- for i in "$@" ; do
- rem_instance $i
- done
-}
-
-rembynum (){
- #ec2-run-instance -k <key-name> -n 1 -g <groupname> --instance-type <type> <ami-id>
- for i in $(seq 1 $1); do
- ip=$(ec2din | grep running | head -1 | awk '{print $15}')
- rem_instance "${ip}"
- sleep 15
- done
-}
-
-#use getopts to check user options
-while getopts ":a:n:" o ; do
- case $o in
- a)
- rembyip ${OPTARG}
- ;;
-
- n)
- rembynum ${OPTARG}
- ;;
-
- *)
- usage
- ;;
- esac
-done
-
Copied: SwiftApps/cloud/remnodes (from rev 7654, SwiftApps/cloud/rem)
===================================================================
--- SwiftApps/cloud/remnodes (rev 0)
+++ SwiftApps/cloud/remnodes 2014-03-08 23:22:20 UTC (rev 7657)
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+#set -x
+
+usage (){
+ printf "Usage: %s -a \"<space separated ip addresses in quotes>\" | -n <nodecount> \n" "${0}"
+}
+
+rem_instance() {
+ MACHINE=$1
+ #ec2din | grep 54.243.24.154 | awk '{print $2}'
+ instanceid=$(ec2din | grep $1 | awk '{print $2}')
+ ec2kill $instanceid
+ # Connect directly
+ return 0
+}
+
+rembyip (){
+ echo "$@"
+ for i in "$@" ; do
+ rem_instance $i
+ done
+}
+
+rembynum (){
+ #ec2-run-instance -k <key-name> -n 1 -g <groupname> --instance-type <type> <ami-id>
+ for i in $(seq 1 $1); do
+ ip=$(ec2din | grep running | head -1 | awk '{print $15}')
+ rem_instance "${ip}"
+ sleep 15
+ done
+}
+
+#use getopts to check user options
+while getopts ":a:n:" o ; do
+ case $o in
+ a)
+ rembyip ${OPTARG}
+ ;;
+
+ n)
+ rembynum ${OPTARG}
+ ;;
+
+ *)
+ usage
+ ;;
+ esac
+done
+
Modified: SwiftApps/cloud/runme.sh
===================================================================
--- SwiftApps/cloud/runme.sh 2014-03-08 23:21:38 UTC (rev 7656)
+++ SwiftApps/cloud/runme.sh 2014-03-08 23:22:20 UTC (rev 7657)
@@ -1 +1 @@
-swift -sites.file sites.xml -tc.file tc -config cf catsnsleep.swift -s=20 -n=200
+swift -sites.file sites.xml -tc.file apps -config cf catsnsleep.swift -s=20 -n=200
More information about the Swift-commit
mailing list