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