plugin UI update patch novnc proxy base url

Change-Id: Ida35b2e652ec96cd9d7eae54fd3283b69bb43153
This commit is contained in:
Kanzhe Jiang 2015-12-11 13:10:37 -08:00
parent d3fc73cadb
commit 737b80d3e4
5 changed files with 71 additions and 41 deletions

View File

@ -15,30 +15,27 @@
# #
class bcf { class bcf {
$bond_lacp = "bond-mode 4" $bond_lacp = "bond-mode 4"
$sys_desc_lacp = "5c:16:c7:00:00:04" $sys_desc_lacp = "5c:16:c7:00:00:04"
$sys_desc_xor = "5c:16:c7:00:00:00" $sys_desc_xor = "5c:16:c7:00:00:00"
# Network configuration # Network configuration
$network_scheme = hiera_hash('network_scheme', {}) $network_scheme = hiera_hash('network_scheme', {})
prepare_network_config($network_scheme) prepare_network_config($network_scheme)
$gw = get_default_gateways() $gw = get_default_gateways()
$phy_devs = get_network_role_property('neutron/private', 'phys_dev') $phy_devs = get_network_role_property('neutron/private', 'phys_dev')
$if_str = "$phy_devs" $if_str = "$phy_devs"
if $if_str =~ /^bond.*/ { if $if_str =~ /^bond.*/ {
$ifaces = join($phy_devs, ",") $ifaces = join($phy_devs, ",")
$bond = true $bond = true
$s = "${phy_devs[0]}," $s = "${phy_devs[0]},"
$r = split("abc$ifaces", $s) $r = split("abc$ifaces", $s)
$itfs = $r[1] $itfs = $r[1]
} }
else { else {
$bond = false $bond = false
$itfs = $phy_devs $itfs = $phy_devs
} }
$network_metadata = hiera_hash('network_metadata', {})
notify { "ifaces: $ifaces": } $public_vip = $network_metadata['vips']['public']['ipaddr']
notify { "bond: $bond": }
notify { "gw: $gw": }
notify { "itfs: $itfs": }
} }

View File

@ -300,4 +300,20 @@ end script
setting => 'dhcp_delete_namespaces', setting => 'dhcp_delete_namespaces',
value => 'False', value => 'False',
} }
service { 'nova-compute':
ensure => running,
enable => true,
}
# update nova.conf for novncproxy_base_url
ini_setting { "nova novncproxy_base_url":
ensure => present,
path => '/etc/nova/nova.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'novncproxy_base_url',
value => "${bcf::public_vip}:6080/vnc_auto.html",
notify => Service['nova-compute']
}
} }

View File

