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 (which will be allowed access to the ssh port)



9
10
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
# File 'modules/cephadm/manifests/target.pp', line 9

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

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

        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,
        }
    }
}