Add neutron ovs plugin resource

* Add compostion layer for OVS plugin with GRE
* Fix neutron tags, use_ssl input

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-08-04 12:13:17 +02:00
parent 0570c4a670
commit 190beffd6c
7 changed files with 117 additions and 5 deletions

View File

@ -158,7 +158,7 @@ def setup_resources():
signals.connect(admin_user, openrc, {'user_name': 'user_name','user_password':'password', 'tenant_name': 'tenant'}) signals.connect(admin_user, openrc, {'user_name': 'user_name','user_password':'password', 'tenant_name': 'tenant'})
# NEUTRON # NEUTRON
# Deploy chain neutron -> neutron_server -> ( agents & plugins ) # Deploy chain neutron -> (plugins) -> neutron_server -> ( agents )
neutron_puppet = vr.create('neutron_puppet', 'resources/neutron_puppet', {})[0] neutron_puppet = vr.create('neutron_puppet', 'resources/neutron_puppet', {})[0]
signals.connect(node1, neutron_puppet) signals.connect(node1, neutron_puppet)
signals.connect(rabbitmq_service1, neutron_puppet, { signals.connect(rabbitmq_service1, neutron_puppet, {
@ -171,6 +171,12 @@ def setup_resources():
signals.connect(openstack_vhost, neutron_puppet, { signals.connect(openstack_vhost, neutron_puppet, {
'vhost_name': 'rabbit_virtual_host'}) 'vhost_name': 'rabbit_virtual_host'})
# NEUTRON OVS PLUGIN WITH GRE
neutron_plugins_ovs = vr.create('neutron_plugins_ovs_puppet', 'resources/neutron_plugins_ovs_puppet', {
'tenant_network_type': 'gre',
})[0]
signals.connect(node1, neutron_plugins_ovs)
# NEUTRON API (SERVER) # NEUTRON API (SERVER)
neutron_server_puppet = vr.create('neutron_server_puppet', 'resources/neutron_server_puppet', { neutron_server_puppet = vr.create('neutron_server_puppet', 'resources/neutron_server_puppet', {
'sync_db': True, 'sync_db': True,
@ -537,6 +543,7 @@ 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_server_puppet', 'neutron_server_puppet',
'cinder_db', 'cinder_db',

View File

@ -0,0 +1,15 @@
# 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.
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

View File

@ -0,0 +1,10 @@
class { 'neutron::plugins::ovs':
package_ensure => 'absent',
}
include neutron::params
package { 'neutron':
ensure => 'absent',
name => $::neutron::params::package_name,
}

View File

@ -0,0 +1,32 @@
$resource = hiera($::resource_name)
$ip = $resource['input']['ip']['value']
$package_ensure = $resource['input']['package_ensure']['value']
$sql_connection = $resource['input']['sql_connection']['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']
class { 'neutron::plugins::ovs':
package_ensure => $package_ensure,
sql_connection => $sql_connection,
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,
}
include neutron::params
package { 'neutron':
ensure => $package_ensure,
name => $::neutron::params::package_name,
}

View File

@ -0,0 +1,48 @@
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_connection:
schema: str
value: ''
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
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

View File

@ -156,8 +156,8 @@ input:
schema: int schema: int
value: 0 value: 0
use_ssl: use_ssl:
schema: str schema: bool
value: '' value: false
cert_file: cert_file:
schema: str schema: str
value: value:
@ -185,5 +185,5 @@ input:
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: [] tags: [resource/neutron]
version: 1.0.0 version: 1.0.0

View File

@ -147,5 +147,5 @@ input:
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: [] tags: [resource/neutron, resource/neutron_service, resource/neutron_server, resource/neutron_api]
version: 1.0.0 version: 1.0.0