From e303fe7eaa25091ea29515cb737fbc08ddad6bbf Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 10 Mar 2020 16:05:43 +0100 Subject: [PATCH] doc/mgr: Enhance placement specs Signed-off-by: Sebastian Wagner --- doc/mgr/orchestrator.rst | 86 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 4 deletions(-) diff --git a/doc/mgr/orchestrator.rst b/doc/mgr/orchestrator.rst index 01e24a11fd0..f4c4be77a66 100644 --- a/doc/mgr/orchestrator.rst +++ b/doc/mgr/orchestrator.rst @@ -273,13 +273,91 @@ Placement Specification In order to allow the orchestrator to deploy a *service*, it needs to know how many and where it should deploy *daemons*. The orchestrator -defines a placement specification: +defines a placement specification that can either be passed as a command line argument. -* To deploy three *daemons*, simply specify the count: ``3`` -* To deploy *daemons* on specific hosts, specify the host names: ``host1 host2 host3`` -* To deploy *daemons* on a subset of hosts, also specify the count: ``2 host1 host2 host3`` +Explicit placements +------------------- + +Daemons can be explictly placed on hosts by simply specifying them:: + + orch apply prometheus "host1 host2 host3" + +Or in yaml:: + + service_type: prometheus + placement: + hosts: + - host1 + - host2 + - host3 + +MONs and other services may require some enhanced network specifications:: + + orch daemon add mon myhost:[v2:1.2.3.4:3000,v1:1.2.3.4:6789]=name + +Where ``[v2:1.2.3.4:3000,v1:1.2.3.4:6789]`` is the network address of the monitor +and ``=name`` specifies the name of the new monitor. + +Placement by labels +------------------- + +Daemons can be explictly placed on hosts that match a specifc label:: + + orch apply prometheus label:mylabel + +Or in yaml:: + + service_type: prometheus + placement: + label: "mylabel" + + +Placement by pattern matching +----------------------------- + +Daemons can be placed on hosts as well:: + + orch apply prometheus all:true +Or in yaml:: + + service_type: prometheus + placement: + all_hosts: true + + +Setting a limit +--------------- + +By specifying ``count``, only that number of daemons will be created:: + + orch apply prometheus 3 + +To deploy *daemons* on a subset of hosts, also specify the count:: + + orch apply prometheus "2 host1 host2 host3" +If the count is bigger than the amount of hosts, cephadm still deploys two daemons:: + + orch apply prometheus "3 host1 host2" + +Or in yaml:: + + service_type: prometheus + placement: + count: 3 + +Or with hosts:: + + service_type: prometheus + placement: + count: 2 + hosts: + - host1 + - host2 + - host3 + + Configuring the Orchestrator CLI ================================ -- 2.39.5