diff --git a/docs/packstack.rst b/docs/packstack.rst index 1b51db29f..4df075021 100644 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -537,6 +537,9 @@ Provision Config Parameters **CONFIG_PROVISION_DEMO_FLOATRANGE** The CIDR network address for the floating IP subnet. +**CONFIG_PROVISION_CIRROS_URL** + A URL or local file location for the Cirros demo image used for Glance. + **CONFIG_PROVISION_TEMPEST** Whether to configure tempest for testing. @@ -552,7 +555,6 @@ Provision Config Parameters **CONFIG_PROVISION_TEMPEST_REPO_URI** The uri of the tempest git repository to use. - Log files and Debug info ------------------------ diff --git a/packstack/plugins/provision_700.py b/packstack/plugins/provision_700.py index ca19e9f69..784840960 100644 --- a/packstack/plugins/provision_700.py +++ b/packstack/plugins/provision_700.py @@ -21,6 +21,10 @@ from packstack.modules.ospluginutils import (appendManifestFile, PLUGIN_NAME = "OS-Provision" PLUGIN_NAME_COLORED = utils.color_text(PLUGIN_NAME, 'blue') +DEMO_CIRRUS_URL = ( + 'http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img' +) + def initConfig(controller): @@ -106,6 +110,21 @@ def initConfig(controller): "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, + + {"CMD_OPTION": "provision-cirros-url", + "USAGE": "A URL or local file location for the Cirros demo image " + "used for Glance", + "PROMPT": "Enter the URL or local file location for the Cirros " + "image", + "OPTION_LIST": False, + "VALIDATORS": [validators.validate_not_empty], + "DEFAULT_VALUE": DEMO_CIRRUS_URL, + "MASK_INPUT": False, + "LOOSE_VALIDATION": True, + "CONF_NAME": "CONFIG_PROVISION_CIRROS_URL", + "USE_DEFAULT": False, + "NEED_CONFIRM": False, + "CONDITION": False}, ], "TEMPEST_GIT_REFS": [ @@ -286,7 +305,7 @@ def create_storage_manifest(config, messages): if config['CONFIG_UNSUPPORTED'] != 'y': config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST'] - if config['CONFIG_PROVISION_TEMPEST'] == "y": + if config['CONFIG_PROVISION_TEMPEST']: template = "provision_tempest_glance.pp" else: template = "provision_demo_glance.pp" diff --git a/packstack/puppet/templates/provision_demo_glance.pp b/packstack/puppet/templates/provision_demo_glance.pp index 36d1c9ffb..062d0a2af 100644 --- a/packstack/puppet/templates/provision_demo_glance.pp +++ b/packstack/puppet/templates/provision_demo_glance.pp @@ -2,7 +2,7 @@ ## Images ## Glance $image_name = 'cirros' - $image_source = 'http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img' + $image_source = hiera('CONFIG_PROVISION_CIRROS_URL') $image_ssh_user = 'cirros' glance_image { $image_name: diff --git a/packstack/puppet/templates/provision_tempest.pp b/packstack/puppet/templates/provision_tempest.pp index 3b93e5b55..98a0db52d 100644 --- a/packstack/puppet/templates/provision_tempest.pp +++ b/packstack/puppet/templates/provision_tempest.pp @@ -24,7 +24,7 @@ if $provision_tempest_user != '' { ## Glance $image_name = 'cirros' - $image_source = 'http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img' + $image_source = hiera('CONFIG_PROVISION_TEMPEST_CIRROS_URL') $image_ssh_user = 'cirros' ## Neutron diff --git a/packstack/puppet/templates/provision_tempest_glance.pp b/packstack/puppet/templates/provision_tempest_glance.pp index 4793f6095..a4b83aaad 100644 --- a/packstack/puppet/templates/provision_tempest_glance.pp +++ b/packstack/puppet/templates/provision_tempest_glance.pp @@ -1,7 +1,7 @@ ## Glance $image_name = 'cirros' - $image_source = 'http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img' + $image_source = hiera('CONFIG_PROVISION_CIRROS_URL') $image_ssh_user = 'cirros' ## Tempest