Monty Taylor 3f4f1d9820
Add support for zuul-web and scheduler connections
Zuul v3 has a zuul-web service that provides web streaming and
eventually other web content. Add support for running it. Also add it to
the Apache mod_rewrite proxy info.

While we're adding things, add proxy info for plugin connections, which
should allow receiving github webhook events.

Change-Id: Ic79681b287dbd1a44469da70c680060940734f40
2017-07-12 05:26:04 -05:00

73 lines
1.8 KiB
Puppet

# Copyright 2017 Red Hat, Inc.
#
# 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: zuul::web
#
class zuul::web (
$ensure = undef,
$manage_log_conf = true,
$web_listen_address = '127.0.0.1',
$web_listen_port = 9000,
) {
service { 'zuul-web':
ensure => $ensure,
name => 'zuul-web',
enable => true,
hasrestart => true,
require => [File['/etc/init.d/zuul-web'],
Class['zuul::systemd_reload']]
}
file { '/etc/init.d/zuul-web':
ensure => present,
owner => 'root',
group => 'root',
mode => '0555',
source => 'puppet:///modules/zuul/zuul-web.init',
notify => Class['zuul::systemd_reload'],
}
if $manage_log_conf {
file { '/etc/zuul/web-logging.conf':
ensure => present,
source => 'puppet:///modules/zuul/web-logging.conf',
}
}
include ::logrotate
::logrotate::file { 'web.log':
log => '/var/log/zuul/web.log',
options => [
'compress',
'missingok',
'rotate 30',
'daily',
'notifempty',
],
require => Service['zuul-web'],
}
::logrotate::file { 'web-debug.log':
log => '/var/log/zuul/web-debug.log',
options => [
'compress',
'missingok',
'rotate 30',
'daily',
'notifempty',
],
require => Service['zuul-web'],
}
}