Mercurial > hg > orthanc-object-storage
annotate README.md @ 20:968eb1c78aed
Added 'RootPath' configuration
author | Alain Mazy |
---|---|
date | Mon, 07 Sep 2020 14:12:49 +0200 |
parents | 2a02b21f0a19 |
children | 7ddd840563c9 |
rev | line source |
---|---|
1 | 1 # README # |
2 | |
3 Orthanc object-storages plugin for main cloud providers (Google/Azure/AWS) | |
4 | |
4 | 5 Check the [Orthanc book](https://book.orthanc-server.com/plugins/object-storage.html) for complete documentation. |
1 | 6 |
5 | 7 ## info for developers ## |
8 | |
9 Here's a sample configuration file of the `StorageEncryption` section of the plugins: | |
10 | |
11 ``` | |
12 { | |
15 | 13 "GoogleCloudStorage" : { |
14 "StorageEncryption" : { | |
15 "Enable": true, | |
16 "MasterKey": [3, "/path/to/master.key"], // key id - path to the base64 encoded key | |
17 "PreviousMasterKeys" : [ | |
18 [ 1, "/path/to/previous1.key"], | |
19 [ 2, "/path/to/previous2.key"] | |
20 ], | |
21 "MaxConcurrentInputSize" : 1024 // size in MB | |
22 } | |
5 | 23 } |
24 } | |
25 ``` | |
26 | |
27 ### Compile Google plugin ### | |
28 | |
29 * `./vcpkg install google-cloud-cpp` | |
30 * `./vcpkg install cryptopp` | |
31 * `hg clone ...` | |
32 * `mkdir -p build/google` | |
33 * `cd build/google` | |
15 | 34 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Google` |
5 | 35 |
36 ### Google plugin configuration ### | |
37 | |
38 ``` | |
39 "GoogleCloudStorage" : { | |
15 | 40 "ServiceAccountFile" : "/.../googleServiceAccountFile.json", |
41 "BucketName": "test-orthanc-storage-plugin", | |
20 | 42 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder) |
15 | 43 "StorageEncryption" : {...}, |
44 "StorageStructure" : "flat", | |
45 "MigrationFromFileSystemEnabled" : false | |
5 | 46 } |
47 | |
48 ``` | |
49 | |
50 ## Azure Blob Storage plugin ## | |
51 | |
52 ### Prerequisites ### | |
53 | |
54 * Install [vcpkg](https://github.com/Microsoft/vcpkg) | |
55 | |
56 ### Compile Azure plugin ### | |
57 | |
58 * `./vcpkg install cpprestsdk` | |
59 * `hg clone ...` | |
60 * `mkdir -p build/azure` | |
61 * `cd build/azure` | |
62 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Azure` | |
63 | |
64 ### Azure plugin configuration ### | |
65 | |
66 ``` | |
67 "AzureBlobStorage" : { | |
68 "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=xxxxxxxxx;AccountKey=yyyyyyyy===;EndpointSuffix=core.windows.net", | |
15 | 69 "ContainerName" : "test-orthanc-storage-plugin", |
20 | 70 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder) |
15 | 71 "StorageEncryption" : {...}, |
72 "StorageStructure" : "flat", | |
73 "MigrationFromFileSystemEnabled" : false | |
5 | 74 } |
75 ``` | |
76 | |
77 ## AWS S3 Storage plugin ## | |
78 | |
79 ### Prerequisites ### | |
80 | |
81 * Install [vcpkg](https://github.com/Microsoft/vcpkg) | |
82 | |
83 * compile the AWS C++ SDK | |
84 | |
85 ``` | |
86 | |
87 mkdir ~/aws | |
88 cd ~/aws | |
89 git clone https://github.com/aws/aws-sdk-cpp.git | |
90 | |
91 mkdir -p ~/aws/builds/aws-sdk-cpp | |
92 cd ~/aws/builds/aws-sdk-cpp | |
93 cmake -DBUILD_ONLY="s3;transfer" ~/aws/aws-sdk-cpp | |
94 make -j 4 | |
95 make install | |
96 ``` | |
97 | |
98 ### Compile AWS S3 plugin ### | |
99 | |
100 * `./vcpkg install cryptopp` | |
101 * `hg clone ...` | |
102 * `mkdir -p build/aws` | |
103 * `cd build/aws` | |
104 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Aws` | |
105 | |
106 ### Azure plugin configuration ### | |
107 | |
108 ``` | |
109 "AwsS3Storage" : { | |
110 "BucketName": "test-orthanc-s3-plugin", | |
111 "Region" : "eu-central-1", | |
112 "AccessKey" : "AKXXX", | |
6
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
113 "SecretKey" : "RhYYYY", |
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
114 "Endpoint": "", // optional: custom endpoint |
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
115 "ConnectionTimeout": 30, // optional: connection timeout in seconds |
15 | 116 "RequestTimeout": 1200, // optional: request timeout in seconds (max time to upload/download a file) |
20 | 117 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder) |
118 "StorageEncryption" : {...}, // optional | |
119 "StorageStructure" : "flat", // optional | |
120 "MigrationFromFileSystemEnabled" : false // optional | |
5 | 121 } |
122 ``` |