Merge "Add Quantum support to Packstack"

This commit is contained in:
Jenkins
2013-05-22 16:18:39 +00:00
committed by Gerrit Code Review
20 changed files with 482 additions and 4 deletions

6
.gitmodules vendored
View File

@@ -61,3 +61,9 @@
[submodule "packstack/puppet/modules/vlan"]
path = packstack/puppet/modules/vlan
url = https://github.com/derekhiggins/puppet-vlan.git
[submodule "packstack/puppet/modules/vswitch"]
path = packstack/puppet/modules/vswitch
url = https://github.com/packstack/puppet-vswitch.git
[submodule "packstack/puppet/modules/quantum"]
path = packstack/puppet/modules/quantum
url = https://github.com/stackforge/puppet-quantum.git

View File

@@ -98,5 +98,7 @@ def createmanifest(config):
append_for("cinder")
if controller.CONF['CONFIG_GLANCE_INSTALL'] == "y":
append_for("glance")
if controller.CONF['CONFIG_QUANTUM_INSTALL'] == 'y':
append_for("quantum")
appendManifestFile(manifestfile, "\n".join(manifestdata), 'pre')

View File

@@ -264,11 +264,16 @@ def initSequences(controller):
{'title': 'Adding Nova Cert manifest entries', 'functions':[createcertmanifest]},
{'title': 'Adding Nova Conductor manifest entries', 'functions':[createconductormanifest]},
{'title': 'Adding Nova Compute manifest entries', 'functions':[createcomputemanifest]},
{'title': 'Adding Nova Network manifest entries', 'functions':[createnetworkmanifest]},
{'title': 'Adding Nova Scheduler manifest entries', 'functions':[createschedmanifest]},
{'title': 'Adding Nova VNC Proxy manifest entries', 'functions':[createvncproxymanifest]},
{'title': 'Adding Nova Common manifest entries', 'functions':[createcommonmanifest]},
]
if controller.CONF['CONFIG_QUANTUM_INSTALL']:
novaapisteps.append({'title': 'Adding Openstack Network-related Nova manifest entries', 'functions':[createquantummanifest]})
else:
novaapisteps.append({'title': 'Adding Nova Network manifest entries', 'functions':[createnetworkmanifest]})
controller.addSequence("Installing OpenStack Nova API", [], [], novaapisteps)
@@ -349,6 +354,9 @@ def createcomputemanifest(config):
def createnetworkmanifest(config):
if controller.CONF['CONFIG_QUANTUM_INSTALL'] == "y":
return
host = controller.CONF['CONFIG_NOVA_NETWORK_HOST']
for i in ('CONFIG_NOVA_NETWORK_PRIVIF', 'CONFIG_NOVA_NETWORK_PUBIF'):
check_ifcfg(host, controller.CONF[i])
@@ -390,3 +398,13 @@ def createcommonmanifest(config):
if manifestfile.endswith("_nova.pp"):
data = getManifestTemplate("nova_common.pp")
appendManifestFile(os.path.split(manifestfile)[1], data)
def createquantummanifest(config):
if controller.CONF['CONFIG_QUANTUM_INSTALL'] != "y":
return
for manifestfile, marker in manifestfiles.getFiles():
if manifestfile.endswith("_nova.pp"):
data = getManifestTemplate("nova_quantum.pp")
appendManifestFile(os.path.split(manifestfile)[1], data)

View File

@@ -62,6 +62,18 @@ def initConfig(controllerObject):
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "os-quantum-install",
"USAGE" : "Set to 'y' if you would like Packstack to install Quantum",
"PROMPT" : "Should Packstack install Quantum compute service",
"OPTION_LIST" : ["y", "n"],
"VALIDATORS" : [validators.validate_options],
"DEFAULT_VALUE" : "y",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": False,
"CONF_NAME" : "CONFIG_QUANTUM_INSTALL",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "os-horizon-install",
"USAGE" : "Set to 'y' if you would like Packstack to install Horizon",
"PROMPT" : "Should Packstack install Horizon dashboard",

