-
Notifications
You must be signed in to change notification settings - Fork 66
🪣 Support for OBject Storage #1021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0d436e3
🎈 *writes data to get teh party started*
Kezzsim 152b886
🌫️ *anxiously adds more cloud providers*
Kezzsim 4e42fb0
Resolve mypy errors
Kezzsim 1c0164b
👍️ Resolve minio https error preventing us from writing `zarr.json`
Kezzsim 6f8ab0f
🚮 Experiment with writing (sloppy) data
Kezzsim 9db8cca
🪲 DEBUG: problems with `write`
Kezzsim 3a4e81c
🕶️ Review : Add missing prefix
Kezzsim 99480e2
✍️ Write regex helper function
Kezzsim f54cc7f
🧽 refactor to clean up repeated code
Kezzsim d102d11
✍️ Add Blobs to writing tests
Kezzsim a4d56c7
Merge branch 'bluesky:main' into obtsor
Kezzsim 76b8dfa
✍️ Rewrite `get_storage` to be a router for buckets
Kezzsim 6df1ecb
Merge branch 'bluesky:main' into obtsor
Kezzsim 3be96c0
refactor ObjectStorage
genematx d61e11a
Merge pull request #1 from genematx/obstore-eugene
Kezzsim 65bebe8
🐋 Add minio container to CI for testing
Kezzsim 0e200a9
🧪 Make `TILED_TEST_BUCKET` env var for advanced testing
Kezzsim bd7007b
More refactoring of Storage
genematx 401e432
FIX: look up registered storages instead of recreating them
genematx ef5e07d
Simplify test config
genematx 4d8afb9
TST: fix test_writing + more refactoring
genematx aae6b13
MNT: add minio dependency for server
genematx 5a270f5
ENH: generalize asset deletion
genematx 8e71719
Merge pull request #2 from genematx/obstore-eugene
Kezzsim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
29 changes: 29 additions & 0 deletions
29
continuous_integration/docker-configs/minio-docker-compose.yml
This file contains hidden or 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,29 @@ | ||
| version: "3.2" | ||
| services: | ||
| minio: | ||
| image: minio/minio:latest | ||
| ports: | ||
| - 9000:9000 | ||
| - 9001:9001 | ||
| volumes: | ||
| - minio-data:/data | ||
| environment: | ||
| MINIO_ROOT_USER: "minioadmin" | ||
| MINIO_ROOT_PASSWORD: "minioadmin" | ||
| command: server /data --console-address :9001 | ||
| restart: unless-stopped | ||
| create-bucket: | ||
| image: minio/mc:latest | ||
| environment: | ||
| MC_HOST_minio: http://minioadmin:minioadmin@minio:9000 | ||
| entrypoint: | ||
| - sh | ||
| - -c | ||
| - | | ||
| until mc ls minio > /dev/null 2>&1; do | ||
| sleep 0.5 | ||
| done | ||
|
|
||
| mc mb --ignore-existing minio/buck | ||
| volumes: | ||
| minio-data: |
This file contains hidden or 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,7 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| # Start MinIO server in docker container | ||
| docker pull minio/minio:latest | ||
| docker compose -f continuous_integration/docker-configs/minio-docker-compose.yml up -d | ||
| docker ps |
This file contains hidden or 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,17 @@ | ||
| authentication: | ||
| allow_anonymous_access: false | ||
| trees: | ||
| - path: / | ||
| tree: catalog | ||
| args: | ||
| uri: "sqlite:///storage/catalog.db" | ||
| writable_storage: | ||
| - provider: s3 | ||
| uri: "http://localhost:9000" | ||
| config: | ||
| access_key_id: "minioadmin" | ||
| secret_access_key: "minioadmin" | ||
| bucket: "buck" | ||
| virtual_hosted_style_request: False | ||
| client_options: {"allow_http": True} | ||
| init_if_not_exists: true |
This file contains hidden or 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,29 @@ | ||
| version: "3.2" | ||
| services: | ||
| minio: | ||
| image: minio/minio:latest | ||
| ports: | ||
| - 9000:9000 | ||
| - 9001:9001 | ||
| volumes: | ||
| - minio-data:/data | ||
| environment: | ||
| MINIO_ROOT_USER: "minioadmin" | ||
| MINIO_ROOT_PASSWORD: "minioadmin" | ||
| command: server /data --console-address :9001 | ||
| restart: unless-stopped | ||
| create-bucket: | ||
| image: minio/mc:latest | ||
| environment: | ||
| MC_HOST_minio: http://minioadmin:minioadmin@minio:9000 | ||
| entrypoint: | ||
| - sh | ||
| - -c | ||
| - | | ||
| until mc ls minio > /dev/null 2>&1; do | ||
| sleep 0.5 | ||
| done | ||
|
|
||
| mc mb --ignore-existing minio/buck | ||
| volumes: | ||
| minio-data: |
This file contains hidden or 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,18 @@ | ||
| # Create a local bucket for testing access to BLOBS | ||
|
|
||
| In this example there exists: | ||
| - A `docker-compose.yml` file capable of instantiating and running a [Minio](https://min.io/) container. | ||
| - A configuration yaml file `bucket_storage.yml` which contains information tiled needs to authenticate with the bucket storage system and write / read Binary Large Objects (BLOBS) through the Zaar adapter. | ||
|
|
||
| ## How to run this example: | ||
| 1. In one terminal window, navigate to the directory where the `docker-compose.yml` and `bucket_storage.yml` are. | ||
| 2. Run `docker compose up` with adequate permissions. | ||
| 3. Open another terminal window in the same location and run `tiled serve config bucket_storage.yml --api-key secret` | ||
| 4. You will need to create a `storage` directory in `/example_configs/bucket_storage` for the sqlite database. | ||
| 5. Create an `ipython` session and run the following commands to write array data as a BLOB in a bucket: | ||
| ```python | ||
| from tiled.client import from_uri | ||
| c = from_uri('http://localhost:8000', api_key='secret') | ||
| c.write_array([1,2,3]) | ||
| ``` | ||
| 6. You will be able to see the written data in the bucket if you log in to the minio container, exposed on your machine at `http://localhost:9001/login`. </br> Use testing credentials `minioadmin` for both fields. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.