# HG changeset patch # User Sebastien Jodogne # Date 1599492647 -7200 # Node ID e4bea5b978907efcef5ee05e0511b99a3a790e3e # Parent 2845ac3adad2c89991edd94dcb86c749273467ae Emulation of AWS S3 using MinIO diff -r 2845ac3adad2 -r e4bea5b97890 Sphinx/source/plugins/object-storage.rst --- 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 `__ 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/ +`__ 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 +`__. This option is +**not** available in releases <= 1.1.0 of the AWS S3 plugin. + + Azure Blob Storage plugin ^^^^^^^^^^^^^^^^^^^^^^^^^