@@ -162,6 +162,8 @@ multiple |tcm| installations:
162162- Command-line options for parameters that must be unique for different |tcm | instances
163163 running on a single server. For example, ``http.port ``.
164164
165+ .. _tcm_configuration_types :
166+
165167Configuration parameter types
166168-----------------------------
167169
@@ -219,6 +221,8 @@ packages documentation <https://pkg.go.dev/>`__.
219221 websession-cookie :
220222 same-site : SameSiteStrictMode
221223
224+ .. _tcm_configuration_template :
225+
222226Creating a configuration template
223227---------------------------------
224228
@@ -229,4 +233,94 @@ To write a default |tcm| configuration to the ``tcm.example.yml`` file, run:
229233
230234.. code-block :: console
231235
232- $ tcm generate-config > tcm.example.yml.
236+ $ tcm generate-config > tcm.example.yml.
237+
238+ .. _tcm_configuration_initial :
239+
240+ Initial settings
241+ ----------------
242+
243+ You can use YAML configuration files to create entities in |tcm | automatically
244+ upon the first start. These entities are defined in the :ref: `tcm_configuration_reference_initial `
245+ section of the configuration files.
246+
247+ .. important ::
248+
249+ The initial settings are applied **only once ** upon the first |tcm | start.
250+ Further changes are **not applied ** upon |tcm | restarts.
251+
252+ .. _tcm_configuration_initial_clusters :
253+
254+ Clusters
255+ ~~~~~~~~
256+
257+ To add clusters to |tcm | upon the first start, specify their settings in the
258+ :ref: `initial-settings.clusters <tcm_configuration_reference_initial_clusters >`
259+ configuration section.
260+
261+ The ``initial-settings.clusters `` section is an array whose items describe separate clusters,
262+ for example:
263+
264+ .. code-block :: yaml
265+
266+ initial-settings :
267+ clusters :
268+ - name : " Cluster 1"
269+ description : " First cluster"
270+ # cluster settings
271+ - name : " Cluster 2"
272+ description : " Second cluster"
273+ # cluster settings
274+
275+ In this configuration, you can specify all cluster settings that you define
276+ when :ref: `connecting clusters ` through the |tcm | web interface. This includes
277+ the cluster name, a text description, additional URLs, configuration storage connection,
278+ Tarantool instances connection, and other settings. For the full list of cluster
279+ configuration parameters, see the :ref: `initial-settings.clusters <tcm_configuration_reference_initial_clusters >`
280+ reference. For example, this is how you add a cluster that uses an etcd configuration
281+ storage:
282+
283+
284+ .. code-block :: yaml
285+
286+ initial-settings :
287+ clusters :
288+ - name : " My cluster"
289+ description : " Cluster description"
290+ urls :
291+ - label : Test
292+ url : http://example.com
293+ storage-connection :
294+ provider : etcd
295+ etcd-connection :
296+ endpoints :
297+ - http://127.0.0.1:2379
298+ username : " "
299+ password : " "
300+ prefix : /cluster1
301+ tarantool-connection :
302+ username : " guest"
303+ password : " "
304+
305+ By default, |tcm | contains a cluster named **Default cluster ** with ID
306+ ``00000000-0000-0000-0000-000000000000 ``. You can specify this ID to modify
307+ the default cluster settings upon the first |tcm | start. For example, rename it
308+ and add its connection settings:
309+
310+ .. code-block :: yaml
311+
312+ initial-settings :
313+ clusters :
314+ - id : 00000000-0000-0000-0000-000000000000
315+ name : " My cluster"
316+ storage-connection :
317+ provider : etcd
318+ etcd-connection :
319+ endpoints :
320+ - http://127.0.0.1:2379
321+ username : etcd-user
322+ password : secret
323+ prefix : /cluster1
324+ tarantool-connection :
325+ username : " guest"
326+ password : " "
0 commit comments