Workflow and Volumes Example
In this example, we assume that no referenced volumes have been created. You can run this workflow under any account. When running this workflow the Fuzzball Storage Service will automatically create the referenced volume, the user home volume directory, and an ephemeral volume directory. The user home directory persists after the workflow ends and will appear in the Storage Volume listing, while the ephemeral volume is deleted when the workflow ends:
version: v1
volumes:
myhome:
reference: volume://user/homedir
data:
reference: volume://user/ephemeral
ingress:
- source:
uri: https://raw.githubusercontent.com/ErikSchierboom/sentencegenerator/master/samples/the-king-james-bible.txt
destination:
uri: file://bible.txt
jobs:
read:
image:
uri: docker://alpine:latest
mounts:
myhome:
location: /myhome
data:
location: /data
command:
- sh
- -c
- "cat /data/bible.txt | tr '[:lower:]' '[:upper:]' > $HOME/bible.txt"
env:
- HOME=/myhome
policy:
timeout:
execute: 10m
retry:
attempts: 3
resource:
cpu:
cores: 1
affinity: NUMA
memory:
size: 1GiB