Introduction
Installation
The Tansu GitHub repository includes a compose.yaml making installing, configuring and running some other dependencies simpler. It includes setting up PostgreSQL with the correct schema so that it can be used as a storage engine by Tansu. Also, setting up telemetry with Jaeger, Prometheus and Grafana.
Lets take a look at some of the services that are defined in the compose.yaml in a little more detail.
PostgreSQL
The compose.yaml includes configuration for PostgreSQL to use any SQL files found in /etc/init.d on first start-up, and a volume for storing data.
services:
db:
image: ${POSTGRES_IMAGE:-postgres:17}
environment:
PGUSER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
volumes:
- db:/var/lib/postgresql/data
- ./etc/initdb.d/:/docker-entrypoint-initdb.d/
healthcheck:
test: /usr/bin/pg_isready
interval: 5s
timeout: 10s
retries: 5
pull_policy: missing
volumes:
db:
driver: local
MinIO
The compose.yaml includes configuration to setup MinIO, including a volume for data storage. Tansu also works with other S3 compatible object stores including: AWS, Tigris and R2.
services:
minio:
image: quay.io/minio/minio
command: server
/data
--console-address ":9001"
volumes:
- minio:/data
ports:
- 9000:9000
- 9001:9001
volumes:
minio:
driver: local
Tansu
services:
tansu:
image: ghcr.io/tansu-io/tansu:latest
restart: unless-stopped
environment:
RUST_BACKTRACE: ${RUST_BACKTRACE}
RUST_LOG: ${RUST_LOG}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_ENDPOINT: ${AWS_ENDPOINT}
AWS_ALLOW_HTTP: ${AWS_ALLOW_HTTP}
volumes:
- ./etc/schema/:/schema/
command: --kafka-cluster-id ${CLUSTER_ID}
--kafka-listener-url tcp://0.0.0.0:9092/
--kafka-advertised-listener-url tcp://${ADVERTISED_LISTENER}
--storage-engine ${STORAGE_ENGINE}
--schema-registry file:///schema
ports:
- 9092:9092
- 9100:9100
links:
- db
- minio
pull_policy: always
The path of least resistance uses the following tools: just and docker, the latter to configure and run: PostgreSQL and MinIO.