-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add support for building storm-mesos docker images based on storm, mesos versions #120
Conversation
Awesome, I was gonna take this up since it seems critical to getting the whole build pipeline working, but since you've done it I can just review & test it. |
@@ -1,32 +1,62 @@ | |||
# |
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.
Looks great at 1st blush. A little unfortunate that there's so much repetition between the Dockerfile
and onbuild/Dockerfile
, but I'm not sure how to improve on that. Need a bit more time to grok this, a lot going on here.
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.
yep , I thought about it too, but there is currently no "import" for Dockerfiles :)
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.
So, I need to look at this a bit more to understand if what I'm going to point out is just nonsensical for our use-case:
in the language-examples of onbuild Dockerfiles that I looked at, they use the non-onbuild Docker image as the base for the onbuild Docker image. Maybe that doesn't make sense for us??
Ruby:
- https://github.com/docker-library/ruby/blob/master/2.1/Dockerfile
- https://github.com/docker-library/ruby/blob/master/2.1/onbuild/Dockerfile
Go-lang:
- https://github.com/docker-library/golang/blob/1eab0db63794152b4516dbcb70270eb9dced4cbd/1.5/Dockerfile
- https://github.com/docker-library/golang/blob/f1f65c0ab0097a5e3d079d5a74e2468e8d47563d/1.5/onbuild/Dockerfile
So could it make sense for us to follow a similar pattern? Maybe the configurability of all the various fundamental components (mesos, storm, java) makes this an impossible idea?
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.
@erikdw yeah, I also came to the same questions myself. i think since everything is so configurable because we are coupling two systems, MESOS and STORM, it will be hard to have a base image. So the nature of our build is with onbuilds in the end using arguments passed at build time.
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.
yep, same conclusion here
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.
Cool cool, makes sense.
@echo 'ENV' | ||
@echo ' STORM_RELEASE The targeted release version of Storm' | ||
@echo ' Default: 0.10.0' | ||
@echo ' MESOS_RELEASE The targeted release version of MESOS' |
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.
the formatting is off here in this whole "help" section -- I'm guessing you're using tabs and have a tab setting which makes this line up nicely for your view here?
(I realize tabs are annoyingly required in Makefiles, but I suggest limiting their use to the required locations, and not proliferating the tab contagion. Don't get me started on go-lang's love of tabs and autoformatting! 😛 )
From my perspective the only question is about whether we are comfortable with the size of the Docker images. Once that is resolved let's merge this! |
@erikdw well here are the size of the latest version of the dockerfile
As you can see the major increase of size is coming from the new storm version 0.10.0 . It's independent from the building of the docker image. The current docker images are actually on par with the reference you provided https://hub.docker.com/r/mesosphere/storm/tags/, because there were using storm 0.9.6. The new docker images for storm 0.9.6 are also in the 300 - 400 MB range |
@salimane : ah, thanks for pointing that out! A couple more questions along these lines:
https://hub.docker.com/r/salimane/storm-mesos/tags/
Given that the size difference of the expanded binary releases is only 60MB:
I'll try to look into this.... an initial guess is the use of the matrix-style building with the |
@erikdw yep, but everything is being cleaned up, removed with |
@salimane : so I finally got some time to look into this docker size issue -- I think I understand why the size is so much bigger for storm-0.10.0: the images contain multiple copies of the same storm bits.
Total of ~100 MB of extra stuff in the COPY'ed files:
Total of ~335 MB of extra stuff in the COPY'ed files:
So, I believe this will be ok so long as we have a fully clean repo that we do the docker build from. I'm assuming that it would be fully clean when we do this in travis-ci, but I'm not sure exactly how we're planning to integrate the invocation of |
…sos versions Signed-off-by: Salimane Adjao Moustapha <me@salimane.com>
@erikdw nice find. I've added a The docker images sizes decreased :
Thanks |
@salimane : awesome, I didn't know about |
Oh, I had a conflict when I merged my changes with yours -- I have a guess that the extra |
FYI, #131 contains my tab excising change. |
thanks @salimane : reviewing now |
This PR makes it possible to automate the building of storm-mesos docker images based on storm, mesos versions.
I've also included in this PR:
dockerImage
inbuild_release.sh
to use the new make targetTo build a new storm-mesos docker image, just do:
make help make images STORM_RELEASE=0.10.0 MESOS_RELEASE=0.28.0 DOCKER_REPO=mesos
This PR needs to be merged before I could finish off #83 #117 with automated docker image building on docker hub
With this PR, we can also close #109 .
cc @erikdw @lfundaro @DarinJ @dsKarthick
Thanks