Skip to content

Commit

Permalink
Ensure Nova Network-compatible demo provisioning
Browse files Browse the repository at this point in the history
Due to a limitation in the implementation of openstack::provision,
demo provisioning was previously limited to deployments with
Neutron.  This change adds support for provisioning users and
images and configuring tempest for deployments using Nova Network.

Closes-Bug: #1242668

Change-Id: Ic5d35e1f0f4f1fb8815193a7573955952dd698e4
  • Loading branch information
marun committed Oct 22, 2013
1 parent 00fc4fa commit d3bb52e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
13 changes: 6 additions & 7 deletions packstack/installer/run_setup.py
Expand Up @@ -651,13 +651,12 @@ def single_step_aio_install(options):
if not options.novanetwork_privif:
options.novanetwork_privif = "lo"

# If we are doing an all-in-one install and neutron isn't disabled
# go ahead and set up a basic network and external bridge unless
# specifically told not to
if options.os_neutron_install != "n":
if not options.provision_demo:
options.provision_demo = "y"
if not options.provision_all_in_one_ovs_bridge:
# If we are doing an all-in-one install, do demo provisioning
# unless specifically told not to
if not options.provision_demo:
options.provision_demo = "y"
if options.os_neutron_install != "n" and \
not options.provision_all_in_one_ovs_bridge:
options.provision_all_in_one_ovs_bridge = "y"

single_step_install(options)
Expand Down
30 changes: 22 additions & 8 deletions packstack/plugins/provision_700.py
Expand Up @@ -110,13 +110,12 @@ def initConfig(controllerObject):
def allow_provisioning(config):
# Provisioning is currently supported only for all-in-one (due
# to a limitation with how the custom types for OpenStack
# resources are implemented) and neutron with namespaces (due
# to the provisioning manifest assuming this configuration).
return is_all_in_one(config) and \
config['CONFIG_NEUTRON_INSTALL'] == 'y'
# resources are implemented).
return is_all_in_one(config)

def allow_all_in_one_ovs_bridge(config):
return allow_provisioning(config) and \
config['CONFIG_NEUTRON_INSTALL'] == 'y' and \
config['CONFIG_NEUTRON_L2_PLUGIN'] == 'openvswitch'

conf_groups = [
Expand Down Expand Up @@ -174,9 +173,24 @@ def initSequences(controller):


def create_manifest(config):
# Using the server host will suffice for the all-in-one case.
manifest_file = '%s_provision.pp' % (
controller.CONF['CONFIG_NEUTRON_SERVER_HOST']
)
# Using the neutron or nova api servers as the provisioning target
# will suffice for the all-in-one case.
if config['CONFIG_NEUTRON_INSTALL'] == "y":
host = config['CONFIG_NEUTRON_SERVER_HOST']
else:
host = config['CONFIG_NOVA_API_HOST']
# The provisioning template requires the name of the external
# bridge but the value will be missing if neutron isn't
# configured to be installed.
config['CONFIG_NEUTRON_L3_EXT_BRIDGE'] = 'br-ex'

# Set template-specific parameter to configure whether neutron is
# available. The value needs to be true/false rather than the y/n.
# provided by CONFIG_NEUTRON_INSTALL.
config['PROVISION_NEUTRON_AVAILABLE'] = config['CONFIG_NEUTRON_INSTALL']
marshall_conf_bool(config, 'PROVISION_NEUTRON_AVAILABLE')

manifest_file = '%s_provision.pp' % host

manifest_data = getManifestTemplate("provision.pp")
appendManifestFile(manifest_file, manifest_data)
1 change: 1 addition & 0 deletions packstack/puppet/templates/provision.pp
Expand Up @@ -4,6 +4,7 @@
configure_tempest => %(CONFIG_PROVISION_TEMPEST)s,
tempest_repo_uri => '%(CONFIG_PROVISION_TEMPEST_REPO_URI)s',
tempest_repo_revision => '%(CONFIG_PROVISION_TEMPEST_REPO_REVISION)s',
neutron_available => %(PROVISION_NEUTRON_AVAILABLE)s,
setup_ovs_bridge => %(CONFIG_PROVISION_ALL_IN_ONE_OVS_BRIDGE)s,
public_bridge_name => '%(CONFIG_NEUTRON_L3_EXT_BRIDGE)s',
floating_range => '%(CONFIG_PROVISION_DEMO_FLOATRANGE)s',
Expand Down

0 comments on commit d3bb52e

Please sign in to comment.