Mercurial > hg > orthanc-object-storage
annotate README.md @ 50:b40327079244
1.2.0
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 26 Apr 2021 09:37:58 +0200 |
parents | ff113c3561c5 |
children | f1688e875d3e |
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 | |
34 | 58 On Linux: |
59 | |
5 | 60 * `./vcpkg install cpprestsdk` |
34 | 61 * `./vcpkg install cryptopp` |
5 | 62 * `hg clone ...` |
63 * `mkdir -p build/azure` | |
64 * `cd build/azure` | |
65 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Azure` | |
66 | |
34 | 67 On Windows: |
68 | |
69 * `.\vcpkg.exe install cpprestsdk:x64-windows-static` | |
70 * `.\vcpkg.exe install azure-storage-cpp:x64-windows-static` | |
71 * `.\vcpkg.exe install cryptopp:x64-windows-static` | |
72 * `hg clone ...` | |
73 * `mkdir -p build/azure` | |
74 * `cd build/azure` | |
75 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE="Release" ../../orthanc-object-storage/Azure` | |
76 * `cmake --build . --config Release` | |
77 | |
78 | |
5 | 79 ### Azure plugin configuration ### |
80 | |
81 ``` | |
82 "AzureBlobStorage" : { | |
83 "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=xxxxxxxxx;AccountKey=yyyyyyyy===;EndpointSuffix=core.windows.net", | |
15 | 84 "ContainerName" : "test-orthanc-storage-plugin", |
50 | 85 "CreateContainerIfNotExists": true, // available from version 1.2.0 |
20 | 86 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder) |
15 | 87 "StorageEncryption" : {...}, |
88 "StorageStructure" : "flat", | |
89 "MigrationFromFileSystemEnabled" : false | |
5 | 90 } |
91 ``` | |
92 | |
93 ## AWS S3 Storage plugin ## | |
94 | |
95 ### Prerequisites ### | |
96 | |
97 * Install [vcpkg](https://github.com/Microsoft/vcpkg) | |
98 | |
99 * compile the AWS C++ SDK | |
100 | |
101 ``` | |
102 | |
103 mkdir ~/aws | |
104 cd ~/aws | |
105 git clone https://github.com/aws/aws-sdk-cpp.git | |
106 | |
107 mkdir -p ~/aws/builds/aws-sdk-cpp | |
108 cd ~/aws/builds/aws-sdk-cpp | |
109 cmake -DBUILD_ONLY="s3;transfer" ~/aws/aws-sdk-cpp | |
110 make -j 4 | |
111 make install | |
112 ``` | |
113 | |
114 ### Compile AWS S3 plugin ### | |
115 | |
116 * `./vcpkg install cryptopp` | |
117 * `hg clone ...` | |
118 * `mkdir -p build/aws` | |
119 * `cd build/aws` | |
120 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Aws` | |
121 | |
122 ### Azure plugin configuration ### | |
123 | |
124 ``` | |
125 "AwsS3Storage" : { | |
126 "BucketName": "test-orthanc-s3-plugin", | |
127 "Region" : "eu-central-1", | |
128 "AccessKey" : "AKXXX", | |
6
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
129 "SecretKey" : "RhYYYY", |
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
130 "Endpoint": "", // optional: custom endpoint |
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
131 "ConnectionTimeout": 30, // optional: connection timeout in seconds |
15 | 132 "RequestTimeout": 1200, // optional: request timeout in seconds (max time to upload/download a file) |
20 | 133 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder) |
134 "StorageEncryption" : {...}, // optional | |
135 "StorageStructure" : "flat", // optional | |
136 "MigrationFromFileSystemEnabled" : false // optional | |
5 | 137 } |
138 ``` |