
As the first step to expose logs, we'll be using apache to server them over HTTP. Change-Id: I569b4fc58bae8aba4d3451f9eb544304cef89e5d Signed-off-by: Paul Belanger <pabelanger@redhat.com>
39 lines
774 B
Puppet
39 lines
774 B
Puppet
# class: OpenStack Infra Logs
|
|
class infracloud::logs(
|
|
$port = '80',
|
|
$vhost_name = $::fqdn,
|
|
$docroot = '/var/www/logs',
|
|
) {
|
|
include ::apache
|
|
|
|
file { $docroot:
|
|
ensure => directory,
|
|
require => Class['::apache'],
|
|
}
|
|
|
|
# Allow everybody to read neutron logs.
|
|
file { '/var/log/neutron':
|
|
ensure => directory,
|
|
group => adm,
|
|
mode => '0644',
|
|
owner => neutron,
|
|
require => Class['::neutron'],
|
|
}
|
|
|
|
file { "${docroot}/neutron":
|
|
ensure => link,
|
|
target => '/var/log/neutron',
|
|
group => root,
|
|
owner => root,
|
|
require => [
|
|
File[$docroot],
|
|
File['/var/log/neutron'],
|
|
],
|
|
}
|
|
|
|
::apache::vhost::custom { $vhost_name:
|
|
ensure => present,
|
|
content => template('infracloud/logs.vhost.erb'),
|
|
}
|
|
}
|