Merge "Correct the ca-cert for mqtt on subunit worker"

This commit is contained in:
Jenkins 2017-04-26 14:56:29 +00:00 committed by Gerrit Code Review
commit 459926216e
3 changed files with 15 additions and 4 deletions

View File

@ -485,9 +485,10 @@ node /^subunit-worker\d+\.openstack\.org$/ {
sysadmins => hiera('sysadmins', []),
}
class { 'openstack_project::subunit_worker':
subunit2sql_db_host => hiera('subunit2sql_db_host', ''),
subunit2sql_db_pass => hiera('subunit2sql_db_password', ''),
mqtt_pass => hiera('mqtt_service_user_password'),
subunit2sql_db_host => hiera('subunit2sql_db_host', ''),
subunit2sql_db_pass => hiera('subunit2sql_db_password', ''),
mqtt_pass => hiera('mqtt_service_user_password'),
mqtt_ca_cert_contents => hiera('mosquitto_tls_ca_file'),
}
}

View File

@ -19,6 +19,7 @@ class openstack_project::subunit_worker (
$subunit2sql_db_pass,
$mqtt_user = 'infra',
$mqtt_pass = undef,
$mqtt_ca_cert_contents = undef,
) {
file { '/etc/subunit2sql/subunit-woker.yaml':
@ -29,6 +30,15 @@ class openstack_project::subunit_worker (
content => template('openstack_project/logstash/jenkins-subunit-worker.yaml.erb'),
}
file { '/etc/subunit2sql/mqtt-root-CA.pem.crt':
ensure => present,
content => $mqtt_ca_cert_contents,
replace => true,
owner => 'subunit',
group => 'subunit',
mode => '0555',
}
include subunit2sql
subunit2sql::worker { 'A':
config_file => '/etc/subunit2sql/subunit-woker.yaml',

View File

@ -6,4 +6,4 @@ mqtt-port: 8883
mqtt-topic: gearman-subunit/<%= @hostname %>
mqtt-user: <%= @mqtt_user %>
mqtt-pass: <%= @mqtt_pass %>
mqtt-ca_certs: "/etc/ca-certificates/extracted/tls-ca-bundle.pem"
mqtt-ca_certs: /etc/subunit2sql/mqtt-root-CA.pem.crt