ceph.ceph_admin package

Submodules

Module contents

Ceph Administrator aka cephadm module is a configuration tool for Ceph cluster.

It allows the users to deploy and manage their Ceph cluster. It also supports all the operations part of the cluster lifecycle.

Over here, we create a glue between the CLI and CephCI to allow the QE to write test scenarios for verifying and validating cephadm.

class ceph.ceph_admin.CephAdmin(cluster, **config)

Bases: BootstrapMixin, ShellMixin

Ceph administrator base class which enables ceph pre-requisites and Inherits HostMixin and BootstrapMixin classes to support host and bootstrap operations respectively

TIMEOUT = 300
direct_calls = ['bootstrap', 'shell']
distribute_cephadm_gen_pub_key(ssh_key_path=None, nodes=None)

Distribute cephadm generated public key to all nodes in the list.

Parameters
  • ssh_key_path (Str) – custom SSH ceph public key path (default: None)

  • nodes (List) – node list to add ceph public key (default: None)

get_cluster_state(commands)

Display cluster state by executing commands provided Just used for sanity.

Parameters

commands (List) – list of commands

install(**kwargs: Dict) None

Install the cephadm package in all node(s).

Parameters

kwargs (Dict) – Key/value pairs that needs to be provided to the installer

Example:

Supported keys:
  upgrade: boolean # to upgrade cephadm RPM package
  gpgcheck: boolean
Note

At present, they are prefixed with – hence use long options

read_cephadm_gen_pub_key(ssh_key_path=None)

Read cephadm generated public key.

Arg:

ssh_key_path ( Str ): custom ssh public key path

Returns

Public Key string (Str)

set_cdn_tool_repo()

Enable the cdn Tools repo on all ceph node.

set_tool_repo(repo=None)

Add the given repo on every node part of the cluster.

Parameters

repo (Str) – repository (default: None)

setup_upstream_repository(repo_url=None)

Download upstream repository to inidividual nodes.

Parameters

repo_url – repo file URL link (default: None)