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

View File

@ -300,4 +300,20 @@ end script
setting => 'dhcp_delete_namespaces',
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 => '=',
setting => 'report_interval',
value => '60',
notify => Service['neutron-server', 'neutron-plugin-openvswitch-agent', 'neutron-l3-agent', 'neutron-dhcp-agent'],
}
ini_setting { "neutron.conf agent_down_time":
ensure => present,
@ -107,6 +108,7 @@ end script
key_val_separator => '=',
setting => 'agent_down_time',
value => '150',
notify => Service['neutron-server', 'neutron-plugin-openvswitch-agent', 'neutron-l3-agent', 'neutron-dhcp-agent'],
}
ini_setting { "neutron.conf service_plugins":
ensure => present,
@ -179,6 +181,7 @@ end script
key_val_separator => '=',
setting => 'enable_metadata_proxy',
value => 'False',
notify => Service['neutron-l3-agent'],
}
ini_setting { "l3 agent external network bridge":
ensure => present,
@ -187,6 +190,16 @@ end script
key_val_separator => '=',
setting => 'external_network_bridge',
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
@ -226,7 +239,7 @@ end script
value => '/etc/neutron/plugins/ml2',
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
}
else {
@ -341,17 +354,21 @@ end script
ensure => running,
enable => true,
}
service { 'keystone':
service { 'neutron-plugin-openvswitch-agent':
ensure => running,
enable => true,
}
service { 'neutron-l3-agent':
ensure => running,
enable => true,
}
service { 'neutron-dhcp-agent':
ensure => stopped,
enable => false,
ensure => running,
enable => true,
}
service { 'neutron-metadata-agent':
ensure => stopped,
enable => false,
service { 'keystone':
ensure => running,
enable => true,
}
}

View File

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

View File

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