MinIO
MinIO is a lightweight, S3-compliant object store that seamlessly well with TileDB.
MinIO is a lightweight, S3-compliant object-store. Although it has many nice features, this tutorial only focuses on local deployment, which is very useful if you wish to quickly test your TileDB-S3 programs locally. Visit the MinIO quickstart guide for installation instructions. Here is a basic example of how to run MinIO on port 9999
:
$ mkdir -p /tmp/minio-data
$ docker run -e MINIO_ACCESS_KEY=minio -e MINIO_SECRET_KEY=miniosecretkey \
-d -p 9999:9000 minio/minio server /tmp/minio-data
$ export AWS_ACCESS_KEY_ID=minio
$ export AWS_SECRET_ACCESS_KEY=miniosecretkey
Once you get MinIO server running, you need to set the S3 configurations as follows (below, <port>
stands for the port on which you are running the MinIO server, equal to 9999
if you run the MinIO Docker container as shown above):
Parameter | Default value |
---|---|
"vfs.s3.scheme" |
"http" |
"vfs.s3.region" |
"" |
"vfs.s3.endpoint_override" |
"localhost:<port>" |
"vfs.s3.use_virtual_addressing" |
"false" |
The Configuration section explains in detail how to set configuration parameters in TileDB. Below is a quick example for the MinIO specific parameters.
# Create a configuration object
= tiledb.Config()
config
# Set configuration parameters
"vfs.s3.scheme"] = "http"
config["vfs.s3.region"] = ""
config["vfs.s3.endpoint_override"] = "<minio address>"
config["vfs.s3.use_virtual_addressing"] = "false"
config[
# Create context
= tiledb.Ctx(config)
ctx
# Pass CTX to read/write of array
with tiledb.open(array_uri, ctx=ctx) as A:
# Read or write and context with minio is applied
pass