Documentation #46133
closedencourage users to apply YAML specs instead of using the CLI
0%
Description
Ceph orchestrator has two main ways to interact on the command line: The CLI and YAML specs.
Turnd out, the CLI is prone to some user errors that I frequently see.
- The
apply
command seems to be a source of lots of confusion: When executing something like this:
ceph orch apply mon host1 ceph orch apply mon host2 ceph orch apply mon host3
which leads to only a single MON at host3.
but actually they want to run this command instead:
ceph orch apply mon "host1,host2,host3"
Looks like the semantics of apply are not obvious.
- The orch CLI is fairly complex with many parameters and many options. When taking into account that we don't own the
ceph
binary, but have to share it with the rest of Ceph, we can't control the CLI to a point where using the CLI don't generate user errors. For example, I'm seeing users where the parameters are "shifted" leading to wrong service specifications.
Consider:
ceph orch apply RGW myrealm myzone "host1,host2,host3"
This will generate a service like this:
service_type: rgw
placement: null
spec:
realm: myrealm
zone: myzone
subcluster: host1,host2,host3
Which is just wrong.
Instead.
I'd propose to encourage users to use the YAML specifications and only use
ceph orch apply -i file.yaml
And let users define YAML specifications:
service_type: mon
placement:
hosts:
- host1
- host2
- host3
Benefits are:
- The semantics of the placement argument is clear.
- As we're using named arguments in YAML, we'll see fewer users calling the CLI wrongly.
Updated by Zac Dover almost 4 years ago
affected files:
cephadm/adopt.rst
cephadm/install.rst
mgr/orchestrator.rst
Updated by Zac Dover almost 4 years ago
We need more examples of YAML files that users can cut and paste or at least cut, alter, and paste.
Updated by Zac Dover almost 4 years ago
This is similar to the way that Kubernetes does things.
--Sebastian Wagner, Ceph Orchestrators Meeting 22 Jun 2020
Updated by Sebastian Wagner almost 4 years ago
- Status changed from New to Pending Backport
Updated by Sebastian Wagner over 3 years ago
- Status changed from Pending Backport to Resolved