tarantool / cartridge-cli

Command-line utility to manage tarantool cartridge applications
Other
49 stars 17 forks source link
cartridge cli tarantool

Cartridge Command Line Interface

.. 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

.. image:: https://github.com/tarantool/cartridge-cli/workflows/Tests/badge.svg :alt: Cartridge CLI build status on GitHub Actions :target: https://github.com/tarantool/cartridge-cli/actions/workflows/tests.yml

.. important::

Cartridge CLI is deprecated in favor of `tt CLI <https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/>`_.
Find the instructions on switching from Cartridge CLI to ``tt`` in
`Migration from Cartridge CLI to tt <https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_cli/migration-to-tt/>`_.

Control your Tarantool application instances via the command line.

Installation

  1. Install the following third-party tools:

    • git <https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>__
    • unzip <https://linuxize.com/post/how-to-unzip-files-in-linux/>__
    • gcc <https://gcc.gnu.org/install/>__
    • cmake <https://cmake.org/install/> and make <https://cmake.org/install/>
  2. Install Tarantool 1.10 or higher. You have two options here:

    • Install from a package <https://www.tarantool.io/en/download/>__
    • Build from source <https://www.tarantool.io/en/doc/latest/dev_guide/building_from_source/>__
  3. [For all platforms except macOS] If you build Tarantool from source, you need to set up the Tarantool packages repository manually:

    .. code-block:: bash

    curl -L https://tarantool.io/installer.sh | sudo -E bash -s -- --repo-only
  4. Install the cartridge-cli package:

    • For CentOS, Fedora, or ALT Linux (RPM package):

      .. code-block:: bash

      sudo yum install cartridge-cli
    • For Debian or Ubuntu (DEB package):

      .. code-block:: bash

      sudo apt-get install cartridge-cli
    • For macOS (Homebrew formula):

      .. code-block:: bash

      brew install cartridge-cli
    • Or build locally:

      .. code-block:: bash

      mage build

  5. Check the installation:

    .. code-block:: bash

    cartridge version

    You may see a warning: Project path is not a project. Don't worry, it only means there is no Cartridge application yet.

Now you can create and run <https://www.tarantool.io/en/doc/2.11/book/monitoring/getting_started_cartridge/>__ your first application!

Quick start

To create your first application, run:

.. code-block:: bash

cartridge create --name myapp

Go to the application directory:

.. code-block:: bash

cd myapp

Build and start your application:

.. code-block:: bash

cartridge build
cartridge start

Now open http://localhost:8081 and see your application's Admin Web UI:

.. image:: ./examples/getting-started-app/images/unconfigured-cluster.png :align: center

You're all set! To dive right in, follow the Getting started with Cartridge <https://www.tarantool.io/en/doc/2.11/book/monitoring/getting_started_cartridge/>__ guide.

Usage

For details about how to use Cartridge CLI, see the documentation links below.