From dfa84a0f054bc6358b0e6dcced81aa2c69e0bc2a Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Thu, 21 Sep 2023 16:22:24 +0700 Subject: [PATCH] doc: replace Cartridge CLI with tt CLI Add deprecation note Provide migration instructions --- README.rst | 6 +++++ doc/index.rst | 7 ++++++ doc/migration-to-tt.rst | 56 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 doc/migration-to-tt.rst diff --git a/README.rst b/README.rst index d2b55ac84..a7b401bcb 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,12 @@ Cartridge Command Line Interface ================================ +.. important:: + + Cartridge CLI is deprecated in favor of `tt CLI `_. + Find the instructions on switching from Cartridge CLI to ``tt`` in + `Migration from Cartridge CLI to tt `_. + .. image:: https://img.shields.io/github/v/release/tarantool/cartridge-cli?include_prereleases&label=Release&labelColor=2d3532 :alt: Cartridge CLI latest release on GitHub :target: https://github.com/tarantool/cartridge-cli/releases diff --git a/doc/index.rst b/doc/index.rst index 211bd3380..98a5a238c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,6 +1,12 @@ Cartridge Command Line Interface ================================ +.. important:: + + Cartridge CLI is deprecated in favor of `tt CLI `_. + Find the instructions on switching from Cartridge CLI to ``tt`` in + :doc:`Migration from Cartridge CLI to tt `. + Control your Tarantool application instances via the command line. .. toctree:: @@ -8,6 +14,7 @@ Control your Tarantool application instances via the command line. :includehidden: lifecycle + migration-to-tt installation commands global-flags diff --git a/doc/migration-to-tt.rst b/doc/migration-to-tt.rst new file mode 100644 index 000000000..03523f92b --- /dev/null +++ b/doc/migration-to-tt.rst @@ -0,0 +1,56 @@ +Migration from Cartridge CLI to tt +================================== + +.. note:: + + The migration instruction is also available in the + `tt repository `_ + on GitHub. + +To start managing a Cartridge application with ``tt`` instead of Cartridge CLI, +run ``tt init`` in the application directory: + +.. code-block::bash + + $ tt init + • Found existing config '.cartridge.yml' + • Environment config is written to 'tt.yaml' + +This creates a ``tt`` environment based on the existing Cartridge configuration. +Now you're ready to manage the application with ``tt``: + +.. code-block::bash + + $ tt start + • Starting an instance [app:s1-master]... + • Starting an instance [app:s1-replica]... + • Starting an instance [app:s2-master]... + • Starting an instance [app:s2-replica]... + • Starting an instance [app:stateboard]... + • Starting an instance [app:router]... + $ tt status + INSTANCE STATUS PID + app:s1-replica RUNNING 112645 + app:s2-master RUNNING 112646 + app:s2-replica RUNNING 112647 + app:stateboard RUNNING 112655 + app:router RUNNING 112656 + app:s1-master RUNNING 112644 + +Commands difference +------------------- + +Most Cartridge CLI commands look the same in ``tt``: ``cartridge start`` and +``tt start``, ``cartridge create`` and ``tt create``, and so on. To migrate such +calls, it is usually enough to replace the utility name. There can be slight differences +in command flags and format. For details on ``tt`` commands, see the +:ref:`tt commands reference `. + +The following commands are different in ``tt``: + +* Cartridge CLI commands ``admin``, ``bench``, ``failover``, ``repair``, ``replicasets`` + are implemented as subcommands of ``tt cartridge``. Example, ``tt cartridge repair``. +* ``cartridge enter`` and ``cartridge connect`` are covered by ``tt connect``. +* The analog of ``cartridge gen completion`` is ``tt completion`` +* ``cartridge log`` and ``cartridge pack docker`` functionality is not supported in ``tt``. +