Skip to content

Add a link to config json-schema #5090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ groups:
instance001:
iproto:
listen:
- uri: '127.0.0.1:3301'
- uri: '127.0.0.1:3301'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=https://download.tarantool.org/tarantool/schema/config.schema.json

groups:
group001:
replicasets:
replicaset001:
instances:
instance001:
iproto:
listen:
- uri: '127.0.0.1:3301'
15 changes: 12 additions & 3 deletions doc/platform/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can flexibly configure a cluster's settings on different levels: from global

.. NOTE::

All the available options are documented in the :ref:`Configuration reference <configuration_reference>`.
All the available options are documented in the :ref:`Configuration reference <configuration_reference>`.


.. _configuration_file:
Expand All @@ -77,7 +77,7 @@ Basic instance configuration

The example below shows a sample configuration of a single Tarantool instance:

.. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config_annotated.yaml
:language: yaml
:dedent:

Expand All @@ -86,6 +86,15 @@ The example below shows a sample configuration of a single Tarantool instance:
- The ``replicasets`` section contains one replica set named *replicaset001*.
- The ``groups`` section contains one group named *group001*.

.. NOTE::

The initial line in this sample contains a link to an annotated Tarantool configuration
schema for a YAML language server (e.g. for `LSP-Yaml`).
With this link you can set up your code editor (VScode, Neovim, Sublime, etc.) to get
full-text annotations and completion prompts when you work with Tarantool configuration.

.. image:: images/yaml-annotated.png
:align: center

.. _configuration_scopes:

Expand Down Expand Up @@ -436,7 +445,7 @@ To see all the supported environment variables, execute the ``tarantool`` comman

.. NOTE::

There are also special ``TT_INSTANCE_NAME`` and ``TT_CONFIG`` environment variables that can be used to :ref:`start <configuration_run_instance_tarantool>` the specified Tarantool instance with configuration from the given file.
There are also special ``TT_INSTANCE_NAME`` and ``TT_CONFIG`` environment variables that can be used to :ref:`start <configuration_run_instance_tarantool>` the specified Tarantool instance with configuration from the given file.

Below are a few examples that show how to set environment variables of different types, like *string*, *number*, *array*, or *map*.

Expand Down
Binary file added doc/platform/images/yaml-annotated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.