Skip to content

Conversation

@p7nov
Copy link
Contributor

@p7nov p7nov commented Sep 27, 2023

Resolves #3718

  • Rewrote Starting and stopping instances to show the basic instance management scenarios with tt CLI.
  • Moved the old content about tarantoolctl to the tarantoolctl doc page.
  • Moved the content about multi-instance application from tt reference to Starting and stopping instances (redirect: https://github.com/tarantool/tarantool.io/pull/1449)

Deployment: https://docs.d.tarantool.io/en/doc/gh-3718-starting-instance-tt/book/admin/start_stop_instance/

@p7nov p7nov requested a review from psergee September 27, 2023 10:39
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.

Shouldn't we add an example of multi-instance application?

• Result of check: syntax of file '/etc/tarantool/instances.enabled/my_app.lua' is OK
.. code-block:: console
* ``tt status`` -- check the instance's status:
Copy link
Contributor

Choose a reason for hiding this comment

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

instance's -> instance
?

@p7nov
Copy link
Contributor Author

p7nov commented Sep 28, 2023

Shouldn't we add an example of multi-instance application?

Thanks for the idea.
Added here the content about multi-instance applications from tt reference section.

@p7nov p7nov requested a review from andreyaksenov September 28, 2023 07:12

While a Lua application is executed by Tarantool, an instance file is executed
by ``tarantoolctl`` which is a Tarantool script.
Quick start
Copy link
Contributor

Choose a reason for hiding this comment

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

Honestly, I'd remove this heading as some people might call this not a "quick" start. For example, the instance file link leads us to a huge section of text without any kind of hello world instance file example, so starting an instance might be not very simple. I think, the text below works good as an introduction without a heading.


All the instance files or directories placed in the ``instances_enabled`` directory
specified in :ref:`tt configuration <tt-config_file>` are called *enabled instances*.
If there are several enabled instances, ``tt start`` starts a separate instance for each of them.
Copy link
Contributor

Choose a reason for hiding this comment

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

The unfolded sentence sounds a bit weird: .. starts a separate instance for each of the instances. Looks like the enabled instance term adds some confusion with a Tarantool instance. Maybe smth like this?

If there are several enabled instances, ``tt start`` starts them separately.

or use Tarantool instance to add some contrast:

If there are several enabled instances, ``tt start`` starts a separate Tarantool instance...

• Starting an instance [my_app]...
.. code-block:: console
.. note::
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe, it's better to format this as a regular sentence. A note takes too much space and attention.

* stop a specific instance of an application or all its instances

.. code-block:: lua
Application layout
Copy link
Contributor

Choose a reason for hiding this comment

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

Future task: we need to think about a new place for this section as it not directly related to administration. Ideally, this section should contain only the Managing multi-instance applications content.

Sometimes you may need to run a Tarantool instance locally, for example, for test
purposes. ``tt`` runs in a local environment if it finds a ``tt.yaml`` configuration
file in the current directory or any of its enclosing directories.
To force ``tt`` into the local mode, add the ``-L`` or ``--local`` argument.
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a link to https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/configuration/#launch-modes somewhere. And I didn't quite understand which tt command should be run with the -L flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved the part about --local in the end of the section with a separate example.

p7nov and others added 2 commits September 28, 2023 16:48
Co-authored-by: Andrey Aksenov <38073144+andreyaksenov@users.noreply.github.com>
@p7nov p7nov requested a review from andreyaksenov September 28, 2023 10:20
@p7nov p7nov merged commit 6b31ec3 into latest Sep 28, 2023
@p7nov p7nov deleted the gh-3718-starting-instance-tt branch September 28, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite Starting and stopping an instance for tt

4 participants