Change protocol and hostname for novncproxy

Noop test, actual fixtures for this changes and other VMware specific
changes we provide asap.

In order to provide VM console access via HTTPS, we need to provide
the correct link to the proxy via the api.
Also, the cloud administrator will need to properly configure the DNS
for the clients to ensure they will be able to access the HTTPS
endpoint as the DNS name must match the certificate name for the Nova
VNC Proxy service.

Change-Id: Ic8da073bb54241c4533747687d106f5f58ffdb4b
Closes-bug: #1511422
This commit is contained in:
Alexander Arzhanov 2016-02-04 11:20:14 +00:00
parent 12eb02c93c
commit 375299d8b6
3 changed files with 59 additions and 38 deletions

View File

@ -1,19 +1,26 @@
notice('MODULAR: vmware/vcenter.pp')
$use_vcenter = hiera('use_vcenter', false)
$vcenter_hash = hiera('vcenter_hash')
$public_vip = hiera('public_vip')
$use_neutron = hiera('use_neutron', false)
$ceilometer_hash = hiera('ceilometer',{})
$debug = pick($vcenter_hash['debug'], hiera('debug', false))
$use_vcenter = hiera('use_vcenter', false)
$vcenter_hash = hiera('vcenter_hash')
$public_vip = hiera('public_vip')
$use_neutron = hiera('use_neutron', false)
$ceilometer_hash = hiera('ceilometer',{})
$nova_hash = hiera_hash('nova_hash', {})
$public_ssl_hash = hiera('public_ssl')
$ssl_hash = hiera_hash('use_ssl', {})
$vncproxy_protocol = get_ssl_property($ssl_hash, $public_ssl_hash, 'nova', 'public', 'protocol', [$nova_hash['vncproxy_protocol'], 'http'])
$vncproxy_host = get_ssl_property($ssl_hash, $public_ssl_hash, 'nova', 'public', 'hostname', [$public_vip])
$debug = pick($vcenter_hash['debug'], hiera('debug', false))
if $use_vcenter {
class { 'vmware':
vcenter_settings => $vcenter_hash['computes'],
vlan_interface => $vcenter_hash['esxi_vlan_interface'],
use_quantum => $use_neutron,
vnc_address => $public_vip,
ceilometer => $ceilometer_hash['enabled'],
debug => $debug,
vcenter_settings => $vcenter_hash['computes'],
vlan_interface => $vcenter_hash['esxi_vlan_interface'],
use_quantum => $use_neutron,
vncproxy_protocol => $vncproxy_protocol,
vncproxy_host => $vncproxy_host,
nova_hash => $nova_hash,
ceilometer => $ceilometer_hash['enabled'],
debug => $debug,
}
}

View File

@ -23,23 +23,31 @@
# vcenter_password - password for $vcenter_user
# vlan_interface - VLAN interface on which networks will be provisioned
# if VLANManager is used for nova-network
# vnc_address - IP address on which VNC server will be listening on
# vncproxy_host - IP address on which VNC server will be listening on
# vncproxy_protocol - the protocol to communicate with the VNC proxy server
# vncproxy_port - the port to communicate with the VNC proxy server
# vncproxy_path - the path at the end of the uri for communication
# with the VNC proxy server
# use_quantum - shows if neutron is enabled
# modules needed: nova
# limitations:
# - only one vcenter supported
class vmware::controller (
$vcenter_settings = undef,
$vcenter_host_ip = '10.10.10.10',
$vcenter_user = 'user',
$vcenter_password = 'password',
$vlan_interface = undef,
$vnc_address = '0.0.0.0',
$use_quantum = false,
$vcenter_settings = undef,
$vcenter_host_ip = '10.10.10.10',
$vcenter_user = 'user',
$vcenter_password = 'password',
$vlan_interface = undef,
$vncproxy_host = undef,
$vncproxy_protocol = 'http',
$vncproxy_port = '6080',
$vncproxy_path = '/vnc_auto.html',
$use_quantum = false,
)
{
include nova::params
$vncproxy_base_url = "${vncproxy_protocol}://${vncproxy_host}:${vncproxy_port}${vncproxy_path}"
# Stubs from nova class in order to not include whole class
if ! defined(Class['nova']) {
@ -88,7 +96,7 @@ class vmware::controller (
# Set correct parameter for vnc access
nova_config {
'DEFAULT/enabled_apis': value => 'ec2,osapi_compute,metadata';
'DEFAULT/novncproxy_base_url': value => "http://${vnc_address}:6080/vnc_auto.html";
'DEFAULT/novncproxy_base_url': value => $vncproxy_base_url;
} -> Service['nova-compute']
# install cirros vmdk package

View File

@ -25,28 +25,34 @@
# vcenter_datastore_regex - the datastore_regex setting specifies the data stores to use with Compute
# vlan_interface - interface which is used on ESXi hosts when nova-network uses VlanManager
# use_quantum - shows if neutron enabled
# vncproxy_protocol - Protocol to use for access vnc proxy
# vncproxy_host - Host that serves as vnc proxy
class vmware (
$vcenter_settings = undef,
$vcenter_user = 'user',
$vcenter_password = 'password',
$vcenter_host_ip = '10.10.10.10',
$vcenter_cluster = 'cluster',
$vlan_interface = undef,
$use_quantum = false,
$vnc_address = '0.0.0.0',
$ceilometer = false,
$debug = false,
$vcenter_settings = undef,
$vcenter_user = 'user',
$vcenter_password = 'password',
$vcenter_host_ip = '10.10.10.10',
$vcenter_cluster = 'cluster',
$vlan_interface = undef,
$use_quantum = false,
$vncproxy_protocol = 'http',
$vncproxy_host = undef,
$nova_hash = {},
$ceilometer = false,
$debug = false,
)
{
class { 'vmware::controller':
vcenter_settings => $vcenter_settings,
vcenter_user => $vcenter_user,
vcenter_password => $vcenter_password,
vcenter_host_ip => $vcenter_host_ip,
vlan_interface => $vlan_interface,
use_quantum => $use_quantum,
vnc_address => $vnc_address,
vcenter_settings => $vcenter_settings,
vcenter_user => $vcenter_user,
vcenter_password => $vcenter_password,
vcenter_host_ip => $vcenter_host_ip,
vlan_interface => $vlan_interface,
use_quantum => $use_quantum,
vncproxy_protocol => $vncproxy_protocol,
vncproxy_host => $vncproxy_host,
vncproxy_port => $nova_hash['vncproxy_port'],
}
if $ceilometer {