Repository navigation
Add ec2 provisioner - #16
Conversation
|
Hi Adam, Thank you for this PR. I would like to suggest a couple of edits:
I'll checkout the code after that. 👍 Alex |
alexellis
left a comment
There was a problem hiding this comment.
Just a few comments / suggestions.
|
LGTM, great work @adamjohnson01! Out of curiosity @alexellis: I noticed that the vendored packages are checked in, is that intentional? |
|
@mhausenblas, I ran a dep ensure after adding the provisioner. Do you not want vendor checked in? |
|
AFAIK when using dep, the packages are generally checked-in. |
alexellis
left a comment
There was a problem hiding this comment.
Thank you for this PR and to Michael for the review. I have requested a few minor changes around prints, also have a question on the security group management and on how this was tested (outputs etc).
|
@adamjohnson01 as I pointed out in this article it's a project policy decision if deps are checked in or not. Seems @alexellis has opted for having them in Git, so we're good. That being said, is there any reason why not to use |
|
I've seen very few big projects use dep and then not commit the vendor folder, but of course it is possible to ask developers and CI to run "dep ensure" after every sync of git.
inlets, k3sup, derek etc all fall under the same contributing guide and community of contributors / host company (OpenFaaS Ltd): https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md#i-need-to-add-a-dependency |
| status = ActiveStatus | ||
| } | ||
|
|
||
| d, err := p.ec2Provisioner.DescribeInstances(&ec2.DescribeInstancesInput{ |
There was a problem hiding this comment.
Is DescribeInstanceStatus and DescribeInstances required here, if we know the instance will not be up immediately after the provisioning call?
This feels like it should belong in the Status function
There was a problem hiding this comment.
I am not sure what you mean, this is in the Status function.
There was a problem hiding this comment.
My mistake, the diff must have been showing a merged view.
alexellis
left a comment
There was a problem hiding this comment.
Hi Adam, it seems like the code is still blocking, which is not desired for the event-loop which will also be used in the Kubernetes operator.
Provision (fast, non-blocking)
Loop check status (fast, non-blocking)
Print IP (fast, non-blocking)
The same should be the case for Delete.
Could you amend, re-test and then squash the commits into one? Let me know if you have any questions.
|
This will be a great addition btw. |
Add a provisioner for deploying exit nodes to AWS EC2 Signed-off-by: Adam Johnson <a.johnson@winton.com>
|
@alexellis , I have removed as much of the blocking as I can. The blocking in the delete function is required as the security group cannot be deleted while the instance exists. |
|
Thank you, and that's fair, do we need to document it with a comment? Additive commits are fine, when they are not reworking behaviour. |
|
I see you have the comment, awesome! I think the |
Cool, I will create another PR for the function name
My pleasure, happy to contribute! |
|
Thank you @adamjohnson01, I was wondering if you would consider the instance type to Maybe we can offer a parameter for it |
Description
Added AWS EC2 provisioner related to #15
How Has This Been Tested?
Create
Delete
Checklist:
I have:
git commit -s