Mercurial > hg > orthanc-book
comparison Sphinx/source/plugins/object-storage.rst @ 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 |
comparison
equal
deleted
inserted
replaced
504:2845ac3adad2 | 505:e4bea5b97890 |
---|---|
88 command (this syntax is not compatible with Ninja yet):: | 88 command (this syntax is not compatible with Ninja yet):: |
89 | 89 |
90 $ cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_VCPKG_PACKAGES=OFF ../../orthanc-object-storage/Aws | 90 $ cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_VCPKG_PACKAGES=OFF ../../orthanc-object-storage/Aws |
91 $ make | 91 $ make |
92 | 92 |
93 | 93 |
94 Azure Blob Storage plugin | 94 Azure Blob Storage plugin |
95 ^^^^^^^^^^^^^^^^^^^^^^^^^ | 95 ^^^^^^^^^^^^^^^^^^^^^^^^^ |
96 | 96 |
97 Prerequisites: Install `vcpkg <https://github.com/Microsoft/vcpkg>`__ dependencies:: | 97 Prerequisites: Install `vcpkg <https://github.com/Microsoft/vcpkg>`__ dependencies:: |
98 | 98 |
138 "Endpoint": "", // custom endpoint | 138 "Endpoint": "", // custom endpoint |
139 "ConnectionTimeout": 30, // connection timeout in seconds | 139 "ConnectionTimeout": 30, // connection timeout in seconds |
140 "RequestTimeout": 1200, // request timeout in seconds (max time to upload/download a file) | 140 "RequestTimeout": 1200, // request timeout in seconds (max time to upload/download a file) |
141 "RootPath": "", // see below | 141 "RootPath": "", // see below |
142 "MigrationFromFileSystemEnabled": false, // see below | 142 "MigrationFromFileSystemEnabled": false, // see below |
143 "StorageStructure": "flat" // see below | 143 "StorageStructure": "flat", // see below |
144 "VirtualAddressing": true // see the section related to MinIO | |
144 } | 145 } |
145 | 146 |
146 The **EndPoint** configuration is used when accessing an S3 compatible cloud provider. I.e. here is a configuration to store data on Scaleway:: | 147 The **EndPoint** configuration is used when accessing an S3 compatible cloud provider. I.e. here is a configuration to store data on Scaleway:: |
147 | 148 |
148 "AwsS3Storage" : { | 149 "AwsS3Storage" : { |
149 "BucketName": "test-orthanc", | 150 "BucketName": "test-orthanc", |
150 "Region": "fr-par", | 151 "Region": "fr-par", |
151 "AccessKey": "XXX", | 152 "AccessKey": "XXX", |
152 "SecretKey": "YYY", | 153 "SecretKey": "YYY", |
153 "Endpoint": "s3.fr-par.scw.cloud" | 154 "Endpoint": "s3.fr-par.scw.cloud" |
154 }, | 155 } |
156 | |
157 | |
158 Emulation of AWS S3 using MinIO | |
159 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
160 | |
161 .. highlight:: bash | |
162 | |
163 The `MinIO project <https://min.io/>`__ can be used to emulate AWS S3 | |
164 for local testing/prototyping. Here is a sample command to start MinIO | |
165 on your local computer using Docker (evidently, make sure to adapt | |
166 your credentials):: | |
167 | |
168 $ docker run -p 9000:9000 \ | |
169 -e "MINIO_REGION=eu-west-1" \ | |
170 -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \ | |
171 -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MNG/bPxRfiCYEXAMPLEKEY" \ | |
172 minio/minio server /data | |
173 | |
174 .. highlight:: json | |
175 | |
176 Note that the ``MINIO_REGION`` must be set to an arbitrary region that | |
177 is supported by AWS S3. | |
178 | |
179 You can then open the URL `http://localhost:9000/ | |
180 <http://localhost:9000/>`__ with your Web browser to create a bucket, | |
181 say ``my-sample-bucket``. | |
182 | |
183 Here is a corresponding full configuration for Orthanc:: | |
184 | |
185 { | |
186 "Plugins" : [ <...> ], | |
187 "AwsS3Storage" : { | |
188 "BucketName": "my-sample-bucket", | |
189 "Region" : "eu-west-1", | |
190 "Endpoint": "http://localhost:9000/", | |
191 "AccessKey": "AKIAIOSFODNN7EXAMPLE", | |
192 "SecretKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", | |
193 "VirtualAddressing" : false | |
194 } | |
195 } | |
196 | |
197 Note that the ``VirtualAddressing`` option must be set to ``false`` | |
198 for such a `local setup with MinIO to work | |
199 <https://github.com/aws/aws-sdk-cpp/issues/1425>`__. This option is | |
200 **not** available in releases <= 1.1.0 of the AWS S3 plugin. | |
201 | |
202 | |
155 | 203 |
156 Azure Blob Storage plugin | 204 Azure Blob Storage plugin |
157 ^^^^^^^^^^^^^^^^^^^^^^^^^ | 205 ^^^^^^^^^^^^^^^^^^^^^^^^^ |
158 | 206 |
159 Sample configuration:: | 207 Sample configuration:: |