Tarantool Cartridge — a framework for distributed applications development
Table of contents
About Tarantool Cartridge
Tarantool Cartridge allows you to easily develop Tarantool-based applications and run them on one or more Tarantool instances organized into a cluster.
As a software development kit (SDK), Tarantool Cartridge provides you with utilities and templates to help:
- easily set up a development environment for your applications;
- plug the necessary Lua modules;
- pack the applications in an environment-independent way: together with module binaries and Tarantool executables.
As a cluster management tool, Tarantool Cartridge provides your cluster-aware applications with the following key benefits:
- horizontal scalability and load balancing via built-in automatic sharding;
- asynchronous replication;
- automatic failover;
- centralized cluster control via GUI or API;
- automatic configuration synchronization;
- instance functionality segregation.
A Tarantool Cartridge cluster can segregate functionality between instances via built-in and custom (user-defined) cluster roles. You can toggle instances on and off on the fly during cluster operation. This allows you to put different types of workloads (e.g., compute- and transaction-intensive ones) on different physical servers with dedicated hardware.
Installation
you@yourmachine $ tarantoolctl rocks install cartridge
This will install <a href="../modules/cartridge.html#">cartridge</a><code> to </code><code>~/.rocks</code>
.
Usage
This repository contains the framework itself.
To build a Tarantool cluster app, you'll also need the cartridge-cli utility.
See a step-by-step
getting started guide
in the <code>cartridge-cli</code>
repository.
Contribution
Building from source
Prerequisites:
<code>tarantool</code><code>, </code><code>tarantool-dev</code>
(instructions);<code>git</code><code>, </code><code>gcc</code><code>, </code><code>cmake</code>
.
To build and test <a href="../modules/cartridge.html#">cartridge</a>
locally, you'll also need:
<code>nodejs</code>
>= 8 (instructions);<code>npm</code>
>= 6;<code>python</code><code>, </code><code>pip</code>
.
To build the front end, say:
tarantoolctl rocks make
To build the API documentation, say:
tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org
tarantoolctl rocks make BUILD_DOC=YES
Runnig demo
At first, you need to install cartridge-cli
tarantoolctl rocks install cartridge-cli
Then you need to start application:
.rocks/bin/cartridge start
If you want to run application with another settings, you can specify script
option:
.rocks/bin/cartridge start --script path_to_script
For more detailed information about cartridge-cli
read a link
Running tests
First, install testing dependencies:
pip install -r test/integration/requirements.txt tarantoolctl rocks install luacheck tarantoolctl rocks install luacov tarantoolctl rocks install luacov-console tarantoolctl rocks install luatest 0.4.0
Then run tests:
pytest -v ./run-test.sh