puppet-openstack_health/manifests/vhost.pp
Glauco Oliveira 576fe04b85 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>
2015-11-11 14:05:35 -02:00

34 lines
990 B
Puppet

# Install and maintain OpenStack Health.
# params:
# serveradmin:
# Used in the Apache virtual host, eg., openstack-health@openstack.org
# vhost_name:
# Used in the Apache virtual host, eg., health.openstack.org
# vhost_port:
# Used in the Apache virtual host, eg., 5000
# api_endpoint:
# The URL where openstack-health API is running
class openstack_health::vhost(
$serveradmin = "webmaster@${::fqdn}",
$vhost_name = 'localhost',
$vhost_port = 80,
$api_endpoint = 'http://localhost:5000',
) {
class { '::openstack_health::frontend':
api_endpoint => $api_endpoint
}
$frontend_dir = "${openstack_health::source_dir}/build"
httpd::vhost { "${vhost_name}-frontend":
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'],
}
}