dashboard: fail on Debian, fix other OS
- Fix manifests - Fix unit tests - Fail when Debian for now Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
parent
5eb021ce0e
commit
5156cf74c1
@ -50,23 +50,40 @@ class privatecloud::dashboard(
|
||||
$listen_ssl = false,
|
||||
) {
|
||||
|
||||
#FIXME https://review.openstack.org/#/c/64523/
|
||||
file {
|
||||
'/etc/apache2/conf.d/openstack-dashboard.conf':
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/privatecloud/apache/openstack-dashboard.conf';
|
||||
}
|
||||
|
||||
class {'horizon':
|
||||
secret_key => $secret_key,
|
||||
keystone_host => $ks_keystone_internal_host,
|
||||
can_set_mount_point => 'False',
|
||||
# fqdn can can be ambiguous since we use reverse DNS here,
|
||||
# e.g: 127.0.0.1 instead of a public IP address.
|
||||
# We force $api_eth to avoid this situation
|
||||
#FIXME https://review.openstack.org/#/c/64523/
|
||||
fqdn => $api_eth,
|
||||
require => File['/etc/apache2/conf.d/openstack-dashboard.conf'];
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
class {'horizon':
|
||||
secret_key => $secret_key,
|
||||
keystone_host => $ks_keystone_internal_host,
|
||||
can_set_mount_point => 'False',
|
||||
# fqdn can can be ambiguous since we use reverse DNS here,
|
||||
# e.g: 127.0.0.1 instead of a public IP address.
|
||||
# We force $api_eth to avoid this situation
|
||||
fqdn => $api_eth
|
||||
}
|
||||
}
|
||||
'Debian': {
|
||||
case $::operatingsystem {
|
||||
'Debian': {
|
||||
#FIXME(sbadia) https://review.openstack.org/#/c/64523/
|
||||
fail('puppet-horizon does not work yet on Debian. Work in progress by https://review.openstack.org/#/c/64523/')
|
||||
}
|
||||
default: {
|
||||
class {'horizon':
|
||||
secret_key => $secret_key,
|
||||
keystone_host => $ks_keystone_internal_host,
|
||||
can_set_mount_point => 'False',
|
||||
# fqdn can can be ambiguous since we use reverse DNS here,
|
||||
# e.g: 127.0.0.1 instead of a public IP address.
|
||||
# We force $api_eth to avoid this situation
|
||||
fqdn => $api_eth
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module puppet-horizon only support osfamily RedHat and Debian")
|
||||
}
|
||||
}
|
||||
|
||||
@@haproxy::balancermember{"${::fqdn}-horizon":
|
||||
|
@ -26,7 +26,8 @@ describe 'privatecloud::dashboard' do
|
||||
{ :listen_ssl => false,
|
||||
:ks_keystone_internal_host => 'localhost',
|
||||
:ks_keystone_internal_host => 'localhost',
|
||||
:secret_key => '/etc/ssl/secret' }
|
||||
:secret_key => '/etc/ssl/secret',
|
||||
:api_eth => '10.0.0.1' }
|
||||
end
|
||||
|
||||
it 'configure horizon with some params' do
|
||||
@ -43,8 +44,8 @@ describe 'privatecloud::dashboard' do
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian',
|
||||
:operatingsystem => 'Ubuntu',
|
||||
:operatingsystemrelease => '12.04',
|
||||
:ipaddress_eth0 => '10.0.0.1',
|
||||
:concat_basedir => '/var/lib/puppet/concat' }
|
||||
end
|
||||
|
||||
@ -55,7 +56,6 @@ describe 'privatecloud::dashboard' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '6',
|
||||
:ipaddress_eth0 => '10.0.0.1',
|
||||
:concat_basedir => '/var/lib/puppet/concat' }
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user