View File

@@ -79,8 +79,8 @@ def copyPuppetModules(config):
'glance', 'horizon', 'inifile',
'keystone', 'memcached', 'mysql',
'nova', 'openstack', 'packstack',
'qpid', 'rsync', 'ssh', 'stdlib',
'swift', 'sysctl', 'vlan', 'xinetd'))
'qpid', 'quantum', 'rsync', 'ssh', 'stdlib',
'swift', 'sysctl', 'vlan', 'vswitch', 'xinetd'))
# write puppet manifest to disk
manifestfiles.writeManifests()

View File

@@ -0,0 +1,364 @@
"""
Installs and configures quantum
"""
import logging
import os
import uuid
from packstack.installer import utils
from packstack.installer import validators
from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile
# Controller object will be initialized from main flow
controller = None
# Plugin name
PLUGIN_NAME = "OS-QUANTUM"
logging.debug("plugin %s loaded", __name__)
def initConfig(controllerObject):
global controller
controller = controllerObject
logging.debug("Adding OpenStack Quantum configuration")
conf_params = {
"QUANTUM" : [
{"CMD_OPTION" : "quantum-server-host",
"USAGE" : "The IP addresses of the server on which to install the Quantum server",
"PROMPT" : "Enter the IP address of the Quantum server",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_ip, validators.validate_ssh],
"DEFAULT_VALUE" : utils.get_localhost_ip(),
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_SERVER_HOST",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-use-namespaces",
"USAGE" : "Enable network namespaces for Quantum",
"PROMPT" : "Should Quantum use network namespaces?",
"OPTION_LIST" : ["y", "n"],
"VALIDATORS" : [validators.validate_options],
"DEFAULT_VALUE" : "y",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_USE_NAMESPACES",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-ks-password",
"USAGE" : "The password to use for Quantum to authenticate with Keystone",
"PROMPT" : "Enter the password for Quantum Keystone access",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_not_empty],
"DEFAULT_VALUE" : uuid.uuid4().hex[:16],
"MASK_INPUT" : True,
"LOOSE_VALIDATION": False,
"CONF_NAME" : "CONFIG_QUANTUM_KS_PW",
"USE_DEFAULT" : True,
"NEED_CONFIRM" : True,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-db-password",
"USAGE" : "The password to use for Quantum to access DB",
"PROMPT" : "Enter the password for Quantum DB access",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_not_empty],
"DEFAULT_VALUE" : uuid.uuid4().hex[:16],
"MASK_INPUT" : True,
"LOOSE_VALIDATION": False,
"CONF_NAME" : "CONFIG_QUANTUM_DB_PW",
"USE_DEFAULT" : True,
"NEED_CONFIRM" : True,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-l3-hosts",
"USAGE" : "A comma separated list of IP addresses on which to install Quantum L3 agent",
"PROMPT" : "Enter a comma separated list of IP addresses on which to install the Quantum L3 agent",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_multi_ssh],
"DEFAULT_VALUE" : utils.get_localhost_ip(),
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_L3_HOSTS",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-l3-ext-bridge",
"USAGE" : "The name of the bridge that the Quantum L3 agent will use for external traffic",
"PROMPT" : "Enter the name of the bridge that the Quantum L3 agent will use for external traffic",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_not_empty],
"DEFAULT_VALUE" : "br-ex",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_L3_EXT_BRIDGE",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-dhcp-hosts",
"USAGE" : "A comma separated list of IP addresses on which to install Quantum DHCP plugin",
"PROMPT" : "Enter a comma separated list of IP addresses on which to install Quantum DHCP plugin",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_multi_ssh],
"DEFAULT_VALUE" : utils.get_localhost_ip(),
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_DHCP_HOSTS",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-l2-plugin",
"USAGE" : "The name of the L2 plugin to be used with Quantum",
"PROMPT" : "Enter the name of the L2 plugin to be used with Quantum",
"OPTION_LIST" : ["linuxbridge", "openvswitch"],
"VALIDATORS" : [validators.validate_options],
"DEFAULT_VALUE" : "openvswitch",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": False,
"CONF_NAME" : "CONFIG_QUANTUM_L2_PLUGIN",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-metadata-hosts",
"USAGE" : "A comma separated list of IP addresses on which to install Quantum metadata agent",
"PROMPT" : "Enter a comma separated list of IP addresses on which to install the Quantum metadata agent",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_multi_ssh],
"DEFAULT_VALUE" : utils.get_localhost_ip(),
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_METADATA_HOSTS",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-metadata-pw",
"USAGE" : "A comma separated list of IP addresses on which to install Quantum metadata agent",
"PROMPT" : "Enter a comma separated list of IP addresses on which to install the Quantum metadata agent",
"OPTION_LIST" : [],
"VALIDATORS" : [validators.validate_not_empty],
"DEFAULT_VALUE" : uuid.uuid4().hex[:16],
"MASK_INPUT" : True,
"LOOSE_VALIDATION": False,
"CONF_NAME" : "CONFIG_QUANTUM_METADATA_PW",
"USE_DEFAULT" : True,
"NEED_CONFIRM" : True,
"CONDITION" : False },
],
"QUANTUM_LB_PLUGIN" : [
{"CMD_OPTION" : "quantum-lb-tenant-network-type",
"USAGE" : "The type of network to allocate for tenant networks",
"PROMPT" : "Enter the type of network to allocate for tenant networks",
"OPTION_LIST" : ["local", "vlan"],
"VALIDATORS" : [validators.validate_options],
"DEFAULT_VALUE" : "local",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": False,
"CONF_NAME" : "CONFIG_QUANTUM_LB_TENANT_NETWORK_TYPE",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-lb-vlan-ranges",
"USAGE" : "A comma separated list of VLAN ranges for the Quantum linuxbridge plugin",
"PROMPT" : "Enter a comma separated list of VLAN ranges for the Quantum linuxbridge plugin",
"OPTION_LIST" : [],
"VALIDATORS" : [],
"DEFAULT_VALUE" : "",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_LB_VLAN_RANGES",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-lb-interface-mappings",
"USAGE" : "A comma separated list of interface mappings for the Quantum linuxbridge plugin",
"PROMPT" : "Enter a comma separated list of interface mappings for the Quantum linuxbridge plugin",
"OPTION_LIST" : [],
"VALIDATORS" : [],
"DEFAULT_VALUE" : "",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_LB_INTERFACE_MAPPINGS",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
],
"QUANTUM_OVS_PLUGIN" : [
{"CMD_OPTION" : "quantum-ovs-tenant-network-type",
"USAGE" : "Type of network to allocate for tenant networks",
"PROMPT" : "Enter the type of network to allocate for tenant networks",
"OPTION_LIST" : ["local", "vlan", "gre"],
"VALIDATORS" : [validators.validate_options],
"DEFAULT_VALUE" : "local",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": False,
"CONF_NAME" : "CONFIG_QUANTUM_OVS_TENANT_NETWORK_TYPE",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-ovs-vlan-ranges",
"USAGE" : "A comma separated list of VLAN ranges for the Quantum openvswitch plugin",
"PROMPT" : "Enter a comma separated list of VLAN ranges for the Quantum openvswitch plugin",
"OPTION_LIST" : [],
"VALIDATORS" : [],
"DEFAULT_VALUE" : "",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_OVS_VLAN_RANGES",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
{"CMD_OPTION" : "quantum-ovs-bridge-mappings",
"USAGE" : "A comma separated list of bridge mappings for the Quantum openvswitch plugin",
"PROMPT" : "Enter a comma separated list of bridge mappings for the Quantum openvswitch plugin",
"OPTION_LIST" : [],
"VALIDATORS" : [],
"DEFAULT_VALUE" : "physnet1:1000:2000",
"MASK_INPUT" : False,
"LOOSE_VALIDATION": True,
"CONF_NAME" : "CONFIG_QUANTUM_OVS_BRIDGE_MAPPINGS",
"USE_DEFAULT" : False,
"NEED_CONFIRM" : False,
"CONDITION" : False },
],
}
conf_groups = [
{ "GROUP_NAME" : "QUANTUM",
"DESCRIPTION" : "Quantum config",
"PRE_CONDITION" : "CONFIG_QUANTUM_INSTALL",
"PRE_CONDITION_MATCH" : "y",
"POST_CONDITION" : False,
"POST_CONDITION_MATCH" : True },
{ "GROUP_NAME" : "QUANTUM_LB_PLUGIN",
"DESCRIPTION" : "Quantum LB plugin config",
"PRE_CONDITION" : "CONFIG_QUANTUM_L2_PLUGIN",
"PRE_CONDITION_MATCH" : "linuxbridge",
"POST_CONDITION" : False,
"POST_CONDITION_MATCH" : True },
{ "GROUP_NAME" : "QUANTUM_OVS_PLUGIN",
"DESCRIPTION" : "Quantum OVS plugin config",
"PRE_CONDITION" : "CONFIG_QUANTUM_L2_PLUGIN",
"PRE_CONDITION_MATCH" : "openvswitch",
"POST_CONDITION" : False,
"POST_CONDITION_MATCH" : True },
]
for group in conf_groups:
paramList = conf_params[group["GROUP_NAME"]]
controller.addGroup(group, paramList)
def getInterfaceDriver():
if controller.CONF["CONFIG_QUANTUM_L2_PLUGIN"] == "openvswitch":
return 'quantum.agent.linux.interface.OVSInterfaceDriver'
elif controller.CONF['CONFIG_QUANTUM_L2_PLUGIN'] == 'linuxbridge':
return 'quantum.agent.linux.interface.BridgeInterfaceDriver'
def initSequences(controller):
if controller.CONF['CONFIG_QUANTUM_INSTALL'] != 'y':
return
if controller.CONF['CONFIG_QUANTUM_USE_NAMESPACES'] == 'y':
controller.CONF['CONFIG_QUANTUM_USE_NAMESPACES'] = 'True'
else:
controller.CONF['CONFIG_QUANTUM_USE_NAMESPACES'] = 'False'
global api_hosts, l3_hosts, dhcp_hosts, compute_hosts, meta_hosts, q_hosts
api_hosts = set(controller.CONF['CONFIG_QUANTUM_SERVER_HOST'].split(','))
l3_hosts = set(controller.CONF['CONFIG_QUANTUM_L3_HOSTS'].split(','))
dhcp_hosts = set(controller.CONF['CONFIG_QUANTUM_DHCP_HOSTS'].split(','))
meta_hosts = set(controller.CONF['CONFIG_QUANTUM_METADATA_HOSTS'].split(','))
compute_hosts = set(controller.CONF['CONFIG_NOVA_COMPUTE_HOSTS'].split(','))
q_hosts = api_hosts | l3_hosts | dhcp_hosts | compute_hosts | meta_hosts
quantum_steps = [
{'title': 'Adding Quantum API manifest entries', 'functions':[createManifest]},
{'title': 'Adding Quantum Keystone manifest entries', 'functions':[createKeystoneManifest]},
{'title': 'Adding Quantum L3 manifest entries', 'functions':[createL3Manifests]},
{'title': 'Adding Quantum L2 Agent manifest entries', 'functions':[createL2AgentManifests]},
{'title': 'Adding Quantum DHCP Agent manifest entries', 'functions':[createDHCPManifests]},
{'title': 'Adding Quantum Metadata Agent manifest entries', 'functions':[createMetadataManifests]},
]
controller.addSequence("Installing OpenStack Quantum", [], [], quantum_steps)
def createManifest(config):
global q_hosts
for host in q_hosts:
if host in api_hosts:
controller.CONF['CONFIG_QUANTUM_SERVER_ENABLE'] = 'true'
else:
controller.CONF['CONFIG_QUANTUM_SERVER_ENABLE'] = 'false'
manifest_file = "%s_quantum.pp" % (host,)
manifest_data = getManifestTemplate("quantum.pp")
appendManifestFile(manifest_file, manifest_data, 'quantum')
# Set up any l2 plugin configs we need anywhere we install quantum
# XXX I am not completely sure about this, but it seems necessary
if controller.CONF['CONFIG_QUANTUM_L2_PLUGIN'] == 'openvswitch':
manifest_data = getManifestTemplate("quantum_ovs_plugin.pp")
appendManifestFile(manifest_file, manifest_data, 'quantum')
elif controller.CONF['CONFIG_QUANTUM_L2_PLUGIN'] == 'linuxbridge':
# Eventually linuxbridge module will need to spearate plugin/agent functionality
pass
def createKeystoneManifest(config):
manifestfile = "%s_keystone.pp"%controller.CONF['CONFIG_KEYSTONE_HOST']
manifestdata = getManifestTemplate("keystone_quantum.pp")
appendManifestFile(manifestfile, manifestdata)
def createL3Manifests(config):
global l3_hosts
for host in l3_hosts:
controller.CONF['CONFIG_QUANTUM_L3_HOST'] = host
controller.CONF['CONFIG_QUANTUM_L3_INTERFACE_DRIVER'] = getInterfaceDriver()
manifestdata = getManifestTemplate("quantum_l3.pp")
manifestfile = "%s_quantum.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + '\n')
if controller.CONF['CONFIG_QUANTUM_L2_PLUGIN'] == 'openvswitch' and controller.CONF['CONFIG_QUANTUM_L3_EXT_BRIDGE']:
controller.CONF['CONFIG_QUANTUM_OVS_BRIDGE'] = controller.CONF['CONFIG_QUANTUM_L3_EXT_BRIDGE']
manifestdata = getManifestTemplate('quantum_ovs_bridge.pp')
appendManifestFile(manifestfile, manifestdata + '\n')
def createDHCPManifests(config):
global dhcp_hosts
for host in dhcp_hosts:
controller.CONF["CONFIG_QUANTUM_DHCP_HOST"] = host
controller.CONF['CONFIG_QUANTUM_DHCP_INTERFACE_DRIVER'] = getInterfaceDriver()
manifestdata = getManifestTemplate("quantum_dhcp.pp")
manifestfile = "%s_quantum.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + "\n")
def createL2AgentManifests(config):
global compute_hosts, dhcp_host, l3_hosts
if controller.CONF["CONFIG_QUANTUM_L2_PLUGIN"] == "openvswitch":
host_var = 'CONFIG_QUANTUM_OVS_HOST'
template_name = 'quantum_ovs_agent.pp'
elif controller.CONF["CONFIG_QUANTUM_L2_PLUGIN"] == "linuxbridge":
host_var = 'CONFIG_QUANTUM_LB_HOST'
template_name = 'quantum_lb_agent.pp'
else:
raise KeyError("Unknown layer2 agent")
# Install l2 agents on every compute host in addition to any hosts listed
# specifically for the l2 agent
for host in compute_hosts | dhcp_hosts | l3_hosts:
controller.CONF[host_var] = host
manifestdata = getManifestTemplate(template_name)
manifestfile = "%s_quantum.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + "\n")
def createMetadataManifests(config):
global meta_hosts
for host in meta_hosts:
controller.CONF['CONFIG_QUANTUM_METADATA_HOST'] = host
manifestdata = getManifestTemplate('quantum_metadata.pp')
manifestfile = "%s_quantum.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + "\n")

View File

@@ -399,7 +399,6 @@ def serverprep(config):
'proxy_user': sat_proxy_user.strip(),
'proxy_pass': sat_proxy_pass.strip(),
'flags': sat_flags}
for hostname in gethostlist(config):
if '/' in hostname:
hostname = hostname.split('/')[0]

