From 79851d7929027050d0d1e76aaa28e83c141dcc55 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Tue, 13 Aug 2019 07:55:58 +0000 Subject: Build images with healthcheck scripts for core services blueprint container-health-check Now docker supports healthcheck directive[0] in Dockerfile, which is helpful for checking container aliveness. Base for this patch were healthcheck scripts from tripleo[1]. [0] https://docs.docker.com/engine/reference/builder/#healthcheck [1] https://github.com/openstack/tripleo-common/tree/master/healthcheck Change-Id: Ifc32713cd4d6b45c74855c0ebf5bb65784701d44 --- kolla/common/config.py | 2 ++ kolla/image/build.py | 2 ++ 2 files changed, 4 insertions(+) (limited to 'kolla') diff --git a/kolla/common/config.py b/kolla/common/config.py index 689631010..6b5302f46 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -255,6 +255,8 @@ _CLI_OPTS = [ help='OpenStack release for building kolla-toolbox'), cfg.StrOpt('openstack-branch', default='master', help='Branch for source images'), + cfg.BoolOpt('docker-healthchecks', default=True, + help='Add Kolla docker healthcheck scripts in the image') ] _BASE_OPTS = [ diff --git a/kolla/image/build.py b/kolla/image/build.py index b29450edd..2750d1a43 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -718,6 +718,7 @@ class KollaWorker(object): self.debian_arch = 'ppc64el' self.images = list() self.openstack_release = conf.openstack_release + self.docker_healthchecks = conf.docker_healthchecks rpm_setup_config = ([repo_file for repo_file in conf.rpm_setup_config if repo_file is not None]) self.rpm_setup = self.build_rpm_setup(rpm_setup_config) @@ -960,6 +961,7 @@ class KollaWorker(object): 'use_dumb_init': self.use_dumb_init, 'base_package_type': self.base_package_type, 'debian_arch': self.debian_arch, + 'docker_healthchecks': self.docker_healthchecks, 'supported_distro_release': supported_distro_release, 'install_metatype': self.install_metatype, 'image_prefix': self.image_prefix, -- cgit v1.2.3