annotate README.md @ 34:7ddd840563c9

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