3.0 config: updated the 'Instance configuration' and 'Starting and stopping instances' topics#3928
Conversation
b839b42 to
55ea6c8
Compare
d1a72bd to
420f5c2
Compare
420f5c2 to
72b250c
Compare
psergee
left a comment
There was a problem hiding this comment.
Thank you for the patch! lgtm.
b691bb2 to
d72f465
Compare
3fb2110 to
8c67e17
Compare
8c67e17 to
433d2e9
Compare
| For example, ``/usr/share/tarantool/my_app.lua`` (here we implement it as a | ||
| :ref:`Lua module <app_server-modules>` that bootstraps the database and | ||
| exports ``start()`` function for API calls): | ||
| 1. :ref:`Initializing a local environment <admin-instance_config-init-environment>`. |
There was a problem hiding this comment.
Not sure about "local" here. Maybe just "a tt environment"?
Local env is typical for dev time, but on real clusters the system tt mode can be used.
There was a problem hiding this comment.
BTW, if you use the exact section name in a link, you don't need to write it:
:ref:`instance_config-init-environment`
There was a problem hiding this comment.
Not sure about "local" here. Maybe just "a tt environment"?
Local env is typical for dev time, but on real clusters the system tt mode can be used.
This section emphasise that the environment is created for development. So, I'd keep local or maybe changed to development.
| -- load my_app module and call start() function | ||
| -- with some app options controlled by sysadmins | ||
| local m = require('my_app').start({...}) | ||
| Before creating an application, you need to set up a local environment for ``tt``: |
There was a problem hiding this comment.
Here we can briefly say about system environments and why we choose local.
There was a problem hiding this comment.
According to the tt's readme, this information sounds a bit specific for the purpose of this topic. I'd better clarify this in the Launch modes section: https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/configuration/#launch-modes
When tt is installed from a repository by a package manager (apt, rpm, ...) a "system" config file (/etc/tarantool/tt.yaml) is included which forms the "system" environment - the case when tt replaces the tarantoolctl.
| - ``sharded_cluster``: a packed application. In addition to files created during the application development, includes the ``.rocks`` directory containing application dependencies (for example, ``vshard``). | ||
|
|
||
| You get the following output: | ||
| - ``tt.yaml``: a tt configuration file. |
There was a problem hiding this comment.
| - ``tt.yaml``: a tt configuration file. | |
| - ``tt.yaml``: a ``tt`` configuration file. |
| This section describes how to manage instances in a Tarantool cluster using the :ref:`tt <tt-cli>` utility. | ||
| A cluster can include multiple instances that run different code. | ||
| A typical example is a cluster application that includes router and storage instances. | ||
| For example, you can manage instances in the following ways: |
There was a problem hiding this comment.
"manage instances in the following ways" sounds a bit awkward. Maybe something more goal-oriented? Or just: "Particularly, you can perform the following actions:"
| Starting an instance using the tarantool command | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The ``tarantool`` command provides additional :ref:`options <configuration_command_options>` that might be helpful for development purposes. |
There was a problem hiding this comment.
Maybe highlight somehow that tarantool run only specific instances?
There was a problem hiding this comment.
I think that the next sentence should give this understanding:
Below is the syntax for starting a Tarantool instance configured in a file:
The old
Instance configurationtopic doesn't give much context on used configuration files. This PR tries to fix this issue by using a ready-to-run sample included to the documentation repository:Here are the main changes:
Instance configurationtopic is renamed toApplication environmentand rewritten completely. This topic now contains the info about how the application environment and layout might look in dev and prod environment. This gives some context for other topics in theAdministrationsection.Staging: https://docs.d.tarantool.io/en/doc/3.0-instance-configuration/book/admin/instance_config/
Starting and stopping instancestopic is rewritten to using the sample from the previous topic.Staging: https://docs.d.tarantool.io/en/doc/3.0-instance-configuration/book/admin/start_stop_instance/
This topic also includes the content moved from other topics:
Preloading Lua scripts and modules(moved fromInstance configuration, examples are updated to tt)Starting an instance using the tarantool command(moved from theConfiguration topic)tarantool command-line options(moved from theConfiguration topic)Configuration:
Starting Tarantool instancessection is removed from theConfigurationtopic: https://docs.d.tarantool.io/en/doc/3.0-instance-configuration/concepts/configuration/