<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">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" 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" 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">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">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">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">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>