]> git.proxmox.com Git - ceph.git/blame - ceph/doc/mgr/administrator.rst
import 15.2.0 Octopus source
[ceph.git] / ceph / doc / mgr / administrator.rst
CommitLineData
b5b8bbf5 1.. _mgr-administrator-guide:
7c673cae
FG
2
3ceph-mgr administrator's guide
4==============================
5
31f18b77
FG
6Manual setup
7------------
7c673cae 8
31f18b77
FG
9Usually, you would set up a ceph-mgr daemon using a tool such
10as ceph-ansible. These instructions describe how to set up
11a ceph-mgr daemon manually.
7c673cae 12
31f18b77
FG
13First, create an authentication key for your daemon::
14
15 ceph auth get-or-create mgr.$name mon 'allow profile mgr' osd 'allow *' mds 'allow *'
7c673cae
FG
16
17Place that key into ``mgr data`` path, which for a cluster "ceph"
18and mgr $name "foo" would be ``/var/lib/ceph/mgr/ceph-foo``.
19
20Start the ceph-mgr daemon::
21
22 ceph-mgr -i $name
23
24Check that the mgr has come up by looking at the output
25of ``ceph status``, which should now include a mgr status line::
26
27 mgr active: $name
28
31f18b77
FG
29Client authentication
30---------------------
224ce89b 31
31f18b77
FG
32The manager is a new daemon which requires new CephX capabilities. If you upgrade
33a cluster from an old version of Ceph, or use the default install/deploy tools,
34your admin client should get this capability automatically. If you use tooling from
35elsewhere, you may get EACCES errors when invoking certain ceph cluster commands.
224ce89b 36To fix that, add a "mgr allow \*" stanza to your client's cephx capabilities by
31f18b77
FG
37`Modifying User Capabilities`_.
38
7c673cae
FG
39High availability
40-----------------
41
42In general, you should set up a ceph-mgr on each of the hosts
b5b8bbf5 43running a ceph-mon daemon to achieve the same level of availability.
7c673cae
FG
44
45By default, whichever ceph-mgr instance comes up first will be made
46active by the monitors, and the others will be standbys. There is
47no requirement for quorum among the ceph-mgr daemons.
48
49If the active daemon fails to send a beacon to the monitors for
50more than ``mon mgr beacon grace`` (default 30s), then it will be replaced
51by a standby.
52
53If you want to pre-empt failover, you can explicitly mark a ceph-mgr
54daemon as failed using ``ceph mgr fail <mgr name>``.
55
3efd9988
FG
56Using modules
57-------------
58
59Use the command ``ceph mgr module ls`` to see which modules are
60available, and which are currently enabled. Enable or disable modules
61using the commands ``ceph mgr module enable <module>`` and
62``ceph mgr module disable <module>`` respectively.
63
64If a module is *enabled* then the active ceph-mgr daemon will load
65and execute it. In the case of modules that provide a service,
66such as an HTTP server, the module may publish its address when it
67is loaded. To see the addresses of such modules, use the command
68``ceph mgr services``.
69
70Some modules may also implement a special standby mode which runs on
71standby ceph-mgr daemons as well as the active daemon. This enables
72modules that provide services to redirect their clients to the active
73daemon, if the client tries to connect to a standby.
74
75Consult the documentation pages for individual manager modules for more
76information about what functionality each module provides.
77
11fdf7f2 78Here is an example of enabling the :term:`Dashboard` module:
3efd9988
FG
79
80::
81
82 $ ceph mgr module ls
83 {
84 "enabled_modules": [
85 "restful",
86 "status"
87 ],
88 "disabled_modules": [
89 "dashboard"
90 ]
91 }
92
93 $ ceph mgr module enable dashboard
94 $ ceph mgr module ls
95 {
96 "enabled_modules": [
97 "restful",
98 "status",
99 "dashboard"
100 ],
101 "disabled_modules": [
102 ]
103 }
104
105 $ ceph mgr services
106 {
107 "dashboard": "http://myserver.com:7789/",
108 "restful": "https://myserver.com:8789/"
109 }
110
111
11fdf7f2
TL
112The first time the cluster starts, it uses the ``mgr_initial_modules``
113setting to override which modules to enable. However, this setting
114is ignored through the rest of the lifetime of the cluster: only
115use it for bootstrapping. For example, before starting your
116monitor daemons for the first time, you might add a section like
117this to your ``ceph.conf``:
118
119::
120
121 [mon]
122 mgr initial modules = dashboard balancer
123
7c673cae
FG
124Calling module commands
125-----------------------
126
c07f9fc5 127Where a module implements command line hooks, the commands will
9f95a23c
TL
128be accessible as ordinary Ceph commands. Ceph will automatically incorporate
129module commands into the standard CLI interface and route them appropriately to
130the module.::
7c673cae 131
c07f9fc5
FG
132 ceph <command | help>
133
7c673cae
FG
134Configuration
135-------------
136
7c673cae
FG
137``mgr module path``
138
139:Description: Path to load modules from
140:Type: String
141:Default: ``"<library dir>/mgr"``
142
7c673cae
FG
143``mgr data``
144
145:Description: Path to load daemon data (such as keyring)
146:Type: String
147:Default: ``"/var/lib/ceph/mgr/$cluster-$id"``
148
31f18b77 149``mgr tick period``
7c673cae 150
31f18b77
FG
151:Description: How many seconds between mgr beacons to monitors, and other
152 periodic checks.
7c673cae
FG
153:Type: Integer
154:Default: ``5``
155
156``mon mgr beacon grace``
157
158:Description: How long after last beacon should a mgr be considered failed
159:Type: Integer
160:Default: ``30``
161
224ce89b 162.. _Modifying User Capabilities: ../../rados/operations/user-management/#modify-user-capabilities