Skip to content

Commit 67786a9

Browse files
authored
Document S3_UPLOAD_OBJECT_KEY_PREFIX (#158)
1 parent 069c43b commit 67786a9

5 files changed

Lines changed: 84 additions & 78 deletions

File tree

docs/docs/Object-Storage-Guide.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@ Rights in Data-General Clause 52.227-14, Alt. IV (DEC 2007). Copyright 2022 The
33

44
# Object Storage Overview
55

6-
By default, OpenMPF will write markup files, JSON output objects, and extracted artifacts to directories in
7-
`$MPF_HOME/share`. For multi-node deployments, `$MPF_HOME/share` points to a directory on a network share.
6+
By default, OpenMPF will write markup files, JSON output objects, and extracted artifacts to directories in
7+
`$MPF_HOME/share`. For multi-node deployments, `$MPF_HOME/share` points to a directory on a network share.
88
Most often, the share is managed by the Network File System (NFS) protocol, although using NFS is not a requirement.
99

10-
Alternatively, OpenMPF supports writing these files to an object storage server. That may be desirable in cloud
10+
Alternatively, OpenMPF supports writing these files to an object storage server. That may be desirable in cloud
1111
deployments to better support integration between systems, and/or to consolidate file storage as a cost-saving measure.
1212

13-
When a file cannot be uploaded to the server, the Workflow Manager will fall back to storing it in `$MPF_HOME/share`.
14-
If and when a failure occurs, the JSON output object will contain a descriptive message in the `jobWarnings` field.
13+
When a file cannot be uploaded to the server, the Workflow Manager will fall back to storing it in `$MPF_HOME/share`.
14+
If and when a failure occurs, the JSON output object will contain a descriptive message in the `jobWarnings` field.
1515
If the job completes without other issues, the final status will be `COMPLETE_WITH_WARNINGS`.
1616

1717
# Common Object Storage Properties
1818

19-
The following system properties are common to the various types of object storage solutions that
19+
The following system properties are common to the various types of object storage solutions that
2020
OpenMPF supports:
2121

2222
- `http.object.storage.upload.retry.count`
23-
- The number of times OpenMPF will attempt to upload an object to the storage server after the
23+
- The number of times OpenMPF will attempt to upload an object to the storage server after the
2424
first failed attempt.
2525
- When using S3, the AWS SDK's default retry strategy is used.
26-
- When using NGINX, exponential back off is used between retry attempts. There is a 500ms
26+
- When using NGINX, exponential back off is used between retry attempts. There is a 500ms
2727
delay before the first retry. The delay doubles for each subsequent retry.
2828

2929

3030
# S3 Object Storage
31-
OpenMPF supports downloading media and uploading results to an S3 compatible
32-
server such as Ceph or Minio. The use of S3 is controlled through the
31+
OpenMPF supports downloading media and uploading results to an S3 compatible
32+
server such as Ceph or Minio. The use of S3 is controlled through the
3333
following job properties and system properties:
3434

3535
- `S3_ACCESS_KEY` job property or `s3.access.key` system property
@@ -39,23 +39,23 @@ following job properties and system properties:
3939
- `S3_SECRET_KEY` job property or `s3.secret.key` system property
4040
- The secret key that will be used when downloading and uploading to S3.
4141
- `S3_SESSION_TOKEN` job property or `s3.session.token` system property
42-
- Only required when the S3 bucket is configured to require a session key.
42+
- Only required when the S3 bucket is configured to require a session key.
4343
This generally occurs when multi-factor authentication is required.
4444
- OpenMPF does not handle generating the session key.
4545
- `S3_USE_VIRTUAL_HOST` job property or `s3.use.virtual.host` system property
46-
- When false or not provided,
47-
[path-style requests](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access)
46+
- When false or not provided,
47+
[path-style requests](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access)
4848
will be used.
49-
- When true,
50-
[virtual hosted-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access)
49+
- When true,
50+
[virtual hosted-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access)
5151
access will be used.
5252
- When true, `S3_HOST` must also be provided.
53-
- The CNAME configuration described
54-
[here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs)
53+
- The CNAME configuration described
54+
[here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs)
5555
is not supported.
5656
- `S3_HOST` job property or `s3.host` system property
5757
- The host of the S3 server without the bucket name.
58-
- If `S3_RESULTS_BUCKET=https://bucket.s3.amazonaws.com`, `S3_HOST` should be
58+
- If `S3_RESULTS_BUCKET=https://bucket.s3.amazonaws.com`, `S3_HOST` should be
5959
set to `s3.amazonaws.com`
6060
- Only used when `S3_USE_VIRTUAL_HOST=true`.
6161
- `S3_RESULTS_BUCKET` job property or `s3.results.bucket` system property
@@ -71,18 +71,20 @@ following job properties and system properties:
7171
- If you want to run a job where some media is in S3 and some is hosted elsewhere,
7272
you can set `S3_UPLOAD_ONLY` to `true` as a media specific property on the media that is hosted elsewhere.
7373
- `S3_REGION` job property or `s3.region` system property
74-
- The [S3 region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints)
75-
to use when accessing S3. For example: `us-east-1`
74+
- The [S3 region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints)
75+
to use when accessing S3. For example: `us-east-1`
7676
- Some S3 compatible servers like Minio ignore this.
77+
- `S3_UPLOAD_OBJECT_KEY_PREFIX` job property or `s3.upload.object.key.prefix` system property
78+
- Specifies a prefix to prepend to object keys when uploading to S3.
7779

7880

7981
# Custom NGINX HTTP Object Storage
8082

81-
OpenMPF supports a custom NGINX object storage server solution. If you're interested, please contact us.
83+
OpenMPF supports a custom NGINX object storage server solution. If you're interested, please contact us.
8284
We can make the server-side code available upon request.
8385

84-
For those who choose to run their own custom NGINX object storage server, please configure OpenMPF by setting
85-
the `http.object.storage.nginx.service.uri` property to the URI of the NGINX server.
86+
For those who choose to run their own custom NGINX object storage server, please configure OpenMPF by setting
87+
the `http.object.storage.nginx.service.uri` property to the URI of the NGINX server.
8688
The following system properties are unique to the custom NGINX object storage solution:
8789

8890
- `http.object.storage.nginx.service.uri`
@@ -96,7 +98,7 @@ The following system properties are unique to the custom NGINX object storage so
9698
- The chunk size, in bytes, that is used to upload objects to the storage server.
9799
- In general, the default value is sufficient.
98100

99-
The NGINX object storage server will determine the sha256 hash for the file once it's been uploaded.
101+
The NGINX object storage server will determine the sha256 hash for the file once it's been uploaded.
100102
It then uses that hash to name the file and returns the file URI to OpenMPF.
101103

102104

docs/site/Object-Storage-Guide/index.html

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -226,30 +226,30 @@
226226
<p><strong>NOTICE:</strong> This software (or technical data) was produced for the U.S. Government under contract, and is subject to the
227227
Rights in Data-General Clause 52.227-14, Alt. IV (DEC 2007). Copyright 2022 The MITRE Corporation. All Rights Reserved.</p>
228228
<h1 id="object-storage-overview">Object Storage Overview</h1>
229-
<p>By default, OpenMPF will write markup files, JSON output objects, and extracted artifacts to directories in
230-
<code>$MPF_HOME/share</code>. For multi-node deployments, <code>$MPF_HOME/share</code> points to a directory on a network share.
229+
<p>By default, OpenMPF will write markup files, JSON output objects, and extracted artifacts to directories in
230+
<code>$MPF_HOME/share</code>. For multi-node deployments, <code>$MPF_HOME/share</code> points to a directory on a network share.
231231
Most often, the share is managed by the Network File System (NFS) protocol, although using NFS is not a requirement.</p>
232-
<p>Alternatively, OpenMPF supports writing these files to an object storage server. That may be desirable in cloud
232+
<p>Alternatively, OpenMPF supports writing these files to an object storage server. That may be desirable in cloud
233233
deployments to better support integration between systems, and/or to consolidate file storage as a cost-saving measure.</p>
234-
<p>When a file cannot be uploaded to the server, the Workflow Manager will fall back to storing it in <code>$MPF_HOME/share</code>.
235-
If and when a failure occurs, the JSON output object will contain a descriptive message in the <code>jobWarnings</code> field.
234+
<p>When a file cannot be uploaded to the server, the Workflow Manager will fall back to storing it in <code>$MPF_HOME/share</code>.
235+
If and when a failure occurs, the JSON output object will contain a descriptive message in the <code>jobWarnings</code> field.
236236
If the job completes without other issues, the final status will be <code>COMPLETE_WITH_WARNINGS</code>.</p>
237237
<h1 id="common-object-storage-properties">Common Object Storage Properties</h1>
238-
<p>The following system properties are common to the various types of object storage solutions that
238+
<p>The following system properties are common to the various types of object storage solutions that
239239
OpenMPF supports:</p>
240240
<ul>
241241
<li><code>http.object.storage.upload.retry.count</code><ul>
242-
<li>The number of times OpenMPF will attempt to upload an object to the storage server after the
242+
<li>The number of times OpenMPF will attempt to upload an object to the storage server after the
243243
first failed attempt.</li>
244244
<li>When using S3, the AWS SDK's default retry strategy is used.</li>
245-
<li>When using NGINX, exponential back off is used between retry attempts. There is a 500ms
245+
<li>When using NGINX, exponential back off is used between retry attempts. There is a 500ms
246246
delay before the first retry. The delay doubles for each subsequent retry.</li>
247247
</ul>
248248
</li>
249249
</ul>
250250
<h1 id="s3-object-storage">S3 Object Storage</h1>
251-
<p>OpenMPF supports downloading media and uploading results to an S3 compatible
252-
server such as Ceph or Minio. The use of S3 is controlled through the
251+
<p>OpenMPF supports downloading media and uploading results to an S3 compatible
252+
server such as Ceph or Minio. The use of S3 is controlled through the
253253
following job properties and system properties:</p>
254254
<ul>
255255
<li><code>S3_ACCESS_KEY</code> job property or <code>s3.access.key</code> system property<ul>
@@ -263,27 +263,27 @@ <h1 id="s3-object-storage">S3 Object Storage</h1>
263263
</ul>
264264
</li>
265265
<li><code>S3_SESSION_TOKEN</code> job property or <code>s3.session.token</code> system property<ul>
266-
<li>Only required when the S3 bucket is configured to require a session key.
266+
<li>Only required when the S3 bucket is configured to require a session key.
267267
This generally occurs when multi-factor authentication is required.</li>
268268
<li>OpenMPF does not handle generating the session key.</li>
269269
</ul>
270270
</li>
271271
<li><code>S3_USE_VIRTUAL_HOST</code> job property or <code>s3.use.virtual.host</code> system property<ul>
272-
<li>When false or not provided,
273-
<a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access">path-style requests</a>
272+
<li>When false or not provided,
273+
<a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access">path-style requests</a>
274274
will be used.</li>
275-
<li>When true,
276-
<a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access">virtual hosted-style</a>
275+
<li>When true,
276+
<a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access">virtual hosted-style</a>
277277
access will be used.</li>
278278
<li>When true, <code>S3_HOST</code> must also be provided.</li>
279-
<li>The CNAME configuration described
280-
<a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs">here</a>
279+
<li>The CNAME configuration described
280+
<a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs">here</a>
281281
is not supported.</li>
282282
</ul>
283283
</li>
284284
<li><code>S3_HOST</code> job property or <code>s3.host</code> system property<ul>
285285
<li>The host of the S3 server without the bucket name.</li>
286-
<li>If <code>S3_RESULTS_BUCKET=https://bucket.s3.amazonaws.com</code>, <code>S3_HOST</code> should be
286+
<li>If <code>S3_RESULTS_BUCKET=https://bucket.s3.amazonaws.com</code>, <code>S3_HOST</code> should be
287287
set to <code>s3.amazonaws.com</code></li>
288288
<li>Only used when <code>S3_USE_VIRTUAL_HOST=true</code>.</li>
289289
</ul>
@@ -305,17 +305,21 @@ <h1 id="s3-object-storage">S3 Object Storage</h1>
305305
</ul>
306306
</li>
307307
<li><code>S3_REGION</code> job property or <code>s3.region</code> system property<ul>
308-
<li>The <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints">S3 region</a>
309-
to use when accessing S3. For example: <code>us-east-1</code> </li>
308+
<li>The <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints">S3 region</a>
309+
to use when accessing S3. For example: <code>us-east-1</code></li>
310310
<li>Some S3 compatible servers like Minio ignore this.</li>
311311
</ul>
312312
</li>
313+
<li><code>S3_UPLOAD_OBJECT_KEY_PREFIX</code> job property or <code>s3.upload.object.key.prefix</code> system property<ul>
314+
<li>Specifies a prefix to prepend to object keys when uploading to S3.</li>
315+
</ul>
316+
</li>
313317
</ul>
314318
<h1 id="custom-nginx-http-object-storage">Custom NGINX HTTP Object Storage</h1>
315-
<p>OpenMPF supports a custom NGINX object storage server solution. If you're interested, please contact us.
319+
<p>OpenMPF supports a custom NGINX object storage server solution. If you're interested, please contact us.
316320
We can make the server-side code available upon request.</p>
317-
<p>For those who choose to run their own custom NGINX object storage server, please configure OpenMPF by setting
318-
the <code>http.object.storage.nginx.service.uri</code> property to the URI of the NGINX server.
321+
<p>For those who choose to run their own custom NGINX object storage server, please configure OpenMPF by setting
322+
the <code>http.object.storage.nginx.service.uri</code> property to the URI of the NGINX server.
319323
The following system properties are unique to the custom NGINX object storage solution:</p>
320324
<ul>
321325
<li><code>http.object.storage.nginx.service.uri</code><ul>
@@ -335,7 +339,7 @@ <h1 id="custom-nginx-http-object-storage">Custom NGINX HTTP Object Storage</h1>
335339
</ul>
336340
</li>
337341
</ul>
338-
<p>The NGINX object storage server will determine the sha256 hash for the file once it's been uploaded.
342+
<p>The NGINX object storage server will determine the sha256 hash for the file once it's been uploaded.
339343
It then uses that hash to name the file and returns the file URI to OpenMPF.</p>
340344

341345
</div>

docs/site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,5 +376,5 @@ <h1 id="overview">Overview</h1>
376376

377377
<!--
378378
MkDocs version : 0.17.5
379-
Build Date UTC : 2022-10-11 13:00:08
379+
Build Date UTC : 2022-12-13 17:36:56
380380
-->

0 commit comments

Comments
 (0)