Fix broken acceptance tests
While applying this module downstream we noticed that its acceptance tests were broken. During the process of fixing them we noticed that the reason for this were the changes made in the manifest 'openstack_health::frontend'. Apparently a new manifest was created to take care of installing the frontend, 'openstack_health::vhost'. The first step in order to fix this was adapting the tests to use this new manifest instead of the former. While doing so we noticed that the apache vhost template file was not being generated correctly. That happened because it was binding agains 'openstack_health::frontend', which now did not have the parameters necessary. So, in order to make the whole acceptance test suite work, it was necessary updating the vhost template file as well. Change-Id: I79edb3b05ca25b484a62d6a414592e662b42d85e Co-Authored-By: Danilo Ramalho <dramalho@thoughtworks.com>
This commit is contained in:
parent
f73456a123
commit
576fe04b85
@ -22,11 +22,12 @@ class openstack_health::vhost(
|
||||
$frontend_dir = "${openstack_health::source_dir}/build"
|
||||
|
||||
httpd::vhost { "${vhost_name}-frontend":
|
||||
docroot => 'MEANINGLESS ARGUMENT',
|
||||
port => $vhost_port,
|
||||
priority => '100',
|
||||
ssl => false,
|
||||
template => 'openstack_health/openstack-health-frontend.vhost.erb',
|
||||
require => Exec['build-static-files'],
|
||||
docroot => 'MEANINGLESS ARGUMENT',
|
||||
vhost_name => $vhost_name,
|
||||
port => $vhost_port,
|
||||
priority => '100',
|
||||
ssl => false,
|
||||
template => 'openstack_health/openstack-health-frontend.vhost.erb',
|
||||
require => Exec['build-static-files'],
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,8 @@ class { '::openstack_health':
|
||||
source_dir => $source_dir,
|
||||
}
|
||||
|
||||
class { '::openstack_health::frontend':
|
||||
source_dir => '/opt/openstack-health',
|
||||
serveradmin => 'webmaster@localhost',
|
||||
class { '::openstack_health::vhost':
|
||||
serveradmin => "webmaster@${::fqdn}",
|
||||
vhost_name => 'localhost',
|
||||
vhost_port => 80,
|
||||
api_endpoint => 'http://localhost:5000',
|
||||
|
@ -1,20 +1,20 @@
|
||||
<% unless [443, 80].include?(scope.lookupvar("openstack_health::frontend::vhost_port").to_i) %>
|
||||
Listen <%= scope.lookupvar("openstack_health::frontend::vhost_port") %>
|
||||
<% unless [443, 80].include?(@vhost_port.to_i) %>
|
||||
Listen <%= @vhost_port %>
|
||||
<% end %>
|
||||
<VirtualHost *:<%= scope.lookupvar("openstack_health::frontend::vhost_port") %>>
|
||||
ServerName <%= scope.lookupvar("openstack_health::frontend::vhost_name") %>
|
||||
ServerAdmin <%= scope.lookupvar("openstack_health::frontend::serveradmin") %>
|
||||
<VirtualHost *:<%= @vhost_port %>>
|
||||
ServerName <%= @vhost_name %>
|
||||
ServerAdmin <%= @serveradmin %>
|
||||
|
||||
LogLevel info
|
||||
CustomLog ${APACHE_LOG_DIR}/openstack-health-frontend-access.log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/openstack-health-frontend-error.log
|
||||
|
||||
<Directory <%= scope.lookupvar("openstack_health::frontend::frontend_dir") %>>
|
||||
<Directory <%= @frontend_dir %>>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
DocumentRoot <%= scope.lookupvar("openstack_health::frontend::frontend_dir") %>
|
||||
DocumentRoot <%= @frontend_dir %>
|
||||
DirectoryIndex index.html
|
||||
</VirtualHost>
|
||||
|
Loading…
x
Reference in New Issue
Block a user