]> git.proxmox.com Git - ceph.git/blob - ceph/doc/man/8/cephadm.rst
9c24d5e829eae8aa59674800992c91c624ee27e2
[ceph.git] / ceph / doc / man / 8 / cephadm.rst
1 :orphan:
2
3 =========================================
4 cephadm -- manage the local cephadm host
5 =========================================
6
7 .. program:: cephadm
8
9 Synopsis
10 ========
11
12 | **cephadm**** [-h] [--image IMAGE] [--docker] [--data-dir DATA_DIR]
13 | [--log-dir LOG_DIR] [--logrotate-dir LOGROTATE_DIR]
14 | [--unit-dir UNIT_DIR] [--verbose] [--timeout TIMEOUT]
15 | [--retry RETRY]
16 | {version,pull,inspect-image,ls,list-networks,adopt,rm-daemon,rm-cluster,run,shell,enter,ceph-volume,unit,logs,bootstrap,deploy,check-host,prepare-host,add-repo,rm-repo,install}
17 | ...
18
19
20 | **cephadm** **pull**
21
22 | **cephadm** **inspect-image**
23
24 | **cephadm** **ls**
25
26 | **cephadm** **list-networks**
27
28 | **cephadm** **adopt** [-h] --name NAME --style STYLE [--cluster CLUSTER]
29 | [--legacy-dir LEGACY_DIR] [--config-json CONFIG_JSON]
30 | [--skip-firewalld] [--skip-pull]
31
32 | **cephadm** **rm-daemon** [-h] --name NAME --fsid FSID [--force]
33 | [--force-delete-data]
34
35 | **cephadm** **rm-cluster** [-h] --fsid FSID [--force]
36
37 | **cephadm** **run** [-h] --name NAME --fsid FSID
38
39 | **cephadm** **shell** [-h] [--fsid FSID] [--name NAME] [--config CONFIG]
40 [--keyring KEYRING] [--env ENV]
41 [--] [command [command ...]]
42
43 | **cephadm** **enter** [-h] [--fsid FSID] --name NAME [command [command ...]]
44
45 | **cephadm** **ceph-volume** [-h] [--fsid FSID] [--config-json CONFIG_JSON]
46 [--config CONFIG] [--keyring KEYRING]
47 command [command ...]
48
49 | **cephadm** **logs** [-h] [--fsid FSID] --name NAME [command [command ...]]
50
51 | **cephadm** **bootstrap** [-h] [--config CONFIG] [--mon-id MON_ID]
52 | [--mon-addrv MON_ADDRV] [--mon-ip MON_IP]
53 | [--mgr-id MGR_ID] [--fsid FSID]
54 | [--output-dir OUTPUT_DIR]
55 | [--output-keyring OUTPUT_KEYRING]
56 | [--output-config OUTPUT_CONFIG]
57 | [--output-pub-ssh-key OUTPUT_PUB_SSH_KEY]
58 | [--skip-ssh]
59 | [--initial-dashboard-user INITIAL_DASHBOARD_USER]
60 | [--initial-dashboard-password INITIAL_DASHBOARD_PASSWORD]
61 | [--dashboard-key DASHBOARD_KEY]
62 | [--dashboard-crt DASHBOARD_CRT] [--skip-mon-network]
63 | [--skip-dashboard] [--dashboard-password-noupdate]
64 | [--no-minimize-config] [--skip-ping-check]
65 | [--skip-pull] [--skip-firewalld] [--allow-overwrite]
66 | [--allow-fqdn-hostname] [--skip-prepare-host]
67 | [--orphan-initial-daemons] [--skip-monitoring-stack]
68
69
70 | **cephadm** **deploy** [-h] --name NAME --fsid FSID [--config CONFIG]
71 | [--config-json CONFIG_JSON] [--keyring KEYRING]
72 | [--key KEY] [--osd-fsid OSD_FSID] [--skip-firewalld]
73 | [--reconfig] [--allow-ptrace]
74
75 | **cephadm** **check-host** [-h] [--expect-hostname EXPECT_HOSTNAME]
76
77 | **cephadm** **prepare-host**
78
79 | **cephadm** **add-repo** [-h] [--release RELEASE] [--version VERSION]
80 | [--dev DEV] [--dev-commit DEV_COMMIT]
81 | [--gpg-url GPG_URL] [--repo-url REPO_URL]
82
83
84 | **cephadm** **rm-repo**
85
86 | **cephadm** **install** [-h] [packages [packages ...]]
87
88
89
90
91 Description
92 ===========
93
94 :program:`cephadm` is a command line tool to manage the local host for the cephadm orchestrator.
95
96 It provides commands to investigate and modify the state of the current host.
97
98 :program:`cephadm` is not required on all hosts, but useful when investigating a particular
99 daemon.
100
101 Options
102 =======
103
104 .. option:: --image IMAGE
105
106 container image. Can also be set via the
107 "CEPHADM_IMAGE" env var (default: None)
108
109 .. option:: --docker
110
111 use docker instead of podman (default: False)
112 .. option::data-dir DATA_DIR
113
114 base directory for daemon data (default:/var/lib/ceph)
115
116 .. option:: --log-dir LOG_DIR
117
118 base directory for daemon logs (default:.. option:: /var/log/ceph)
119
120 .. option:: --logrotate-dir LOGROTATE_DIR
121
122 location of logrotate configuration files (default: /etc/logrotate.d)
123
124 .. option:: --unit-dir UNIT_DIR
125
126 base directory for systemd units (default: /etc/systemd/system)
127
128 .. option:: --verbose, -v
129
130 Show debug-level log messages (default: False)
131
132 .. option:: --timeout TIMEOUT
133
134 timeout in seconds (default: None)
135
136 .. option:: --retry RETRY
137
138 max number of retries (default: 10)
139
140
141 Commands
142 ========
143
144 add-repo
145 --------
146
147 configure local package repository to also include the ceph repository.
148
149 Arguments:
150
151 * [--release RELEASE] use latest version of a named release (e.g., octopus)
152 * [--version VERSION] use specific upstream version (x.y.z)
153 * [--dev DEV] use specified bleeding edge build from git branch or tag
154 * [--dev-commit DEV_COMMIT] use specified bleeding edge build from git commit
155 * [--gpg-url GPG_URL] specify alternative GPG key location
156 * [--repo-url REPO_URL] specify alternative repo location
157
158
159 adopt
160 -----
161
162 Adopt a daemon deployed with a different deployment tool.
163
164 Arguments:
165
166 * [--name NAME, -n NAME] daemon name (type.id)
167 * [--style STYLE] deployment style (legacy, ...)
168 * [--cluster CLUSTER] cluster name
169 * [--legacy-dir LEGACY_DIR] base directory for legacy daemon data
170 * [--config-json CONFIG_JSON] Additional configuration information in JSON format
171 * [--skip-firewalld] Do not configure firewalld
172 * [--skip-pull] do not pull the latest image before adopting
173
174
175 bootstrap
176 ---------
177
178 Bootstrap a cluster on the local host. It deploys a MON and a MGR and then also automatically
179 deploys the monitoring stack on this host (see --skip-monitoring-stack) and calls
180 ``ceph orch host add $(hostname)`` (see --skip-ssh).
181
182 Arguments:
183
184 * [--config CONFIG, -c CONFIG] ceph conf file to incorporate
185 * [--mon-id MON_ID] mon id (default: local hostname)
186 * [--mon-addrv MON_ADDRV] mon IPs (e.g., [v2:localipaddr:3300,v1:localipaddr:6789])
187 * [--mon-ip MON_IP] mon IP
188 * [--mgr-id MGR_ID] mgr id (default: randomly generated)
189 * [--fsid FSID] cluster FSID
190 * [--output-dir OUTPUT_DIR] directory to write config, keyring, and pub key files
191 * [--output-keyring OUTPUT_KEYRING] location to write keyring file with new cluster admin and mon keys
192 * [--output-config OUTPUT_CONFIG] location to write conf file to connect to new cluster
193 * [--output-pub-ssh-key OUTPUT_PUB_SSH_KEY] location to write the cluster's public SSH key
194 * [--skip-ssh skip setup of ssh key on local host
195 * [--initial-dashboard-user INITIAL_DASHBOARD_USER] Initial user for the dashboard
196 * [--initial-dashboard-password INITIAL_DASHBOARD_PASSWORD] Initial password for the initial dashboard user
197 * [--dashboard-key DASHBOARD_KEY] Dashboard key
198 * [--dashboard-crt DASHBOARD_CRT] Dashboard certificate
199 * [--skip-mon-network] set mon public_network based on bootstrap mon ip
200 * [--skip-dashboard] do not enable the Ceph Dashboard
201 * [--dashboard-password-noupdate] stop forced dashboard password change
202 * [--no-minimize-config] do not assimilate and minimize the config file
203 * [--skip-ping-check] do not verify that mon IP is pingable
204 * [--skip-pull] do not pull the latest image before bootstrapping
205 * [--skip-firewalld] Do not configure firewalld
206 * [--allow-overwrite] allow overwrite of existing --output-* config/keyring/ssh files
207 * [--allow-fqdn-hostname] allow hostname that is fully-qualified (contains ".")
208 * [--skip-prepare-host] Do not prepare host
209 * [--orphan-initial-daemons] Do not create initial mon, mgr, and crash service specs
210 * [--skip-monitoring-stack] Do not automatically provision monitoring stack] (prometheus, grafana, alertmanager, node-exporter)
211
212
213 ceph-volume
214 -----------
215
216 Run ceph-volume inside a container::
217
218 cephadm ceph-volume inventory
219
220 Positional arguments:
221 * [command] command
222
223 Arguments:
224
225 * [--fsid FSID] cluster FSID
226 * [--config-json CONFIG_JSON] JSON file with config and (client.bootrap-osd) key
227 * [--config CONFIG, -c CONFIG] ceph conf file
228 * [--keyring KEYRING, -k KEYRING] ceph.keyring to pass through to the container
229
230
231 check-host
232 ----------
233
234 check host configuration to be suitable for a Ceph cluster.
235
236 Arguments:
237
238 * [--expect-hostname EXPECT_HOSTNAME] Check that hostname matches an expected value
239
240
241 deploy
242 ------
243
244 deploy a daemon on the local host. Used by the orchestrator CLI::
245
246 cephadm shell -- ceph orch apply <type> ...
247
248 Arguments:
249
250 * [--name NAME] daemon name (type.id)
251 * [--fsid FSID] cluster FSID
252 * [--config CONFIG, -c CONFIG] config file for new daemon
253 * [--config-json CONFIG_JSON] Additional configuration information in JSON format
254 * [--keyring KEYRING] keyring for new daemon
255 * [--key KEY] key for new daemon
256 * [--osd-fsid OSD_FSID] OSD uuid, if creating an OSD container
257 * [--skip-firewalld] Do not configure firewalld
258 * [--reconfig] Reconfigure a previously deployed daemon
259 * [--allow-ptrace] Allow SYS_PTRACE on daemon container
260
261
262 enter
263 -----
264
265 Run an interactive shell inside a running daemon container::
266
267 cephadm enter --name mgr.myhost.ysubfo
268
269 Positional arguments:
270 * [command] command
271
272 Arguments:
273
274 * [--fsid FSID] cluster FSID
275 * [--name NAME, -n NAME] daemon name (type.id)
276
277 install
278 -------
279
280 install ceph package(s)
281
282 Positional arguments:
283
284 * [packages] packages
285
286
287 inspect-image
288 -------------
289
290 inspect local ceph container image.
291
292 list-networks
293 -------------
294
295 list IP networks
296
297
298 ls
299 --
300
301 list daemon instances known to cephadm on **this** host::
302
303 $ cephadm ls
304 [
305 {
306 "style": "cephadm:v1",
307 "name": "mgr.storage-14b-1.ysubfo",
308 "fsid": "5110cb22-8332-11ea-9148-0894ef7e8bdc",
309 "enabled": true,
310 "state": "running",
311 "container_id": "8562de72370a3836473ecfff8a22c9ccdd99815386b4692a2b30924fb5493c44",
312 "container_image_name": "docker.io/ceph/ceph:v15",
313 "container_image_id": "bc83a388465f0568dab4501fb7684398dca8b50ca12a342a57f21815721723c2",
314 "version": "15.2.1",
315 "started": "2020-04-21T01:16:41.831456",
316 "created": "2020-04-21T01:16:41.775024",
317 "deployed": "2020-04-21T01:16:41.415021",
318 "configured": "2020-04-21T01:16:41.775024"
319 },
320 ...
321
322 logs
323 ----
324
325 print journald logs for a daemon container::
326
327 cephadm logs --name mgr.myhost.ysubfo
328
329 This is similar to::
330
331 journalctl -u mgr.myhost.ysubfo
332
333
334 prepare-host
335 ------------
336
337 prepare a host for cephadm use
338
339 Arguments:
340
341 * [--expect-hostname EXPECT_HOSTNAME] Set hostname
342
343
344 pull
345 ----
346
347 Pull the ceph image::
348
349 cephadm pull
350
351
352 rm-daemon
353 ---------
354
355 Remove a specific daemon instance
356
357 Arguments:
358
359 * [--name NAME, -n NAME] daemon name (type.id)
360 * [--fsid FSID] cluster FSID
361 * [--force] proceed, even though this may destroy valuable data
362 * [--force-delete-data] delete valuable daemon data instead of making a backup
363
364
365 rm-cluster
366 ----------
367
368 remove all daemons for a cluster
369
370 Arguments:
371
372 * [--fsid FSID] cluster FSID
373 * [--force] proceed, even though this may destroy valuable data
374
375 rm-repo
376 -------
377
378 remove package repository configuration
379
380 run
381 ---
382
383 run a ceph daemon, in a container, in the foreground
384
385 Arguments:
386
387 * [--name NAME, -n NAME] daemon name (type.id)
388 * [--fsid FSID] cluster FSID
389
390
391 shell
392 -----
393
394 Run an interactive shell::
395
396 cephadm shell
397
398 Or one specific command inside a container::
399
400 cephadm shell -- ceph orch ls
401
402
403 Positional arguments:
404
405 * [command] command (optional)
406
407 Arguments:
408
409 * [--fsid FSID] cluster FSID
410 * [--name NAME, -n NAME] daemon name (type.id)
411 * [--config CONFIG, -c CONFIG] ceph.conf to pass through to the container
412 * [--keyring KEYRING, -k KEYRING] ceph.keyring to pass through to the container
413 * [--env ENV, -e ENV] set environment variable
414
415
416 unit
417 ----
418
419 Operate on the daemon's systemd unit.
420
421 Positional arguments:
422
423 * [command] systemd command (start, stop, restart, enable, disable, ...)
424
425 Arguments:
426
427 * [--fsid FSID] cluster FSID
428 * [--name NAME, -n NAME] daemon name (type.id)
429
430
431 Availability
432 ============
433
434 :program:`cephadm` is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to
435 the documentation at http://docs.ceph.com/ for more information.
436
437
438 See also
439 ========
440
441 :doc:`ceph-volume <ceph-volume>`\(8),