MinIO
MinIO is a lightweight S3-compliant object-store. Although it has many nice features, here we focus only on local deployment, which is very useful if you wish to quickly test your TileDB-S3 programs locally. See the MinIO quickstart guide for installation instructions. Here is what we do to run MinIO on port 9999:
1
$ mkdir -p /tmp/minio-data
2
$ docker run -e MINIO_ACCESS_KEY=minio -e MINIO_SECRET_KEY=miniosecretkey \
3
-d -p 9999:9000 minio/minio server /tmp/minio-data
4
$ export AWS_ACCESS_KEY_ID=minio
5
$ export AWS_SECRET_ACCESS_KEY=miniosecretkey
Copied!
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 as shown above):
Parameter
Value
"vfs.s3.scheme"
"http"
"vfs.s3.region"
""
"vfs.s3.endpoint_override"
"localhost:<port>"
"vfs.s3.use_virtual_addressing"
"false"
The Configuration page explains in detail how to set configuration parameters in TileDB. Below is a quick example for the minio specific parameters.
C
C++
Python
R
Java
Go
1
// Create a configuration object
2
tiledb_config_t *config;
3
tiledb_config_alloc(&config, NULL);
4
5
// Set configuration parameters
6
tiledb_config_set(config, "vfs.s3.scheme", "http", &error);
7
tiledb_config_set(config, "vfs.s3.region", "", &error);
8
tiledb_config_set(config, "vfs.s3.endpoint_override", "<minio address>", &error);
9
tiledb_config_set(config, "vfs.s3.use_virtual_addressing", "false", &error);
10
11
// Create contex
12
tiledb_ctx_t* ctx;
13
tiledb_ctx_alloc(&config, &ctx);
14
15
// Pass CTX to read/write of array
16
17
// Clean up
18
tiledb_config_free(&config);
19
tiledb_ctx_free(&ctx);
Copied!
1
// Create a configuration object
2
Config config;
3
4
// Set a configuration parameter
5
config["vfs.s3.scheme"] = "http";
6
config["vfs.s3.region"] = "";
7
config["vfs.s3.endpoint_override"] = "<minio address>";
8
config["vfs.s3.use_virtual_addressing"] = "false";
9
10
// Create contex
11
Ctx ctx(config);
12
13
// Pass CTX to read/write of array
Copied!
1
# Create a configuration object
2
config = tiledb.Config()
3
4
# Set configuration parameters
5
config["vfs.s3.scheme"] = "http"
6
config["vfs.s3.region"] = ""
7
config["vfs.s3.endpoint_override"] = "<minio address>"
8
config["vfs.s3.use_virtual_addressing"] = "false"
9
10
# Create contex
11
ctx = tiledb.Ctx(config)
12
13
# Pass CTX to read/write of array
14
with tiledb.open(array_uri, ctx=ctx) as A:
15
# Read or write and context with minio is applied
Copied!
1
# Create a configuration object
2
config <- tiledb_config()
3
4
# Set a configuration parameter
5
config["vfs.s3.scheme"] = "http"
6
config["vfs.s3.region"] = ""
7
config["vfs.s3.endpoint_override"] = "<minio address>"
8
config["vfs.s3.use_virtual_addressing"] = "false"
9
10
ctx <- tiledb_ctx(config)
11
12
# Pass CTX to read/write of array
13
Copied!
1
try(Config config = new Config()) {
2
// Set configuration parameters
3
config.set("vfs.s3.scheme", "http");
4
config.set("vfs.s3.region", "");
5
config.set("vfs.s3.endpoint_override", "<minio address>");
6
config.set("vfs.s3.use_virtual_addressing", "false");
7
8
// set config on context
9
try(Context ctx = new Context(config)) {
10
// Pass CTX to read/write of array
11
}
12
}
Copied!
1
// Create a configuration object
2
config, _ := tiledb.NewConfig()
3
4
// Set configuration parameters
5
config.Set("vfs.s3.scheme", "http")
6
config.Set("vfs.s3.region", "")
7
config.Set("vfs.s3.endpoint_override", "<minio address>")
8
config.Set("vfs.s3.use_virtual_addressing", "false")
9
10
// set config on context
11
ctx, _ := tiledb.NewCtx(&config)
12
13
// Pass CTX to read/write of array
14
15
// Clean up
16
config.Free()
17
ctx.Free()
Copied!
Last modified 7mo ago
Copy link