Feature #44205
Updated by Joshua Schmid about 4 years ago
Having a push/apply-config option would enable us to define multiple services/daemons before the actual deployment.
This may be helpful for one-button deployments such as POCs or reproducer environments.
For the technical side:
We have to define a structure that the orchestrator understands.
Since we have *ServiceSpec*[0] and *PlacementSpec*[1] that can parse *from_json/yaml()*
this shouldn't be too hard.
After parsing the SeriveSpecs we have to call the corresponding *_add_$component()*
functions in order. We have to take care that:
* We execute in the right order (not services that create pools before OSDs exist)
** and respect dependencies (mds before NFS/RGW if specified)
* aggregate the completion objects and wait/track progress if async
example config.yaml:
<pre><code class="yaml">
mon:
placement:
count: 1 #optional (mutex with hosts)
label: foo #optional (mutex with hosts)
hosts: #optional (mutex with label and count)
- x
- y
- z
osd:
drivegroups:
default_drivegroup:
host_pattern: foo*
data_devices:
all: True
rgw: #more rgw_custom entries if more than one realm/zone
placement:
count: 1 #optional (mutex with hosts)
label: foo #optional (mutex with hosts)
hosts: #optional (mutex with label and count)
- x
- y
- z
rgw_realm: realm1
rgw_zone: zone1
# Similar options for mds/nfs/mgr etc
</code></pre>
CLI:
<pre>
ceph <orch> apply -i config.yaml
</pre>
[0] https://github.com/ceph/ceph/blob/e5933d5e47fb2e2b77f37678ce770a1887d54c08/src/pybind/mgr/orchestrator/_interface.py#L1338
[1] https://github.com/ceph/ceph/blob/e5933d5e47fb2e2b77f37678ce770a1887d54c08/src/pybind/mgr/orchestrator/_interface.py#L1112