<div dir="ltr">Agreed than. We&#39;ll stick with plan Dockerfile.<div><br></div><div>Thanks everyone for good discussion and putting good arguments on the table.</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 20, 2017 at 10:28 AM Tristan Tarrant &lt;<a href="mailto:ttarrant@redhat.com">ttarrant@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tend to agree with Gustavo.<br>
The docker image should be as straightforward as possible. All the fancy<br>
build tools and layerings just create multiple levels of indirection. It<br>
also makes things more brittle.<br>
<br>
So -1 from me.<br>
<br>
Tristan<br>
<br>
On 11/10/17 6:31 PM, Gustavo Fernandes wrote:<br>
&gt; IMHO the cons are much more significant than the pros, here&#39;s a few more:<br>
&gt;<br>
&gt; - Increase the barrier to users/contributors, forcing them to learn a<br>
&gt; new tool if they need to customize the image;<br>
&gt; - Prevents usage of new/existent features in the Dockerfile, such as<br>
&gt; [1], at least until the generator supports it;<br>
&gt; - Makes the integration with Dockerhub harder.<br>
&gt;<br>
&gt; Furthermore, integrating Jolokia and DB drivers are trivial tasks, it<br>
&gt; hardly justifies migrating the image completely just to be able to<br>
&gt; re-use some external scripts to patch the server at Docker build time.<br>
&gt;<br>
&gt; With relation to the release cycle, well, this is another discussion. As<br>
&gt; far as Infinispan is concerned, it takes roughly 1h to release both the<br>
&gt; project and the docker image :)<br>
&gt;<br>
&gt; So my vote is -1<br>
&gt;<br>
&gt; [1]<br>
&gt; <a href="https://docs.docker.com/engine/userguide/eng-image/multistage-build/#before-multi-stage-builds" rel="noreferrer" target="_blank">https://docs.docker.com/engine/userguide/eng-image/multistage-build/#before-multi-stage-builds</a><br>
&gt; &lt;<a href="https://docs.docker.com/engine/userguide/eng-image/multistage-build/#before-multi-stage-builds" rel="noreferrer" target="_blank">https://docs.docker.com/engine/userguide/eng-image/multistage-build/#before-multi-stage-builds</a>&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Gustavo<br>
&gt;<br>
&gt; On Thu, Nov 9, 2017 at 11:33 AM, Sebastian Laskawiec<br>
&gt; &lt;<a href="mailto:slaskawi@redhat.com" target="_blank">slaskawi@redhat.com</a> &lt;mailto:<a href="mailto:slaskawi@redhat.com" target="_blank">slaskawi@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     That&#39;s a very good point Gustavo.<br>
&gt;<br>
&gt;     Let me try to iterate on pros and cons of each approach:<br>
&gt;<br>
&gt;       * Putting all bits into distribution:<br>
&gt;           o Pros:<br>
&gt;               + Unified approach for both project and product<br>
&gt;               + Supporting all platforms with a single distribution<br>
&gt;           o Cons:<br>
&gt;               + Long turnaround from community to the product based bits<br>
&gt;                 (like Online Services)<br>
&gt;               + Some work has already been done in Concreate-based<br>
&gt;                 approach (like Jolokia) and battle-tested (e.g. with EAP).<br>
&gt;       * Putting all additional bits into integration layers<br>
&gt;         (Concreate-based approach):<br>
&gt;           o Pros:<br>
&gt;               + Short turnaround, in most of the cases we need to patch<br>
&gt;                 the integration bits only<br>
&gt;               + Some integration bits has already been implemented for<br>
&gt;                 us (Joloka, DB drivers etc)<br>
&gt;           o Cons:<br>
&gt;               + Some integrations bits needs to be reimplemented, e.g.<br>
&gt;                 KUBE_PING<br>
&gt;               + Each integration layer needs to have its own code (e.g.<br>
&gt;                 community Docker image, xPaaS images, Online Services)<br>
&gt;<br>
&gt;     I must admit that in the past I was a pretty big fan of putting all<br>
&gt;     bits into community distribution and driving it forward from there.<br>
&gt;     But this actually changed once Concreate tool appeared. It allows to<br>
&gt;     externalize modules into separate repositories which promotes code<br>
&gt;     reuse (e.g. we could easily use Jolokia integration implemented for<br>
&gt;     EAP and at the same time provide our own custom configuration for<br>
&gt;     it). Of course most of the bits assume that underlying OS is RHEL<br>
&gt;     which is not true for the community (community images use CentOS) so<br>
&gt;     there might be some mismatch there but it&#39;s definitely something to<br>
&gt;     start with. The final argument that made me change my mind was<br>
&gt;     turnaround loop. Going through all those releases is quite<br>
&gt;     time-consuming and sometimes we just need to update micro version to<br>
&gt;     fix something. A nice example of this is KUBE_PING which had a<br>
&gt;     memory leak - with concreate-based approach we could fix it in one<br>
&gt;     day; but as long as it is in distribution, we need to wait whole<br>
&gt;     release cycle.<br>
&gt;<br>
&gt;     Thanks,<br>
&gt;     Sebastian<br>
&gt;<br>
&gt;     On Tue, Nov 7, 2017 at 8:07 PM Gustavo Fernandes<br>
&gt;     &lt;<a href="mailto:gustavo@infinispan.org" target="_blank">gustavo@infinispan.org</a> &lt;mailto:<a href="mailto:gustavo@infinispan.org" target="_blank">gustavo@infinispan.org</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;         IMHO we should ship things like scripts, external modules,<br>
&gt;         drivers, etc with the server itself, leaving the least amount of<br>
&gt;         logic in the Docker image.<br>
&gt;<br>
&gt;         What you are proposing is the opposite: introducing a templating<br>
&gt;         engine that adds a level of indirection to the Docker image (the<br>
&gt;         Dockerfile is generated) plus<br>
&gt;         it grabs jars, modules, scripts, xmls, etc from potentially<br>
&gt;         external sources and does several patches to the server at<br>
&gt;         Docker image creation time.<br>
&gt;<br>
&gt;         WRT the docker hub, I think it could be used with Concreate by<br>
&gt;         using hooks, I did a quick experiment of a Dockerhub automated<br>
&gt;         build having a dynamically generating a Dockerfile in [1], but I<br>
&gt;         guess<br>
&gt;         the biggest question is if the added overall complexity is worth<br>
&gt;         it. I&#39;m leaning towards a -1, but would like to hear more<br>
&gt;         opinions :)<br>
&gt;<br>
&gt;         [1] <a href="https://hub.docker.com/r/gustavonalle/dockerhub-test/" rel="noreferrer" target="_blank">https://hub.docker.com/r/gustavonalle/dockerhub-test/</a><br>
&gt;         &lt;<a href="https://hub.docker.com/r/gustavonalle/dockerhub-test/" rel="noreferrer" target="_blank">https://hub.docker.com/r/gustavonalle/dockerhub-test/</a>&gt;<br>
&gt;<br>
&gt;         Thanks,<br>
&gt;         Gustavo<br>
&gt;<br>
&gt;         On Tue, Nov 7, 2017 at 3:14 PM, Sebastian Laskawiec<br>
&gt;         &lt;<a href="mailto:slaskawi@redhat.com" target="_blank">slaskawi@redhat.com</a> &lt;mailto:<a href="mailto:slaskawi@redhat.com" target="_blank">slaskawi@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;             Hey!<br>
&gt;<br>
&gt;             Together with Ryan we are thinking about the future of<br>
&gt;             Infinispan Docker image [1].<br>
&gt;<br>
&gt;             Currently we use a single Dockerfile and a bootstrap script<br>
&gt;             which is responsible for setting up memory limits and<br>
&gt;             creating/generating (if necessary) credentials. Our build<br>
&gt;             pipeline uses Docker HUB integration hooks, so whenever we<br>
&gt;             push a new commit (or a tag) our images are being rebuilt.<br>
&gt;             This is very simple to understand and very powerful setup.<br>
&gt;<br>
&gt;             However we are thinking about bringing product and project<br>
&gt;             images closer together and possibly reusing some bits (a<br>
&gt;             common example might be Jolokia - those bits could be easily<br>
&gt;             reused without touching core server distribution). This<br>
&gt;             however requires converting our image to a framework called<br>
&gt;             Concreate [2]. Concreate divides setup scripts into modules<br>
&gt;             which are later on assembled into a single Dockerfile and<br>
&gt;             built. Modules can also be pulled from other public git<br>
&gt;             repository and I consider this as the most powerful option.<br>
&gt;             It is also worth to mention, that Concreate is based on YAML<br>
&gt;             file - here&#39;s an example of JDG image [3].<br>
&gt;<br>
&gt;             As you can see, this can be quite a change so I would like<br>
&gt;             to reach out for some opinions. The biggest issue I can see<br>
&gt;             is that we will lose our Docker HUB build pipeline and we<br>
&gt;             will need to build and push images on our CI (which already<br>
&gt;             does this locally for Online Services).<br>
&gt;<br>
&gt;             WDYT?<br>
&gt;<br>
&gt;             Thanks,<br>
&gt;             Sebastian<br>
&gt;<br>
&gt;             [1]<br>
&gt;             <a href="https://github.com/jboss-dockerfiles/infinispan/tree/master/server" rel="noreferrer" target="_blank">https://github.com/jboss-dockerfiles/infinispan/tree/master/server</a><br>
&gt;             &lt;<a href="https://github.com/jboss-dockerfiles/infinispan/tree/master/server" rel="noreferrer" target="_blank">https://github.com/jboss-dockerfiles/infinispan/tree/master/server</a>&gt;<br>
&gt;             [2] <a href="http://concreate.readthedocs.io/en/latest/" rel="noreferrer" target="_blank">http://concreate.readthedocs.io/en/latest/</a><br>
&gt;             &lt;<a href="http://concreate.readthedocs.io/en/latest/" rel="noreferrer" target="_blank">http://concreate.readthedocs.io/en/latest/</a>&gt;<br>
&gt;             [3]<br>
&gt;             <a href="https://github.com/jboss-container-images/jboss-datagrid-7-openshift-image/blob/datagrid71-dev/image.yaml" rel="noreferrer" target="_blank">https://github.com/jboss-container-images/jboss-datagrid-7-openshift-image/blob/datagrid71-dev/image.yaml</a><br>
&gt;             &lt;<a href="https://github.com/jboss-container-images/jboss-datagrid-7-openshift-image/blob/datagrid71-dev/image.yaml" rel="noreferrer" target="_blank">https://github.com/jboss-container-images/jboss-datagrid-7-openshift-image/blob/datagrid71-dev/image.yaml</a>&gt;<br>
&gt;<br>
&gt;             _______________________________________________<br>
&gt;             infinispan-dev mailing list<br>
&gt;             <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt;             &lt;mailto:<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a>&gt;<br>
&gt;             <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;             &lt;<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt;         _______________________________________________<br>
&gt;         infinispan-dev mailing list<br>
&gt;         <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt;         &lt;mailto:<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a>&gt;<br>
&gt;         <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;         &lt;<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     infinispan-dev mailing list<br>
&gt;     <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a>&gt;<br>
&gt;     <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;     &lt;<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
<br>
--<br>
Tristan Tarrant<br>
Infinispan Lead<br>
JBoss, a division of Red Hat<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</blockquote></div>