Skip to content

Commit

Permalink
name ec2 instances and security groups consistently
Browse files Browse the repository at this point in the history
Security groups created by spark-ec2 do not prepend “spark-“ to the
name.

Since naming the instances themselves is new to spark-ec2, it’s better
to change that pattern to match the existing naming pattern for the
security groups, rather than the other way around.
  • Loading branch information
nchammas committed Jul 9, 2014
1 parent de7292a commit a36eed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ec2/spark_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,11 @@ def launch_cluster(conn, opts, cluster_name):
for master in master_nodes:
master.add_tag(
key='Name',
value='spark-{cn}-master-{iid}'.format(cn=cluster_name, iid=master.id))
value='{cn}-master-{iid}'.format(cn=cluster_name, iid=master.id))
for slave in slave_nodes:
slave.add_tag(
key='Name',
value='spark-{cn}-slave-{iid}'.format(cn=cluster_name, iid=slave.id))
value='{cn}-slave-{iid}'.format(cn=cluster_name, iid=slave.id))

# Return all the instances
return (master_nodes, slave_nodes)
Expand Down

0 comments on commit a36eed0

Please sign in to comment.