-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
394 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? | ||
---------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
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. | ||
|
||
.. 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 | ||
-------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.