Mercurial > hg > orthanc-book
changeset 505:e4bea5b97890
Emulation of AWS S3 using MinIO
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Sep 2020 17:30:47 +0200 |
parents | 2845ac3adad2 |
children | 30d415f2b8ee |
files | Sphinx/source/plugins/object-storage.rst |
diffstat | 1 files changed, 51 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Sphinx/source/plugins/object-storage.rst Mon Sep 07 16:03:56 2020 +0200 +++ b/Sphinx/source/plugins/object-storage.rst Mon Sep 07 17:30:47 2020 +0200 @@ -90,7 +90,7 @@ $ cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_VCPKG_PACKAGES=OFF ../../orthanc-object-storage/Aws $ make - + Azure Blob Storage plugin ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,7 +140,8 @@ "RequestTimeout": 1200, // request timeout in seconds (max time to upload/download a file) "RootPath": "", // see below "MigrationFromFileSystemEnabled": false, // see below - "StorageStructure": "flat" // see below + "StorageStructure": "flat", // see below + "VirtualAddressing": true // see the section related to MinIO } The **EndPoint** configuration is used when accessing an S3 compatible cloud provider. I.e. here is a configuration to store data on Scaleway:: @@ -151,7 +152,54 @@ "AccessKey": "XXX", "SecretKey": "YYY", "Endpoint": "s3.fr-par.scw.cloud" - }, + } + + +Emulation of AWS S3 using MinIO +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. highlight:: bash + +The `MinIO project <https://min.io/>`__ can be used to emulate AWS S3 +for local testing/prototyping. Here is a sample command to start MinIO +on your local computer using Docker (evidently, make sure to adapt +your credentials):: + + $ docker run -p 9000:9000 \ + -e "MINIO_REGION=eu-west-1" \ + -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \ + -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MNG/bPxRfiCYEXAMPLEKEY" \ + minio/minio server /data + +.. highlight:: json + +Note that the ``MINIO_REGION`` must be set to an arbitrary region that +is supported by AWS S3. + +You can then open the URL `http://localhost:9000/ +<http://localhost:9000/>`__ with your Web browser to create a bucket, +say ``my-sample-bucket``. + +Here is a corresponding full configuration for Orthanc:: + + { + "Plugins" : [ <...> ], + "AwsS3Storage" : { + "BucketName": "my-sample-bucket", + "Region" : "eu-west-1", + "Endpoint": "http://localhost:9000/", + "AccessKey": "AKIAIOSFODNN7EXAMPLE", + "SecretKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "VirtualAddressing" : false + } + } + +Note that the ``VirtualAddressing`` option must be set to ``false`` +for such a `local setup with MinIO to work +<https://github.com/aws/aws-sdk-cpp/issues/1425>`__. This option is +**not** available in releases <= 1.1.0 of the AWS S3 plugin. + + Azure Blob Storage plugin ^^^^^^^^^^^^^^^^^^^^^^^^^