-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. _tcm_quick_start | ||
|
||
Quick start with TCM | ||
==================== | ||
|
||
.. include:: index.rst | ||
:start-after: ee_note_tcm_start | ||
:end-before: ee_note_tcm_end | ||
|
||
This guide explain how to get |tcm_full_name| up and running on your local system. | ||
|
||
?? location: howto or TCM? | ||
|
||
Prerequisites | ||
------------- | ||
|
||
- Linux | ||
- macOS? | ||
- SDK archive (how to obtain) | ||
|
||
Setting up Tarantool EE | ||
----------------------- | ||
|
||
Preparing TCM environment | ||
------------------------- | ||
|
||
Starting TCM | ||
------------ | ||
|
||
Logging in | ||
---------- | ||
|
||
Adding a cluster ? do we need further steps? | ||
---------------- |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,56 @@ Connecting to a Tarantool instance | |
$ tt connect {URI|INSTANCE} [OPTION ...] | ||
|
||
|
||
``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 | ||
------- | ||
|
||
.. option:: -u USERNAME, --username USERNAME | ||
|
||
Username | ||
A Tarantool user for connecting to the instance. | ||
|
||
.. option:: -p PASSWORD, --password PASSWORD | ||
|
||
Password | ||
The user's password. | ||
|
||
.. option:: -f FILEPATH, --file FILEPATH | ||
|
||
Connect and evaluate the script from a file. | ||
|
||
``-`` – read the script from stdin. | ||
|
||
.. option:: -i, --interactive | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a bit more
Or is this not relevant to the issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, added these options and missing |
||
|
||
Enter the interactive mode after evaluating the script passed in ``-f``/``--file``. | ||
|
||
.. option:: -l LANGUAGE, --language LANGUAGE | ||
|
||
The input language of the :ref:`tt interactive console <tt-interactive-console>`: | ||
``lua`` (default) or ``sql``. | ||
|
||
.. option:: -x FORMAT, --outputformat FORMAT | ||
|
||
The output format of the :ref:`tt interactive console <tt-interactive-console>`: | ||
``yaml`` (default), ``lua``, ``table``, ``ttable``. | ||
|
||
.. option:: --sslcertfile FILEPATH | ||
|
||
The path to an SSL certificate file for encrypted connections. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the descriptions for |
||
|
||
.. option:: --sslkeyfile FILEPATH | ||
|
||
The path to a private SSL key file for encrypted connections. | ||
|
||
.. option:: --sslcafile FILEPATH | ||
|
||
The path to a trusted certificate authorities (CA) file for encrypted connections. | ||
|
||
.. option:: --sslciphers STRING | ||
|
||
The list of SSL cipher suites used for encrypted connections, separated by colons (``:``). | ||
|
||
Details | ||
------- | ||
|
||
|
@@ -38,14 +68,57 @@ You can also connect to instances in the same ``tt`` environment | |
(that is, those that use the same :ref:`configuration file <tt-config_file>` and Tarantool installation) | ||
by their instance names. | ||
|
||
If authentication is required, specify the username and the password using the ``-u`` (``--username``) | ||
and ``-p`` (``--password``) options. | ||
Authentication | ||
~~~~~~~~~~~~~~ | ||
|
||
When connecting to an instance by its URI, ``tt connect`` establishes a remote connection | ||
for which authentication is required. Use one of the following ways to pass the | ||
username and the password: | ||
|
||
* The ``-u`` (``--username``) and ``-p`` (``--password``) options: | ||
|
||
.. code-block:: console | ||
|
||
By default, ``tt connect`` opens an interactive Tarantool console. Alternatively, you | ||
can open a connection to evaluate a Lua script from a file or stdin. To do this, | ||
pass the file path in the ``-f`` (``--file``) option or use ``-f -`` to take the script | ||
from stdin. | ||
$ tt connect 192.168.10.10:3301 -u myuser -p p4$$w0rD | ||
|
||
* The connection string: | ||
|
||
.. code-block:: console | ||
|
||
$ tt connect myuser:[email protected]:3301 -u myuser -p p4$$w0rD | ||
|
||
* Environment variables ``TT_CLI_USERNAME`` and ``TT_CLI_PASSWORD`` : | ||
|
||
.. code-block:: console | ||
|
||
$ export TT_CLI_USERNAME=myuser | ||
$ export TT_CLI_PASSWORD=p4$$w0rD | ||
$ tt connect 192.168.10.10:3301 | ||
|
||
If no credentials are provided for a remote connection, the user is automatically ``guest``. | ||
|
||
.. note:: | ||
|
||
Local connections (by instance name instead of the URI) don't require authentication. | ||
|
||
Encrypted connection | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
To connect to instances that use SSL encryption, provide the SSL certificate and | ||
SSL key files in the ``--sslcertfile`` and ``--sslkeyfile`` options. If necessary, | ||
add other SSL parameters -- ``--sslcafile`` and ``--sslciphers``. | ||
|
||
Script evaluation | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
By default, ``tt connect`` opens an :ref:`interactive tt console <tt-interactive-console>`. | ||
Alternatively, you can open a connection to evaluate a Lua script from a file or stdin. | ||
To do this, pass the file path in the ``-f`` (``--file``) option or use ``-f -`` | ||
to take the script from stdin. | ||
|
||
.. code-block:: console | ||
|
||
$ tt connect app -f test.lua | ||
|
||
Examples | ||
-------- | ||
|
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 expand
-u
and-p
descriptions a bit.Username
four times in a row looks a bit weird :)