git.net

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

[kolla][tripleo] Podman/buildah


On Wed, Jun 5, 2019 at 8:46 AM Sean Mooney <smooney at redhat.com> wrote:

> On Wed, 2019-06-05 at 13:47 +0100, Mark Goddard wrote:
> > On Wed, 5 Jun 2019 at 13:28, Emilien Macchi <emilien at redhat.com> wrote:
> > >
> > > On Wed, Jun 5, 2019 at 5:21 AM Mark Goddard <mark at stackhpc.com> wrote:
> > > [...]
> > > >
> > > > I understand that Tripleo uses buildah to build images already
> (please
> > > > correct me if I'm wrong). How is this achieved with kolla? Perhaps
> > > > using 'kolla-build --template-only' to generate Dockerfiles then
> > > > invoking buildah separately? Are you planning to work on adding
> > > > buildah support to kolla itself?
> > >
> > >
> > > That's what we did indeed, we use Kolla to generate Dockerfiles, then
> call Buildah from tripleoclient to build
> > > containers.
> > > We have not planned (yet) to port that workflow to Kolla, which would
> involve some refacto in the build code (last
> > > time I checked).
> > >
> > > I wrote a blog post about it a while ago:
> > >
> https://my1.fr/blog/openstack-containerization-with-podman-part-5-image-build/
> >
> > Thanks for following up. It wouldn't be a trivial change to add
> > buildah support in kolla, but it would have saved reimplementing the
> > task parallelisation in Tripleo and would benefit others too. Never
> > mind.
> actully im not sure about that buildah should actully be pretty simple to
> add support for.
> its been a while but we looksed at swaping out the building with a python
> script a few years ago
> https://review.opendev.org/#/c/503882/
> and it really did not take that much to enable so simply invoking buildah
> in a simlar maner should be trivail.
>
>
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.


> podman support will be harder but again we confied all interaction with
> docker in kolla-ansibel to be via
>
> https://github.com/openstack/kolla-ansible/blob/master/ansible/library/kolla_docker.py
> so we sould jsut need to write a similar module that would work with
> podman and then select the correct one to use.
> the interface is a little large but it shoudld reactively mechanical to
> implement podman supprot.
>

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.

Thanks,
-Alex

[0]
https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/image/builder/buildah.py#L156
[1]
https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/image/kolla_builder.py#L496
[2]
https://opendev.org/openstack/python-tripleoclient/src/branch/master/tripleoclient/v1/container_image.py#L207-L228
[3] https://opendev.org/openstack/paunch

>
> > > --
> > > Emilien Macchi
> >
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190605/d7985f6d/attachment.html>