DiSARM algorithms and OpenFaaS

We have been developing and testing DiSARM algorithms for deployment on OpenFaaS. It is a great platform, and has sped us up considerably in steps 2, 3 and 4 in the lifecycle. OpenFaaS is not the only approach to this, but any function built with OpenFaaS should then be much easier to deploy.
We've used 3 parts of OpenFaaS:
  1. 1.
    The OpenFaaS platform itself: for hosting and running deployed functions
  2. 2.
    The watchdog process handler: gets built into Docker images, to convert incoming HTTP requests into STDIN streams
  3. 3.
    The faas-cli tool: scaffold new functions from templates, then build and deploy (see below)

The faas-cli

The officials docs are at
We've used these commands for creating new functions:
  • faas template pull retrieves our custom templates, and gets ready to create a new function from them
  • faas new --lang r-geospatial new-function-r: scaffolds a new function from the r-geospatial template
We've used these commands for building. They assume the existence of a stack.yml file.
  • faas build: builds a Docker image for the function. We've also found faas build --shrinkwrap can be useful to prepare the required files, but not actually build a container (check in the build folder that gets created)
  • faas push: push the built image to Docker Hub
  • faas deploy: get the built image running on your OpenFaas deployment
They can be combined and run at once with faas up.