-
Notifications
You must be signed in to change notification settings - Fork 43
Add tt console docs #3994
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
Add tt console docs #3994
Conversation
9263ce3
to
3e233a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@@ -28,6 +28,20 @@ Options | |||
|
|||
``-`` – read the script from stdin. | |||
|
|||
.. option:: -i, --interactive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a bit more tt connect
flags:
--sslcafile string path to a trusted certificate authorities (CA) file
--sslcertfile string path to an SSL certificate file
--sslciphers string colon-separated (:) list of SSL cipher suites the connection
--sslkeyfile string path to a private SSL key file
Or is this not relevant to the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, added these options and missing tt connect
auth methods (URI string and env variables).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Please see my comments and suggestions below.
tt interactive console | ||
====================== | ||
|
||
The ``tt`` utility features an command-line console that allows executing requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ``tt`` utility features an command-line console that allows executing requests | |
The ``tt`` utility features a command-line console that allows executing requests |
\\set table_colum_width WIDTH, \\xw WIDTH | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Set maximum printed width of a table cell content. If the length exceeds this value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set maximum printed width of a table cell content. If the length exceeds this value, | |
Set the maximum printed width of a table cell content. If the length exceeds this value, |
and Lua code interactively on the connected Tarantool instances. | ||
It is similar to the :ref:`Tarantool interactive console <interactive_console>` with | ||
one key difference: the ``tt`` console allows connecting to any available instance, | ||
both local and remote. Additionally, it offers more flexible output formatting capabilities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both local and remote
We have the Security topic (I don't know why it has such a name) that describes the difference between local and remote connections. Most of the contnet might be dropped but the main points are:
- A local connection (
tt connect <instance_name>
) opens a console for theadmin
user. - A remote connection (
tt connect <iproto_socket/address>
) requires credentials for administration. Otherwise, theguest
user is used.
So, I'd add the link to this topic or added a couple of sentences about this difference to the Entering the console
section.
- [1, 'Roxette', 1986] | ||
... | ||
|
||
.. code-block:: console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a short sentence on what this code snippet does.
- - [1, 'Roxette', 1986] | ||
... | ||
|
||
.. note:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me, this note looks more important than the info about tab-based autocompletion because it describes the second way on how to change the input. So, I'd write this note as a regular sentence and the info about autocompletion as a note. Just a suggestion, up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave this a note because it's a bit out of the page's context: it's not about working in the console, but an external way to select the language.
Possible values: | ||
|
||
* ``lua`` (default) | ||
* ``sql``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't remember our guidelines for lists but I'd remove the dot after sql
``yaml`` > ``lua`` > ``table`` > ``ttable``. | ||
|
||
The format of ``table`` and ``ttable`` output can be adjusted using the ``\set table_format``, | ||
``\set graphics`, and ``\set table_colum_width`` commands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``\set graphics`, and ``\set table_colum_width`` commands. | |
``\set graphics``, and ``\set table_colum_width`` commands. |
``tt connect`` connects to a Tarantool instance by its URI or name specified | ||
during its startup (``tt start``). | ||
``tt connect`` connects to a Tarantool instance by its URI or instance name specified | ||
in the current environment. | ||
|
||
Options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
.. option:: --sslcafile FILEPATH | ||
|
||
The path to an SSL certificate file for encrypted connections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the descriptions for --sslcafile
and --sslcertfile
should be swapped.
|
||
To connect to instances that use SSL encryption, provide the SSL certificate path and | ||
other encryption parameters in the options ``--sslcertfile``, ``--sslcafile``, | ||
``--sslkeyfile``, and ``--sslciphers``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly speaking, --sslcertfile
and --sslkeyfile
are mandatory. Other parameters are optional.
Resolves #3734
Resolves #3820
tt connect
options-l
(input language) and-x
(output format) to the tt connect reference page.--ssl*
options to the tt connect reference page.tt connect
auth methods: URI string and env variables.Deployment: https://docs.d.tarantool.io/en/doc/gh-3734-tt-connect-console/reference/tooling/tt_cli/tt_interactive_console/
To cherry pick to 2.11