View File

@@ -0,0 +1,7 @@
class {"quantum::keystone::auth":
password => "%(CONFIG_QUANTUM_KS_PW)s",
public_address => "%(CONFIG_QUANTUM_SERVER_HOST)s",
admin_address => "%(CONFIG_QUANTUM_SERVER_HOST)s",
internal_address => "%(CONFIG_QUANTUM_SERVER_HOST)s",
}

View File

@@ -0,0 +1,4 @@
class {"quantum::db::mysql":
password => "%(CONFIG_QUANTUM_DB_PW)s",
allowed_hosts => "%%",
}

View File

@@ -0,0 +1,17 @@
class {"nova::network::quantum":
quantum_admin_password => "%(CONFIG_QUANTUM_KS_PW)s",
quantum_auth_strategy => "keystone",
quantum_url => "http://%(CONFIG_QUANTUM_SERVER_HOST)s:9696",
quantum_admin_tenant_name => "services",
quantum_admin_auth_url => "http://%(CONFIG_KEYSTONE_HOST)s:35357/v2.0",
}
class {"nova::compute::quantum":
libvirt_vif_driver => "nova.virt.libvirt.vif.LibvirtGenericVifDriver",
}
nova_config {
'DEFAULT/service_quantum_metadata_proxy': value => 'True';
'DEFAULT/quantum_metadata_proxy_shared_secret': value => '%(CONFIG_QUANTUM_METADATA_PW)s';
}

