hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r927666 - in /hadoop/hbase/trunk/contrib/ec2/bin: hbase-ec2-env.sh launch-hbase-master launch-hbase-zookeeper terminate-hbase-cluster
Date Fri, 26 Mar 2010 01:52:37 GMT
Author: apurtell
Date: Fri Mar 26 01:52:37 2010
New Revision: 927666

URL: http://svn.apache.org/viewvc?rev=927666&view=rev
Log:
[EC2] make use of elastic IPs optional, and disabled by default

Modified:
    hadoop/hbase/trunk/contrib/ec2/bin/hbase-ec2-env.sh
    hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-master
    hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-zookeeper
    hadoop/hbase/trunk/contrib/ec2/bin/terminate-hbase-cluster

Modified: hadoop/hbase/trunk/contrib/ec2/bin/hbase-ec2-env.sh
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/contrib/ec2/bin/hbase-ec2-env.sh?rev=927666&r1=927665&r2=927666&view=diff
==============================================================================
--- hadoop/hbase/trunk/contrib/ec2/bin/hbase-ec2-env.sh (original)
+++ hadoop/hbase/trunk/contrib/ec2/bin/hbase-ec2-env.sh Fri Mar 26 01:52:37 2010
@@ -53,6 +53,9 @@ S3_BUCKET=apache-hbase-images
 # Enable public access web interfaces
 ENABLE_WEB_PORTS=false
 
+# Enable mapping of elastic IPs to ZK and master instances
+ENABLE_ELASTIC_IPS=false
+
 # Extra packages
 # Allows you to add a private Yum repo and pull packages from it as your
 # instances boot up. Format is <repo-descriptor-URL> <pkg1> ... <pkgN>

Modified: hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-master
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-master?rev=927666&r1=927665&r2=927666&view=diff
==============================================================================
--- hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-master (original)
+++ hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-master Fri Mar 26 01:52:37 2010
@@ -68,8 +68,10 @@ sed -e "s|%ZOOKEEPER_QUORUM%|$quorum|" \
     "$bin"/$USER_DATA_FILE > "$bin"/$USER_DATA_FILE.master
 
 inst=`ec2-run-instances $AMI_IMAGE $TOOL_OPTS -n 1 -g $CLUSTER_MASTER -k root -f "$bin"/$USER_DATA_FILE.master
-t $type | grep INSTANCE | awk '{print $2}'`
-addr=`ec2-allocate-address $TOOL_OPTS | awk '{print $2}'`
-ec2-associate-address $TOOL_OPTS $addr -i $inst
+if [ "$ENABLE_ELASTIC_IPS" = "true" ] ; then
+  addr=`ec2-allocate-address $TOOL_OPTS | awk '{print $2}'`
+  ec2-associate-address $TOOL_OPTS $addr -i $inst
+fi
 echo -n "Waiting for instance $inst to start"
 while true; do
   printf "."
@@ -102,4 +104,4 @@ done
 scp $SSH_OPTS $EC2_ROOT_SSH_KEY "root@$host:/root/.ssh/id_rsa"
 ssh $SSH_OPTS "root@$host" "chmod 600 /root/.ssh/id_rsa"
 
-echo "Master is $host ($addr) in zone $zone"
+echo "Master is $host in zone $zone"

Modified: hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-zookeeper
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-zookeeper?rev=927666&r1=927665&r2=927666&view=diff
==============================================================================
--- hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-zookeeper (original)
+++ hadoop/hbase/trunk/contrib/ec2/bin/launch-hbase-zookeeper Fri Mar 26 01:52:37 2010
@@ -53,8 +53,10 @@ i=0
 while [ $i -lt $NO_INSTANCES ] ; do
   echo "Starting an AMI with ID $ZOO_AMI_IMAGE (arch $arch) in group $CLUSTER_ZOOKEEPER"
   inst=`ec2-run-instances $ZOO_AMI_IMAGE $TOOL_OPTS -n 1 -g $CLUSTER_ZOOKEEPER -k root -t
$type | grep INSTANCE | awk '{print $2}'`
-  addr=`ec2-allocate-address $TOOL_OPTS | awk '{print $2}'`
-  ec2-associate-address $TOOL_OPTS $addr -i $inst
+  if [ "$ENABLE_ELASTIC_IPS" = "true" ] ; then
+    addr=`ec2-allocate-address $TOOL_OPTS | awk '{print $2}'`
+    ec2-associate-address $TOOL_OPTS $addr -i $inst
+  fi
   echo -n "Waiting for instance $inst to start: "
   while true; do
     printf "."
@@ -66,7 +68,6 @@ while [ $i -lt $NO_INSTANCES ] ; do
     sleep 1
   done
   host=`ec2-describe-instances $TOOL_OPTS $inst | grep INSTANCE | awk '{print $4}'`
-  echo "Associated elastic IP $host ($addr) with instance $INSTANCE"
   peers="$peers $host"
   peer_addrs="$peer_addrs $addr"
   i=$(($i + 1))

Modified: hadoop/hbase/trunk/contrib/ec2/bin/terminate-hbase-cluster
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/contrib/ec2/bin/terminate-hbase-cluster?rev=927666&r1=927665&r2=927666&view=diff
==============================================================================
--- hadoop/hbase/trunk/contrib/ec2/bin/terminate-hbase-cluster (original)
+++ hadoop/hbase/trunk/contrib/ec2/bin/terminate-hbase-cluster Fri Mar 26 01:52:37 2010
@@ -46,13 +46,14 @@ fi
 ec2-terminate-instances $TOOL_OPTS `echo "$HBASE_INSTANCES" | awk '{print $2}'`
 
 # clean up elastic IPs
-
-# master
-ec2-release-address $TOOL_OPTS `cat $MASTER_IP_PATH`
-# zookeeper quorum ensemble
-for addr in `cat $ZOOKEEPER_ADDR_PATH` ; do
-  ec2-release-address $TOOL_OPTS $addr
-done
+if [ "$ENABLE_ELASTIC_IPS" = "true" ] ; then
+  # master
+  ec2-release-address $TOOL_OPTS `cat $MASTER_IP_PATH`
+  # zookeeper quorum ensemble
+  for addr in `cat $ZOOKEEPER_ADDR_PATH` ; do
+    ec2-release-address $TOOL_OPTS $addr
+  done
+fi
 
 # clean up state files
 



Mime
View raw message