tripleo-common/tripleo_common/utils
Emilien Macchi b047a20135 Support for Buildah in kolla_builder
Buildah and Podman will replace Docker.
This patch will be used by tripleoclient when running:

  $ openstack overcloud container image build --use-buildah

When using Buildah, the kolla_builder will, in that order:

1) Generate container templates but not actually build the images.
   The directories are generated by kolla-build and containers files
   like Dockerfiles and such.
2) Generate container dependencies and build a dictionary, later used by
   the new BuildahBuilder.

In this patch, we introduce a Class for builders. For now, we only have
BuildahBuilder but later we will refactor kolla_builder.

The BuildahBuilder has in charge of:

1) Build containers using "buildah bud". This command is used because
   Kolla uses Dockerfiles to build images. Each image build is logged in
   the directory that contains the Dockerfile.
   During the build, logging displays the container that is being built
   and also the buildah command that is used.

   The image layers that don't have childs are multi-threaded to
   accelerate the build. We don't go over 8 builds at the same time
   otherwise Buildah struggles with the locks too hard.
   We also setup a timeout of 30 minutes for the workers to report back.

   For example:

   base
    └─openstack-base
       ├─nova-base
       │  ├─nova-api
       │  └─nova-conductor
       └─neutron-base
          └─neutron-dhcp
    └─multipathd
    └─crond

    The builder will first build "base" then:
    - build openstack-base, multipathd and crond in same time.
    - build nova-base and neutron-base in same time
    - build nova-api, nova-conductor in same time
    - etc

2) Push containers to a Docker registry. We'll support more than Docker
   registries, but later.

Note: All commands are executed using processutils from oslo_concurrency
      which is pretty and rock solid.

Note2: kolla_builder will be refactored to use the new Builder class.
      This patch is an initial support for Buildah, improvements will come
      later.

Co-Authored-By: Alex Schultz <aschultz@redhat.com>
Co-Authored-By: Christophe Fontaine <cfontain@redhat.com>

blueprint podman-support

Change-Id: Ieff41a5f84456530b4621218b01f3b546cd867bf
2019-02-14 13:34:51 +00:00
..
__init__.py Initial workflow implementation of tripleo-common 2015-12-07 12:38:42 -05:00
config.py Merge "Check for physical_resource_id before getting deployments" 2019-01-24 02:36:25 +00:00
glance.py Accept glance image ID in addition to name 2017-10-24 15:22:03 -04:00
keystone.py nova-less-deploy: deploy_instances and undeploy_instances workflows 2019-01-16 12:41:42 +01:00
nodes.py Supports specifying profile explicitly in instackenv.json 2018-11-08 16:23:46 +01:00
overcloudrc.py Persist region name in overcloudrc 2018-11-21 15:13:02 +02:00
parameters.py Derive Params (part 1): Initial workflow to start 2017-06-09 03:57:56 -04:00
passwords.py Generate rndc key in password list 2018-07-16 21:12:06 +00:00
plan.py Fix environments sorting 2018-12-03 18:02:21 +01:00
process.py Support for Buildah in kolla_builder 2019-02-14 13:34:51 +00:00
roles.py Allow networks in roles_data to be dict or list 2018-09-04 18:58:15 +02:00
swift.py Update hacking version 2018-12-31 16:54:36 +00:00
tarball.py Open tarball in binary mode 2018-08-21 16:16:57 -06:00
time_functions.py Add GUI logging workflows 2017-08-08 08:55:55 +02:00
validations.py Add support for custom validations 2018-08-10 11:21:29 +02:00