diff --git a/manifests/compute/consoleproxy.pp b/manifests/compute/consoleproxy.pp index b1ff40a7..6b517f66 100644 --- a/manifests/compute/consoleproxy.pp +++ b/manifests/compute/consoleproxy.pp @@ -25,7 +25,7 @@ # # [*console*] # (optional) Nova's console type (spice or novnc) -# Defaults to 'spice' +# Defaults to 'novnc' # # [*novnc_port*] # (optional) TCP port to bind Nova novnc service. @@ -42,7 +42,7 @@ # class cloud::compute::consoleproxy( $api_eth = '127.0.0.1', - $console = 'spice', + $console = 'novnc', $novnc_port = '6080', $spice_port = '6082', $firewall_settings = {}, diff --git a/manifests/compute/hypervisor.pp b/manifests/compute/hypervisor.pp index 1448324e..241375a7 100644 --- a/manifests/compute/hypervisor.pp +++ b/manifests/compute/hypervisor.pp @@ -50,7 +50,7 @@ # # [*console*] # (optional) Nova's console type (spice or novnc) -# Defaults to 'spice' +# Defaults to 'novnc' # # [*novnc_port*] # (optional) TCP port to connect to Nova vncproxy service. @@ -134,7 +134,7 @@ class cloud::compute::hypervisor( $ks_nova_public_host = '127.0.0.1', $nova_ssh_private_key = undef, $nova_ssh_public_key = undef, - $console = 'spice', + $console = 'novnc', $novnc_port = '6080', $spice_port = '6082', $ks_console_public_proto = 'http', diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp index 8cbf2f67..d14935ae 100644 --- a/manifests/loadbalancer.pp +++ b/manifests/loadbalancer.pp @@ -155,14 +155,14 @@ # If true, both public and internal will attempt to be created except if vip_internal_ip is set to false. # If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options. # If set to false, no binding will be configure. -# Defaults to true +# Defaults to false # # [*novnc*] # (optional) Enable or not novnc binding. # If true, both public and internal will attempt to be created except if vip_internal_ip is set to false. # If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options. # If set to false, no binding will be configure. -# Defaults to false +# Defaults to true # # [*metadata_api*] # (optional) Enable or not Metadata public binding. @@ -435,8 +435,8 @@ class cloud::loadbalancer( $horizon = true, $horizon_ssl = false, $rabbitmq = false, - $spice = true, - $novnc = false, + $spice = false, + $novnc = true, $haproxy_auth = 'admin:changeme', $keepalived_state = 'BACKUP', $keepalived_priority = '50', diff --git a/spec/classes/cloud_compute_consoleproxy_spec.rb b/spec/classes/cloud_compute_consoleproxy_spec.rb index 323dd138..14e7c51b 100644 --- a/spec/classes/cloud_compute_consoleproxy_spec.rb +++ b/spec/classes/cloud_compute_consoleproxy_spec.rb @@ -44,8 +44,7 @@ describe 'cloud::compute::consoleproxy' do end let :params do - { :api_eth => '10.0.0.1', - :spice_port => '6082' } + { :api_eth => '10.0.0.1' } end it 'configure nova common' do @@ -87,25 +86,25 @@ describe 'cloud::compute::consoleproxy' do ) end - it 'configure nova-spicehtml5proxy' do - is_expected.to contain_class('nova::spicehtml5proxy').with( + it 'configure nova-vncproxy' do + is_expected.to contain_class('nova::vncproxy').with( :enabled => true, :host => '10.0.0.1', - :port => '6082' + :port => '6080' ) end - context 'with novnc console' do + context 'with spice console' do before :each do params.merge!( - :console => 'novnc', - :novnc_port => '6080' ) + :console => 'spice', + :novnc_port => '6082' ) end - it 'configure nova-vncproxy' do - is_expected.to contain_class('nova::vncproxy').with( + it 'configure nova-spicehtml5proxy' do + is_expected.to contain_class('nova::spicehtml5proxy').with( :enabled => true, :host => '10.0.0.1', - :port => '6080' + :port => '6082' ) end end @@ -115,8 +114,8 @@ describe 'cloud::compute::consoleproxy' do "class { 'cloud': manage_firewall => true }" end it 'configure spice firewall rules' do - is_expected.to contain_firewall('100 allow spice access').with( - :port => '6082', + is_expected.to contain_firewall('100 allow novnc access').with( + :port => '6080', :proto => 'tcp', :action => 'accept', ) @@ -131,8 +130,8 @@ describe 'cloud::compute::consoleproxy' do params.merge!(:firewall_settings => { 'limit' => '50/sec' } ) end it 'configure spice firewall rules with custom parameter' do - is_expected.to contain_firewall('100 allow spice access').with( - :port => '6082', + is_expected.to contain_firewall('100 allow novnc access').with( + :port => '6080', :proto => 'tcp', :action => 'accept', :limit => '50/sec', diff --git a/spec/classes/cloud_compute_hypervisor_spec.rb b/spec/classes/cloud_compute_hypervisor_spec.rb index 7785daf2..c415682f 100644 --- a/spec/classes/cloud_compute_hypervisor_spec.rb +++ b/spec/classes/cloud_compute_hypervisor_spec.rb @@ -184,21 +184,15 @@ describe 'cloud::compute::hypervisor' do it 'configure nova-compute' do is_expected.to contain_class('nova::compute').with( - :enabled => true, - :vnc_enabled => false, - :virtio_nic => false, - :neutron_enabled => true - ) - end - - it 'configure spice console' do - is_expected.to contain_class('nova::compute::spice').with( - :server_listen => '0.0.0.0', - :server_proxyclient_address => '7.0.0.1', - :proxy_host => '10.0.0.2', - :proxy_protocol => 'https', - :proxy_port => '6082' - ) + :enabled => true, + :vnc_enabled => true, + :vncserver_proxyclient_address => '7.0.0.1', + :vncproxy_host => '10.0.0.2', + :vncproxy_protocol => 'https', + :vncproxy_port => '6080', + :virtio_nic => false, + :neutron_enabled => true + ) end it 'configure nova compute with neutron' do @@ -235,23 +229,18 @@ describe 'cloud::compute::hypervisor' do is_expected.to contain_nova_config('libvirt/block_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC') end - context 'witch novnc console' do + context 'witch spice console' do before :each do - params.merge!( - :console => 'novnc', - :novnc_port => '6080' ) + params.merge!( :console => 'spice' ) end - it 'configure nova-compute' do - is_expected.to contain_class('nova::compute').with( - :enabled => true, - :vnc_enabled => true, - :vncserver_proxyclient_address => '7.0.0.1', - :vncproxy_host => '10.0.0.2', - :vncproxy_protocol => 'https', - :vncproxy_port => '6080', - :virtio_nic => false, - :neutron_enabled => true - ) + it 'configure spice console' do + is_expected.to contain_class('nova::compute::spice').with( + :server_listen => '0.0.0.0', + :server_proxyclient_address => '7.0.0.1', + :proxy_host => '10.0.0.2', + :proxy_protocol => 'https', + :proxy_port => '6082' + ) end end diff --git a/spec/classes/cloud_loadbalancer_spec.rb b/spec/classes/cloud_loadbalancer_spec.rb index b957ddae..61248347 100644 --- a/spec/classes/cloud_loadbalancer_spec.rb +++ b/spec/classes/cloud_loadbalancer_spec.rb @@ -38,7 +38,8 @@ describe 'cloud::loadbalancer' do :keystone_api => true, :trove_api => true, :horizon => true, - :spice => true, + :spice => false, + :novnc => true, :ceilometer_bind_options => [], :cinder_bind_options => [], :ec2_bind_options => [], @@ -258,11 +259,10 @@ describe 'cloud::loadbalancer' do )} end # configure monitor haproxy listen - # test backward compatibility - context 'configure OpenStack binding on public network only' do - it { is_expected.to contain_haproxy__listen('spice_cluster').with( + context 'configure Openstack Nova with novnc' do + it { is_expected.to contain_haproxy__listen('novnc_cluster').with( :ipaddress => [params[:vip_public_ip]], - :ports => '6082', + :ports => '6080', :options => { 'mode' => 'tcp', 'balance' => 'source', @@ -273,16 +273,16 @@ describe 'cloud::loadbalancer' do )} end - context 'configure Openstack Nova with novnc' do + context 'configure OpenStack binding on public network only' do before do params.merge!( - :spice => false, - :novnc => true, - :novnc_port => 6080 ) + :spice => true, + :novnc => false, + :novnc_port => 6082 ) end - it { is_expected.to contain_haproxy__listen('novnc_cluster').with( + it { is_expected.to contain_haproxy__listen('spice_cluster').with( :ipaddress => [params[:vip_public_ip]], - :ports => '6080', + :ports => '6082', :options => { 'mode' => 'tcp', 'balance' => 'source',