Debian Codegraph @

docs/ug/user_manual/text_based_suite_definition/external/mirror.rst

raw
1 .. _text_based_def_mirror:
2
3 mirror
4 //////
5
6 This defines a :term:`mirror` attribute, which synchronizes the status of a
7 :term:`node` between a local and a remote ecFlow server. The options defining
8 the attribute can be provided in any order.
9
10 The :term:`mirror` attribute is defined by the coordinates to the remote :term:`node` to be mirrored, including the
11 remote :term:`node` path, the remote host name, the remote port number; and the polling interval in seconds.
12 Furthermore, the option :code:`--ssl` enables the use of a Secure connection and the option :code:`--auth` can be used
13 to provide the authentication credentials for the remote ecFlow server.
14
15 .. code-block:: shell
16
17 task t1
18 mirror --name A --remote_path /s/f/tA --remote_host host --remote_port 3141 --polling 300 --ssl --auth /path/to/auth.json
19
20 task t2
21 aviso --name B --remote_path /s/f/tB
22 # when not provided, the following default options are used
23 # --remote_host %ECF_MIRROR_REMOTE_HOST%
24 # --remote_port %ECF_MIRROR_REMOTE_PORT%
25 # --polling %ECF_MIRROR_POLLING%
26 # --auth %ECF_MIRROR_AUTH%
27
28
29 By default, the :term:`mirror` attribute will not propagate the state of the remote :term:`node` to the local node tree,
30 and only the actual associated local :term:`node` will see its state updated.
31 The option :code:`--propagate` can be used to enable the propagation of the remote :term:`node` state to the local node
32 tree.
33
34 .. code-block:: shell
35
36 task t1
37 mirror --name A --remote_path /s/f/tA --remote_host host --remote_port 3141 --polling 300 --propagate
38
39
40 .. note::
41 The ``--polling`` value (in seconds) controls how often the local ecFlow
42 server contacts the remote server. Lower values reduce latency but
43 have impact on the remote server as the network traffic increases.
44 A value of 300 seconds is considered suitable for most cases, and a minimum
45 of 60 seconds being imposed to avoid overloading the remote server.
46
47 The Authentication credentials, provided via option :code:`--auth`, are
48 provided in a `JSON` file with the following content:
49
50 .. code-block:: json
51
52 {
53 "url": "http://host.int:1234",
54 "username": "user",
55 "password": "************",
56 "email": "[email protected]"
57 }