commit
b113ce2a7c
@ -162,7 +162,7 @@ def setup_resources():
|
|||||||
# NEUTRON
|
# NEUTRON
|
||||||
# Deploy chain neutron -> (plugins) -> neutron_server -> ( agents )
|
# Deploy chain neutron -> (plugins) -> neutron_server -> ( agents )
|
||||||
neutron_puppet = vr.create('neutron_puppet', 'resources/neutron_puppet', {
|
neutron_puppet = vr.create('neutron_puppet', 'resources/neutron_puppet', {
|
||||||
'core_plugin': 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2'
|
'core_plugin': 'neutron.plugins.ml2.plugin.Ml2Plugin'
|
||||||
})[0]
|
})[0]
|
||||||
signals.connect(node1, neutron_puppet)
|
signals.connect(node1, neutron_puppet)
|
||||||
signals.connect(rabbitmq_service1, neutron_puppet, {
|
signals.connect(rabbitmq_service1, neutron_puppet, {
|
||||||
@ -237,23 +237,16 @@ def setup_resources():
|
|||||||
'bind_port': ['admin_port', 'internal_port', 'public_port'],
|
'bind_port': ['admin_port', 'internal_port', 'public_port'],
|
||||||
})
|
})
|
||||||
|
|
||||||
# NEUTRON OVS PLUGIN & AGENT WITH GRE
|
# NEUTRON ML2 PLUGIN & ML2-OVS AGENT WITH GRE
|
||||||
neutron_plugins_ovs = vr.create('neutron_plugins_ovs', 'resources/neutron_plugins_ovs_puppet', {
|
neutron_plugins_ml2 = vr.create('neutron_plugins_ml2', 'resources/neutron_plugins_ml2_puppet', {})[0]
|
||||||
'tenant_network_type': 'gre',
|
signals.connect(node1, neutron_plugins_ml2)
|
||||||
})[0]
|
neutron_agents_ml2 = vr.create('neutron_agents_ml2', 'resources/neutron_agents_ml2_ovs_puppet', {
|
||||||
signals.connect(node1, neutron_plugins_ovs)
|
|
||||||
signals.connect(neutron_db_user, neutron_plugins_ovs, {
|
|
||||||
'user_name':'db_user',
|
|
||||||
'db_name':'db_name',
|
|
||||||
'user_password':'db_password',
|
|
||||||
'db_host' : 'db_host'
|
|
||||||
})
|
|
||||||
neutron_agents_ovs = vr.create('neutron_agents_ovs', 'resources/neutron_agents_ovs_puppet', {
|
|
||||||
# TODO(bogdando) these should come from the node network resource
|
# TODO(bogdando) these should come from the node network resource
|
||||||
'enable_tunneling': True,
|
'enable_tunneling': True,
|
||||||
|
'tunnel_types': ['gre'],
|
||||||
'local_ip': '10.1.0.13' # should be the IP addr of the br-mesh int.
|
'local_ip': '10.1.0.13' # should be the IP addr of the br-mesh int.
|
||||||
})[0]
|
})[0]
|
||||||
signals.connect(node1, neutron_agents_ovs)
|
signals.connect(node1, neutron_agents_ml2)
|
||||||
|
|
||||||
# NEUTRON DHCP, L3, metadata agents
|
# NEUTRON DHCP, L3, metadata agents
|
||||||
neutron_agents_dhcp = vr.create('neutron_agents_dhcp', 'resources/neutron_agents_dhcp_puppet', {})[0]
|
neutron_agents_dhcp = vr.create('neutron_agents_dhcp', 'resources/neutron_agents_dhcp_puppet', {})[0]
|
||||||
@ -285,17 +278,15 @@ def setup_resources():
|
|||||||
})
|
})
|
||||||
|
|
||||||
# NEUTRON OVS PLUGIN & AGENT WITH GRE FOR COMPUTE (node2)
|
# NEUTRON OVS PLUGIN & AGENT WITH GRE FOR COMPUTE (node2)
|
||||||
neutron_plugins_ovs2 = vr.create('neutron_plugins_ovs2', 'resources/neutron_plugins_ovs_puppet', {})[0]
|
neutron_plugins_ml22 = vr.create('neutron_plugins_ml22', 'resources/neutron_plugins_ml2_puppet', {})[0]
|
||||||
signals.connect(node2, neutron_plugins_ovs2)
|
signals.connect(node2, neutron_plugins_ml22)
|
||||||
signals.connect(neutron_plugins_ovs, neutron_plugins_ovs2, {
|
neutron_agents_ml22 = vr.create('neutron_agents_ml22', 'resources/neutron_agents_ml2_ovs_puppet', {
|
||||||
'db_host', 'db_name', 'db_password', 'db_user', 'tenant_network_type'
|
|
||||||
})
|
|
||||||
neutron_agents_ovs2 = vr.create('neutron_agents_ovs2', 'resources/neutron_agents_ovs_puppet', {
|
|
||||||
# TODO(bogdando) these should come from the node network resource
|
# TODO(bogdando) these should come from the node network resource
|
||||||
'enable_tunneling': True,
|
'enable_tunneling': True,
|
||||||
|
'tunnel_types': ['gre'],
|
||||||
'local_ip': '10.1.0.14' # Should be the IP addr of the br-mesh int.
|
'local_ip': '10.1.0.14' # Should be the IP addr of the br-mesh int.
|
||||||
})[0]
|
})[0]
|
||||||
signals.connect(node2, neutron_agents_ovs2)
|
signals.connect(node2, neutron_agents_ml22)
|
||||||
|
|
||||||
# CINDER
|
# CINDER
|
||||||
cinder_puppet = vr.create('cinder_puppet', 'resources/cinder_puppet', {})[0]
|
cinder_puppet = vr.create('cinder_puppet', 'resources/cinder_puppet', {})[0]
|
||||||
@ -614,9 +605,9 @@ resources_to_run = [
|
|||||||
'neutron_keystone_role',
|
'neutron_keystone_role',
|
||||||
'neutron_puppet',
|
'neutron_puppet',
|
||||||
'neutron_keystone_service_endpoint',
|
'neutron_keystone_service_endpoint',
|
||||||
'neutron_plugins_ovs',
|
'neutron_plugins_ml2',
|
||||||
'neutron_server_puppet',
|
'neutron_server_puppet',
|
||||||
'neutron_agents_ovs',
|
'neutron_agents_ml2',
|
||||||
'neutron_agents_dhcp',
|
'neutron_agents_dhcp',
|
||||||
'neutron_agents_l3',
|
'neutron_agents_l3',
|
||||||
'neutron_agents_metadata',
|
'neutron_agents_metadata',
|
||||||
@ -655,8 +646,8 @@ resources_to_run = [
|
|||||||
'nova_compute_puppet',
|
'nova_compute_puppet',
|
||||||
|
|
||||||
'neutron_puppet2',
|
'neutron_puppet2',
|
||||||
'neutron_plugins_ovs2',
|
'neutron_plugins_ml22',
|
||||||
'neutron_agents_ovs2',
|
'neutron_agents_ml22',
|
||||||
]
|
]
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
|
74
resources/neutron_agents_ml2_ovs_puppet/README.md
Normal file
74
resources/neutron_agents_ml2_ovs_puppet/README.md
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
# Neutron OVS agent with ML2 plugin puppet resource
|
||||||
|
|
||||||
|
Setups OVS neutron agent when using ML2 plugin
|
||||||
|
|
||||||
|
# === Parameters
|
||||||
|
|
||||||
|
source https://github.com/openstack/puppet-neutron/blob/5.1.0/manifests/agents/ml2/ovs.pp
|
||||||
|
|
||||||
|
``package_ensure``
|
||||||
|
(optional) The state of the package
|
||||||
|
Defaults to 'present'
|
||||||
|
|
||||||
|
``enabled``
|
||||||
|
(required) Whether or not to enable the OVS Agent
|
||||||
|
Defaults to true
|
||||||
|
|
||||||
|
``bridge_uplinks``
|
||||||
|
(optional) List of interfaces to connect to the bridge when doing
|
||||||
|
bridge mapping.
|
||||||
|
Defaults to empty list
|
||||||
|
|
||||||
|
``bridge_mapping``
|
||||||
|
(optional) List of <physical_network>:<bridge>
|
||||||
|
Defaults to empty list
|
||||||
|
|
||||||
|
``integration_bridge``
|
||||||
|
(optional) Integration bridge in OVS
|
||||||
|
Defaults to 'br-int'
|
||||||
|
|
||||||
|
``enable_tunneling``
|
||||||
|
(optional) Enable or not tunneling
|
||||||
|
Defaults to false
|
||||||
|
|
||||||
|
``tunnel_types``
|
||||||
|
(optional) List of types of tunnels to use when utilizing tunnels,
|
||||||
|
either 'gre' or 'vxlan'.
|
||||||
|
Defaults to false
|
||||||
|
|
||||||
|
``local_ip``
|
||||||
|
(optional) Local IP address of GRE tunnel endpoints.
|
||||||
|
Required when enabling tunneling
|
||||||
|
Defaults to false
|
||||||
|
|
||||||
|
``tunnel_bridge``
|
||||||
|
(optional) Bridge used to transport tunnels
|
||||||
|
Defaults to 'br-tun'
|
||||||
|
|
||||||
|
``vxlan_udp_port``
|
||||||
|
(optional) The UDP port to use for VXLAN tunnels.
|
||||||
|
Defaults to '4789'
|
||||||
|
|
||||||
|
``polling_interval``
|
||||||
|
(optional) The number of seconds the agent will wait between
|
||||||
|
polling for local device changes.
|
||||||
|
Defaults to '2"
|
||||||
|
|
||||||
|
``l2_population``
|
||||||
|
(optional) Extension to use alongside ml2 plugin's l2population
|
||||||
|
mechanism driver.
|
||||||
|
Defaults to false
|
||||||
|
|
||||||
|
``arp_responder``
|
||||||
|
(optional) Enable or not the ARP responder.
|
||||||
|
Recommanded when using l2 population mechanism driver.
|
||||||
|
Defaults to false
|
||||||
|
|
||||||
|
``firewall_driver``
|
||||||
|
(optional) Firewall driver for realizing neutron security group function.
|
||||||
|
Defaults to 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'.
|
||||||
|
|
||||||
|
``enable_distributed_routing``
|
||||||
|
(optional) Set to True on L2 agents to enable support
|
||||||
|
for distributed virtual routing.
|
||||||
|
Defaults to false
|
@ -1,4 +1,4 @@
|
|||||||
class { 'neutron::agents::ovs':
|
class { 'neutron::agents::ml2::ovs':
|
||||||
package_ensure => 'absent',
|
package_ensure => 'absent',
|
||||||
enabled => false,
|
enabled => false,
|
||||||
}
|
}
|
45
resources/neutron_agents_ml2_ovs_puppet/actions/run.pp
Normal file
45
resources/neutron_agents_ml2_ovs_puppet/actions/run.pp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
$resource = hiera($::resource_name)
|
||||||
|
|
||||||
|
$ip = $resource['input']['ip']['value']
|
||||||
|
|
||||||
|
$package_ensure = $resource['input']['package_ensure']['value']
|
||||||
|
$enabled = $resource['input']['enabled']['value']
|
||||||
|
$bridge_uplinks = $resource['input']['bridge_uplinks']['value']
|
||||||
|
$bridge_mappings = $resource['input']['bridge_mappings']['value']
|
||||||
|
$integration_bridge = $resource['input']['integration_bridge']['value']
|
||||||
|
$enable_tunneling = $resource['input']['enable_tunneling']['value']
|
||||||
|
$tunnel_types = $resource['input']['tunnel_types']['value']
|
||||||
|
$local_ip = $resource['input']['local_ip']['value']
|
||||||
|
$tunnel_bridge = $resource['input']['tunnel_bridge']['value']
|
||||||
|
$vxlan_udp_port = $resource['input']['vxlan_udp_port']['value']
|
||||||
|
$polling_interval = $resource['input']['polling_interval']['value']
|
||||||
|
$l2_population = $resource['input']['l2_population']['value']
|
||||||
|
$arp_responder = $resource['input']['arp_responder']['value']
|
||||||
|
$firewall_driver = $resource['input']['firewall_driver']['value']
|
||||||
|
$enable_distributed_routing = $resource['input']['enable_distributed_routing']['value']
|
||||||
|
|
||||||
|
class { 'neutron::agents::ml2::ovs':
|
||||||
|
enabled => true,
|
||||||
|
package_ensure => $package_ensure,
|
||||||
|
bridge_uplinks => $bridge_uplinks,
|
||||||
|
bridge_mappings => $bridge_mappings,
|
||||||
|
integration_bridge => $integration_bridge,
|
||||||
|
enable_tunneling => $enable_tunneling,
|
||||||
|
tunnel_types => $tunnel_types,
|
||||||
|
local_ip => $local_ip,
|
||||||
|
tunnel_bridge => $tunnel_bridge,
|
||||||
|
vxlan_udp_port => $vxlan_udp_port,
|
||||||
|
polling_interval => $polling_interval,
|
||||||
|
l2_population => $l2_population,
|
||||||
|
arp_responder => $arp_responder,
|
||||||
|
firewall_driver => $firewall_driver,
|
||||||
|
enable_distributed_routing => $enable_distributed_routing,
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove external class dependency and restore required ones
|
||||||
|
Service <| title == 'neutron-ovs-agent-service' |> {
|
||||||
|
require => undef
|
||||||
|
}
|
||||||
|
Neutron_plugin_ml2<||> ~> Service['neutron-ovs-agent-service']
|
||||||
|
File <| title == '/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini' |> ~>
|
||||||
|
Service<| title == 'neutron-ovs-agent-service' |>
|
@ -1,5 +1,5 @@
|
|||||||
handler: puppet
|
handler: puppet
|
||||||
id: 'neutron_agents_ovs_puppet'
|
id: 'neutron_agents_ml2_ovs_puppet'
|
||||||
input:
|
input:
|
||||||
ip:
|
ip:
|
||||||
schema: str!
|
schema: str!
|
||||||
@ -14,6 +14,9 @@ input:
|
|||||||
package_ensure:
|
package_ensure:
|
||||||
schema: str
|
schema: str
|
||||||
value: 'present'
|
value: 'present'
|
||||||
|
enabled:
|
||||||
|
schema: bool
|
||||||
|
value: true
|
||||||
bridge_uplinks:
|
bridge_uplinks:
|
||||||
schema: [str]
|
schema: [str]
|
||||||
value: []
|
value: []
|
||||||
@ -31,7 +34,7 @@ input:
|
|||||||
value: []
|
value: []
|
||||||
local_ip:
|
local_ip:
|
||||||
schema: str
|
schema: str
|
||||||
value:
|
value: ''
|
||||||
tunnel_bridge:
|
tunnel_bridge:
|
||||||
schema: str
|
schema: str
|
||||||
value: 'br-tun'
|
value: 'br-tun'
|
||||||
@ -41,17 +44,23 @@ input:
|
|||||||
polling_interval:
|
polling_interval:
|
||||||
schema: int
|
schema: int
|
||||||
value: 2
|
value: 2
|
||||||
|
l2_population:
|
||||||
|
schema: bool
|
||||||
|
value: false
|
||||||
|
arp_responder:
|
||||||
|
schema: bool
|
||||||
|
value: false
|
||||||
firewall_driver:
|
firewall_driver:
|
||||||
schema: str
|
schema: str
|
||||||
value: 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
value: 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
veth_mtu:
|
enable_distributed_routing:
|
||||||
schema: str
|
schema: bool
|
||||||
value:
|
value: false
|
||||||
|
|
||||||
git:
|
git:
|
||||||
schema: {repository: str!, branch: str!}
|
schema: {repository: str!, branch: str!}
|
||||||
value: {repository: 'https://github.com/openstack/puppet-neutron', branch: '5.1.0'}
|
value: {repository: 'https://github.com/openstack/puppet-neutron', branch: '5.1.0'}
|
||||||
|
|
||||||
puppet_module: 'neutron'
|
puppet_module: 'neutron'
|
||||||
tags: [resource/neutron, resource/neutron_agents_ovs]
|
tags: [resource/neutron, resource/neutron_agents_ml2_ovs]
|
||||||
version: 1.0.0
|
version: 1.0.0
|
@ -1,5 +0,0 @@
|
|||||||
# Neutron OVS agent puppet resource
|
|
||||||
|
|
||||||
Setups OVS neutron agent
|
|
||||||
|
|
||||||
source https://github.com/openstack/puppet-neutron/blob/5.1.0/manifests/agents/ovs.pp
|
|
@ -1,38 +0,0 @@
|
|||||||
$resource = hiera($::resource_name)
|
|
||||||
|
|
||||||
$ip = $resource['input']['ip']['value']
|
|
||||||
|
|
||||||
$package_ensure = $resource['input']['package_ensure']['value']
|
|
||||||
$bridge_uplinks = $resource['input']['bridge_uplinks']['value']
|
|
||||||
$bridge_mappings = $resource['input']['bridge_mappings']['value']
|
|
||||||
$integration_bridge = $resource['input']['integration_bridge']['value']
|
|
||||||
$enable_tunneling = $resource['input']['enable_tunneling']['value']
|
|
||||||
$tunnel_types = $resource['input']['tunnel_types']['value']
|
|
||||||
$local_ip = $resource['input']['local_ip']['value']
|
|
||||||
$tunnel_bridge = $resource['input']['tunnel_bridge']['value']
|
|
||||||
$vxlan_udp_port = $resource['input']['vxlan_udp_port']['value']
|
|
||||||
$polling_interval = $resource['input']['polling_interval']['value']
|
|
||||||
$firewall_driver = $resource['input']['firewall_driver']['value']
|
|
||||||
$veth_mtu = $resource['input']['veth_mtu']['value']
|
|
||||||
|
|
||||||
class { 'neutron::agents::ovs':
|
|
||||||
enabled => true,
|
|
||||||
manage_service => true,
|
|
||||||
package_ensure => $package_ensure,
|
|
||||||
bridge_uplinks => $bridge_uplinks,
|
|
||||||
bridge_mappings => $bridge_mappings,
|
|
||||||
integration_bridge => $integration_bridge,
|
|
||||||
enable_tunneling => $enable_tunneling,
|
|
||||||
tunnel_types => $tunnel_types,
|
|
||||||
local_ip => $local_ip,
|
|
||||||
tunnel_bridge => $tunnel_bridge,
|
|
||||||
vxlan_udp_port => $vxlan_udp_port,
|
|
||||||
polling_interval => $polling_interval,
|
|
||||||
firewall_driver => $firewall_driver,
|
|
||||||
veth_mtu => $veth_mtu,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove external class dependency
|
|
||||||
Service <| title == 'neutron-plugin-ovs-service' |> {
|
|
||||||
require => undef
|
|
||||||
}
|
|
83
resources/neutron_plugins_ml2_puppet/README.md
Normal file
83
resources/neutron_plugins_ml2_puppet/README.md
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
# Neutron ML2 plugin puppet resource
|
||||||
|
|
||||||
|
# === Parameters
|
||||||
|
|
||||||
|
source https://github.com/openstack/puppet-neutron/blob/5.1.0/manifests/plugins/ml2.pp
|
||||||
|
|
||||||
|
``type_drivers``
|
||||||
|
(optional) List of network type driver entrypoints to be loaded
|
||||||
|
from the neutron.ml2.type_drivers namespace.
|
||||||
|
Could be an array that can have these elements:
|
||||||
|
local, flat, vlan, gre, vxlan
|
||||||
|
Defaults to ['local', 'flat', 'vlan', 'gre', 'vxlan'].
|
||||||
|
|
||||||
|
``tenant_network_types``
|
||||||
|
(optional) Ordered list of network_types to allocate as tenant networks.
|
||||||
|
The value 'local' is only useful for single-box testing
|
||||||
|
but provides no connectivity between hosts.
|
||||||
|
Should be an array that can have these elements:
|
||||||
|
local, flat, vlan, gre, vxlan
|
||||||
|
Defaults to ['local', 'flat', 'vlan', 'gre', 'vxlan'].
|
||||||
|
|
||||||
|
``mechanism_drivers``
|
||||||
|
(optional) An ordered list of networking mechanism driver
|
||||||
|
entrypoints to be loaded from the neutron.ml2.mechanism_drivers namespace.
|
||||||
|
Should be an array that can have these elements:
|
||||||
|
logger, test, linuxbridge, openvswitch, hyperv, ncs, arista, cisco_nexus,
|
||||||
|
l2population, sriovnicswitch
|
||||||
|
Default to ['openvswitch', 'linuxbridge'].
|
||||||
|
|
||||||
|
``flat_networks``
|
||||||
|
(optional) List of physical_network names with which flat networks
|
||||||
|
can be created. Use * to allow flat networks with arbitrary
|
||||||
|
physical_network names.
|
||||||
|
Should be an array.
|
||||||
|
Default to *.
|
||||||
|
|
||||||
|
``network_vlan_ranges``
|
||||||
|
(optional) List of <physical_network>:<vlan_min>:<vlan_max> or
|
||||||
|
<physical_network> specifying physical_network names
|
||||||
|
usable for VLAN provider and tenant networks, as
|
||||||
|
well as ranges of VLAN tags on each available for
|
||||||
|
allocation to tenant networks.
|
||||||
|
Should be an array with vlan_min = 1 & vlan_max = 4094 (IEEE 802.1Q)
|
||||||
|
Default to empty.
|
||||||
|
|
||||||
|
``tunnel_id_ranges``
|
||||||
|
(optional) Comma-separated list of <tun_min>:<tun_max> tuples
|
||||||
|
enumerating ranges of GRE tunnel IDs that are
|
||||||
|
available for tenant network allocation
|
||||||
|
Should be an array with tun_max +1 - tun_min > 1000000
|
||||||
|
Default to empty.
|
||||||
|
|
||||||
|
``vxlan_group``
|
||||||
|
(optional) Multicast group for VXLAN.
|
||||||
|
Multicast group for VXLAN. If unset, disables VXLAN enable sending allocate
|
||||||
|
broadcast traffic to this multicast group. When left unconfigured, will
|
||||||
|
disable multicast VXLAN mode
|
||||||
|
Should be an Multicast IP (v4 or v6) address.
|
||||||
|
Default to 'None'.
|
||||||
|
|
||||||
|
``vni_ranges``
|
||||||
|
(optional) Comma-separated list of <vni_min>:<vni_max> tuples
|
||||||
|
enumerating ranges of VXLAN VNI IDs that are
|
||||||
|
available for tenant network allocation.
|
||||||
|
Min value is 0 and Max value is 16777215.
|
||||||
|
Default to empty.
|
||||||
|
|
||||||
|
``enable_security_group``
|
||||||
|
(optional) Controls if neutron security group is enabled or not.
|
||||||
|
It should be false when you use nova security group.
|
||||||
|
Defaults to true.
|
||||||
|
|
||||||
|
``supported_pci_vendor_devs``
|
||||||
|
(optional) Supported PCI vendor devices, defined by
|
||||||
|
vendor_id:product_id according to the PCI ID
|
||||||
|
Repository. Should be an array of devices.
|
||||||
|
Defaults to ['15b3:1004', '8086:10ca'] (Intel & Mellanox SR-IOV capable NICs)
|
||||||
|
|
||||||
|
``sriov_agent_required``
|
||||||
|
(optional) SRIOV neutron agent is required for port binding.
|
||||||
|
Only set to true if SRIOV network adapters support VF link state setting
|
||||||
|
and if admin state management is desired.
|
||||||
|
Defaults to false.
|
3
resources/neutron_plugins_ml2_puppet/actions/remove.pp
Normal file
3
resources/neutron_plugins_ml2_puppet/actions/remove.pp
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
class { 'neutron::plugins::ml2':
|
||||||
|
package_ensure => 'absent',
|
||||||
|
}
|
54
resources/neutron_plugins_ml2_puppet/actions/run.pp
Normal file
54
resources/neutron_plugins_ml2_puppet/actions/run.pp
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
$resource = hiera($::resource_name)
|
||||||
|
|
||||||
|
$ip = $resource['input']['ip']['value']
|
||||||
|
|
||||||
|
$type_drivers = $resource['input']['type_drivers']['value']
|
||||||
|
$tenant_network_types = $resource['input']['tenant_network_types']['value']
|
||||||
|
$mechanism_drivers = $resource['input']['mechanism_drivers']['value']
|
||||||
|
$flat_networks = $resource['input']['flat_networks']['value']
|
||||||
|
$network_vlan_ranges = $resource['input']['network_vlan_ranges']['value']
|
||||||
|
$tunnel_id_ranges = $resource['input']['tunnel_id_ranges']['value']
|
||||||
|
$vxlan_group = $resource['input']['vxlan_group']['value']
|
||||||
|
$vni_ranges = $resource['input']['vni_ranges']['value']
|
||||||
|
$enable_security_group = $resource['input']['enable_security_group']['value']
|
||||||
|
$package_ensure = $resource['input']['package_ensure']['value']
|
||||||
|
$supported_pci_vendor_devs = $resource['input']['supported_pci_vendor_devs']['value']
|
||||||
|
$sriov_agent_required = $resource['input']['sriov_agent_required']['value']
|
||||||
|
|
||||||
|
# LP1490438
|
||||||
|
file {'/etc/default/neutron-server':
|
||||||
|
ensure => present,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => 644
|
||||||
|
} ->
|
||||||
|
|
||||||
|
class { 'neutron::plugins::ml2':
|
||||||
|
type_drivers => $type_drivers,
|
||||||
|
tenant_network_types => $tenant_network_types,
|
||||||
|
mechanism_drivers => $mechanism_drivers,
|
||||||
|
flat_networks => $flat_networks,
|
||||||
|
network_vlan_ranges => $network_vlan_ranges,
|
||||||
|
tunnel_id_ranges => $tunnel_id_ranges,
|
||||||
|
vxlan_group => $vxlan_group,
|
||||||
|
vni_ranges => $vni_ranges,
|
||||||
|
enable_security_group => $enable_security_group,
|
||||||
|
package_ensure => $package_ensure,
|
||||||
|
supported_pci_vendor_devs => $supported_pci_vendor_devs,
|
||||||
|
sriov_agent_required => $sriov_agent_required,
|
||||||
|
} ->
|
||||||
|
|
||||||
|
exec { 'neutron-db-sync':
|
||||||
|
provider => 'shell',
|
||||||
|
command => "${command} stamp head",
|
||||||
|
path => [ '/usr/bin', '/bin' ],
|
||||||
|
onlyif => "${command} current | grep -qE '^Current revision.*None$' "
|
||||||
|
}
|
||||||
|
|
||||||
|
include neutron::params
|
||||||
|
|
||||||
|
package { 'neutron':
|
||||||
|
ensure => $package_ensure,
|
||||||
|
name => $::neutron::params::package_name,
|
||||||
|
before => Exec['neutron-db-sync']
|
||||||
|
}
|
57
resources/neutron_plugins_ml2_puppet/meta.yaml
Normal file
57
resources/neutron_plugins_ml2_puppet/meta.yaml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
handler: puppet
|
||||||
|
id: 'neutron_plugins_ml2_puppet'
|
||||||
|
input:
|
||||||
|
ip:
|
||||||
|
schema: str!
|
||||||
|
value:
|
||||||
|
ssh_key:
|
||||||
|
schema: str!
|
||||||
|
value:
|
||||||
|
ssh_user:
|
||||||
|
schema: str!
|
||||||
|
value:
|
||||||
|
|
||||||
|
type_drivers:
|
||||||
|
schema: [str]
|
||||||
|
value: ['local', 'flat', 'vlan', 'gre', 'vxlan']
|
||||||
|
tenant_network_types:
|
||||||
|
schema: [str]
|
||||||
|
value: ['local', 'flat', 'vlan', 'gre', 'vxlan']
|
||||||
|
mechanism_drivers:
|
||||||
|
schema: [str]
|
||||||
|
value: ['openvswitch', 'linuxbridge']
|
||||||
|
flat_networks:
|
||||||
|
schema: [str]
|
||||||
|
value: ['*']
|
||||||
|
network_vlan_ranges:
|
||||||
|
schema: [str]
|
||||||
|
value: ['physnet1:1000:2999']
|
||||||
|
tunnel_id_ranges:
|
||||||
|
schema: [str]
|
||||||
|
value: ['20:100']
|
||||||
|
vxlan_group:
|
||||||
|
schema: str
|
||||||
|
value: '224.0.0.1'
|
||||||
|
vni_ranges:
|
||||||
|
schema: [str]
|
||||||
|
value: ['10:100']
|
||||||
|
enable_security_group:
|
||||||
|
schema: bool
|
||||||
|
value: true
|
||||||
|
package_ensure:
|
||||||
|
schema: str
|
||||||
|
value: 'present'
|
||||||
|
supported_pci_vendor_devs:
|
||||||
|
schema: [str]
|
||||||
|
value: ['15b3:1004', '8086:10ca']
|
||||||
|
sriov_agent_required:
|
||||||
|
schema: bool
|
||||||
|
value: false
|
||||||
|
|
||||||
|
git:
|
||||||
|
schema: {repository: str!, branch: str!}
|
||||||
|
value: {repository: 'https://github.com/openstack/puppet-neutron', branch: '5.1.0'}
|
||||||
|
|
||||||
|
puppet_module: 'neutron'
|
||||||
|
tags: [resource/neutron, resource/neutron_plugins_ml2]
|
||||||
|
version: 1.0.0
|
@ -1,17 +0,0 @@
|
|||||||
# Neutron OVS plugin puppet resource
|
|
||||||
|
|
||||||
Configure the neutron server to use the OVS plugin.
|
|
||||||
This configures the plugin for the API server, but does nothing
|
|
||||||
about configuring the agents that must also run and share a config
|
|
||||||
file with the OVS plugin if both are on the same machine.
|
|
||||||
|
|
||||||
Note, this plugin was deprecated, you may want to use the ML2 plugin instead.
|
|
||||||
|
|
||||||
NB: don't need tunnel ID range when using VLANs,
|
|
||||||
*but* you do need the network vlan range regardless of type,
|
|
||||||
because the list of networks there is still important
|
|
||||||
even if the ranges aren't specified
|
|
||||||
if type is vlan or flat, a default of physnet1:1000:2000 is used
|
|
||||||
otherwise this will not be set by default.
|
|
||||||
|
|
||||||
source https://github.com/openstack/puppet-neutron/blob/5.1.0/manifests/plugins/ovs.pp
|
|
@ -1,15 +0,0 @@
|
|||||||
class { 'neutron::plugins::ovs':
|
|
||||||
package_ensure => 'absent',
|
|
||||||
}
|
|
||||||
|
|
||||||
include neutron::params
|
|
||||||
|
|
||||||
package { 'neutron':
|
|
||||||
ensure => 'absent',
|
|
||||||
name => $::neutron::params::package_name,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove external class dependency
|
|
||||||
Service <| title == 'neutron-plugin-ovs-service' |> {
|
|
||||||
require => undef
|
|
||||||
}
|
|
@ -1,51 +0,0 @@
|
|||||||
$resource = hiera($::resource_name)
|
|
||||||
|
|
||||||
$ip = $resource['input']['ip']['value']
|
|
||||||
|
|
||||||
$db_user = $resource['input']['db_user']['value']
|
|
||||||
$db_host = $resource['input']['db_host']['value']
|
|
||||||
$db_password = $resource['input']['db_password']['value']
|
|
||||||
$db_name = $resource['input']['db_name']['value']
|
|
||||||
|
|
||||||
$package_ensure = $resource['input']['package_ensure']['value']
|
|
||||||
$sql_max_retries = $resource['input']['sql_max_retries']['value']
|
|
||||||
$sql_idle_timeout = $resource['input']['sql_idle_timeout']['value']
|
|
||||||
$reconnect_interval = $resource['input']['reconnect_interval']['value']
|
|
||||||
$tenant_network_type = $resource['input']['tenant_network_type']['value']
|
|
||||||
$network_vlan_ranges = $resource['input']['network_vlan_ranges']['value']
|
|
||||||
$tunnel_id_ranges = $resource['input']['tunnel_id_ranges']['value']
|
|
||||||
$vxlan_udp_port = $resource['input']['vxlan_udp_port']['value']
|
|
||||||
|
|
||||||
# Stamp neutron head, if current version is None, or upgrade head would fail later
|
|
||||||
$command = '/usr/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini'
|
|
||||||
class { 'neutron::plugins::ovs':
|
|
||||||
package_ensure => $package_ensure,
|
|
||||||
sql_connection => "mysql://${db_user}:${db_password}@${db_host}/${db_name}",
|
|
||||||
sql_max_retries => $sql_max_retries,
|
|
||||||
sql_idle_timeout => $sql_idle_timeout,
|
|
||||||
reconnect_interval => $reconnect_interval,
|
|
||||||
tenant_network_type => $tenant_network_type,
|
|
||||||
network_vlan_ranges => $network_vlan_ranges,
|
|
||||||
tunnel_id_ranges => $tunnel_id_ranges,
|
|
||||||
vxlan_udp_port => $vxlan_udp_port,
|
|
||||||
} ->
|
|
||||||
|
|
||||||
exec { 'neutron-db-sync':
|
|
||||||
provider => 'shell',
|
|
||||||
command => "${command} stamp head",
|
|
||||||
path => [ '/usr/bin', '/bin' ],
|
|
||||||
onlyif => "${command} current | grep -qE '^Current revision.*None$' "
|
|
||||||
}
|
|
||||||
|
|
||||||
include neutron::params
|
|
||||||
|
|
||||||
package { 'neutron':
|
|
||||||
ensure => $package_ensure,
|
|
||||||
name => $::neutron::params::package_name,
|
|
||||||
before => Exec['neutron-db-sync']
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove external class dependency
|
|
||||||
Service <| title == 'neutron-plugin-ovs-service' |> {
|
|
||||||
require => undef
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
handler: puppet
|
|
||||||
id: 'neutron_plugins_ovs_puppet'
|
|
||||||
input:
|
|
||||||
ip:
|
|
||||||
schema: str!
|
|
||||||
value:
|
|
||||||
ssh_key:
|
|
||||||
schema: str!
|
|
||||||
value:
|
|
||||||
ssh_user:
|
|
||||||
schema: str!
|
|
||||||
value:
|
|
||||||
|
|
||||||
package_ensure:
|
|
||||||
schema: str
|
|
||||||
value: 'present'
|
|
||||||
sql_max_retries:
|
|
||||||
schema: str
|
|
||||||
value:
|
|
||||||
sql_idle_timeout:
|
|
||||||
schema: str
|
|
||||||
value:
|
|
||||||
reconnect_interval:
|
|
||||||
schema: str
|
|
||||||
value:
|
|
||||||
tenant_network_type:
|
|
||||||
schema: str
|
|
||||||
value: 'vlan'
|
|
||||||
network_vlan_ranges:
|
|
||||||
schema: str
|
|
||||||
value:
|
|
||||||
tunnel_id_ranges:
|
|
||||||
schema: str
|
|
||||||
value: '1:1000'
|
|
||||||
vxlan_udp_port:
|
|
||||||
schema: int
|
|
||||||
value: 4789
|
|
||||||
|
|
||||||
db_user:
|
|
||||||
schema: str!
|
|
||||||
value:
|
|
||||||
db_password:
|
|
||||||
schema: str!
|
|
||||||
value:
|
|
||||||
db_name:
|
|
||||||
schema: str!
|
|
||||||
value:
|
|
||||||
db_host:
|
|
||||||
schema: str!
|
|
||||||
value:
|
|
||||||
|
|
||||||
git:
|
|
||||||
schema: {repository: str!, branch: str!}
|
|
||||||
value: {repository: 'https://github.com/openstack/puppet-neutron', branch: '5.1.0'}
|
|
||||||
|
|
||||||
puppet_module: 'neutron'
|
|
||||||
tags: [resource/neutron, resource/neutron_plugins_ovs]
|
|
||||||
version: 1.0.0
|
|
Loading…
x
Reference in New Issue
Block a user