-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Docker provider #983
Docker provider #983
Conversation
94b24d2
to
fc07ff5
Compare
Note: we're doing a bunch of merges for 0.3.7 right now and we won't get to this until 0.4.0 (which will start this week). |
@mitchellh Not a problem. While I'm fixing up the TODOs and bringing in the fixes you've been working on I've been rebasing. When you guys start taking a look I'll switch to merging if you wish. |
e9dc0f7
to
eb371e1
Compare
c8dc21b
to
edb77af
Compare
"image": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment says "ForceNew
is not true" but it is set. Which one is correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Will take it out.
62f736c
to
fb1fa73
Compare
Docker's API is huge and only a small subset is currently implemented, but this is expected to grow over time. Currently it's enough to satisfy the use cases of probably 95% of Docker users. I'm preparing this initial pull request as a preview step for feedback. My ideal scenario would be to develop this within a branch in the main repository; the more eyes and testing and pitching in on the code, the better (this would avoid a merge request-to-the-merge-request scenario, as I figure this will be built up over the longer term, even before a merge into master). Unit tests do not exist yet. Right now I've just been focused on getting initial functionality ported over. I've been testing each option extensively via the Docker inspect capabilities. This code (C)2014-2015 Akamai Technologies, Inc. <opensource@akamai.com>
@jefferai seems like this might be nearly ready to merge, yeah? Just need to get some acceptance tests in there. 👍 |
Starting to review and get this going for 0.4 |
@@ -0,0 +1,24 @@ | |||
package docker | |||
|
|||
import dc "github.com/fsouza/go-dockerclient" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick I usually just do multiline imports from the get-go cause there is usually some future that requires more and it makes it easier to add.
client, err := config.NewClient() | ||
if err != nil { | ||
return fmt.Errorf("Unable to connect to Docker: %s", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason the client can't be initialized in the provider configuration function?
@jefferai This looks good, I can add the tests if you're averse to it. Is this ready to go? I noticed you haven't comitted in awhile but I think in IRC you mentioned you were doing more work on it. |
Closing for #1329 which is just your commit + some test commits. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Please read this merge request message carefully; it is not expected that this be merged. This is being created for initial feedback.
Initial commit. This adds the initial bits of a Docker provider.
Docker's API is huge and only a small subset is currently implemented,
but this is expected to grow over time. This is enough to satisfy the
use cases of probably 95% of Docker users.
A few things are not yet tested, and are clearly marked with TODO. These
are very high on the priority list.
I'm preparing this initial pull request as a preview step for feedback.
My ideal scenario would be to develop this within a branch in the main
repository; the more eyes and testing and pitching in on the code, the
better (this would avoid a merge request-to-the-merge-request scenario,
as I figure this will be built up over the longer term, even before
a merge into master).
Unit tests do not exist yet. I really need
#950 and
#952 fixed before I can
properly instrument Docker at all, let alone trust the results of unit
tests. Working around this to the best of my abilities is also a reason
that each resource setting has a computed equivalent.
I also added a "make quickdev" option to skip the fetching step, which
speeds up builds significantly when you've just updated all of the
dependencies.
This code is copyright 2014 Akamai Technologies, Inc. opensource@akamai.com