Matthew Treinish c974b922e9
Add site module to deploy frontend to a dir
This commit adds a site.pp file which is used to deploy the frontend
to a directory instead of setting up a vhost. When deploying this on
status.o.o we need to put the dashboard in a dir on an existing vhost
instead of deploying a seperate one. This commit adds the class to do
this.

Change-Id: Ic47fbd817a293a257f7a9b164682fc96cce5321e
2015-10-20 21:34:47 -04:00

33 lines
947 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',
port => $vhost_port,
priority => '100',
ssl => false,
template => 'openstack_health/openstack-health-frontend.vhost.erb',
require => Exec['build-static-files'],
}
}