View File

@@ -0,0 +1,19 @@
$quantum_db_host = '%(CONFIG_MYSQL_HOST)s'
$quantum_db_name = 'quantum'
$quantum_db_user = 'quantum'
$quantum_db_password = '%(CONFIG_QUANTUM_DB_PW)s'
$quantum_sql_connection = "mysql://${quantum_db_user}:${quantum_db_password}@${quantum_db_host}/${quantum_db_name}"
$quantum_user_password = '%(CONFIG_QUANTUM_KS_PW)s'
# set up a quantum server
class { 'quantum':
rpc_backend => 'quantum.openstack.common.rpc.impl_qpid',
qpid_hostname => '%(CONFIG_QPID_HOST)s',
}
class { 'quantum::server':
auth_password => $quantum_user_password,
auth_host => '%(CONFIG_KEYSTONE_HOST)s',
enabled => '%(CONFIG_QUANTUM_SERVER_ENABLE)s',
}

View File

@@ -0,0 +1,4 @@
class { 'quantum::agents::dhcp':
use_namespaces => '%(CONFIG_QUANTUM_USE_NAMESPACES)s',
interface_driver => '%(CONFIG_QUANTUM_DHCP_INTERFACE_DRIVER)s',
}

View File

@@ -0,0 +1,5 @@
class { 'quantum::agents::l3':
use_namespaces => '%(CONFIG_QUANTUM_USE_NAMESPACES)s',
interface_driver => '%(CONFIG_QUANTUM_L3_INTERFACE_DRIVER)s',
external_network_bridge => '%(CONFIG_QUANTUM_L3_EXT_BRIDGE)s',
}

View File

@@ -0,0 +1,2 @@
class {'quantum::agents::linuxbridge':
}

View File

@@ -0,0 +1,6 @@
class {'quantum::agents::metadata':
auth_password => '%(CONFIG_QUANTUM_KS_PW)s',
auth_url => 'http://%(CONFIG_KEYSTONE_HOST)s:35357/v2.0',
shared_secret => '%(CONFIG_QUANTUM_METADATA_PW)s',
metadata_ip => '%(CONFIG_NOVA_API_HOST)s',
}

View File

@@ -0,0 +1,2 @@
class { 'quantum::agents::ovs':
}

View File

@@ -0,0 +1,4 @@
vs_bridge { '%(CONFIG_QUANTUM_OVS_BRIDGE)s':
ensure => present,
require => Service['quantum-plugin-ovs-service']
}

View File

@@ -0,0 +1,5 @@
class { 'quantum::plugins::ovs':
tenant_network_type => '%(CONFIG_QUANTUM_OVS_TENANT_NETWORK_TYPE)s',
network_vlan_ranges => '%(CONFIG_QUANTUM_OVS_VLAN_RANGES)s',
sql_connection => $quantum_sql_connection
}