Mercurial > hg > orthanc-object-storage
annotate README.md @ 15:2a02b21f0a19
migration + storage structure
author | Alain Mazy |
---|---|
date | Tue, 01 Sep 2020 13:08:49 +0200 |
parents | 393fcf337462 |
children | 968eb1c78aed |
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", | |
42 "StorageEncryption" : {...}, | |
43 "StorageStructure" : "flat", | |
44 "MigrationFromFileSystemEnabled" : false | |
5 | 45 } |
46 | |
47 ``` | |
48 | |
49 ## Azure Blob Storage plugin ## | |
50 | |
51 ### Prerequisites ### | |
52 | |
53 * Install [vcpkg](https://github.com/Microsoft/vcpkg) | |
54 | |
55 ### Compile Azure plugin ### | |
56 | |
57 * `./vcpkg install cpprestsdk` | |
58 * `hg clone ...` | |
59 * `mkdir -p build/azure` | |
60 * `cd build/azure` | |
61 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Azure` | |
62 | |
63 ### Azure plugin configuration ### | |
64 | |
65 ``` | |
66 "AzureBlobStorage" : { | |
67 "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=xxxxxxxxx;AccountKey=yyyyyyyy===;EndpointSuffix=core.windows.net", | |
15 | 68 "ContainerName" : "test-orthanc-storage-plugin", |
69 "StorageEncryption" : {...}, | |
70 "StorageStructure" : "flat", | |
71 "MigrationFromFileSystemEnabled" : false | |
5 | 72 } |
73 ``` | |
74 | |
75 ## AWS S3 Storage plugin ## | |
76 | |
77 ### Prerequisites ### | |
78 | |
79 * Install [vcpkg](https://github.com/Microsoft/vcpkg) | |
80 | |
81 * compile the AWS C++ SDK | |
82 | |
83 ``` | |
84 | |
85 mkdir ~/aws | |
86 cd ~/aws | |
87 git clone https://github.com/aws/aws-sdk-cpp.git | |
88 | |
89 mkdir -p ~/aws/builds/aws-sdk-cpp | |
90 cd ~/aws/builds/aws-sdk-cpp | |
91 cmake -DBUILD_ONLY="s3;transfer" ~/aws/aws-sdk-cpp | |
92 make -j 4 | |
93 make install | |
94 ``` | |
95 | |
96 ### Compile AWS S3 plugin ### | |
97 | |
98 * `./vcpkg install cryptopp` | |
99 * `hg clone ...` | |
100 * `mkdir -p build/aws` | |
101 * `cd build/aws` | |
102 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Aws` | |
103 | |
104 ### Azure plugin configuration ### | |
105 | |
106 ``` | |
107 "AwsS3Storage" : { | |
108 "BucketName": "test-orthanc-s3-plugin", | |
109 "Region" : "eu-central-1", | |
110 "AccessKey" : "AKXXX", | |
6
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
111 "SecretKey" : "RhYYYY", |
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
112 "Endpoint": "", // optional: custom endpoint |
393fcf337462
AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents:
5
diff
changeset
|
113 "ConnectionTimeout": 30, // optional: connection timeout in seconds |
15 | 114 "RequestTimeout": 1200, // optional: request timeout in seconds (max time to upload/download a file) |
115 "StorageEncryption" : {...}, | |
116 "StorageStructure" : "flat", | |
117 "MigrationFromFileSystemEnabled" : false | |
5 | 118 } |
119 ``` |