@@ -36,8 +36,8 @@ For example:
3636
3737.. _tcm_configuration_ways :
3838
39- Ways to pass | tcm | configuration parameters
40- -------------------------------------------
39+ Ways to pass configuration parameters
40+ -------------------------------------
4141
4242There are three ways to pass |tcm | configuration parameters:
4343
@@ -47,8 +47,8 @@ There are three ways to pass |tcm| configuration parameters:
4747
4848.. _tcm_configuration_ways_yaml :
4949
50- YAML configuration file
51- ~~~~~~~~~~~~~~~~~~~~~~~
50+ YAML file
51+ ~~~~~~~~~
5252
5353|tcm | configuration can be stored in a YAML file. Its structure must reflect the
5454configuration parameters hierarchy.
@@ -144,9 +144,10 @@ You can combine different ways of |tcm| configuration for efficient management o
144144multiple |tcm | installations:
145145
146146- A single YAML file for all installations can contain the common configuration parts.
147- For example, the security parameters that fulfill your organization's requirements.
147+ For example, the |tcm | configuration storage used for all installations or
148+ TLS settings.
148149- Environment variables that set specific parameters for each server, such as
149- ?? any good example??
150+ local directories and paths.
150151- Command-line options for parameters that must be unique for different |tcm | instances
151152 running on a single server. For example, ``http.port ``.
152153
@@ -158,64 +159,59 @@ types. Note that this is different from the :ref:`Tarantool configuration parame
158159which have Lua types.
159160
160161Most options have the Go's basic types: `bool `, `string `, `int `, and other numeric types.
162+ Their values are passed as strings:
163+
164+ .. code-block :: yaml
165+
166+ http :
167+ basic-auth :
168+ enabled : false # bool
169+ network : tcp # string
170+ host : 127.0.0.1 # string
171+ port : 8080 # int
172+ request-size : 1572864 # int64
161173
162174 Parameters that can take multiple values are arrays. In YAML, they are passed as
163175YAML arrays (each item on a new line, starting with a dash). In environment variables
164176and command line options, the items of such arrays are passed in a semicolon-separated string.
165177
166- Parameters that set timeouts, TTLs, and other duration values, have the Go's `time.Duration <https://pkg.go.dev/time#Duration >`__
167- type. This enables passing the values in the time-formatted strings such as ``4h30m25s ``.
168-
169- The table below shows how to pass parameter values of different types:
170-
171- .. list-table ::
172- :header-rows: 1
173- :stub-columns: 1
174-
175- * - Type
176- - YAML
177- - Environment variable
178- - Command-line option
179-
180- * - ``bool ``
181- - http:
182- tls:
183- enabled: true
184- - TCM_HTTP_TLS_ENABLED="true"
185- - --http_tls_enabled="true"
178+ .. code-block :: yaml
186179
187- * - ``int ``, ``uint ``, ``uint64 ``
188- - http:
189- port: 8080
180+ storage :
181+ provider : etcd
182+ etcd :
183+ endpoints : # array
184+ - https://192.168.0.1:2379 # item 1
185+ - https://192.168.0.2:2379 # item 2
190186
191- - TCM_HTTP_PORT=8080
192- - --http-port=8080
187+ Parameters that set timeouts, TTLs, and other duration values, have the Go's ` time.Duration < https://pkg.go.dev/time#Duration >`__
188+ type. Their values can be passed in time-formatted strings such as `` 4h30m25s ``.
193189
194- * - ``string ``
195- - http:
196- host: 127.0.0.1
190+ .. code-block :: yaml
197191
198- - TCM_HTTP_HOST="127.0.0.1"
199- - --http-host=127.0.0.1
192+ cluster :
193+ tarantool-timeout : 10s # duration
194+ tarantool-ping-timeout : 5s # duration
200195
201- * - ``array ``
202- - http:
203- cors:
204- allowed-methods:
205- - POST
206- - GET
196+ Finally, there are parameters whose values are constants defined in Go packages.
197+ For example, :ref: `http.websession-cookie.same-site <tcm_configuration_reference_http_websession-cookie_same-site > `
198+ values are constants from the Go's `http.SameSite <https://pkg.go.dev/net/http#SameSite >`__
199+ type. To find out the exact values available for such parameters, refer to `Go
200+ packages documentation <https://pkg.go.dev/> `__.
207201
208- - TCM_HTTP_CORS_ALLOWED_METHODS="POST;GET"
209- - --http-cors-allowed-methods=POST;GET
202+ .. code-block :: yaml
210203
211- * - ``time.Duration ``
212- - http:
213- read-timeout: 1m5s
204+ http :
205+ tls :
206+ cipher-suites :
207+ - TLS_RSA_WITH_RC4_128_SHA # Go constant
214208
215- - TCM_HTTP_READ_TIMEOUT="1m5s"
216- - --http-read-timeout=1m5s
209+ Creating configuration template
210+ -------------------------------
217211
212+ You can create a YAML configuration template for |tcm | by running the ``tcm ``
213+ executable with the ``generate-config `` option:
218214
215+ .. code-block :: console
219216
220- ? Configuration example or template for users?
221- ----------------------------------------------
217+ tcm generate-config
0 commit comments