split deployment scripts into p-only and p_v
Add structural support for p_only and p_v modes, add LACP support for controller nodes Change-Id: Idd46aa0a34c890ce77c784eeebfa88602b5c6b03
This commit is contained in:
parent
97913db098
commit
97932c7bd7
|
@ -14,4 +14,10 @@
|
|||
# under the License.
|
||||
#
|
||||
notice('MODULAR: bigswitch compute-config')
|
||||
include bcf::ceph
|
||||
include bcf::params
|
||||
if $bcf::params::openstack::bcf_mode == 'P-Only' {
|
||||
include bcf::p_only::ceph
|
||||
}
|
||||
else {
|
||||
include bcf::p_v::ceph
|
||||
}
|
||||
|
|
|
@ -14,4 +14,10 @@
|
|||
# under the License.
|
||||
#
|
||||
notice('MODULAR: bigswitch compute-config')
|
||||
include bcf::compute
|
||||
include bcf::params
|
||||
if $bcf::params::openstack::bcf_mode == 'P-Only' {
|
||||
include bcf::p_only::compute
|
||||
}
|
||||
else {
|
||||
include bcf::p_v::compute
|
||||
}
|
||||
|
|
|
@ -14,4 +14,10 @@
|
|||
# under the License.
|
||||
#
|
||||
notice("MODULAR: bigswitch controller-config")
|
||||
include bcf::controller
|
||||
include bcf::params
|
||||
if $bcf::params::openstack::bcf_mode == 'P-Only' {
|
||||
include bcf::p_only::controller
|
||||
}
|
||||
else {
|
||||
include bcf::p_v::controller
|
||||
}
|
||||
|
|
|
@ -0,0 +1,357 @@
|
|||
#
|
||||
# Copyright 2015 BigSwitch Networks, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
class bcf::controller {
|
||||
|
||||
include bcf
|
||||
include bcf::params
|
||||
$binpath = "/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin"
|
||||
|
||||
$ifcfg_bond0 = "/etc/network/interfaces.d/ifcfg-bond0"
|
||||
$sys_desc_lacp = "5c:16:c7:00:00:04"
|
||||
$sys_desc_xor = "5c:16:c7:00:00:00"
|
||||
if $bcf::bond {
|
||||
# ensure bond-mode is 802.3ad
|
||||
exec { "ensure ${bcf::bond_lacp} in $ifcfg_bond0":
|
||||
command => "echo '${bcf::bond_lacp}' >> $ifcfg_bond0",
|
||||
unless => "grep -qe '${bcf::bond_lacp}' -- $ifcfg_bond0",
|
||||
path => "/bin:/usr/bin",
|
||||
require => Exec["update bond-mode in $ifcfg_bond0"],
|
||||
}
|
||||
exec { "update bond-mode in $ifcfg_bond0":
|
||||
command => "sed -i 's/bond-mode.*/${bcf::bond_lacp}/' $ifcfg_bond0",
|
||||
path => "/bin:/usr/bin"
|
||||
}
|
||||
$sys_desc = $bcf::sys_desc_lacp
|
||||
}
|
||||
else {
|
||||
$sys_desc = $bcf::sys_desc_xor
|
||||
}
|
||||
|
||||
# lldp
|
||||
$a = file('/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/python_scripts/send_lldp','/dev/null')
|
||||
if($a != '') {
|
||||
file { "/bin/send_lldp":
|
||||
content => $a,
|
||||
ensure => file,
|
||||
mode => 0777,
|
||||
}
|
||||
}
|
||||
|
||||
file { "/etc/init/send_lldp.conf":
|
||||
ensure => file,
|
||||
content => "
|
||||
description \"BCF LLDP\"
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
respawn
|
||||
script
|
||||
exec /bin/send_lldp --system-desc $sys_desc --system-name $(uname -n) -i 10 --network_interface $bcf::itfs
|
||||
end script
|
||||
",
|
||||
}
|
||||
service { "send_lldp":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => [File['/bin/send_lldp'], File['/etc/init/send_lldp.conf']],
|
||||
}
|
||||
|
||||
package { 'python-pip':
|
||||
ensure => 'installed',
|
||||
}
|
||||
exec { 'bsnstacklib':
|
||||
command => 'pip install "bsnstacklib<2015.2"',
|
||||
path => "/usr/local/bin/:/usr/bin/:/bin",
|
||||
require => Package['python-pip']
|
||||
}
|
||||
|
||||
# load bonding module
|
||||
file_line {'load bonding on boot':
|
||||
path => '/etc/modules',
|
||||
line => 'bonding',
|
||||
match => '^bonding$',
|
||||
}
|
||||
|
||||
# purge bcf controller public key
|
||||
exec { 'purge bcf key':
|
||||
command => "rm -rf /etc/neutron/plugins/ml2/host_certs/*",
|
||||
path => $binpath,
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
|
||||
# config /etc/neutron/neutron.conf
|
||||
ini_setting { "neutron.conf report_interval":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'agent',
|
||||
key_val_separator => '=',
|
||||
setting => 'report_interval',
|
||||
value => '60',
|
||||
}
|
||||
ini_setting { "neutron.conf agent_down_time":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'agent_down_time',
|
||||
value => '150',
|
||||
}
|
||||
ini_setting { "neutron.conf service_plugins":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'service_plugins',
|
||||
value => 'router',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "neutron.conf dhcp_agents_per_network":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'dhcp_agents_per_network',
|
||||
value => '1',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "neutron.conf notification driver":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'notification_driver',
|
||||
value => 'messaging',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
|
||||
# configure /etc/keystone/keystone.conf
|
||||
ini_setting { "keystone.conf notification driver":
|
||||
ensure => present,
|
||||
path => '/etc/keystone/keystone.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'notification_driver',
|
||||
value => 'messaging',
|
||||
notify => Service['keystone'],
|
||||
}
|
||||
|
||||
# config /etc/neutron/plugin.ini
|
||||
ini_setting { "neutron plugin.ini firewall_driver":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugin.ini',
|
||||
section => 'securitygroup',
|
||||
key_val_separator => '=',
|
||||
setting => 'firewall_driver',
|
||||
value => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "neutron plugin.ini enable_security_group":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugin.ini',
|
||||
section => 'securitygroup',
|
||||
key_val_separator => '=',
|
||||
setting => 'enable_security_group',
|
||||
value => 'True',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
file { '/etc/neutron/dnsmasq-neutron.conf':
|
||||
ensure => file,
|
||||
content => 'dhcp-option-force=26,1400',
|
||||
}
|
||||
|
||||
# config /etc/neutron/l3-agent.ini
|
||||
ini_setting { "l3 agent disable metadata proxy":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/l3_agent.ini',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'enable_metadata_proxy',
|
||||
value => 'False',
|
||||
}
|
||||
ini_setting { "l3 agent external network bridge":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/l3_agent.ini',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'external_network_bridge',
|
||||
value => '',
|
||||
}
|
||||
|
||||
# config /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||
ini_setting { "ml2 type dirvers":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'ml2',
|
||||
key_val_separator => '=',
|
||||
setting => 'type_drivers',
|
||||
value => 'vlan',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 tenant network types":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'ml2',
|
||||
key_val_separator => '=',
|
||||
setting => 'tenant_network_types',
|
||||
value => 'vlan',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 mechanism drivers":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'ml2',
|
||||
key_val_separator => '=',
|
||||
setting => 'mechanism_drivers',
|
||||
value => 'openvswitch,bsn_ml2',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy ssl cert directory":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'ssl_cert_directory',
|
||||
value => '/etc/neutron/plugins/ml2',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
if $bcf::params::openstack::bcf_controller_2 == "" {
|
||||
$server = $bcf::params::openstack::bcf_controller_1
|
||||
}
|
||||
else {
|
||||
$server = "${bcf::params::openstack::bcf_controller_1},${bcf::params::openstack::bcf_controller_2}"
|
||||
}
|
||||
|
||||
ini_setting { "ml2 restproxy servers":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'servers',
|
||||
value => $server,
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy server auth":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'server_auth',
|
||||
value => "${bcf::params::openstack::bcf_username}:${bcf::params::openstack::bcf_password}",
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy server ssl":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'server_ssl',
|
||||
value => 'True',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy auto sync on failure":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'auto_sync_on_failure',
|
||||
value => 'True',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy consistency interval":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'consistency_interval',
|
||||
value => 60,
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy neutron_id":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'neutron_id',
|
||||
value => "${bcf::params::openstack::bcf_instance_id}",
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy auth_url":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'auth_url',
|
||||
value => "http://${bcf::params::openstack::keystone_vip}:35357",
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy auth_user":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'auth_user',
|
||||
value => "${bcf::params::openstack::auth_user}",
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy auth_password":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'auth_password',
|
||||
value => "${bcf::params::openstack::auth_password}",
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy auth_tenant_name":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'auth_tenant',
|
||||
value => "${bcf::params::openstack::auth_tenant_name}",
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
|
||||
# change ml2 ownership
|
||||
file { '/etc/neutron/plugins/ml2':
|
||||
owner => neutron,
|
||||
group => neutron,
|
||||
recurse => true,
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
|
||||
# heat-engine, neutron-server, neutron-dhcp-agent and neutron-metadata-agent
|
||||
service { 'heat-engine':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
}
|
||||
service { 'neutron-server':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
}
|
||||
service { 'keystone':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
}
|
||||
service { 'neutron-dhcp-agent':
|
||||
ensure => stopped,
|
||||
enable => false,
|
||||
}
|
||||
service { 'neutron-metadata-agent':
|
||||
ensure => stopped,
|
||||
enable => false,
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#
|
||||
# Copyright 2015 BigSwitch Networks, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
class bcf::ceph {
|
||||
|
||||
include bcf
|
||||
include bcf::params
|
||||
# all of the exec statements use this path
|
||||
$binpath = "/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin"
|
||||
|
||||
$ifcfg_bond0 = "/etc/network/interfaces.d/ifcfg-bond0"
|
||||
if $bcf::bond {
|
||||
# ensure bond-mode is 802.3ad
|
||||
exec { "ensure ${bcf::bond_lacp} in $ifcfg_bond0":
|
||||
command => "echo '${bcf::bond_lacp}' >> $ifcfg_bond0",
|
||||
unless => "grep -qe '${bcf::bond_lacp}' -- $ifcfg_bond0",
|
||||
path => "/bin:/usr/bin",
|
||||
require => Exec["update bond-mode in $ifcfg_bond0"],
|
||||
}
|
||||
exec { "update bond-mode in $ifcfg_bond0":
|
||||
command => "sed -i 's/bond-mode.*/${bcf::bond_lacp}/' $ifcfg_bond0",
|
||||
path => "/bin:/usr/bin"
|
||||
}
|
||||
$sys_desc = $bcf::sys_desc_lacp
|
||||
}
|
||||
else {
|
||||
$sys_desc = $bcf::sys_desc_xor
|
||||
}
|
||||
|
||||
# lldp
|
||||
file { "/bin/send_lldp":
|
||||
ensure => file,
|
||||
mode => 0777,
|
||||
}
|
||||
file { "/etc/init/send_lldp.conf":
|
||||
ensure => file,
|
||||
content => "
|
||||
description \"BCF LLDP\"
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
respawn
|
||||
script
|
||||
exec /bin/send_lldp --system-desc $sys_desc --system-name $(uname -n) -i 10 --network_interface $bcf::itfs
|
||||
end script
|
||||
",
|
||||
}
|
||||
service { "send_lldp":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => [File['/bin/send_lldp'], File['/etc/init/send_lldp.conf']],
|
||||
}
|
||||
}
|
|
@ -0,0 +1,303 @@
|
|||
#
|
||||
# Copyright 2015 BigSwitch Networks, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
class bcf::compute {
|
||||
|
||||
include bcf
|
||||
include bcf::params
|
||||
# all of the exec statements use this path
|
||||
$binpath = "/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin"
|
||||
|
||||
$ifcfg_bond0 = "/etc/network/interfaces.d/ifcfg-bond0"
|
||||
$sys_desc_lacp = "5c:16:c7:00:00:04"
|
||||
$sys_desc_xor = "5c:16:c7:00:00:00"
|
||||
if $bcf::bond {
|
||||
# ensure bond-mode is 802.3ad
|
||||
exec { "ensure ${bcf::bond_lacp} in $ifcfg_bond0":
|
||||
command => "echo '${bcf::bond_lacp}' >> $ifcfg_bond0",
|
||||
unless => "grep -qe '${bcf::bond_lacp}' -- $ifcfg_bond0",
|
||||
path => "/bin:/usr/bin",
|
||||
require => Exec["update bond-mode in $ifcfg_bond0"],
|
||||
}
|
||||
exec { "update bond-mode in $ifcfg_bond0":
|
||||
command => "sed -i 's/bond-mode.*/${bcf::bond_lacp}/' $ifcfg_bond0",
|
||||
path => "/bin:/usr/bin"
|
||||
}
|
||||
$sys_desc = $bcf::sys_desc_lacp
|
||||
}
|
||||
else {
|
||||
$sys_desc = $bcf::sys_desc_xor
|
||||
}
|
||||
|
||||
# lldp
|
||||
$a = file('/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/python_scripts/send_lldp','/dev/null')
|
||||
if($a != '') {
|
||||
file { "/bin/send_lldp":
|
||||
content => $a,
|
||||
ensure => file,
|
||||
mode => 0777,
|
||||
}
|
||||
}
|
||||
|
||||
file { "/etc/init/send_lldp.conf":
|
||||
ensure => file,
|
||||
content => "
|
||||
description \"BCF LLDP\"
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
respawn
|
||||
script
|
||||
exec /bin/send_lldp --system-desc $sys_desc --system-name $(uname -n) -i 10 --network_interface $bcf::itfs
|
||||
end script
|
||||
",
|
||||
}
|
||||
service { "send_lldp":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => [File['/bin/send_lldp'], File['/etc/init/send_lldp.conf']],
|
||||
}
|
||||
|
||||
# edit rc.local for cron job and default gw
|
||||
file { "/etc/rc.local":
|
||||
ensure => file,
|
||||
mode => 0777,
|
||||
}->
|
||||
file_line { "remove clear default gw":
|
||||
path => '/etc/rc.local',
|
||||
ensure => absent,
|
||||
line => "ip route del default",
|
||||
}->
|
||||
file_line { "remove ip route add default":
|
||||
path => '/etc/rc.local',
|
||||
ensure => absent,
|
||||
line => "ip route add default via ${bcf::gw}",
|
||||
}->
|
||||
file_line { "clear default gw":
|
||||
path => '/etc/rc.local',
|
||||
line => "ip route del default",
|
||||
}->
|
||||
file_line { "add default gw":
|
||||
path => '/etc/rc.local',
|
||||
line => "ip route add default via ${bcf::gw}",
|
||||
}->
|
||||
file_line { "add exit 0":
|
||||
path => '/etc/rc.local',
|
||||
line => "exit 0",
|
||||
}
|
||||
|
||||
# config /etc/neutron/neutron.conf
|
||||
ini_setting { "neutron.conf report_interval":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'agent',
|
||||
key_val_separator => '=',
|
||||
setting => 'report_interval',
|
||||
value => '60',
|
||||
}
|
||||
ini_setting { "neutron.conf agent_down_time":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'agent_down_time',
|
||||
value => '150',
|
||||
}
|
||||
ini_setting { "neutron.conf service_plugins":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'service_plugins',
|
||||
value => 'router',
|
||||
}
|
||||
ini_setting { "neutron.conf dhcp_agents_per_network":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'dhcp_agents_per_network',
|
||||
value => '1',
|
||||
}
|
||||
ini_setting { "neutron.conf notification driver":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/neutron.conf',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'notification_driver',
|
||||
value => 'messaging',
|
||||
}
|
||||
|
||||
# set the correct properties in ml2_conf.ini on compute as well
|
||||
# config /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||
ini_setting { "ml2 type dirvers":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'ml2',
|
||||
key_val_separator => '=',
|
||||
setting => 'type_drivers',
|
||||
value => 'vlan',
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 tenant network types":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'ml2',
|
||||
key_val_separator => '=',
|
||||
setting => 'tenant_network_types',
|
||||
value => 'vlan',
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 mechanism drivers":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'ml2',
|
||||
key_val_separator => '=',
|
||||
setting => 'mechanism_drivers',
|
||||
value => 'openvswitch,bsn_ml2',
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy ssl cert directory":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'ssl_cert_directory',
|
||||
value => '/etc/neutron/plugins/ml2',
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy servers":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'servers',
|
||||
value => "${bcf::params::openstack::bcf_controller_1},${bcf::params::openstack::bcf_controller_2}",
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy server auth":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'server_auth',
|
||||
value => "${bcf::params::openstack::bcf_username}:${bcf::params::openstack::bcf_password}",
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy server ssl":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'server_ssl',
|
||||
value => 'True',
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy auto sync on failure":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'auto_sync_on_failure',
|
||||
value => 'True',
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy consistency interval":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'consistency_interval',
|
||||
value => 60,
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
ini_setting { "ml2 restproxy neutron_id":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
section => 'restproxy',
|
||||
key_val_separator => '=',
|
||||
setting => 'neutron_id',
|
||||
value => "${bcf::params::openstack::bcf_instance_id}",
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
|
||||
# change ml2 ownership
|
||||
file { '/etc/neutron/plugins/ml2':
|
||||
owner => neutron,
|
||||
group => neutron,
|
||||
recurse => true,
|
||||
notify => Service['neutron-plugin-openvswitch-agent'],
|
||||
}
|
||||
|
||||
# ensure neutron-plugin-openvswitch-agent is running
|
||||
file { "/etc/init/neutron-plugin-openvswitch-agent.conf":
|
||||
ensure => file,
|
||||
mode => 0644,
|
||||
}
|
||||
service { 'neutron-plugin-openvswitch-agent':
|
||||
ensure => 'running',
|
||||
enable => 'true',
|
||||
provider => 'upstart',
|
||||
hasrestart => 'true',
|
||||
hasstatus => 'true',
|
||||
subscribe => [File['/etc/init/neutron-plugin-openvswitch-agent.conf']],
|
||||
}
|
||||
|
||||
file { '/etc/neutron/dnsmasq-neutron.conf':
|
||||
ensure => file,
|
||||
content => 'dhcp-option-force=26,1400',
|
||||
}
|
||||
|
||||
# dhcp configuration
|
||||
ini_setting { "dhcp agent interface driver":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/dhcp_agent.ini',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'interface_driver',
|
||||
value => 'neutron.agent.linux.interface.OVSInterfaceDriver',
|
||||
}
|
||||
ini_setting { "dhcp agent dhcp driver":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/dhcp_agent.ini',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'dhcp_driver',
|
||||
value => 'neutron.agent.linux.dhcp.Dnsmasq',
|
||||
}
|
||||
ini_setting { "dhcp agent enable isolated metadata":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/dhcp_agent.ini',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'enable_isolated_metadata',
|
||||
value => 'True',
|
||||
}
|
||||
ini_setting { "dhcp agent disable metadata network":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/dhcp_agent.ini',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'enable_metadata_network',
|
||||
value => 'False',
|
||||
}
|
||||
ini_setting { "dhcp agent disable dhcp_delete_namespaces":
|
||||
ensure => present,
|
||||
path => '/etc/neutron/dhcp_agent.ini',
|
||||
section => 'DEFAULT',
|
||||
key_val_separator => '=',
|
||||
setting => 'dhcp_delete_namespaces',
|
||||
value => 'False',
|
||||
}
|
||||
}
|
|
@ -27,11 +27,18 @@ class bcf::controller {
|
|||
require => Package['python-pip']
|
||||
}
|
||||
|
||||
# load bonding module
|
||||
file_line {'load bonding on boot':
|
||||
path => '/etc/modules',
|
||||
line => 'bonding',
|
||||
match => '^bonding$',
|
||||
# uplink mtu
|
||||
define uplink_mtu {
|
||||
file_line { "ifconfig $name mtu ${bcf::params::openstack::mtu}":
|
||||
path => '/etc/rc.local',
|
||||
line => "ifconfig $name mtu ${bcf::params::openstack::mtu}",
|
||||
match => "^ifconfig $name mtu ${bcf::params::openstack::mtu}",
|
||||
}
|
||||
}
|
||||
|
||||
# make sure known_hosts is cleaned up
|
||||
file { "/root/.ssh/known_hosts":
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
# purge bcf controller public key
|
|
@ -20,7 +20,7 @@ attributes:
|
|||
bcf_controller_1:
|
||||
value: ""
|
||||
label: "BCF Controller1"
|
||||
description: "BCF Controller' IP address and ports: <ip>:<port>"
|
||||
description: "BCF Controller' IP address and ports: <ip>:8000"
|
||||
weight: 10
|
||||
type: "text"
|
||||
regex:
|
||||
|
|
Loading…
Reference in New Issue