old version of spark_ec2
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/c868d71b Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/c868d71b Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/c868d71b Branch: refs/heads/master Commit: c868d71b0ba122906f9041823ef2442578fa06b9 Parents: 0c3797d Author: Reza Zadeh <riz...@gmail.com> Authored: Wed Jan 1 20:08:01 2014 -0800 Committer: Reza Zadeh <riz...@gmail.com> Committed: Wed Jan 1 20:08:01 2014 -0800 ---------------------------------------------------------------------- ec2/spark_ec2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/c868d71b/ec2/spark_ec2.py ---------------------------------------------------------------------- diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index ac309cc..a2b0e7e 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -113,6 +113,16 @@ def parse_args(): # Boto config check # http://boto.cloudhackers.com/en/latest/boto_config_tut.html home_dir = os.getenv('HOME') + if home_dir == None or not os.path.isfile(home_dir + '/.boto'): + if not os.path.isfile('/etc/boto.cfg'): + if os.getenv('AWS_ACCESS_KEY_ID') == None: + print >> stderr, ("ERROR: The environment variable AWS_ACCESS_KEY_ID " + + "must be set") + sys.exit(1) + if os.getenv('AWS_SECRET_ACCESS_KEY') == None: + print >> stderr, ("ERROR: The environment variable AWS_SECRET_ACCESS_KEY " + + "must be set") + sys.exit(1) return (opts, action, cluster_name)