Home

Awesome

manta-buckets-mdapi: The Manta buckets metadata API

This repository comprises a rust workspace with two different binary project and a library project. The binaries are buckets-mdapi and schema-manager.

buckets-mdapi is a component of the manta buckets storage system that exposes an API for interacting with Manta object metadata using the Fast protocol.

schema-manager is a tool that performs the necessary database configuration to ensure the database is properly prepared for buckets-mdapi. Each time it executes it only does the necessary work to ensure the database correctly prepared. It will not overwrite or destroy existing structures in the database.

Quick start

The following steps cp config.toml.dist config.toml vi config.toml cargo run --bin buckets_mdapi -- -c config.toml

Configuration

There are a variety of configuration options to tailor the behavior to particular environments. The configuration options are organized into categories and each are described below.

Logging

The logging configuration entries pertaining the bucket-mdapi's logging behavior.

Server

The configuration entries controlling the buckets-mdapi server behavior.

Metrics

The configuration entries controlling the buckets-mdapi metrics server.

Database

The database connection configuration entries.

Cueball

The database connection pool configuration entries.

Tokio

Tokio provides the runtime for buckets-mdapi and these are configuration options to control the behavior of the Tokio runtime.

Database schema setup and migrations

The schema-manager binary is included in this repo as a tool to create and configure the expected database schemas, tables, and other necssary aspects of the database.

The details of the database setup may change over time along with the code and so the schema-manager tool includes the ability to add database migrations. More details about database migrations can be found here.

Testing

The tests can be run with:

cargo test

There are quickcheck tests and also some functional tests for the RPC handlers.

The functional tests require that postgresql is installed as well as pg_tmp. The test uses pg_tmp to create and configure a temporary postgres database and once the test has completed the temporary database is removed within a few seconds. The tests use the same code used by the schema-manager to prepare the database for use by the test suite.