Local installation

TStorage

Download TStorage’s Docker image

docker pull registry.atende.industries:5000/tstorage/tstorage:stable

Create on your filesystem root directory <DATA_DIR> that will be used by TStorage to store data:

mkdir <DATA_DIR>
mkdir <DATA_DIR>/sack0

Run Docker container:

docker run --name tstorage -v <DATA_DIR>:/sacks/ -e DEV=s1 -p 1234:1234 -p 2025:2025 -d registry.atende.industries:5000/tstorage/tstorage:stable

REST Server

The fastest way to get REST Server with TStorage up and running is to use Docker images of TStorage and REST Server.

Crete docker-compose.yml file:

x-env: &env
  volumes:
    - ${TSTORAGE_LOG_DIR:-/var/log/tstorage}:/home/tstorage/logs:rw
    - ${TSTORAGE_DATA_DIR:-/mnt/}:/sacks/:rw

services:
  tstorage1:
    <<: *env
    container_name: tstorage_core
    image: registry.atende.industries:5000/tstorage/tstorage:stable
    stop_grace_period: 15m
    environment:
      DEV: s1

  tstorage_rest1:
    container_name: tstorage_rest
    image: registry.atende.industries:5000/tstorage/rest:stable
    environment:
      TSTORAGE_ADDRESS: tstorage_core
      TSTORAGE_PORT: 2025
    ports:
      - 8000:8000

To run TStorage with REST interface, use the command:

docker compose up -d

To stop it, use:

docker compose stop

By default, REST server will run on port 8000. You should be able to verify your installation by opening link http://localhost:8000/docs. You should see Swagger documentation of TStorage’s REST API.