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