Skip to content

tt create

Create an application from a template.

Built-in templates:

    single_instance: Tarantool 3 application with a single instance configuration.
    cluster: Tarantool 3 cluster application.
    vshard_cluster: Tarantool 3 vshard cluster application.
    config_storage: Tarantool 3 cluster configuration storage.

A built-in template creates a project: the code of the application in its directory, and the instances description and the cluster config it runs from in .templates/default/.

A template of your own is given by its path: a directory, or a .tgz or .tar.gz archive, which may be named without its extension. A path is told from the name of a built-in template by a slash in it, so a template in the current directory is given as ./<name>.

A template of your own creates a project laid out the same way: an instances.yaml and the config.yaml beside it, or a config.yaml alone, that the template keeps at its root or in a directory of its own are moved into .templates/default/, unless the template has a pair in .templates/ already. A template that writes neither app.manifest.toml nor a pair makes no project, and is refused.

Usage

tt create <TEMPLATE_NAME> [flags]

Flags

  • -d, --dst string - Path to the directory where an application will be created.
  • -f, --force - Force rewrite application directory if already exists
  • -n, --name string - Application name
  • -s, --non-interactive - Non-interactive mode
  • --var stringArray - Variable definition. Usage: --var var_name=value
  • --vars-file string - Variables definition file path

Examples

# Create an application app1 from a template.
$ tt create <template name> --name app1

# Create an application app1 from the template in the templates/basic
# directory.
$ tt create ./templates/basic --name app1

# Create a Tarantool 3 application with a single instance configuration.
$ tt create single_instance --name new_app

# Create Tarantool 3 vshard cluster.
$ tt create vshard_cluster --name cluster_app

# Create Tarantool 3 cluster configuration storage.
$ tt create config_storage --name cs_app