Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions content/references/advanced/createserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,24 @@

## Foreign Data Wrapper

CedarDB currently supports S3 and requires the following options.
CedarDB currently supports S3 and S3-compatible object storage (e.g., MinIO, Ceph, or other self-hosted storage), and requires the following options.

Check failure on line 18 in content/references/advanced/createserver.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Ceph'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Ceph'?", "location": {"path": "content/references/advanced/createserver.md", "range": {"start": {"line": 18, "column": 78}}}, "severity": "ERROR"}

Check failure on line 18 in content/references/advanced/createserver.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Google.Latin] Use 'for example' instead of 'e.g.'. Raw Output: {"message": "[Google.Latin] Use 'for example' instead of 'e.g.'.", "location": {"path": "content/references/advanced/createserver.md", "range": {"start": {"line": 18, "column": 65}}}, "severity": "ERROR"}

## Options

* location: The bucket location of the data, in the form `s3://bucketname:region`.
* location: The bucket location of the data, in the form `s3://bucketname:region` for AWS S3, or `minio://host:port/bucketname:region` for S3-compatible storage.
* id: This is the access key.
* secret: This is the secret that belongs to the access key.

## S3-compatible storage

To use a self-hosted, S3-compatible storage such as MinIO or Ceph, use the `minio://` prefix and add the endpoint (host and port) in front of the bucket.

Check failure on line 28 in content/references/advanced/createserver.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Ceph'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Ceph'?", "location": {"path": "content/references/advanced/createserver.md", "range": {"start": {"line": 28, "column": 62}}}, "severity": "ERROR"}
The region has to match the region configured on your storage server.
CedarDB connects to such endpoints via plain HTTP.

```sql
create server server_name foreign data wrapper s3 options (location 'minio://127.0.0.1:9000/bucketname:local', id '<access key>', secret '<secret key>');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might want to rethink the minio:// prefix, considering that minio is not maintained anymore

```

## Creating access keys

For setting up a S3 server CedarDB needs AWS IAM credentials.
Expand Down
11 changes: 11 additions & 0 deletions content/references/advanced/s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@

After setting up a table that uses S3 as backend storage, you can use it the same as a regular table stored on the local filesystem.

## Using S3-compatible storage

Instead of AWS S3, you can also use a self-hosted, S3-compatible object storage such as MinIO or Ceph.

Check failure on line 34 in content/references/advanced/s3.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Ceph'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Ceph'?", "location": {"path": "content/references/advanced/s3.md", "range": {"start": {"line": 34, "column": 98}}}, "severity": "ERROR"}
To do so, use the `minio://` prefix and specify the endpoint of your storage in the location, in the form `minio://host:port/bucketname:region`.

```sql
-- Create a server for a local MinIO instance listening on port 9000
CREATE SERVER serverName FOREIGN DATA WRAPPER s3 OPTIONS (location 'minio://127.0.0.1:9000/bucketname:local', id '<access key>', secret '<secret key>');
CREATE TABLE salary (salary integer, tax numeric) WITH (SERVER = serverName);
```

## AWS performance considerations

To get the most out of S3-backed data, it is crucial to choose an instance with enough network bandwidth.
Expand Down
Loading