YAML Deploy
Example: Packages with NodeJS and Python (with params, sequences)
ibmcloud fn deploy -m manifest-example-bookclub.yamlpackages:
packageNodeJS:
actions:
helloNodejs-1:
function: actions/hello.js
runtime: nodejs:8
inputs:
name:
type: string
description: name of a person
place:
type: string
description: location of a person
outputs:
payload:
type: string
description: a simple greeting message, Hello World!
helloNodejs-2:
function: actions/hello.js
runtime: nodejs:10
helloNodejs-3:
function: actions/hello.js
runtime: nodejs:10
inputs:
name:
type: string
description: name of a person
place:
type: string
description: location of a person
sequences:
helloworldnodejs-series:
actions: helloNodejs-1, helloNodejs-2, helloNodejs-3 #, hellowhisk/greeting, hellowhisk/httpGet, myhelloworlds/hello-js
triggers:
triggerNodeJS1:
rules:
ruleNodeJS1:
trigger: triggerNodeJS1
action: helloworldnodejs-series
packagePython:
actions:
helloPython-1:
function: actions/hello.py
runtime: python
inputs:
name:
type: string
description: name of a person
outputs:
payload:
type: string
description: a simple greeting message, Hello Henry!
helloPython-2:
function: actions/hello.py
runtime: python
inputs:
name:
type: string
description: name of a person
outputs:
payload:
type: string
description: a simple greeting message, Hello Alex!
helloPython-3:
function: actions/hello.py
runtime: python
sequences:
helloworldpython-series:
actions: helloPython-1, helloPython-2, helloPython-3 #, hellowhisk/greeting, hellowhisk/httpGet, helloworlds/hello-js
triggers:
triggerPython:
rules:
rulePython:
trigger: triggerPython
action: helloworldpython-seriesExample: "Book Club" APIs
where manifest.yaml has contents:
Last updated
Was this helpful?