diff --git a/tripleoclient/config/standalone.py b/tripleoclient/config/standalone.py index c1a6ca7f1..831bf7fde 100644 --- a/tripleoclient/config/standalone.py +++ b/tripleoclient/config/standalone.py @@ -18,6 +18,7 @@ import copy from osc_lib.i18n import _ from oslo_config import cfg from tripleoclient.config.base import BaseConfig +from tripleoclient.constants import DEFAULT_HEAT_CONTAINER NETCONFIG_TAGS_EXAMPLE = """ "network_config": [ @@ -167,10 +168,16 @@ class StandaloneConfig(BaseConfig): 'binaries be installed locally on this machine.' ' This option is enabled by default which means' ' heat-all is executed on the host OS ' - ' directly.')), + ' directly If this is set to false, a ' + 'containerized version of heat-all is used.')), cfg.StrOpt('heat_container_image', default='', - help=_('URL for the heat container image to use.') + help=_('Custom URL for the heat-all container image to ' + 'use as part of the undercloud deployment. If ' + 'not specified, the default "%s" is used. ' + 'If this location requires authentication, ' + 'run podman login prior to running the ' + 'undercloud install.' % DEFAULT_HEAT_CONTAINER) ), cfg.StrOpt('container_images_file', default='', diff --git a/tripleoclient/constants.py b/tripleoclient/constants.py index b62711abd..930325bad 100644 --- a/tripleoclient/constants.py +++ b/tripleoclient/constants.py @@ -42,6 +42,15 @@ UNDERCLOUD_NETWORKS_FILE = "network_data_undercloud.yaml" ANSIBLE_HOSTS_FILENAME = "hosts.yaml" ANSIBLE_CWL = "tripleo_dense,tripleo_profile_tasks,tripleo_states" CONTAINER_IMAGE_PREPARE_LOG_FILE = "container_image_prepare.log" +DEFAULT_CONTAINER_REGISTRY = "docker.io" +DEFAULT_CONTAINER_NAMESPACE = "tripleomaster" +DEFAULT_CONTAINER_TAG = "current-tripleo" +DEFAULT_HEAT_CONTAINER = ('{}/{}/openstack-heat-all:{}'.format( + DEFAULT_CONTAINER_REGISTRY, + DEFAULT_CONTAINER_NAMESPACE, + DEFAULT_CONTAINER_TAG)) + + # The name of the file which holds the plan environment contents PLAN_ENVIRONMENT = 'plan-environment.yaml' USER_ENVIRONMENT = 'user-environment.yaml' diff --git a/tripleoclient/v1/tripleo_deploy.py b/tripleoclient/v1/tripleo_deploy.py index 837ccdd27..576e4d9ae 100644 --- a/tripleoclient/v1/tripleo_deploy.py +++ b/tripleoclient/v1/tripleo_deploy.py @@ -1016,10 +1016,10 @@ class Deploy(command.Command): parser.add_argument( '--heat-container-image', metavar='', dest='heat_container_image', - default='tripleomaster/centos-binary-heat-all:current-tripleo', + default=constants.DEFAULT_HEAT_CONTAINER, help=_('The container image to use when launching the heat-all ' - 'process. Defaults to: ' - 'tripleomaster/centos-binary-heat-all:current-tripleo') + 'process. Defaults to: {}'.format( + constants.DEFAULT_HEAT_CONTAINER)) ) parser.add_argument( '--heat-native', diff --git a/tripleoclient/v1/tripleo_launch_heat.py b/tripleoclient/v1/tripleo_launch_heat.py index ac61e5e91..ecf28eac6 100644 --- a/tripleoclient/v1/tripleo_launch_heat.py +++ b/tripleoclient/v1/tripleo_launch_heat.py @@ -21,6 +21,7 @@ import os from cliff import command from osc_lib.i18n import _ +from tripleoclient.constants import DEFAULT_HEAT_CONTAINER from tripleoclient import exceptions from tripleoclient import heat_launcher @@ -94,10 +95,9 @@ class LaunchHeat(command.Command): parser.add_argument( '--heat-container-image', metavar='', dest='heat_container_image', - default='tripleomaster/centos-binary-heat-all:current-tripleo', + default=DEFAULT_HEAT_CONTAINER, help=_('The container image to use when launching the heat-all ' - 'process. Defaults to: ' - 'tripleomaster/centos-binary-heat-all:current-tripleo') + 'process. Defaults to: {}'.format(DEFAULT_HEAT_CONTAINER)) ) parser.add_argument( '--heat-native',