K Jonathan Harker b548b141ce Switch to using the new log_processor project
The python scripts have been moved to their own project at
openstack-infra/log_processor. Delete the files here and start
installing that project from source. As a part of this split, the
.py extension has been dropped from the filename of the installed
executables.

Change-Id: Ied3025df46b5014a092be0c26e43d4f90699a43f
2015-11-25 15:23:26 -08:00

74 lines
2.0 KiB
Puppet

# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
# Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# == Class: log_processor::client
#
class log_processor::client (
$config_file,
$statsd_host = undef,
) {
file { '/etc/logstash/jenkins-log-client.yaml':
ensure => present,
owner => 'root',
group => 'root',
mode => '0555',
source => $config_file,
require => File['/etc/logstash'],
}
file { '/etc/init.d/jenkins-log-client':
ensure => present,
owner => 'root',
group => 'root',
mode => '0555',
source => 'puppet:///modules/log_processor/jenkins-log-client.init',
require => [
Vcsrepo['/opt/log_processor'],
File['/etc/logstash/jenkins-log-client.yaml'],
File['/etc/default/jenkins-log-client'],
],
}
file { '/etc/default/jenkins-log-client':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
content => template('log_processor/jenkins-log-client.default.erb'),
}
service { 'jenkins-log-client':
enable => true,
hasrestart => true,
subscribe => File['/etc/logstash/jenkins-log-client.yaml'],
require => File['/etc/init.d/jenkins-log-client'],
}
include ::logrotate
logrotate::file { 'log-client-debug.log':
log => '/var/log/logstash/log-client-debug.log',
options => [
'compress',
'copytruncate',
'missingok',
'rotate 7',
'daily',
'notifempty',
],
require => Service['jenkins-log-client'],
}
}