Skip to content

Commit f159ec8

Browse files
committed
Update description and examples; add cross-reference to release notes
Part of #2066
1 parent 391bdf5 commit f159ec8

File tree

2 files changed

+46
-32
lines changed

2 files changed

+46
-32
lines changed

doc/reference/configuration/index.rst

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -300,97 +300,111 @@ a second time.
300300
To see all the non-null parameters, say ``box.cfg`` (no parentheses). To see a
301301
particular parameter, for example, the listen address, say ``box.cfg.listen``.
302302

303-
Configuration parameters via environmental variables
304-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
303+
.. _box-cfg-params-prior:
305304

306-
[TBD]--to rephrase
307-
As described/discussed before, you can specify configuration parameters :ref:`via environmental variables <index-init-example>`
308-
and then pass it to ``box.cfg{}`` by using the ``os.getenv()`` function.
305+
Configuration parameter sources / priority
306+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309307

310-
Starting from version 2.8.1, you can specify these/such parameters via environmental variables in much easier way.
308+
[TBD]--title
311309

312-
The name of a variable should correspond to the following pattern: ``TT_<NAME>``
310+
Tarantool configuration parameters can be specified in different ways.
311+
[TBD] The priority of parameter sources is the following, from higher to lower:
313312

313+
* ``box.cfg{}`` call
314+
* :ref:`environment variables <box-cfg-params-env>`
315+
* :doc:`tarantoolctl </reference/tarantoolctl>` options
316+
* default values.
317+
318+
.. _box-cfg-params-env:
319+
320+
Configuration parameters via environment variables
321+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322+
323+
[TBD]--1) title 2) intro
324+
325+
[TBD--do we need this?] As described before, you can specify configuration parameters via environment variables
326+
and then pass them to ``box.cfg{}`` by using the ``os.getenv()`` function (see the :ref:`example <index-init-example>`).
327+
328+
Starting from version :doc:`2.8.1 </release/2.8.1>`, you can specify such parameters [via environment variables] in much easier way.
329+
330+
[TBD] The name of a variable should have the following pattern: ``TT_<NAME>``,
314331
where ``<NAME>`` is the uppercase name of the corresponding ``box.cfg`` option.
315332

333+
[TBD]--maybe give an example with the value, and only for tt_listen.
316334
For example:
317335

318336
* ``TT_LISTEN``---corresponds to the ``box.cfg.listen`` option.
319337
* ``TT_REPLICATION``---corresponds to the ``box.cfg.replication`` option..
320338

321-
Array values are separated by comma. Example:
339+
[TBD] On Tarantool start and the ``box.cfg{}`` call, the values of the ``TT_<NAME>`` environment variables will be set for the corresponding configuration parameters.
340+
[TBD] ?Note on priorities?
341+
342+
[TBD] Array values should be separated by comma without space:
322343

323344
.. code-block:: console
324345
325-
export TT_REPLICATION=localhost:3301,localhost:3302
346+
export TT_REPLICATION="localhost:3301,localhost:3302" [TBD] кавычки
326347
327-
An empty variable is the same as unset one.
348+
[TBD] An empty variable (``TT_LISTEN=``) has the effect as an unset one [meaning that the corresponding configuration parameter won't be set when calling ``box.cfg{}``].
328349

350+
.. code-block:: console
329351
352+
export TT_LISTEN="localhost:3301?param1=value1&param2=value2"
330353
331354
Parameters reference
332355
~~~~~~~~~~~~~~~~~~~~
333356

334-
[TBD]--1) title 2) intro phrase and possibly local ToC 3) downgrade levels of underlying titles
357+
[TBD]--1) title 2) intro phrase and possibly local ToC
335358

336-
The following sections describe all parameters for basic operation, for storage,
359+
The sections that follow describe all parameters for basic operation, for storage,
337360
for binary logging and snapshots, for replication, for networking,
338361
for logging, and for feedback.
339362

340-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
341363
Basic parameters
342-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
364+
^^^^^^^^^^^^^^^^
343365

344366
.. include:: cfg_basic.rst
345367

346-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347368
Configuring the storage
348-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
369+
^^^^^^^^^^^^^^^^^^^^^^^
349370

350371
.. include:: cfg_storage.rst
351372

352373
.. _book_cfg_checkpoint_daemon:
353374

354-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
355375
Checkpoint daemon
356-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
376+
^^^^^^^^^^^^^^^^^
357377

358378
.. include:: cfg_snapshot_daemon.rst
359379

360-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
361380
Binary logging and snapshots
362-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
381+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
363382

364383
.. include:: cfg_binary_logging_snapshots.rst
365384

366385
.. _index-hot_standby:
367386

368-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
369387
Hot standby
370-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
388+
^^^^^^^^^^^
371389

372390
.. include:: cfg_hot_standby.rst
373391

374-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
375392
Replication
376-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
393+
^^^^^^^^^^^
377394

378395
.. include:: cfg_replication.rst
379396

380-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
381397
Networking
382-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
398+
^^^^^^^^^^
383399

384400
.. include:: cfg_networking.rst
385401

386-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
387402
Logging
388-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
403+
^^^^^^^
389404

390405
.. include:: cfg_logging.rst
391406

392-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
393407
Deprecated parameters
394-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408+
^^^^^^^^^^^^^^^^^^^^^
395409

396410
.. include:: cfg_deprecated.rst

doc/release/2.8.1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ issue <https://github.com/tarantool/tarantool/issues>`__ on GitHub.
2020
Notable changes are:
2121

2222
- Tarantool is now able to set multiple iproto threads.
23-
- Setting ``box.cfg`` options with environment variables.
23+
- Setting ``box.cfg`` options with :ref:`environment variables <box-cfg-params-env>`.
2424
- The new ``box.ctl.promote()`` function and the concept of manual elections.
2525
- Enhancements in the Lua memory profiler.
2626

@@ -92,7 +92,7 @@ Core
9292
- The new ``box.lib`` module allows loading and executing C
9393
stored procedures on read-only nodes (:tarantool-issue:`4642`).
9494

95-
- Configuration options in ``box.cfg`` can now be defined with environment variables
95+
- Configuration options in ``box.cfg`` can now be :ref:`defined with environment variables <box-cfg-params-env>`
9696
(:tarantool-issue:`5602`).
9797

9898
The priority of sources of configuration options is the following, from higher to lower:

0 commit comments

Comments
 (0)