Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EC2] name ec2 instances and security groups consistently #1344

Closed
wants to merge 9 commits into from
Closed

[EC2] name ec2 instances and security groups consistently #1344

wants to merge 9 commits into from

Conversation

nchammas
Copy link
Contributor

@nchammas nchammas commented Jul 9, 2014

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.

merging upstream updates
This update gives launched EC2 instances descriptive names by using
instance tags. Launched instances now show up in the EC2 console with
these names.

I used `format()` with named parameters, which I believe is the
recommended practice for string formatting in Python, but which doesn’t
seem to be used elsewhere in the script.
pulling upstream updates
Merge upstream updates
merging upstream updates
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.
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@nchammas
Copy link
Contributor Author

nchammas commented Jul 9, 2014

For what it's worth, I think spark-ec2 should somehow tag all the instances it launches with the word "Spark" so that they are easy to find in the EC2 console.

Perhaps a separate tag on each instance would suffice? Or is it OK to prepend spark- to the security group names (as well as the instance names)?

@pwendell
Copy link
Contributor

pwendell commented Jul 9, 2014

Hey @nchammas - If users want to select all spark clusters, can't they just name their clusters spark-XXX? The cluster name is only used for these tags (IIRC) so it's not like there is some other place they might want to have a different name. I would worry a bit about changing the naming now because I know people automate things around these ec2 scripts and this would introduce a change that is not backwards compatible since we'd coerce spark- into the name.

I definitely think making the tagging the same everywhere is good, i.e. I like this change as it currently stands!

@nchammas
Copy link
Contributor Author

nchammas commented Jul 9, 2014

If users want to select all spark clusters, can't they just name their clusters spark-XXX?

Absolutely, and I think that's fine.

I would worry a bit about changing the naming now because I know people automate things around these ec2 scripts and this would introduce a change that is not backwards compatible since we'd coerce spark- into the name.

Yes, that is my concern too, which is why I opted for removing the spark- from the instance tags as opposed to adding it in to the security group names.

I originally made the change to add instance name tagging in, and it's not in the 1.0.0 release, so I think it's safe to change the instance name tags as long as it makes it in to the next release.

One way or the other, the next release will be the first where spark-ec2 tags instances with names.

Functions in Python should be preceded by 2 blank lines, not 1.
@nchammas
Copy link
Contributor Author

@pwendell - Should I specifically mention you when responding, or is that not necessary? Just making sure you got my response.

Anyway, in summary, I think it is safe to merge this in for the 1.0.1 release, since instance name tagging does not exist at all in 1.0.0.

@pwendell
Copy link
Contributor

Okay sounds good, I was actually okay to change the instance tags anyways because it was a very new feature, but even better if it was never in a release. So let's just merge this as-is.

BTW - this will end up in 1.1.0 which is the next feature release. 1.0.1 is just a bug-fix release that actually has already finished voting and will be packaging soon.

No need to mention me, I check all of the PR's that I've commented on if someone updates them!

@pwendell
Copy link
Contributor

Jenkins, test this please.

@pwendell
Copy link
Contributor

LGTM pending tests.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jul 10, 2014

QA tests have started for PR 1344. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16504/consoleFull

@nchammas
Copy link
Contributor Author

OK, sounds good to me!

@SparkQA
Copy link

SparkQA commented Jul 10, 2014

QA results for PR 1344:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16504/consoleFull

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16504/

@asfgit asfgit closed this in 369aa84 Jul 10, 2014
@nchammas nchammas changed the title name ec2 instances and security groups consistently [EC2] name ec2 instances and security groups consistently Aug 30, 2014
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
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.

Author: Nicholas Chammas <nicholas.chammas@gmail.com>
Author: nchammas <nicholas.chammas@gmail.com>

Closes apache#1344 from nchammas/master and squashes the following commits:

f7e4581 [Nicholas Chammas] unrelated pep8 fix
a36eed0 [Nicholas Chammas] name ec2 instances and security groups consistently
de7292a [nchammas] Merge pull request apache#4 from apache/master
2e4fe00 [nchammas] Merge pull request apache#3 from apache/master
89fde08 [nchammas] Merge pull request apache#2 from apache/master
69f6e22 [Nicholas Chammas] PEP8 fixes
2627247 [Nicholas Chammas] broke up lines before they hit 100 chars
6544b7e [Nicholas Chammas] [SPARK-2065] give launched instances names
69da6cf [nchammas] Merge pull request apache#1 from apache/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants