Skip to content

Commit

Permalink
Update horizon to 67f6c4f4a294eee465b02f87e8125a752f20cbef
Browse files Browse the repository at this point in the history
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
  • Loading branch information
xbezdick committed Dec 2, 2014
1 parent ace5040 commit 477b1dd
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 94 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod 'heat',
:git => 'https://github.com/stackforge/puppet-heat.git'

mod 'horizon',
:commit => '353c372d582167d5635b1b2ee9474cf6822db032',
:commit => '67f6c4f4a294eee465b02f87e8125a752f20cbef',
:git => 'https://github.com/stackforge/puppet-horizon.git'

mod 'inifile',
Expand Down
29 changes: 28 additions & 1 deletion horizon/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
horizon
=======

4.0.0 - 2014.1.0 - Icehouse
5.0.0 - 2014.2.0 - Juno

#### Table of Contents

Expand Down Expand Up @@ -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.
Expand Down
75 changes: 16 additions & 59 deletions horizon/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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_'.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -177,12 +164,6 @@
# (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':
Expand All @@ -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_',
Expand All @@ -224,52 +204,23 @@
$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,
) {

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 {
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions horizon/manifests/wsgi/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
}))

}
2 changes: 1 addition & 1 deletion horizon/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
]
Expand Down
20 changes: 2 additions & 18 deletions horizon/spec/classes/horizon_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,",
Expand Down Expand Up @@ -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!({
Expand Down
12 changes: 8 additions & 4 deletions horizon/spec/classes/horizon_wsgi_apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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' }
Expand All @@ -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' }
Expand Down
15 changes: 7 additions & 8 deletions horizon/templates/local_settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>"

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 477b1dd

Please sign in to comment.