You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 05:24:25 UTC

svn commit: r1131571 - in /incubator/mesos/trunk/src/ec2: deploy.karmic64/root/nexus-ec2/setup nexus_ec2.py

Author: benh
Date: Sun Jun  5 03:24:24 2011
New Revision: 1131571

URL: http://svn.apache.org/viewvc?rev=1131571&view=rev
Log:
Adds --branch option parameter to EC2 script. Closes #30.

Modified:
    incubator/mesos/trunk/src/ec2/deploy.karmic64/root/nexus-ec2/setup
    incubator/mesos/trunk/src/ec2/nexus_ec2.py

Modified: incubator/mesos/trunk/src/ec2/deploy.karmic64/root/nexus-ec2/setup
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/ec2/deploy.karmic64/root/nexus-ec2/setup?rev=1131571&r1=1131570&r2=1131571&view=diff
==============================================================================
--- incubator/mesos/trunk/src/ec2/deploy.karmic64/root/nexus-ec2/setup (original)
+++ incubator/mesos/trunk/src/ec2/deploy.karmic64/root/nexus-ec2/setup Sun Jun  5 03:24:24 2011
@@ -1,6 +1,7 @@
 #!/bin/bash
 OS_NAME=$1
 DOWNLOAD_METHOD=$2
+BRANCH=$3
 
 # Set PATH to include Scala
 export PATH=$PATH:/root/scala-2.7.7.final/bin
@@ -82,6 +83,7 @@ if [[ "$DOWNLOAD_METHOD" == "git" ]] ; t
   rm -rf nexus nexus.tgz
   # Set git SSH command to a script that uses -o StrictHostKeyChecking=no
   GIT_SSH=/root/nexus-ec2/ssh-no-keychecking git clone $REPOSITORY nexus
+  GIT_SSH=/root/nexus-ec2/ssh-no-keychecking git checkout $BRANCH
   popd > /dev/null 2>&1
   DOWNLOADED=1
 elif [[ "$DOWNLOAD_METHOD" == "web" ]] ; then

Modified: incubator/mesos/trunk/src/ec2/nexus_ec2.py
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/ec2/nexus_ec2.py?rev=1131571&r1=1131570&r2=1131571&view=diff
==============================================================================
--- incubator/mesos/trunk/src/ec2/nexus_ec2.py (original)
+++ incubator/mesos/trunk/src/ec2/nexus_ec2.py Sun Jun  5 03:24:24 2011
@@ -40,6 +40,8 @@ def parse_args():
       help="Where to download latest code from: set to 'git' to check out " +
            "from git, 'web' for latest snapshot .tgz, or 'none' to use " +
            "the build of Nexus on the AMI (default)")
+  parser.add_option("-b", "--branch", default="master",
+      help="if using git, which branch to check out. default is 'master'")
   parser.add_option("-D", metavar="[ADDRESS:]PORT", dest="proxy_port", 
       help="Use SSH dynamic port forwarding to create a SOCKS proxy at " +
             "the given local address (for use with login)")
@@ -235,7 +237,7 @@ def main():
     scp(master, opts, opts.identity_file, '/root/.ssh/id_rsa')
     print "Running setup on master..."
     ssh(master, opts, "chmod u+x nexus-ec2/setup")
-    ssh(master, opts, "nexus-ec2/setup %s %s" % (opts.os, opts.download))
+    ssh(master, opts, "nexus-ec2/setup %s %s %s" % (opts.os, opts.download, opts.branch))
     print "Done!"
   elif action == "shutdown":
     response = raw_input("Are you sure you want to shut down the cluster " +