Introduce container_cli parameter for undercloud.conf
This parameter, default to 'docker' for now, can be changed to 'podman' if we want to deploy an Undercloud with Podman instead of Docker. blueprint podman-support Change-Id: I8e83a3903f6c67087d4e18734a61661dbd597185
This commit is contained in:
parent
c906002929
commit
6b0f54c07a
|
@ -188,6 +188,10 @@ class StandaloneConfig(BaseConfig):
|
|||
help=_('Used to add custom insecure registries in '
|
||||
'/etc/sysconfig/docker.')
|
||||
),
|
||||
cfg.StrOpt('container_cli',
|
||||
default='docker',
|
||||
help=_('Container CLI used for deployment; '
|
||||
'Can be docker or podman.')),
|
||||
]
|
||||
return self.sort_opts(_base_opts + _opts)
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ class TestStandaloneConfig(base.TestCase):
|
|||
def test_get_base_opts(self):
|
||||
ret = self.config.get_base_opts()
|
||||
expected = ['cleanup',
|
||||
'container_cli',
|
||||
'container_images_file',
|
||||
'custom_env_files',
|
||||
'deployment_user',
|
||||
|
@ -84,6 +85,7 @@ class TestStandaloneConfig(base.TestCase):
|
|||
def test_get_opts(self):
|
||||
ret = self.config.get_opts()
|
||||
expected = ['cleanup',
|
||||
'container_cli',
|
||||
'container_images_file',
|
||||
'custom_env_files',
|
||||
'deployment_user',
|
||||
|
|
|
@ -29,6 +29,7 @@ class TestUndercloudConfig(base.TestCase):
|
|||
'certificate_generation_ca',
|
||||
'clean_nodes',
|
||||
'cleanup',
|
||||
'container_cli',
|
||||
'container_images_file',
|
||||
'custom_env_files',
|
||||
'deployment_user',
|
||||
|
@ -79,6 +80,7 @@ class TestUndercloudConfig(base.TestCase):
|
|||
'certificate_generation_ca',
|
||||
'clean_nodes',
|
||||
'cleanup',
|
||||
'container_cli',
|
||||
'container_images_file',
|
||||
'custom_env_files',
|
||||
'deployment_user',
|
||||
|
|
|
@ -321,6 +321,8 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False,
|
|||
env_data['DockerInsecureRegistryAddress'].extend(
|
||||
CONF['docker_insecure_registries'])
|
||||
|
||||
env_data['ContainerCli'] = CONF['container_cli']
|
||||
|
||||
if CONF.get('docker_registry_mirror', None):
|
||||
env_data['DockerRegistryMirror'] = CONF['docker_registry_mirror']
|
||||
|
||||
|
|
Loading…
Reference in New Issue