-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
S3 storage as an optional back-end for a whole node. Closes #35 - Regroup all file management operations under a single module - Extract hash operations to be abstracted in such a way to possibly be efficient with S3 - Scan at the end of sync only if files changed locally - Create an abstraction module that reimplements all file operations but with S3 - Add cache mode for S3 hash listing - Make a global configuration mechanism for a node that substitutes file operations by s3 operations - Hook in maestro for configuration - Rework flow control to support the new bottleneck S3 introduces (see https://cohost.org/mononcqc/post/3283763-oh-are-you-really-g) - write integration tests and mocked tests Also fixes a weird performance issue that came from loading deleted files in the directory diffing on the first load that got to be very slow on S3.
- Loading branch information
Showing
30 changed files
with
2,046 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ _build | |
rebar3.crashdump | ||
*~ | ||
doc | ||
# getting clobbered by vm.args.src | ||
config/vm.args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
[db] | ||
path = "db/" | ||
|
||
[backend] | ||
mode = "s3" | ||
role_arn = "arn:aws:iam::874886211697:role/ReVault-s3" | ||
region = "us-east-2" | ||
bucket = "revault-airm1" | ||
# cache_dir = ".cache" | ||
|
||
[dirs] | ||
[dirs.music] | ||
interval = 60 | ||
path = "Music" | ||
|
||
[dirs.images] | ||
interval = 60 | ||
path = "images" | ||
ignore = ["\\.DS_Store$", "\\.exe$"] # regexes on full path | ||
|
||
[peers] | ||
# VPS copy running | ||
[peers.vps] | ||
sync = ["images"] | ||
url = "leetzone.ca:8022" | ||
[peers.vps.auth] | ||
type = "tls" | ||
certfile = "/path/to/fake/cert" | ||
keyfile = "/path/to/fake/key" | ||
peer_certfile = "/some/fake/path.crt" | ||
|
||
# Localhost copy running | ||
[peers.local] | ||
url = "localhost:8888" | ||
[peers.local.auth] | ||
type = "none" | ||
|
||
[server] | ||
[server.auth.none] | ||
status = "disabled" | ||
port = 9999 | ||
sync = ["images", "music"] | ||
mode = "read/write" | ||
|
||
[server.auth.tls] | ||
# status = "disabled" | ||
port = 8022 | ||
certfile = "/path/to/fake/cert" | ||
keyfile = "/path/to/fake/key" | ||
[server.auth.tls.authorized] | ||
[server.auth.tls.authorized.vps] | ||
# each peer should have a unique peer certificate to auth it | ||
certfile = "...." | ||
sync = ["images", "music"] | ||
|
||
[server.auth.tls.authorized.friendo] | ||
certfile = "...." | ||
sync = ["music"] | ||
mode = "read" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.