Add zuulv3 configuration file
Rather then updating the existing zuul.conf.erb file, create a new zuulv3.conf.erb specific to zuulv3. Add new settings for tennant / zookeeper configurations. Change-Id: I6d0ec2ef2d1b0c86fdcd06bfca01c02a6fffa7f3 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
cd746e236b
commit
84488919c6
@ -28,6 +28,8 @@ class zuul (
|
|||||||
$gerrit_baseurl = '',
|
$gerrit_baseurl = '',
|
||||||
$zuul_ssh_private_key = '',
|
$zuul_ssh_private_key = '',
|
||||||
$layout_file_name = 'layout.yaml',
|
$layout_file_name = 'layout.yaml',
|
||||||
|
$zookeeper_hosts = '127.0.0.1:2181',
|
||||||
|
$tenant_file_name = 'main.yaml',
|
||||||
$url_pattern = '',
|
$url_pattern = '',
|
||||||
$status_url = "https://${::fqdn}/",
|
$status_url = "https://${::fqdn}/",
|
||||||
$zuul_url = '',
|
$zuul_url = '',
|
||||||
@ -65,6 +67,7 @@ class zuul (
|
|||||||
$nodes = [],
|
$nodes = [],
|
||||||
$connections = [],
|
$connections = [],
|
||||||
$python_version = 2,
|
$python_version = 2,
|
||||||
|
$zuulv3 = false,
|
||||||
) {
|
) {
|
||||||
include ::httpd
|
include ::httpd
|
||||||
include ::pip
|
include ::pip
|
||||||
@ -181,13 +184,19 @@ class zuul (
|
|||||||
ensure => directory,
|
ensure => directory,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $zuulv3 {
|
||||||
|
$zuul_conf_content = template('zuul/zuulv3.conf.erb')
|
||||||
|
} else {
|
||||||
|
$zuul_conf_content = template('zuul/zuul.conf.erb')
|
||||||
|
}
|
||||||
|
|
||||||
# TODO: We should put in notify either Service['zuul'] or Exec['zuul-reload']
|
# TODO: We should put in notify either Service['zuul'] or Exec['zuul-reload']
|
||||||
# at some point, but that still has some problems.
|
# at some point, but that still has some problems.
|
||||||
file { '/etc/zuul/zuul.conf':
|
file { '/etc/zuul/zuul.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => 'zuul',
|
owner => 'zuul',
|
||||||
mode => '0400',
|
mode => '0400',
|
||||||
content => template('zuul/zuul.conf.erb'),
|
content => $zuul_conf_content,
|
||||||
require => [
|
require => [
|
||||||
File['/etc/zuul'],
|
File['/etc/zuul'],
|
||||||
User['zuul'],
|
User['zuul'],
|
||||||
|
41
templates/zuulv3.conf.erb
Normal file
41
templates/zuulv3.conf.erb
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
[gearman]
|
||||||
|
server=<%= @gearman_server %>
|
||||||
|
check_job_registration=<%= @gearman_check_job_registration %>
|
||||||
|
|
||||||
|
[gearman_server]
|
||||||
|
start=<%= @internal_gearman %>
|
||||||
|
log_config=/etc/zuul/gearman-logging.conf
|
||||||
|
|
||||||
|
[zuul]
|
||||||
|
tenant_config=/etc/zuul/layout/<%= @tenant_file_name %>
|
||||||
|
log_config=/etc/zuul/logging.conf
|
||||||
|
state_dir=/var/lib/zuul
|
||||||
|
url_pattern=<%= @url_pattern %>
|
||||||
|
status_url=<%= @status_url %>
|
||||||
|
job_name_in_report=<%= @job_name_in_report %>
|
||||||
|
zookeeper_hosts=<%= @zookeeper_hosts %>
|
||||||
|
|
||||||
|
[merger]
|
||||||
|
git_dir=/var/lib/zuul/git
|
||||||
|
zuul_url=<%= @zuul_url %>
|
||||||
|
log_config=/etc/zuul/merger-logging.conf
|
||||||
|
<% if @git_email != "" -%>
|
||||||
|
git_user_email=<%= @git_email %>
|
||||||
|
<% end -%>
|
||||||
|
<% if @git_name != "" -%>
|
||||||
|
git_user_name=<%= @git_name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
[executor]
|
||||||
|
log_config=/etc/zuul/launcher-logging.conf
|
||||||
|
<% if @worker_private_key_file != "" -%>
|
||||||
|
private_key_file=<%= @worker_private_key_file %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<% @connections.each do |connection| -%>
|
||||||
|
[connection "<%= connection['name'] %>"]
|
||||||
|
<% connection.each do |key,value| -%>
|
||||||
|
<%= key %>=<%= value %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<% end -%>
|
Loading…
x
Reference in New Issue
Block a user