Ceph grafana service certificate request
This change adds the certmonger ceph_grafana class to define the necessary requirements to make the cert request for the ceph dashboard service. Change-Id: Ib5f780349c12eebbf514a75293d8f4644dc5731f
This commit is contained in:
parent
8e4de1b75c
commit
dcf2263522
68
manifests/certmonger/ceph_grafana.pp
Normal file
68
manifests/certmonger/ceph_grafana.pp
Normal file
@ -0,0 +1,68 @@
|
||||
# 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: tripleo::certmonger::ceph_grafana-server
|
||||
#
|
||||
# Request a certificate for RabbitMQ and do the necessary setup.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*hostname*]
|
||||
# The hostname of the node. this will be set in the CN of the certificate.
|
||||
#
|
||||
# [*service_certificate*]
|
||||
# The path to the certificate that will be used for TLS in this service.
|
||||
#
|
||||
# [*service_key*]
|
||||
# The path to the key that will be used for TLS in this service.
|
||||
#
|
||||
# [*certmonger_ca*]
|
||||
# (Optional) The CA that certmonger will use to generate the certificates.
|
||||
# Defaults to hiera('certmonger_ca', 'local').
|
||||
#
|
||||
# [*principal*]
|
||||
# (Optional) The service principal that is set for the service in kerberos.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::certmonger::ceph_grafana (
|
||||
$hostname,
|
||||
$service_certificate,
|
||||
$service_key,
|
||||
$certmonger_ca = hiera('certmonger_ca', 'local'),
|
||||
$principal = undef,
|
||||
) {
|
||||
|
||||
certmonger_certificate { 'ceph_grafana' :
|
||||
ensure => 'present',
|
||||
certfile => $service_certificate,
|
||||
keyfile => $service_key,
|
||||
hostname => $hostname,
|
||||
dnsname => $hostname,
|
||||
principal => $principal,
|
||||
ca => $certmonger_ca,
|
||||
wait => true,
|
||||
require => Class['::certmonger'],
|
||||
}
|
||||
|
||||
file { $service_certificate :
|
||||
require => Certmonger_certificate['ceph_grafana'],
|
||||
owner => 472,
|
||||
group => 472,
|
||||
}
|
||||
file { $service_key :
|
||||
require => Certmonger_certificate['ceph_grafana'],
|
||||
owner => 472,
|
||||
group => 472,
|
||||
}
|
||||
}
|
@ -102,6 +102,11 @@
|
||||
# it will create.
|
||||
# Defaults to hiera('redis_certificate_specs', {}).
|
||||
#
|
||||
# [*ceph_grafana_certificate_specs*]
|
||||
# (Optional) The specifications to give to certmonger for the certificate(s)
|
||||
# it will create.
|
||||
# Defaults to hiera('ceph_grafana_certificate_specs', {}).
|
||||
#
|
||||
# [*etcd_certificate_specs*]
|
||||
# (Optional) The specifications to give to certmonger for the certificate(s)
|
||||
# it will create.
|
||||
@ -164,6 +169,7 @@ class tripleo::profile::base::certmonger_user (
|
||||
$ovs_certificate_specs = hiera('tripleo::profile::base::neutron::plugins::ovs::opendaylight::certificate_specs', {}),
|
||||
$neutron_certificate_specs = hiera('tripleo::profile::base::neutron::certificate_specs', {}),
|
||||
$novnc_proxy_certificates_specs = hiera('novnc_proxy_certificates_specs',{}),
|
||||
$ceph_grafana_certificate_specs = hiera('ceph_grafana_certificate_specs', {}),
|
||||
$novnc_proxy_postsave_cmd = undef,
|
||||
# Deprecated
|
||||
$haproxy_postsave_cmd = undef,
|
||||
@ -251,5 +257,8 @@ class tripleo::profile::base::certmonger_user (
|
||||
ensure_resource('class', 'tripleo::certmonger::novnc_proxy', $novnc_proxy_certificates_specs,
|
||||
{'postsave_cmd' => $novnc_proxy_postsave_cmd})
|
||||
}
|
||||
unless empty($ceph_grafana_certificate_specs) {
|
||||
ensure_resource('class', 'tripleo::certmonger::ceph_grafana', $ceph_grafana_certificate_specs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user