Our first workflow — creating a lambda Docker image
This stage requires basic knowledge about Python and Docker, and assumes that you have
access to a public Docker repository where you can push Docker images. If that's not the
case, you may skip this step and go to the Define the lambda in the inventory, using the
below Docker image:
onedata/training-lambda-calc-checksum:v1
The purpose of the lambda function is to calculate the checksum of file content (pointed
by file
argument) and store it in the file's extended attributes (xattrs).
The algorithm is configurable; it can be passed using the algorithm
lambda parameter.
Any algorithm supported by Python's hashlib package can be used (e.g. MD5, SHA-1,
SHA-256, and so on).
Apart from setting the xattr, each processed item generates results:
- result summary —
result
,
- log entry —
statusLog
.
During execution, the lambda will also continuously stream time series statistics via the
stats
result file.