From 9ef5e18aef669896368fd5359559a52acde853e2 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Tue, 16 Dec 2014 11:27:59 +0100 Subject: [PATCH] Update horizon to b6249732791935f6b3ff83dd720dca30f4aabe48 b6249732791935f6b3ff83dd720dca30f4aabe48 Update comment documentation 67f6c4f4a294eee465b02f87e8125a752f20cbef Merge "Add support for the configuration of OPENSTACK_CINDER_FEATURES" d563e767c5bf2939a75507a9369ade26cc684385 Remove deprecated parameters 168c206dfefa35abec48d7bce33ed469bf98cefb Merge "Release 5.0.0 - Juno" dc32ea4940b7882017a954d848f5d7eae7e01fe5 Add support for the configuration of OPENSTACK_CINDER_FEATURES 512ff352eb4dbdc01cd40529b9ca9ea7e5b1db7c Update horzion::wsgi::apache for new apache module c4ba7a3c4cc42391b764724a8f95c94e86eabc06 Release 5.0.0 - Juno --- Puppetfile | 2 +- horizon/README.md | 29 ++++++- horizon/manifests/init.pp | 77 ++++--------------- horizon/manifests/wsgi/apache.pp | 6 +- horizon/metadata.json | 2 +- horizon/spec/classes/horizon_init_spec.rb | 20 +---- .../spec/classes/horizon_wsgi_apache_spec.rb | 12 ++- horizon/templates/local_settings.py.erb | 15 ++-- 8 files changed, 68 insertions(+), 95 deletions(-) diff --git a/Puppetfile b/Puppetfile index a34196dca..2b54e4a6c 100644 --- a/Puppetfile +++ b/Puppetfile @@ -51,7 +51,7 @@ mod 'heat', :git => 'https://github.com/stackforge/puppet-heat.git' mod 'horizon', - :commit => '353c372d582167d5635b1b2ee9474cf6822db032', + :commit => 'b6249732791935f6b3ff83dd720dca30f4aabe48', :git => 'https://github.com/stackforge/puppet-horizon.git' mod 'inifile', diff --git a/horizon/README.md b/horizon/README.md index 56bd56e7e..aca255098 100644 --- a/horizon/README.md +++ b/horizon/README.md @@ -1,7 +1,7 @@ horizon ======= -4.0.0 - 2014.1.0 - Icehouse +5.0.0 - 2014.2.0 - Juno #### Table of Contents @@ -87,6 +87,33 @@ Contributors Release Notes ------------- +**5.0.0** + +* Stable Juno release +* Fixed the default value of compress_offline parameter +* Always manages local_settings.py +* Added parameters to configure policy files in horizon class +* Fixed Apache config file default +* Added parameter django_session_engine to horizon class +* Stops setting wsgi_socket_prefix since the apache module takes care of it +* Adds workaround for puppet's handling of undef for setting the vhost bind address +* Changes cache_server_ip in horizon class to accept arrays +* Switched the default log level to INFO from DEBUG +* Fixed the default MSSQL port in security group rules + +**4.2.0** + +* Added parameters to configure ALLOWED_HOSTS in settings_local.y and + ServerAlias in apache, no longer requiring these values to be the fqdn +* Fixed removal of vhost conf file +* Added support for secure cookies + +**4.1.0** + +* Added option to set temporary upload directory for images. +* Ensure ssl wsgi_process_group is the same as wsgi_daemon_process. +* Pined major gems. + **4.0.0** * Stable Icehouse release. diff --git a/horizon/manifests/init.pp b/horizon/manifests/init.pp index 08f6a73ab..1f671b97d 100644 --- a/horizon/manifests/init.pp +++ b/horizon/manifests/init.pp @@ -41,9 +41,6 @@ # [*cache_server_port*] # (optional) Memcached port. Defaults to '11211'. # -# [*swift*] -# (optional) Enable Swift interface extension. Defaults to false. -# # [*horizon_app_links*] # (optional) Array of arrays that can be used to add call-out links # to the dashboard for other apps. There is no specific requirement @@ -53,22 +50,6 @@ # # [*keystone_url*] # (optional) Full url of keystone public endpoint. (Defaults to 'http://127.0.0.1:5000/v2.0') -# Use this parameter in favor of keystone_host, keystone_port and keystone_scheme. -# -# [*keystone_scheme*] -# (optional) DEPRECATED: Use keystone_url instead. -# Scheme of the Keystone service. (Defaults to 'http') -# Setting this parameter overrides keystone_url parameter. -# -# [*keystone_host*] -# (optional) DEPRECATED: Use keystone_url instead. -# IP address of the Keystone service. (Defaults to '127.0.0.1') -# Setting this parameter overrides keystone_url parameter. -# -# [*keystone_port*] -# (optional) DEPRECATED: Use keystone_url instead. -# Port of the Keystone service. (Defaults to 5000) -# Setting this parameter overrides keystone_url parameter. # # [*keystone_default_role*] # (optional) Default Keystone role for new users. Defaults to '_member_'. @@ -118,6 +99,12 @@ # Works only with Xen Hypervisor. # Defaults to 'False'. # +# [*cinder_options*] +# (optional) A hash of parameters to enable features specific to +# Cinder. These include: +# 'enable_backup': Boolean to enable or disable Cinders's backup feature. +# Defaults to False. +# # [*neutron_options*] # (optional) A hash of parameters to enable features specific to # Neutron. These include: @@ -177,16 +164,10 @@ # (optional) Selects the session engine for Django to use. # Defaults to undefined - will not add entry to local settings. # -# === Deprecation notes -# -# If any value is provided for keystone_scheme, keystone_host, or -# keystone_port parameters; keystone_url will be completely ignored. Also -# can_set_mount_point is deprecated. -# # === Examples # # class { 'horizon': -# secret => 's3cr3t', +# secret_key => 's3cr3t', # keystone_url => 'https://10.0.0.10:5000/v2.0', # available_regions => [ # ['http://region-1.example.com:5000/v2.0', 'Region-1'], @@ -200,7 +181,6 @@ $package_ensure = 'present', $cache_server_ip = '127.0.0.1', $cache_server_port = '11211', - $swift = false, $horizon_app_links = false, $keystone_url = 'http://127.0.0.1:5000/v2.0', $keystone_default_role = '_member_', @@ -224,15 +204,13 @@ $horizon_ca = undef, $compress_offline = true, $hypervisor_options = {}, + $cinder_options = {}, $neutron_options = {}, $file_upload_temp_dir = '/tmp', $policy_files_path = undef, $policy_files = undef, # DEPRECATED PARAMETERS $can_set_mount_point = undef, - $keystone_host = undef, - $keystone_port = undef, - $keystone_scheme = undef, $vhost_extra_params = undef, $secure_cookies = false, $django_session_engine = undef, @@ -240,36 +218,9 @@ include ::horizon::params - if $swift { - warning('swift parameter is deprecated and has no effect.') - } - - if $keystone_scheme { - warning('The keystone_scheme parameter is deprecated, use keystone_url instead.') - } - - if $keystone_host { - warning('The keystone_host parameter is deprecated, use keystone_url instead.') - } - - if $keystone_port { - warning('The keystone_port parameter is deprecated, use keystone_url instead.') - } - - # Default options for the OPENSTACK_HYPERVISOR_FEATURES section. These will - # be merged with user-provided options when the local_settings.py.erb - # template is interpolated. Also deprecates can_set_mount_point. - if $can_set_mount_point { - warning('The can_set_mount_point parameter is deprecated, use hypervisor_options instead.') - $hypervisor_defaults = { - 'can_set_mount_point' => $can_set_mount_point, - 'can_set_password' => false - } - } else { - $hypervisor_defaults = { - 'can_set_mount_point' => true, - 'can_set_password' => false - } + $hypervisor_defaults = { + 'can_set_mount_point' => true, + 'can_set_password' => false } if $fqdn { @@ -281,6 +232,12 @@ $final_server_aliases = $server_aliases } + # Default options for the OPENSTACK_CINDER_FEATURES section. These will + # be merged with user-provided options when the local_settings.py.erb + # template is interpolated. + $cinder_defaults = { + 'enable_backup' => false, + } # Default options for the OPENSTACK_NEUTRON_NETWORK section. These will # be merged with user-provided options when the local_settings.py.erb diff --git a/horizon/manifests/wsgi/apache.pp b/horizon/manifests/wsgi/apache.pp index 1c51b13b7..4087f1959 100644 --- a/horizon/manifests/wsgi/apache.pp +++ b/horizon/manifests/wsgi/apache.pp @@ -180,7 +180,8 @@ } ensure_resource('apache::vhost', $vhost_conf_name, merge ($default_vhost_conf, $extra_params, { - redirectmatch_regexp => "${redirect_match} ${redirect_url}", + redirectmatch_regexp => $redirect_match, + redirectmatch_dest => $redirect_url, })) ensure_resource('apache::vhost', $vhost_ssl_conf_name, merge ($default_vhost_conf, $extra_params, { access_log_file => 'horizon_ssl_access.log', @@ -191,7 +192,8 @@ ensure => $ensure_ssl_vhost, wsgi_daemon_process => 'horizon-ssl', wsgi_process_group => 'horizon-ssl', - redirectmatch_regexp => "^/$ ${::horizon::params::root_url}" + redirectmatch_regexp => '^/$', + redirectmatch_dest => $::horizon::params::root_url, })) } diff --git a/horizon/metadata.json b/horizon/metadata.json index e7576515a..ce68ab167 100644 --- a/horizon/metadata.json +++ b/horizon/metadata.json @@ -31,7 +31,7 @@ ], "description": "Installs and configures OpenStack Horizon (Dashboard).", "dependencies": [ - { "name": "puppetlabs/apache", "version_requirement": ">=1.1.2 <2.0.0" }, + { "name": "puppetlabs/apache", "version_requirement": ">=1.2.0 <2.0.0" }, { "name": "puppetlabs/stdlib", "version_requirement": ">=4.0.0 <5.0.0" }, { "name": "saz/memcached", "version_requirement": ">=2.0.2 <3.0.0" } ] diff --git a/horizon/spec/classes/horizon_init_spec.rb b/horizon/spec/classes/horizon_init_spec.rb index 365abf721..bb1ffb552 100644 --- a/horizon/spec/classes/horizon_init_spec.rb +++ b/horizon/spec/classes/horizon_init_spec.rb @@ -88,6 +88,7 @@ :api_result_limit => 4682, :compress_offline => false, :hypervisor_options => {'can_set_mount_point' => false, 'can_set_password' => true }, + :cinder_options => {'enable_backup' => true }, :neutron_options => {'enable_lb' => true, 'enable_firewall' => true, 'enable_quotas' => false, 'enable_security_group' => false, 'enable_vpn' => true, 'profile_support' => 'cisco' }, :file_upload_temp_dir => '/var/spool/horizon', :secure_cookies => true @@ -107,6 +108,7 @@ 'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "SwiftOperator"', " 'can_set_mount_point': False,", " 'can_set_password': True,", + " 'enable_backup': True,", " 'enable_lb': True,", " 'enable_firewall': True,", " 'enable_quotas': False,", @@ -142,24 +144,6 @@ it { should contain_exec('refresh_horizon_django_cache') } end - context 'with deprecated parameters' do - before do - params.merge!({ - :keystone_host => 'keystone.example.com', - :keystone_port => 4682, - :keystone_scheme => 'https', - :can_set_mount_point => true, - }) - end - - it 'generates local_settings.py' do - verify_contents(subject, platforms_params[:config_file], [ - 'OPENSTACK_KEYSTONE_URL = "https://keystone.example.com:4682/v2.0"', - " 'can_set_mount_point': True," - ]) - end - end - context 'with vhost_extra_params' do before do params.merge!({ diff --git a/horizon/spec/classes/horizon_wsgi_apache_spec.rb b/horizon/spec/classes/horizon_wsgi_apache_spec.rb index 332eb311e..7a7b9ef15 100644 --- a/horizon/spec/classes/horizon_wsgi_apache_spec.rb +++ b/horizon/spec/classes/horizon_wsgi_apache_spec.rb @@ -44,7 +44,8 @@ 'docroot' => '/var/www/', 'ssl' => 'false', 'redirectmatch_status' => 'permanent', - 'redirectmatch_regexp' => "^/$ #{platforms_params[:root_url]}", + 'redirectmatch_regexp' => '^/$', + 'redirectmatch_dest' => platforms_params[:root_url], 'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' }, 'wsgi_process_group' => platforms_params[:wsgi_group], 'wsgi_daemon_process' => platforms_params[:wsgi_group], @@ -76,7 +77,8 @@ 'docroot' => '/var/www/', 'ssl' => 'false', 'redirectmatch_status' => 'permanent', - 'redirectmatch_regexp' => "^/$ #{platforms_params[:root_url]}", + 'redirectmatch_regexp' => '^/$', + 'redirectmatch_dest' => platforms_params[:root_url], 'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' }, 'wsgi_process_group' => platforms_params[:wsgi_group], 'wsgi_daemon_process' => platforms_params[:wsgi_group], @@ -112,7 +114,8 @@ 'ssl_key' => '/etc/pki/tls/private/httpd.key', 'ssl_ca' => '/etc/pki/tls/certs/ca.crt', 'redirectmatch_status' => 'permanent', - 'redirectmatch_regexp' => "^/$ #{platforms_params[:root_url]}", + 'redirectmatch_regexp' => '^/$', + 'redirectmatch_dest' => platforms_params[:root_url], 'wsgi_process_group' => 'horizon-ssl', 'wsgi_daemon_process' => 'horizon-ssl', 'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' } @@ -127,7 +130,8 @@ 'docroot' => '/var/www/', 'ssl' => 'false', 'redirectmatch_status' => 'permanent', - 'redirectmatch_regexp' => '(.*) https://some.host.tld', + 'redirectmatch_regexp' => '(.*)', + 'redirectmatch_dest' => 'https://some.host.tld', 'wsgi_process_group' => platforms_params[:wsgi_group], 'wsgi_daemon_process' => platforms_params[:wsgi_group], 'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' } diff --git a/horizon/templates/local_settings.py.erb b/horizon/templates/local_settings.py.erb index d4880c875..e1a781c7d 100644 --- a/horizon/templates/local_settings.py.erb +++ b/horizon/templates/local_settings.py.erb @@ -153,14 +153,6 @@ AVAILABLE_REGIONS = [ ] <% end -%> -<% -if (!@keystone_scheme.nil?) || (!@keystone_host.nil?) || (!@keystone_port.nil?) - @keystone_scheme ||= "http" - @keystone_host ||= "127.0.0.1" - @keystone_port ||= "5000" - @keystone_url = "#{@keystone_scheme}://#{@keystone_host}:#{@keystone_port}/v2.0" -end --%> OPENSTACK_KEYSTONE_URL = "<%= @keystone_url %>" OPENSTACK_KEYSTONE_DEFAULT_ROLE = "<%= @keystone_default_role %>" @@ -193,6 +185,13 @@ OPENSTACK_HYPERVISOR_FEATURES = { 'can_set_password': <%= @hypervisor_options['can_set_password'].to_s.capitalize %>, } +# The OPENSTACK_CINDER_FEATURES settings can be used to enable optional +# # services provided by cinder that is not exposed by its extension API. +OPENSTACK_CINDER_FEATURES = { + <%- @cinder_options = @cinder_defaults.merge(@cinder_options) -%> + 'enable_backup': <%= @cinder_options['enable_backup'].to_s.capitalize %>, +} + # The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional # services provided by neutron. Options currenly available are load # balancer service, security groups, quotas, VPN service.