Skip to content
Snippets Groups Projects
Commit 84bf7924 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Made region used by spark-ec2 configurable.

parent 79c82b6c
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,9 @@ def parse_args(): ...@@ -58,7 +58,9 @@ def parse_args():
"WARNING: must be 64-bit; small instances won't work") "WARNING: must be 64-bit; small instances won't work")
parser.add_option("-m", "--master-instance-type", default="", parser.add_option("-m", "--master-instance-type", default="",
help="Master instance type (leave empty for same as instance-type)") help="Master instance type (leave empty for same as instance-type)")
parser.add_option("-z", "--zone", default="us-east-1b", parser.add_option("-r", "--region", default="us-east-1",
help="EC2 region zone to launch instances in")
parser.add_option("-z", "--zone", default="",
help="Availability zone to launch instances in") help="Availability zone to launch instances in")
parser.add_option("-a", "--ami", default="latest", parser.add_option("-a", "--ami", default="latest",
help="Amazon Machine Image ID to use, or 'latest' to use latest " + help="Amazon Machine Image ID to use, or 'latest' to use latest " +
...@@ -438,7 +440,7 @@ def ssh(host, opts, command): ...@@ -438,7 +440,7 @@ def ssh(host, opts, command):
def main(): def main():
(opts, action, cluster_name) = parse_args() (opts, action, cluster_name) = parse_args()
conn = boto.connect_ec2() conn = boto.ec2.connect_to_region(opts.region)
# Select an AZ at random if it was not specified. # Select an AZ at random if it was not specified.
if opts.zone == "": if opts.zone == "":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment