<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>Whats the plan for Kubernetes integration at this point? I keep seeing more and more talk/work on integrating podman and paunch and such but its a lot of work that doesn't apply when switching to Kubernetes?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Kevin<br>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF222202" style="direction:ltr"><font size="2" face="Tahoma" color="#000000"><b>From:</b> Alex Schultz [aschultz@redhat.com]<br>
<b>Sent:</b> Wednesday, June 05, 2019 7:59 AM<br>
<b>To:</b> Sean Mooney<br>
<b>Cc:</b> Mark Goddard; Emilien Macchi; openstack-discuss<br>
<b>Subject:</b> Re: [kolla][tripleo] Podman/buildah<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jun 5, 2019 at 8:46 AM Sean Mooney <<a href="mailto:smooney@redhat.com" rel="noopener noreferrer" target="_blank">smooney@redhat.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
On Wed, 2019-06-05 at 13:47 +0100, Mark Goddard wrote:<br>
> On Wed, 5 Jun 2019 at 13:28, Emilien Macchi <<a href="mailto:emilien@redhat.com" rel="noopener noreferrer" target="_blank">emilien@redhat.com</a>> wrote:<br>
> > <br>
> > On Wed, Jun 5, 2019 at 5:21 AM Mark Goddard <<a href="mailto:mark@stackhpc.com" rel="noopener noreferrer" target="_blank">mark@stackhpc.com</a>> wrote:<br>
> > [...]<br>
> > > <br>
> > > I understand that Tripleo uses buildah to build images already (please<br>
> > > correct me if I'm wrong). How is this achieved with kolla? Perhaps<br>
> > > using 'kolla-build --template-only' to generate Dockerfiles then<br>
> > > invoking buildah separately? Are you planning to work on adding<br>
> > > buildah support to kolla itself?<br>
> > <br>
> > <br>
> > That's what we did indeed, we use Kolla to generate Dockerfiles, then call Buildah from tripleoclient to build<br>
> > containers.<br>
> > We have not planned (yet) to port that workflow to Kolla, which would involve some refacto in the build code (last<br>
> > time I checked).<br>
> > <br>
> > I wrote a blog post about it a while ago:<br>
> > <a href="https://my1.fr/blog/openstack-containerization-with-podman-part-5-image-build/" rel="noreferrer" target="_blank">
https://my1.fr/blog/openstack-containerization-with-podman-part-5-image-build/</a><br>
> <br>
> Thanks for following up. It wouldn't be a trivial change to add<br>
> buildah support in kolla, but it would have saved reimplementing the<br>
> task parallelisation in Tripleo and would benefit others too. Never<br>
> mind.<br>
actully im not sure about that buildah should actully be pretty simple to add support for.<br>
its been a while but we looksed at swaping out the building with a python script a few years ago<br>
<a href="https://review.opendev.org/#/c/503882/" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/503882/</a><br>
and it really did not take that much to enable so simply invoking buildah in a simlar maner should be trivail.<br>
<br>
</blockquote>
<div><br>
</div>
<div>The issue was trying to build the appropriate parallelization logic based on the kolla container build order[0].  We're using the --list-dependencies to get the ordering for the build[1] and then run it through our builder[2].  You wouldn't want to do
 it serially because it's dramatically slower.  Our buildah builder is only slightly slower than the docker one at this point.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
podman support will be harder but again we confied all interaction with docker in kolla-ansibel to be via<br>
<a href="https://github.com/openstack/kolla-ansible/blob/master/ansible/library/kolla_docker.py" rel="noreferrer" target="_blank">https://github.com/openstack/kolla-ansible/blob/master/ansible/library/kolla_docker.py</a><br>
so we sould jsut need to write a similar module that would work with podman and then select the correct one to use.<br>
the interface is a little large but it shoudld reactively mechanical to implement podman supprot.<br>
</blockquote>
<div><br>
</div>
<div>The podman support is a bit more complex because there is no daemon associated with it. We wrote systemd/podman support into paunch[3] for us to handle the management of the life cycles of the containers. We'd like to investigate switching our invocation
 of paunch from cli to an ansible plugin/module which might be beneficial for kolla-ansible as well.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>-Alex </div>
<div><br>
</div>
<div>[0] <a href="https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/image/builder/buildah.py#L156" rel="noopener noreferrer" target="_blank">https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/image/builder/buildah.py#L156</a></div>
<div>[1] <a href="https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/image/kolla_builder.py#L496" rel="noopener noreferrer" target="_blank">https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/image/kolla_builder.py#L496</a></div>
<div>[2] <a href="https://opendev.org/openstack/python-tripleoclient/src/branch/master/tripleoclient/v1/container_image.py#L207-L228" rel="noopener noreferrer" target="_blank">https://opendev.org/openstack/python-tripleoclient/src/branch/master/tripleoclient/v1/container_image.py#L207-L228</a></div>
<div>[3] <a href="https://opendev.org/openstack/paunch" rel="noopener noreferrer" target="_blank">https://opendev.org/openstack/paunch</a></div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
> <br>
> > --<br>
> > Emilien Macchi<br>
> <br>
> <br>
<br>
<br>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>