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,
|
$listen_ssl = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
#FIXME https://review.openstack.org/#/c/64523/
|
case $::osfamily {
|
||||||
file {
|
'RedHat': {
|
||||||
'/etc/apache2/conf.d/openstack-dashboard.conf':
|
class {'horizon':
|
||||||
ensure => file,
|
secret_key => $secret_key,
|
||||||
source => 'puppet:///modules/privatecloud/apache/openstack-dashboard.conf';
|
keystone_host => $ks_keystone_internal_host,
|
||||||
}
|
can_set_mount_point => 'False',
|
||||||
|
# fqdn can can be ambiguous since we use reverse DNS here,
|
||||||
class {'horizon':
|
# e.g: 127.0.0.1 instead of a public IP address.
|
||||||
secret_key => $secret_key,
|
# We force $api_eth to avoid this situation
|
||||||
keystone_host => $ks_keystone_internal_host,
|
fqdn => $api_eth
|
||||||
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.
|
'Debian': {
|
||||||
# We force $api_eth to avoid this situation
|
case $::operatingsystem {
|
||||||
#FIXME https://review.openstack.org/#/c/64523/
|
'Debian': {
|
||||||
fqdn => $api_eth,
|
#FIXME(sbadia) https://review.openstack.org/#/c/64523/
|
||||||
require => File['/etc/apache2/conf.d/openstack-dashboard.conf'];
|
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":
|
@@haproxy::balancermember{"${::fqdn}-horizon":
|
||||||
|
@ -26,7 +26,8 @@ describe 'privatecloud::dashboard' do
|
|||||||
{ :listen_ssl => false,
|
{ :listen_ssl => false,
|
||||||
:ks_keystone_internal_host => 'localhost',
|
:ks_keystone_internal_host => 'localhost',
|
||||||
: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
|
end
|
||||||
|
|
||||||
it 'configure horizon with some params' do
|
it 'configure horizon with some params' do
|
||||||
@ -43,8 +44,8 @@ describe 'privatecloud::dashboard' do
|
|||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
let :facts do
|
let :facts do
|
||||||
{ :osfamily => 'Debian',
|
{ :osfamily => 'Debian',
|
||||||
|
:operatingsystem => 'Ubuntu',
|
||||||
:operatingsystemrelease => '12.04',
|
:operatingsystemrelease => '12.04',
|
||||||
:ipaddress_eth0 => '10.0.0.1',
|
|
||||||
:concat_basedir => '/var/lib/puppet/concat' }
|
:concat_basedir => '/var/lib/puppet/concat' }
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -55,7 +56,6 @@ describe 'privatecloud::dashboard' do
|
|||||||
let :facts do
|
let :facts do
|
||||||
{ :osfamily => 'RedHat',
|
{ :osfamily => 'RedHat',
|
||||||
:operatingsystemrelease => '6',
|
:operatingsystemrelease => '6',
|
||||||
:ipaddress_eth0 => '10.0.0.1',
|
|
||||||
:concat_basedir => '/var/lib/puppet/concat' }
|
:concat_basedir => '/var/lib/puppet/concat' }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user