You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jo...@apache.org on 2015/10/29 21:09:26 UTC
spark git commit: [SPARK-10532][EC2] Added --profile option to
specify the name of profile
Repository: spark
Updated Branches:
refs/heads/master a01cbf5da -> f21ef8dbb
[SPARK-10532][EC2] Added --profile option to specify the name of profile
"profiles" give us the way that you can specify the set of credentials you want to use when you initialize a connection to AWS.
You can keep multiple sets of credentials in the same credentials files using different profile names.
For example, you can use --profile option to do that when you use "aws cli tool".
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
Author: teramonagi <te...@gmail.com>
Closes #8696 from teramonagi/SPARK-10532.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f21ef8db
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f21ef8db
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f21ef8db
Branch: refs/heads/master
Commit: f21ef8dbb2ef6526b8b47e18b9d8d91dd520c086
Parents: a01cbf5
Author: teramonagi <te...@gmail.com>
Authored: Thu Oct 29 10:54:04 2015 -0700
Committer: Josh Rosen <jo...@databricks.com>
Committed: Thu Oct 29 13:08:55 2015 -0700
----------------------------------------------------------------------
ec2/spark_ec2.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/f21ef8db/ec2/spark_ec2.py
----------------------------------------------------------------------
diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py
index 3a2361c..9327e21 100755
--- a/ec2/spark_ec2.py
+++ b/ec2/spark_ec2.py
@@ -182,6 +182,10 @@ def parse_args():
"-i", "--identity-file",
help="SSH private key file to use for logging into instances")
parser.add_option(
+ "-p", "--profile", default=None,
+ help="If you have multiple profiles (AWS or boto config), you can configure " +
+ "additional, named profiles by using this option (default: %default)")
+ parser.add_option(
"-t", "--instance-type", default="m1.large",
help="Type of instance to launch (default: %default). " +
"WARNING: must be 64-bit; small instances won't work")
@@ -1315,7 +1319,10 @@ def real_main():
sys.exit(1)
try:
- conn = ec2.connect_to_region(opts.region)
+ if opts.profile is None:
+ conn = ec2.connect_to_region(opts.region)
+ else:
+ conn = ec2.connect_to_region(opts.region, profile_name=opts.profile)
except Exception as e:
print((e), file=stderr)
sys.exit(1)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org