|
| 1 | +Migration from Cartridge CLI to tt |
| 2 | +================================== |
| 3 | + |
| 4 | +To switch from Cartridge CLI to ``tt`` |
| 5 | + |
| 6 | +To start managing a Cartridge application with ``tt`` instead of Cartridge CLI, |
| 7 | +run ``tt init`` in the application directory: |
| 8 | + |
| 9 | +.. code-block::bash |
| 10 | +
|
| 11 | + $ tt init |
| 12 | + • Found existing config '.cartridge.yml' |
| 13 | + • Environment config is written to 'tt.yaml' |
| 14 | +
|
| 15 | +This creates a ``tt`` environment based on the existing Cartridge configuration. |
| 16 | +Now you're ready to manage the application with ``tt``: |
| 17 | + |
| 18 | +.. code-block::bash |
| 19 | +
|
| 20 | + $ tt start |
| 21 | + • Starting an instance [app:s1-master]... |
| 22 | + • Starting an instance [app:s1-replica]... |
| 23 | + • Starting an instance [app:s2-master]... |
| 24 | + • Starting an instance [app:s2-replica]... |
| 25 | + • Starting an instance [app:stateboard]... |
| 26 | + • Starting an instance [app:router]... |
| 27 | + $ tt status |
| 28 | + • app:router: RUNNING. PID: 13188. |
| 29 | + • app:s1-master: RUNNING. PID: 13177. |
| 30 | + • app:s1-replica: RUNNING. PID: 13178. |
| 31 | + • app:s2-master: RUNNING. PID: 13179. |
| 32 | + • app:s2-replica: RUNNING. PID: 13180. |
| 33 | + • app:stateboard: RUNNING. PID: 13182. |
| 34 | +
|
| 35 | +Commands difference |
| 36 | +------------------- |
| 37 | + |
| 38 | +Most Cartridge CLI commands look the same in ``tt``: ``cartridge start`` and |
| 39 | +``tt start``, ``cartridge create`` and ``tt create``, and so on. To migrate such |
| 40 | +calls, it is usually enough to replace the utility name. There can be slight differences |
| 41 | +in command flags and format. For details on ``tt`` commands, see the |
| 42 | +:ref:`tt commands reference <tt-commands>`. |
| 43 | + |
| 44 | +The following commands are different in ``tt``: |
| 45 | + |
| 46 | +* Cartridge CLI commands ``admin``, ``bench``, ``failover``, ``repair``, ``replicasets`` |
| 47 | + are implemented as subcommands of ``tt cartridge``. Example, ``tt cartridge repair``. |
| 48 | +* ``cartridge enter`` and ``cartridge connect`` are covered by ``tt connect``. |
| 49 | +* The analog of ``cartridge gen completion`` is ``tt completion`` |
| 50 | +* ``cartridge log`` and ``cartridge pack docker`` functionality is not supported in ``tt``. |
| 51 | + |
0 commit comments