Saving OpenFOAM Results
This example OpenFOAM workflow can save the
generated results tarball motorbike-example-results.tar.gz
to a destination of your choice. This
section walks through how you can save the output file to S3.
In order to write the output file to an S3 bucket, you may need access to a Fuzzball S3 secret. Please see the Fuzzball secrets guide for instructions on how to set one up.
You can set up your workflow to save an output file to S3 through the GUI or by editing the Fuzzfile.
motorbike-example-results.tar.gz
to S3.
After opening the workflow in the Fuzzball GUI, you can select any job in the workflow editor and navigate to the volumes tab.
You can edit the settings of openfoam-data-volume
by clicking on it. You can specify a destination
for output file motorbike-example-results.tar.gz
by clicking “Add
Egress” which will bring up a pop-up.
First, specify the source and destination location of the result file. Next, you can select the
secret which will be used to write your output file to the destination using the drop down.
Optionally you can specify a timeout and retry attempts. The screenshot below saves the results
tarball motorbike-example-results.tar.gz
to S3 URI s3://my-bucket/my-dir/motorbike-example-results.tar.gz
.
Fuzzball user secret my-s3-bucket-secret
is used to
write to S3 bucket s3://my-bucket/
. When you are done editing your egress configuration, you can
click “OK”.
When you are done editing your volume settings, you can click the “Save” button.
Editing the Fuzzfile to save output file motorbike-example-results.tar.gz
can be done in the GUI
after opening the Fuzzfile by clicking the ellipses (...
) menu in the lower right and select
“Edit YAML” or simply press e
on your keyboard. An editor with the workflow’s Fuzzfile will appear
shown in the screenshot below. If you are using the
CLI, the Fuzzfile can be edited in a
text editor of your choice.
The Fuzzfile in the previous section uses
ephemeral volume openfoam-data-volume
with an egress block commented out.
volumes:
openfoam-data-volume:
name: openfoam-data-volume
reference: volume://user/ephemeral
# egress:
# - source:
# uri: file://motorbike-example-results.tar.gz
# destination:
# uri:
# secret:
To save output motorbike-example-results.tar.gz
to S3 by editing the Fuzzfile, you can uncomment
the egress section, specify a destination with an S3 URI and a Fuzzball secret. The volumes block below
writes workflow output file motorbike-example-results.tar.gz
to destination S3 URI
s3://my-bucket/my-dir/motorbike-example-results.tar.gz
. The credentials used to egress this file
is Fuzzball user secret secret://user/my-s3-bucket-secret
.
volumes:
openfoam-data-volume:
name: openfoam-data-volume
reference: volume://user/ephemeral
egress:
- source:
uri: file://motorbike-example-results.tar.gz
destination:
uri: s3://my-bucket/my-dir/motorbike-example-results.tar.gz
secret: secret://user/my-s3-bucket-secret