Puppet Class: cephadm::target

Defined in:
modules/cephadm/manifests/target.pp

Summary

Installs the requirements for a node to be a cephadm target

Overview

SPDX-License-Identifier: Apache-2.0

Class: cephadm::target

i.e. a node that will be part of a cephadm-managed Ceph cluster.

Parameters:

  • cephadm_controller (Optional[Stdlib::Fqdn]) (defaults to: undef)

    cephadm controller node (whose key will be used)

  • cephadm_mgrs (Optional[Array[Stdlib::Fqdn]]) (defaults to: undef)

    cephadm manager nodes (which will be allowed access to the ssh port)



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'modules/cephadm/manifests/target.pp', line 11

class cephadm::target(
    Optional[Stdlib::Fqdn] $cephadm_controller = undef,
    Optional[Array[Stdlib::Fqdn]] $cephadm_mgrs = undef,
) {
    # podman, and necessary packages for running Ceph containers.
    ensure_packages([
        'catatonit',
        'fuse-overlayfs',
        'lvm2',
        'thin-provisioning-tools',
        'podman',
    ])

    # Buggy and unnecessary T370255
    systemd::mask { 'podman-auto-update.service': }

    if $cephadm_mgrs and $cephadm_controller {
        firewall::service { 'cephadm-ssh':
            proto  => 'tcp',
            port   => '22',
            srange => $cephadm_mgrs,
        }

        file { '/etc/ssh/userkeys/root.d/cephadm':
            mode    => '0444',
            content => cephadm::ssh_keys($cephadm_controller),
        }
    } else {
        file { '/etc/ssh/userkeys/root.d/cephadm':
            ensure => absent,
        }
    }
}