Skip to content

3.0 config: updated the 'Instance configuration' and 'Starting and stopping instances' topics #3928

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

Merged
merged 5 commits into from
Dec 20, 2023

Conversation

andreyaksenov
Copy link
Contributor

@andreyaksenov andreyaksenov commented Dec 13, 2023

The old Instance configuration topic 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:

Configuration:

@andreyaksenov andreyaksenov changed the base branch from latest to 3.0 December 13, 2023 14:56
@andreyaksenov andreyaksenov force-pushed the 3.0-instance-configuration branch 11 times, most recently from b839b42 to 55ea6c8 Compare December 15, 2023 12:23
@andreyaksenov andreyaksenov force-pushed the 3.0-instance-configuration branch 9 times, most recently from d1a72bd to 420f5c2 Compare December 18, 2023 11:56
@andreyaksenov andreyaksenov changed the title 3.0 instance configuration 3.0 administration: updated the 'Instance configuration' and 'Starting and stopping instances' topics Dec 18, 2023
@andreyaksenov andreyaksenov changed the title 3.0 administration: updated the 'Instance configuration' and 'Starting and stopping instances' topics 3.0 config: updated the 'Instance configuration' and 'Starting and stopping instances' topics Dec 18, 2023
@andreyaksenov andreyaksenov force-pushed the 3.0-instance-configuration branch from 420f5c2 to 72b250c Compare December 18, 2023 12:12
Copy link
Contributor

@psergee psergee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch! lgtm.

@andreyaksenov andreyaksenov force-pushed the 3.0-instance-configuration branch from b691bb2 to d72f465 Compare December 19, 2023 10:41
@andreyaksenov andreyaksenov force-pushed the 3.0-instance-configuration branch 3 times, most recently from 3fb2110 to 8c67e17 Compare December 19, 2023 11:54
@andreyaksenov andreyaksenov force-pushed the 3.0-instance-configuration branch from 8c67e17 to 433d2e9 Compare December 19, 2023 11:58
@andreyaksenov andreyaksenov requested a review from p7nov December 19, 2023 13:41
Copy link
Contributor

@p7nov p7nov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, if you use the exact section name in a link, you don't need to write it:

:ref:`instance_config-init-environment`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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``:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we can briefly say about system environments and why we choose local.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


You get the following output:
- ``tt.yaml``: a tt configuration file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe highlight somehow that tarantool run only specific instances?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the next sentence should give this understanding:

Below is the syntax for starting a Tarantool instance configured in a file:

@andreyaksenov andreyaksenov merged commit 6d966b6 into 3.0 Dec 20, 2023
@andreyaksenov andreyaksenov deleted the 3.0-instance-configuration branch December 20, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants