update controller script

Change-Id: I0dc9b1ba89c754e252f57f3aa582274755078f70
This commit is contained in:
Kanzhe Jiang 2015-12-08 16:16:59 -08:00
parent 9c91afaf6c
commit 97913db098
2 changed files with 27 additions and 22 deletions

View File

@ -18,6 +18,15 @@ class bcf::controller {
include bcf::params
$binpath = "/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin"
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',
@ -167,13 +176,20 @@ class bcf::controller {
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 => "${bcf::params::openstack::bcf_controller_1},${bcf::params::openstack::bcf_controller_2}",
value => $server,
notify => Service['neutron-server'],
}
ini_setting { "ml2 restproxy server auth":
@ -227,7 +243,7 @@ class bcf::controller {
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_url',
value => "${bcf::params::openstack::keystone_vip}:35357",
value => "http://${bcf::params::openstack::keystone_vip}:35357",
notify => Service['neutron-server'],
}
ini_setting { "ml2 restproxy auth_user":
@ -287,9 +303,5 @@ class bcf::controller {
ensure => stopped,
enable => false,
}
service {'neutron-bsn-agent':
ensure => stopped,
enable => false,
}
}

View File

@ -34,7 +34,7 @@ attributes:
weight: 11
type: "text"
regex:
source: '^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\:(?:(6553[0-5])|(655[0-2]\d)|(65[0-4]\d{2})|(6[0-4]\d{3})|([1-5]\d{4})|([1-9]\d{1,3})|([1-9])))$'
source: '(^$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\:(?:(6553[0-5])|(655[0-2]\d)|(65[0-4]\d{2})|(6[0-4]\d{3})|([1-5]\d{4})|([1-9]\d{1,3})|([1-9]))))$'
error: "Invalid IP address and port"
bcf_controller_username:
@ -57,10 +57,3 @@ attributes:
description: "The Openstack instance ID that is unique within the BCF fabric"
weight: 30
type: "text"
bcf_controller_os_mgmt:
value: ""
label: "Openstack Management Tenant Name"
description: "The tenant that defines Openstack management segments"
weight: 40
type: "text"