@ -99,6 +99,7 @@ end script
key_val_separator => '=', key_val_separator => '=',
setting => 'report_interval', setting => 'report_interval',
value => '60', value => '60',
notify => Service['neutron-server', 'neutron-plugin-openvswitch-agent', 'neutron-l3-agent', 'neutron-dhcp-agent'],
} }
ini_setting { "neutron.conf agent_down_time": ini_setting { "neutron.conf agent_down_time":
ensure => present, ensure => present,
@ -107,6 +108,7 @@ end script
key_val_separator => '=', key_val_separator => '=',
setting => 'agent_down_time', setting => 'agent_down_time',
value => '150', value => '150',
notify => Service['neutron-server', 'neutron-plugin-openvswitch-agent', 'neutron-l3-agent', 'neutron-dhcp-agent'],
} }
ini_setting { "neutron.conf service_plugins": ini_setting { "neutron.conf service_plugins":
ensure => present, ensure => present,
@ -179,6 +181,7 @@ end script
key_val_separator => '=', key_val_separator => '=',
setting => 'enable_metadata_proxy', setting => 'enable_metadata_proxy',
value => 'False', value => 'False',
notify => Service['neutron-l3-agent'],
} }
ini_setting { "l3 agent external network bridge": ini_setting { "l3 agent external network bridge":
ensure => present, ensure => present,
@ -187,6 +190,16 @@ end script
key_val_separator => '=', key_val_separator => '=',
setting => 'external_network_bridge', setting => 'external_network_bridge',
value => '', value => '',
notify => Service['neutron-l3-agent'],
}
ini_setting { "l3 agent handle_internal_only_routers":
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'handle_internal_only_routers',
value => 'True',
notify => Service['neutron-l3-agent'],
} }
# config /etc/neutron/plugins/ml2/ml2_conf.ini # config /etc/neutron/plugins/ml2/ml2_conf.ini
@ -226,7 +239,7 @@ end script
value => '/etc/neutron/plugins/ml2', value => '/etc/neutron/plugins/ml2',
notify => Service['neutron-server'], notify => Service['neutron-server'],
} }
if $bcf::params::openstack::bcf_controller_2 == "" { if $bcf::params::openstack::bcf_controller_2 == ":8000" {
$server = $bcf::params::openstack::bcf_controller_1 $server = $bcf::params::openstack::bcf_controller_1
} }
else { else {
@ -341,17 +354,21 @@ end script
ensure => running, ensure => running,
enable => true, enable => true,
} }
service { 'keystone': service { 'neutron-plugin-openvswitch-agent':
ensure => running,
enable => true,
}
service { 'neutron-l3-agent':
ensure => running, ensure => running,
enable => true, enable => true,
} }
service { 'neutron-dhcp-agent': service { 'neutron-dhcp-agent':
ensure => stopped, ensure => running,
enable => false, enable => true,
} }
service { 'neutron-metadata-agent': service { 'keystone':
ensure => stopped, ensure => running,
enable => false, enable => true,
} }
} }

View File

@ -36,8 +36,8 @@ class bcf::params::openstack {
$rabbit_hash = hiera('rabbit') $rabbit_hash = hiera('rabbit')
$bcf_mode = $bcf_hash['bcf_mode'] $bcf_mode = $bcf_hash['bcf_mode']
$bcf_controller_1 = $bcf_hash['bcf_controller_1'] $bcf_controller_1 = "${bcf_hash['bcf_controller_1']}:8000"
$bcf_controller_2 = $bcf_hash['bcf_controller_2'] $bcf_controller_2 = "${bcf_hash['bcf_controller_2']}:8000"
$bcf_username = $bcf_hash['bcf_controller_username'] $bcf_username = $bcf_hash['bcf_controller_username']
$bcf_password = $bcf_hash['bcf_controller_password'] $bcf_password = $bcf_hash['bcf_controller_password']
$bcf_instance_id = $bcf_hash['openstack_instance_id'] $bcf_instance_id = $bcf_hash['openstack_instance_id']

View File

@ -20,22 +20,22 @@ attributes:
bcf_controller_1: bcf_controller_1:
value: "" value: ""
label: "BCF Controller1" label: "BCF Controller1"
description: "BCF Controller' IP address and ports: <ip>:8000" description: "BCF Controller' IP address"
weight: 10 weight: 10
type: "text" type: "text"
regex: 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}$'
error: "Invalid IP address and port" error: "Invalid IP address"
bcf_controller_2: bcf_controller_2:
value: "" value: ""
label: "BCF Controller2" label: "BCF Controller2"
description: "BCF Controller' IP address and ports: <ip>:<port>" description: "The second BCF Controller' IP address"
weight: 11 weight: 11
type: "text" type: "text"
regex: 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}$)'
error: "Invalid IP address and port" error: "Invalid IP address"
bcf_controller_username: bcf_controller_username:
value: "" value: ""
@ -49,7 +49,7 @@ attributes:
label: "BCF Controller Password" label: "BCF Controller Password"
description: "Password to access BCF controllers" description: "Password to access BCF controllers"
weight: 21 weight: 21
type: "text" type: "password"
openstack_instance_id: openstack_instance_id:
value: "" value: ""