Update node_network resource
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
b8cca2db09
commit
dd654eac1d
@ -1,5 +1,9 @@
|
||||
# Node network resource for puppet handler
|
||||
|
||||
Setup and configure L23 networking for a node
|
||||
Setup and configure L23 networking for a node.
|
||||
Leverages the powerful network_scheme structures to
|
||||
create all required networking entities like interfaces,
|
||||
bridges, bonds - both linux and ovs based.
|
||||
Defaults are given for Debian OS family.
|
||||
|
||||
source https://github.com/xenolog/l23network
|
||||
|
@ -1,6 +1,41 @@
|
||||
$resource = hiera($::resource_name)
|
||||
#TODO
|
||||
|
||||
$ensure_package = $resource['input']['ensure_package']['value']
|
||||
$use_lnx = $resource['input']['use_lnx']['value']
|
||||
$use_ovs = $resource['input']['use_ovs']['value']
|
||||
$install_ovs = $resource['input']['install_ovs']['value']
|
||||
$install_brtool = $resource['input']['install_brtool']['value']
|
||||
$install_ethtool = $resource['input']['install_ethtool']['value']
|
||||
$install_bondtool = $resource['input']['install_bondtool']['value']
|
||||
$install_vlantool = $resource['input']['install_vlantool']['value']
|
||||
$ovs_modname = $resource['input']['ovs_modname']['value']
|
||||
$ovs_datapath_package_name = $resource['input']['ovs_datapath_package_name']['value']
|
||||
$ovs_common_package_name = $resource['input']['ovs_common_package_name']['value']
|
||||
$network_scheme = $resource['input']['network_scheme']['value']
|
||||
|
||||
class {'l23network':
|
||||
package_ensure => $package_ensure,
|
||||
ensure_package => $ensure_package,
|
||||
use_lnx => $use_lnx,
|
||||
use_ovs => $use_ovs,
|
||||
install_ovs => $install_ovs,
|
||||
install_brtool => $install_brtool,
|
||||
install_ethtool => $install_ethtool,
|
||||
install_bondtool => $install_bondtool,
|
||||
install_vlantool => $install_vlantool,
|
||||
ovs_modname => $ovs_modname,
|
||||
ovs_datapath_package_name => $ovs_datapath_package_name,
|
||||
ovs_common_package_name => $ovs_common_package_name,
|
||||
}
|
||||
|
||||
prepare_network_config($network_scheme)
|
||||
$sdn = generate_network_config()
|
||||
notify { $sdn: require => Class['l23network'], }
|
||||
|
||||
# We need to wait at least 30 seconds for the bridges and other interfaces to
|
||||
# come up after being created. This should allow for all interfaces to be up
|
||||
# and ready for traffic before proceeding with further deploy steps. LP#1458954
|
||||
exec { 'wait-for-interfaces':
|
||||
path => '/usr/bin:/bin',
|
||||
command => 'sleep 32',
|
||||
require => Notify[$sdn]
|
||||
}
|
@ -3,14 +3,55 @@ handler: puppet
|
||||
puppet_module: l23network
|
||||
version: 1.0.0
|
||||
input:
|
||||
#TODO
|
||||
package_ensure:
|
||||
schema: str
|
||||
value: 'present'
|
||||
ensure_package:
|
||||
schema: str
|
||||
value: 'present'
|
||||
use_lnx:
|
||||
schema: bool
|
||||
value: true
|
||||
use_ovs:
|
||||
schema: bool
|
||||
value: false
|
||||
install_ovs:
|
||||
schema: bool
|
||||
value: true
|
||||
install_brtool:
|
||||
schema: bool
|
||||
value: true
|
||||
install_ethtool:
|
||||
schema: bool
|
||||
value: true
|
||||
install_bondtool:
|
||||
schema: bool
|
||||
value: true
|
||||
install_vlantool:
|
||||
schema: bool
|
||||
value: true
|
||||
ovs_modname:
|
||||
schema: str
|
||||
value: 'openvswitch'
|
||||
ovs_datapath_package_name:
|
||||
schema: str
|
||||
value: 'openvswitch-datapath-dkms'
|
||||
ovs_common_package_name:
|
||||
schema: str
|
||||
value: 'openvswitch-switch'
|
||||
network_scheme:
|
||||
schema: {
|
||||
version: str!,
|
||||
provider: str!,
|
||||
interfaces: {},
|
||||
transformations: {},
|
||||
endpoints: {},
|
||||
roles: {},
|
||||
}
|
||||
|
||||
git:
|
||||
schema: {repository: str!, branch: str!}
|
||||
value: {repository: 'https://github.com/openstack/puppet-cinder', branch: '5.1.0'}
|
||||
value: {repository: 'https://github.com/xenolog/l23network', branch: 'master'}
|
||||
|
||||
ip:
|
||||
schema: str!
|
||||
@ -22,4 +63,4 @@ input:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
tags: [resource/l23network_service, resources/l23network, resources/cinder]
|
||||
tags: [resources/l23network, resources/node_network]
|
||||
|
Loading…
Reference in New Issue
Block a user