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