All Projects → tarantool → ansible-cartridge

tarantool / ansible-cartridge

Licence: other
Ansible role for deploying tarantool cartridge-based applications

Programming Languages

python
139335 projects - #7 most used programming language
lua
6591 projects
shell
77523 projects
Jinja
831 projects

Projects that are alternatives of or similar to ansible-cartridge

tarantool rs
Sync/Async tarantool database connector. WORK IN PROGRESS. DON'T SHARE THIS REPO
Stars: ✭ 14 (+0%)
Mutual labels:  tarantool
go-tarantool
Tarantool 1.10+ client for Go language
Stars: ✭ 148 (+957.14%)
Mutual labels:  tarantool
tarantool-autovshard
Vshard wrapper with automatic master election, failover and centralized configuration storage in Consul.
Stars: ✭ 20 (+42.86%)
Mutual labels:  tarantool
kick-c64-dead-test
Kick assembler personalized version of the C=64 rev. 781220 Dead Test + more
Stars: ✭ 24 (+71.43%)
Mutual labels:  cartridge
tarantool-operator
Tarantool Operator manages Tarantool Cartridge clusters atop Kubernetes
Stars: ✭ 48 (+242.86%)
Mutual labels:  tarantool
docker
Docker images for tarantool database
Stars: ✭ 44 (+214.29%)
Mutual labels:  tarantool
tarantool-admin
No description or website provided.
Stars: ✭ 90 (+542.86%)
Mutual labels:  tarantool
adyen-salesforce-commerce-cloud
Salesforce Commerce Cloud (formerly Demandware)
Stars: ✭ 63 (+350%)
Mutual labels:  cartridge
openshift-cartridge-mysql
Custom cartridge for OpenShift providing MySQL 5.7.17
Stars: ✭ 13 (-7.14%)
Mutual labels:  cartridge
tarantool.ex
Tarantool client library for Elixir projects
Stars: ✭ 26 (+85.71%)
Mutual labels:  tarantool
Awesome Gbdev
Contribute
Stars: ✭ 3,016 (+21442.86%)
Mutual labels:  cartridge
tarantool-php
PECL PHP driver for Tarantool
Stars: ✭ 82 (+485.71%)
Mutual labels:  tarantool
rvw developers core
SFCC Developers Core Cartridge. A Salesforce Commerce Cloud (Demandware) Cartridge for Developers.
Stars: ✭ 43 (+207.14%)
Mutual labels:  cartridge
Tarantool
Get your data in RAM. Get compute close to data. Enjoy the performance.
Stars: ✭ 2,787 (+19807.14%)
Mutual labels:  tarantool
awesome-n64-development
A curated list of Nintendo 64 development resources including toolchains, documentation, emulators, example code, and more
Stars: ✭ 210 (+1400%)
Mutual labels:  cartridge
tarantool-module
Tarantool Rust SDK
Stars: ✭ 24 (+71.43%)
Mutual labels:  tarantool
powerslaves
Taking PowerSaves as a slave to your will.
Stars: ✭ 28 (+100%)
Mutual labels:  cartridge
go-tarantool
Tarantool 1.6+ connector for Go language
Stars: ✭ 45 (+221.43%)
Mutual labels:  tarantool
mysql-tarantool-replication
A standalone MySQL -> Tarantool replication daemon
Stars: ✭ 47 (+235.71%)
Mutual labels:  tarantool
mapper
Map tarantool tuples to php objects.
Stars: ✭ 68 (+385.71%)
Mutual labels:  tarantool

Ansible Role: Tarantool Cartridge

Ansible Galaxy Releases

Unit Tests Molecule Tests Consistency Tests

An Ansible role to easily deploy Tarantool Cartridge applications.

This role can deploy and configure applications packed in RPM, DEB and TGZ using Cartridge CLI.

Only RedHat and Debian OS families are supported.

Table of contents

Requirements

  • Tarantool Cartridge >= 2.0.0, < 3;
  • Ansible 2.8.4 or higher.

Note that running the role may require root access.

Installation

First, you need to install this role using ansible-galaxy:

$ ansible-galaxy install tarantool.cartridge,1.12.0

Quick start

Check out the Getting Started guide to learn how to use this role.

You can start two virtual machines using example Vagrantfile.

Let's deploy an application with simple topology.

First, pack your application to RPM using cartridge pack rpm command.

Then, describe the topology in hosts.yml file:

hosts.yml:

---
all:
  vars:
    cartridge_app_name: myapp
    cartridge_package_path: ./myapp-1.0.0-0.rpm
    cartridge_cluster_cookie: secret-cookie

    # may be useful for vagrant
    ansible_ssh_private_key_file: ~/.vagrant.d/insecure_private_key
    ansible_ssh_common_args: '-o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'

  hosts:
    storage-1:
      config:
        advertise_uri: '172.19.0.2:3301'
        http_port: 8181

    storage-1-replica:
      config:
        advertise_uri: '172.19.0.2:3302'
        http_port: 8182

  children:
    # group instances by machines
    machine_1:
      vars:
        # first machine address and connection opts
        ansible_host: 172.19.0.2
        ansible_user: vagrant

      hosts:  # instances to be started on this machine
        storage-1:
        storage-1-replica:

    # group instances by replicasets
    storage_1_replicaset:  # replicaset storage-1
      hosts:  # instances
        storage-1:
        storage-1-replica:
      vars:
        # replicaset configuration
        replicaset_alias: storage-1
        roles:
          - 'vshard-storage'
        failover_priority:
          - storage-1
          - storage-1-replica

Write a simple playbook that imports role:

# playbook.yml
---
- name: Deploy my Tarantool Cartridge app
  hosts: all
  become: true
  become_user: root
  any_errors_fatal: true
  gather_facts: false
  roles:
    - tarantool.cartridge

Then run the playbook with created inventory:

ansible-playbook -i hosts.yml playbook.yml

Now, visit http://localhost:8181

image

Using scenario

It's possible to perform different actions with instances or replicasets by combining cartridge_scenario variable and Ansible limits.

For example, you can configure and start some instances. To do this, you should define cartridge_scenario variable like this:

cartridge_scenario:
  - configure_instances
  - start_instance
  - wait_instance_started

Then run playbook with --limit option:

ansible-playbook -i hosts.yml playbook.yml --limit instance_1,instance_2

You can also simply edit some replicaset. To do this, define cartridge_scenario variable like this:

cartridge_scenario:
  - edit_topology

After run playbook with --limit option:

ansible-playbook -i hosts.yml playbook.yml --limit replicaset_1_group,replicaset_2_group

Moreover, scenario allows you to describe custom steps for configuring cluster. For more details about using scenario and available steps, see scenario documentation.

Documentation

Cookbook

Learn the cookbook to know now to use the tarantool.cartridge role for different purposes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].