2019-11-25 18:38:49 +00:00
|
|
|
=======================
|
|
|
|
Basic Ceph Client Setup
|
|
|
|
=======================
|
2024-03-11 07:04:47 +00:00
|
|
|
Client hosts require basic configuration to interact with
|
|
|
|
Ceph clusters. This section describes how to perform this configuration.
|
2019-11-25 18:38:49 +00:00
|
|
|
|
2021-07-12 20:07:49 +00:00
|
|
|
.. note::
|
2024-03-11 07:04:47 +00:00
|
|
|
Most client hosts need to install only the ``ceph-common`` package
|
|
|
|
and its dependencies. Such an installation supplies the basic ``ceph`` and
|
|
|
|
``rados`` commands, as well as other commands including ``mount.ceph``
|
|
|
|
and ``rbd``.
|
2019-11-25 18:38:49 +00:00
|
|
|
|
|
|
|
Config File Setup
|
|
|
|
=================
|
2024-03-11 07:04:47 +00:00
|
|
|
Client hosts usually require smaller configuration files (here
|
|
|
|
sometimes called "config files") than do back-end cluster hosts.
|
2021-07-12 20:07:49 +00:00
|
|
|
To generate a minimal config file, log into a host that has been
|
2024-03-11 07:04:47 +00:00
|
|
|
configured as a client or that is running a cluster daemon, then
|
|
|
|
run the following command:
|
2020-09-11 23:04:14 +00:00
|
|
|
|
2021-07-12 20:07:49 +00:00
|
|
|
.. prompt:: bash #
|
2019-11-25 18:38:49 +00:00
|
|
|
|
2021-07-12 20:07:49 +00:00
|
|
|
ceph config generate-minimal-conf
|
2019-11-25 18:38:49 +00:00
|
|
|
|
2021-07-12 20:07:49 +00:00
|
|
|
This command generates a minimal config file that tells the client how
|
2024-03-11 07:04:47 +00:00
|
|
|
to reach the Ceph Monitors. This file should usually
|
|
|
|
be copied to ``/etc/ceph/ceph.conf`` on each client host.
|
2019-11-25 18:38:49 +00:00
|
|
|
|
|
|
|
Keyring Setup
|
|
|
|
=============
|
2021-07-12 20:07:49 +00:00
|
|
|
Most Ceph clusters run with authentication enabled. This means that
|
2024-03-11 07:04:47 +00:00
|
|
|
the client needs keys in order to communicate with Ceph daemons.
|
|
|
|
To generate a keyring file with credentials for ``client.fs``,
|
2021-07-12 20:07:49 +00:00
|
|
|
log into an running cluster member and run the following command:
|
2020-09-11 23:04:14 +00:00
|
|
|
|
2021-07-12 20:07:49 +00:00
|
|
|
.. prompt:: bash $
|
2019-11-25 18:38:49 +00:00
|
|
|
|
2021-07-12 20:07:49 +00:00
|
|
|
ceph auth get-or-create client.fs
|
2019-11-25 18:38:49 +00:00
|
|
|
|
2021-07-12 20:07:49 +00:00
|
|
|
The resulting output is directed into a keyring file, typically
|
|
|
|
``/etc/ceph/ceph.keyring``.
|
|
|
|
|
2024-03-11 07:04:47 +00:00
|
|
|
To gain a broader understanding of client keyring distribution and administration,
|
|
|
|
you should read :ref:`client_keyrings_and_configs`.
|
2021-07-12 20:07:49 +00:00
|
|
|
|
2024-03-11 07:04:47 +00:00
|
|
|
To see an example that explains how to distribute ``ceph.conf`` configuration
|
|
|
|
files to hosts that are tagged with the ``bare_config`` label, you should read
|
|
|
|
the subsection named "Distributing ceph.conf to hosts tagged with bare_config"
|
|
|
|
under the heading :ref:`etc_ceph_conf_distribution`.
|