35
35
from boto import ec2
36
36
37
37
# A static URL from which to figure out the latest Mesos EC2 AMI
38
- LATEST_AMI_URL = "https://s3.amazonaws.com/mesos-images/ids/latest-spark-0.6 "
38
+ LATEST_AMI_URL = "https://s3.amazonaws.com/mesos-images/ids/latest-spark-0.7 "
39
39
40
40
41
41
# Configure and parse our command-line arguments
@@ -83,16 +83,16 @@ def parse_args():
83
83
help = "If specified, launch slaves as spot instances with the given " +
84
84
"maximum price (in dollars)" )
85
85
parser .add_option ("--cluster-type" , type = "choice" , metavar = "TYPE" ,
86
- choices = ["mesos" , "standalone" ], default = "mesos " ,
86
+ choices = ["mesos" , "standalone" ], default = "standalone " ,
87
87
help = "'mesos' for a Mesos cluster, 'standalone' for a standalone " +
88
- "Spark cluster (default: mesos )" )
88
+ "Spark cluster (default: standalone )" )
89
89
parser .add_option ("--ganglia" , action = "store_true" , default = True ,
90
90
help = "Setup Ganglia monitoring on cluster (default: on). NOTE: " +
91
91
"the Ganglia page will be publicly accessible" )
92
92
parser .add_option ("--no-ganglia" , action = "store_false" , dest = "ganglia" ,
93
93
help = "Disable Ganglia monitoring for the cluster" )
94
- parser .add_option ("--new -scripts" , action = "store_true" , default = False ,
95
- help = "Use new spark -ec2 scripts, for Spark > = 0.7 AMIs" )
94
+ parser .add_option ("--old -scripts" , action = "store_true" , default = False ,
95
+ help = "Use old mesos -ec2 scripts, for Spark < = 0.6 AMIs" )
96
96
parser .add_option ("-u" , "--user" , default = "root" ,
97
97
help = "The SSH user you want to connect as (default: root)" )
98
98
parser .add_option ("--delete-groups" , action = "store_true" , default = False ,
@@ -383,7 +383,7 @@ def setup_cluster(conn, master_nodes, slave_nodes, zoo_nodes, opts, deploy_ssh_k
383
383
if opts .ganglia :
384
384
modules .append ('ganglia' )
385
385
386
- if opts .new_scripts :
386
+ if not opts .old_scripts :
387
387
# NOTE: We should clone the repository before running deploy_files to
388
388
# prevent ec2-variables.sh from being overwritten
389
389
ssh (master , opts , "rm -rf spark-ec2 && git clone https://github.com/mesos/spark-ec2.git" )
@@ -393,7 +393,7 @@ def setup_cluster(conn, master_nodes, slave_nodes, zoo_nodes, opts, deploy_ssh_k
393
393
zoo_nodes , modules )
394
394
395
395
print "Running setup on master..."
396
- if not opts .new_scripts :
396
+ if opts .old_scripts :
397
397
if opts .cluster_type == "mesos" :
398
398
setup_mesos_cluster (master , opts )
399
399
elif opts .cluster_type == "standalone" :
0 commit comments