You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- :ref:`config.etcd.endpoints <config_etcd_endpoints>` specifies the list of etcd endpoints.
31
+
- :ref:`config.etcd.prefix <config_etcd_prefix>` sets a key prefix used to search a configuration. Tarantool searches keys by the following path: ``/prefix/config/*``.
48
32
49
-
.. code-block:: console
50
33
51
-
$ etcdctl put /example/config/all.yaml < remote_config.yaml
34
+
You can also provide additional etcd connection options:
- :ref:`config.etcd.username <config_etcd_username>` and :ref:`config.etcd.password <config_etcd_password>` specify credentials used for authentication.
43
+
- :ref:`config.etcd.ssl.ca_file <config_etcd_ssl_ca_file>` specifies a path to a trusted certificate authorities (CA) file.
44
+
- :ref:`config.etcd.http.request.timeout <config_etcd_http_request_timeout>` configures a timeout for connecting to an etcd server.
58
45
59
-
Searches keys by the following path: ``/prefix/config/*``.
60
-
See https://github.com/tarantool/doc/issues/3725
46
+
You can find all the available configuration options in the :ref:`etcd <configuration_reference_config_etcd>` section.
61
47
62
-
Manual:
63
48
64
-
.. code-block:: yaml
65
49
66
-
config:
67
-
reload: 'manual'
50
+
.. _etcd_publishing_configuration:
68
51
69
-
Reload config (on all instances):
52
+
Publishing cluster's configuration to etcd
53
+
------------------------------------------
70
54
71
-
.. code-block:: lua
55
+
.. _etcd_publishing_configuration_tt:
72
56
73
-
require('config'):reload()
57
+
Publishing configuration using the tt utility
58
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74
59
75
-
Authentication:
60
+
The tt utility provides the :ref:`tt cluster <tt-cluster>` command for managing a cluster's configuration.
61
+
The ``tt cluster publish`` command can be used to publish a cluster's configuration to etcd.
76
62
77
-
.. code-block:: console
63
+
The example below shows how a :ref:`layout <admin-start_stop_instance-multi-instance-layout>` of the application called ``app`` might look:
$ etcdctl --user root --password foobar user grant-role testuser tt
67
+
instances.enabled
68
+
└── app
69
+
├── config.yaml
70
+
├── cluster.yaml
71
+
└── instances.yml
83
72
73
+
* ``config.yaml`` contains a :ref:`local configuration <etcd_local_configuration>` used to connect to etcd.
74
+
* ``cluster.yaml`` contains a cluster's configuration to be published.
75
+
* ``instances.yml`` specifies :ref:`instances <admin-start_stop_instance-multi-instance>` to run in the current environment. ``tt cluster publish`` ignores the configured instances.
84
76
85
-
.. code-block:: yaml
77
+
To publish a cluster's configuration (``cluster.yaml``) to an etcd server, execute ``tt cluster publish`` as follows:
To publish a cluster's configuration using the ``etcdctl`` utility, use the ``put`` command:
90
+
91
+
.. code-block:: console
92
+
93
+
$ etcdctl put /example/config/all < cluster.yaml
94
+
95
+
96
+
97
+
98
+
.. _etcd_showing_configuration:
99
+
100
+
Showing a cluster's configuration
101
+
---------------------------------
102
+
103
+
As for :ref:`publishing configuration <etcd_publishing_configuration>`, you can see a cluster's configuration in two ways:
104
+
105
+
- Using the :ref:`tt cluster show <tt-cluster>` command.
106
+
- Using the ``etcdctl get`` command.
107
+
108
+
109
+
.. _etcd_starting_instances:
110
+
111
+
Starting Tarantool instances
112
+
----------------------------
113
+
114
+
To learn how to start Tarantool instances, see the :ref:`Starting Tarantool instances <configuration_run_instance>` section.
115
+
116
+
117
+
.. _etcd_reloading_configuration:
118
+
119
+
Reloading configuration
120
+
-----------------------
121
+
122
+
By default, Tarantool watches etcd keys with the :ref:`specified prefix <etcd_local_configuration>` for changes in a cluster's configuration and reloads a changed configuration automatically.
123
+
If necessary, you can set the :ref:`config.reload <configuration_reference_config_reload>` option to ``manual`` to turn off configuration reloading:
124
+
125
+
.. code-block:: yaml
126
+
127
+
config:
128
+
reload: 'manual'
129
+
etcd:
130
+
# ...
131
+
132
+
In this case, you can reload a configuration in the :ref:`application code <configuration_application>` using the ``reload()`` function provided by the :ref:`config <config-module>` module:
0 commit comments