osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build depends on Docker


Hi Geoff.

The PR looks good but creates an inconsistency between the binaries:
RPM/DEB and Go client are all opt-out whereas the docker build is opt-in.
Whatever route we go, I think we should be consistent across the board.

Since people seems ok with an opt-in solution for the different binaries, I
would be happy to follow the majority.

Best.

On Sun, 16 Dec 2018 at 22:51 Geoff Macartney <geoff.macartney@xxxxxxxxx>
wrote:

> Have raised https://github.com/apache/brooklyn-dist/pull/136, let me know
> what you think
>
> G
>
> On Sat, 15 Dec 2018 at 17:34 Paul Campbell <paul.campbell@xxxxxxxxxxxx>
> wrote:
>
> > +1 to only build docker image when profile is activated
> >
> > On Sat, 15 Dec 2018, 16:34 Geoff Macartney <geoff.macartney@xxxxxxxxx
> > wrote:
> >
> > > I'll go out on a limb here and suggest we disable it by default - let's
> > go
> > > with Alex's suggestion of a profile to build the image, with the
> default
> > > build being NOT to build with that profile, so you would have to do
> > > something like
> > >
> > > mvn clean install  -DdockerImage
> > >
> > > to build the image.
> > >
> > > any +1s?
> > >
> > >
> > > On Sat, 15 Dec 2018 at 10:33 Thomas Bouron <thomas.bouron@xxxxxxxxxxxx
> >
> > > wrote:
> > >
> > > > Hi Geoff, all.
> > > >
> > > > To recap what this is doing: it builds a docker image that launches
> > > > Brooklyn. It actually wraps the RPM that maven builds, and packages
> > that
> > > as
> > > > a Docker image.
> > > > Now, I merged this and when testing, I noticed[1] that the plugin
> used
> > to
> > > > build the docker image can be disabled with one of their own flag[2],
> > > > namely `-DskipDocker`. This is why I didn't ask the contributor for a
> > > maven
> > > > profile.
> > > >
> > > > If you think that is not enough, we could definitely disable this by
> > > > default. But I think this is useful, and a much easier way for new
> > people
> > > > to get started with Brooklyn (instead of vagrant).
> > > >
> > > > Best.
> > > >
> > > > [1]
> > > >
> > https://github.com/apache/brooklyn-dist/pull/118#issuecomment-435649038
> > > > [2]
> > > >
> > > >
> > >
> >
> https://github.com/spotify/docker-maven-plugin#bind-docker-commands-to-maven-phases
> > > >
> > > > On Sat, 15 Dec 2018 at 08:55 Alex Heneveld <
> > > > alex.heneveld@xxxxxxxxxxxxxxxxx>
> > > > wrote:
> > > >
> > > > > It should have a mvn profile like rpm and the go cli IMO. The
> README
> > in
> > > > the
> > > > > master project describes these.
> > > > >
> > > > > Best
> > > > > Alex
> > > > >
> > > > > On Fri, 14 Dec 2018, 22:51 Geoff Macartney <
> > geoff.macartney@xxxxxxxxx
> > > > > wrote:
> > > > >
> > > > > > We added this in
> https://github.com/apache/brooklyn-dist/pull/118,
> > > > but I
> > > > > > do
> > > > > > dislike having to have Docker to build Brooklyn.  IMHO anyone
> > should
> > > be
> > > > > > able to build and use Brooklyn without knowing anything about
> > Docker.
> > > > > Could
> > > > > > we remove the image build from the mvn install and have a
> separate
> > > > shell
> > > > > > script that you would run manually to build the image? And yes it
> > > > should
> > > > > > use the karaf distro, didn't realise it doesn't.
> > > > > >
> > > > > > Geoff
> > > > > >
> > > > > >
> > > > > > On Wed, 12 Dec 2018 at 16:58 Richard Downer <richard@xxxxxxxxxx>
> > > > wrote:
> > > > > >
> > > > > > > All,
> > > > > > >
> > > > > > > The Apache Brooklyn build depends on having a working Docker
> > > > instance.
> > > > > > This
> > > > > > > I did not know.
> > > > > > >
> > > > > > > The build failure happens in the `brooklyn-dist` project, which
> > > > > > > incorporates into execution `dockerfile-maven-plugin` which
> > invokes
> > > > > > Docker
> > > > > > > during the build phase. If Docker is not running, it tries to
> > > connect
> > > > > to
> > > > > > a
> > > > > > > non-existent UNIX socket and the build fails.
> > > > > > >
> > > > > > > This presents a few discussion points...
> > > > > > >
> > > > > > > What exactly is it building? There's a Dockerfile there and it
> > > seems
> > > > > that
> > > > > > > it builds an image which contains the Brooklyn distribution and
> > > > starts
> > > > > > > Brooklyn. I don't know much about Docker, what happens to that
> > > image?
> > > > > Is
> > > > > > it
> > > > > > > local to my computer?
> > > > > > >
> > > > > > > Is it necessary to have the build depend on Docker? To me this
> > > seems
> > > > > > > unreasonable. Docker has a large footprint and I don't think
> it's
> > > > > > > reasonable to require it for a normal, local build of Brooklyn.
> > > > > > >
> > > > > > > We're not releasing Docker images. Should we be? Should we not
> > be?
> > > Is
> > > > > it
> > > > > > > even possible for us to do that in Apache?
> > > > > > >
> > > > > > > Why haven't I seen this before? The changes to add this to
> > > > > brooklyn-dist
> > > > > > > were made in 2017. I've performed release builds on clean EC2
> > > > instances
> > > > > > and
> > > > > > > never seen this. Was this dormant, and has something changed
> > which
> > > > has
> > > > > > > kicked this into life?
> > > > > > >
> > > > > > > brooklyn-dist is obsolete now. If the Docker build is still
> > > something
> > > > > > > important, then firstly it needs moved to another project
> > > (hopefully
> > > > > one
> > > > > > > exclusive to that task) and secondly it needs to use the Karaf
> > > > > > > distribution.
> > > > > > >
> > > > > > > Can anyone shed some light on this?
> > > > > > >
> > > > > > > Thanks!
> > > > > > >
> > > > > > > Richard.
> > > > > > >
> > > > > >
> > > > >
> > > > --
> > > > Thomas Bouron
> > > > Senior Software Engineer
> > > >
> > > > *Cloudsoft <https://cloudsoft.io/> *| Bringing Business to the Cloud
> > > >
> > > > GitHub: https://github.com/tbouron
> > > > Twitter: https://twitter.com/eltibouron
> > > >
> > > > Need a hand with AWS? Get a Free Consultation.
> > > >
> > >
> >
>
-- 
Thomas Bouron
Senior Software Engineer

*Cloudsoft <https://cloudsoft.io/> *| Bringing Business to the Cloud

GitHub: https://github.com/tbouron
Twitter: https://twitter.com/eltibouron

Need a hand with AWS? Get a Free Consultation.