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

volume support enhancements #65

Closed
wants to merge 10 commits into from

Conversation

jgangemi
Copy link
Collaborator

@jgangemi jgangemi commented Dec 6, 2014

this is meant to replace #60. in addition to resolving issue #55, it also addresses #62 to allow container volumes to be specified at image build time. (i split off the assembly enhancements into #64).

all options are supported in the property files, there are some new tests, and some compiler warning cleanup.

i have also update the docs and did some minor re-organization which i hope you won't mind (i think having docker:build come before docker:start makes sense from a workflow perspective and i think listing config values in alphabetical order makes scanning the docs for what you need easier).

jgangemi and others added 10 commits December 3, 2014 22:29
- allow container configuration parameters to be specified for
   - hostname
   - domainname
   - user
   - memory
   - memorySwap
   - entrypoint
   - volumes
   - workingDir
   - binds
   - privileged
   - dns
   - dnsSearch
   - capAdd
   - capDrop
   - restartPolicy

Signed-off-by: Jae Gangemi <jgangemi@gmail.com>
- merged ContainerConfig/ContainerHostConfig into Container
Signed-off-by: Jae Gangemi <jgangemi@gmail.com>
- fixed some compiler warnings

Signed-off-by: Jae Gangemi <jgangemi@gmail.com>
Signed-off-by: Jae Gangemi <jgangemi@gmail.com>
@rhuss
Copy link
Collaborator

rhuss commented Dec 7, 2014

Awesome !

I will do a review, hopefully today, but you can expect the PR applied tomorrow at last.

for (String volume : bind) {
if (volume.contains(":")) {
binds.put(volume);
volume = volume.split(":")[0];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that the volume to be specified within "Volumes" in the create configuration should be the host path ? I'm not sure, but I think it should be the container path (element [1]). The documentation is not really clear about this. The best I could find was moby/moby#1580.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah - that's a bug, good catch!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will fix this since I already made some (more or less cosmetic) changes.

@rhuss
Copy link
Collaborator

rhuss commented Dec 8, 2014

IMO using volume as inner element of bind and volumes as parent for from is a bit confusing. And I think, too, they both belong together.

Yes, Maven is really hard to use for complex configuration needs. In fact I really would like to stick the bind and import stuff together, e.g. like in

<volumes>
    <bind>/tmp</bind>
    <bind>/bla:/blub</bind>
    <from>data</from>
</volumes>

but as you said correctly this is not possible with Maven (e.g. every list needs a dedicated parent element).

So I came up with this

<volumes>
  <bind>
    <volume>/tmp</volume>
    <volume>/bla:/blub</volume>
  </bind>
  <from>
    <image>data</image>
  </from>
</volumes>

Ok, a bit verbose, but hey, its XML anyway ;-)

What do you think ? I'm just about to implement that one, if you don't mind.

@jgangemi
Copy link
Collaborator Author

jgangemi commented Dec 8, 2014

yeah - i always wondered why filesets had to be distinct includes/excludes...

i'm fine w/ that structure change.

rhuss added a commit that referenced this pull request Dec 8, 2014
E.g. inserted dedicated ContainerCreateConfig and ContainerStartConfig object for better separation of concerns.
@rhuss
Copy link
Collaborator

rhuss commented Dec 8, 2014

Pushed my refactoring (including fix and changes) to branch 65-pr-jgangemi. This will make it to master ASAP.

I would merge it immediately to master, however then the documentation won't reflect the currently deployed plugins.

Still need a better workflow here ....

Thanks again, Jae ...

@jgangemi
Copy link
Collaborator Author

jgangemi commented Dec 9, 2014

my pleasure, thanks for letting me contribute!

@mwl
Copy link
Contributor

mwl commented Dec 10, 2014

What's left on this PR? Would really like to see it in master soon 😄

@rhuss
Copy link
Collaborator

rhuss commented Dec 10, 2014

You can find the PR merged into branch 65-pr-jgangemi (including documentation). I would merge it into master, but I have the problem that then documentation doesn't fit the currently released plugin. So I will merge it into master just before a release.

Still have to overthink my workflow for the documentation, though.

@jgangemi
Copy link
Collaborator Author

why don't you just have a 'next release' branch and then when you're ready to do a release, merge that into master?

@rhuss
Copy link
Collaborator

rhuss commented Dec 10, 2014

That's a good idea. Currently I only have that single branch, but you are right, one should have probably something like an integration branch.

@jgangemi
Copy link
Collaborator Author

you could probably just rename 65-pr-jgangemi to be whatever you want the integration branch and be all set. i haven't rebased against anything yet so it wouldn't impact me if that changed.

@rhuss
Copy link
Collaborator

rhuss commented Dec 11, 2014

I just created a branch integration and already merged in 65-pr-jgangemi. I couldn't simply rename the branch existing branch since some minor work already happened on master.

Now all work the next version will be done on branches starting on integration which are merged into integration when finished. Just right before the release integration is then merged to master.

Hope that's not to confusing.

So if you could rebase on integration before submitting a PR would be very cool.

@rhuss
Copy link
Collaborator

rhuss commented Dec 22, 2014

Going to close thie PR, since everything has been already merged to integration so far. Thanks !

@rhuss rhuss closed this Dec 22, 2014
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.

3 participants