Rudimentary YAML workflow runner for OpenFaaS
MIT License
Rudimentary YAML workflow runner for OpenFaaS
faas template pull https://github.com/alexellis/workflow-yaml-template
faas new --lang workflow youtube2gif --prefix=DOCKER_HUB_NAME
youtube2gif/workflow.yml
workflow:
name: youtube2gif
gateway_url: http://gateway:8080/
steps:
- name: download-video
function: youtube-dl
method: POST
- name: convert-to-gif
function: gif-maker
method: POST
stack.yml
provider:
name: openfaas
functions:
## Workflow runner
youtube2gif:
lang: workflow
handler: ./youtube2gif
image: YOUR_HUB_USERNAME/youtube-gif
environment:
write_timeout: 2m
read_timeout: 2m
combine_output: false
## Dependent functions
gif-maker:
skip_build: true
image: functions/gif-maker:latest
environment:
write_timeout: 65s
read_timeout: 65s
combine_output: false
youtube-dl:
skip_build: true
image: rgee0/faas-youtubedl:0.4
environment:
write_timeout: 65s
read_timeout: 65s
combine_output: false
faas-cli up -f youtube2gif.yml
echo -n "https://www.youtube.com/watch?v=0Bmhjf0rKe8" | faas invoke youtube2gif "https://www.youtube.com/watch?v=0Bmhjf0rKe8" > cat-surprise.gif