sequentech / meta

Sequent Public Roadmap
GNU Affero General Public License v3.0
0 stars 0 forks source link

✨ add AWS S3 backend for immudb #577

Closed edulix closed 1 month ago

edulix commented 4 months ago

Preflight checklist

Suggestion

add AWS S3 backend for immudb

Possible Implementation

No response

Tasks

Screenshots

```[tasklist] # Tasks - [x] Create the required infrastructure - [x] Adapt the immudb Helm Chart - [x] Enhance Bucket Policy (Versioning) - [x] Prepare IAM Role for the future ``` ```[tasklist] # Main PRs - [ ] https://github.com/sequentech/gitops/pull/218 - [ ] https://github.com/sequentech/infrastructure/pull/42 ``` ```[tasklist] # Stable PRs - [ ] PR 1 ``` ### Additional context _No response_
angelAtSequent commented 2 months ago
angelAtSequent commented 2 months ago

Hit: https://github.com/codenotary/immudb/pull/1712/files

Pending: Include lifecycle policy on S3 to delete old versions from the immudb state bucket

angelAtSequent commented 2 months ago

Hit another issue: https://github.com/codenotary/immudb/issues/1877 I'll try to workaround it by pushing the "expected" file upfront (on bucket creation).

angelAtSequent commented 2 months ago

Pending:

angelAtSequent commented 2 months ago

I'll try to run some tests on staging with the new immudb configuration today

angelAtSequent commented 2 months ago

I'm creating the IAM role just to be ready for: https://github.com/codenotary/immudb/issues/1094

angelAtSequent commented 2 months ago

Once approved, we would need to apply the changes eventually.

Findeton commented 2 months ago

@angelAtSequent What I don't understand is that the s3 buckets (like staging-immudb-lasting-sloth) seem to be empty (looking in the aws page). Shouldn't it be filled with new data? immudb in staging doesn't seem to be using s3 but I may be wrong.

angelAtSequent commented 2 months ago

@angelAtSequent What I don't understand is that the s3 buckets (like staging-immudb-lasting-sloth) seem to be empty (looking in the aws page). Shouldn't it be filled with new data? immudb in staging doesn't seem to be using s3 but I may be wrong.

TL;DR: https://github.com/codenotary/immudb/discussions/1140

immudb uses a multi-file approach. Files are created with exactly the same size as they are filled up. Once a file is fully written and a new file is created for the next writes, the previous one will be automatically uploaded to the S3 server. This upload also takes place when gracefully closing immudb server

if you want to force immudb to write all local data to S3, you need to gracefully shutdown immudb

angelAtSequent commented 2 months ago

After restarting the immudb instance (currently located in the tests-3 namespace, it puts all the files to S3.

edulix commented 1 month ago

Closing it since it was moved to done, please reopen it if it's a mistake to close it.