-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanifest.yaml
More file actions
50 lines (48 loc) · 1.75 KB
/
Copy pathmanifest.yaml
File metadata and controls
50 lines (48 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Manifest for Lost-And-Found-ML-IBM-Watson-Cloudant
# Source Repo is located at https://github.com/IBM/serverless-image-recognition
# Deployment using this manifest file creates following OpenWhisk components:
# Package: serverless-image-recognition
# Action: update-document-with-watson
# Trigger: update-trigger
# Rule: update-trigger-rule
# This manifest file expects following env. variables:
# CLOUDANT_IMAGE_DATABASE
# CLOUDANT_TAGS_DATABASE
# CLOUDANT_USERNAME
# CLOUDANT_PASSWORD
# WATSON_VISUAL_APIKEY
---
packages:
serverless-image-recognition:
dependencies:
# binding cloudant package named openwhisk-cloudant
serverless-pattern-cloudant-package:
location: /whisk.system/cloudant
inputs:
username: $CLOUDANT_USERNAME
password: $CLOUDANT_PASSWORD
host: ${CLOUDANT_USERNAME}.cloudant.com
actions:
# Action named "update-document-with-watson"
# Creating action as a regular Node.js action
update-document-with-watson:
function: actions/updateDocumentWithWatson.js
runtime: nodejs:8
inputs:
USERNAME: $CLOUDANT_USERNAME
PASSWORD: $CLOUDANT_PASSWORD
DBNAME: $CLOUDANT_IMAGE_DATABASE
DBNAME_PROCESSED: $CLOUDANT_TAGS_DATABASE
WATSON_VR_APIKEY: $WATSON_VISUAL_APIKEY
triggers:
# Creating the update-trigger trigger"
update-trigger:
feed: serverless-pattern-cloudant-package/changes
inputs:
dbname: $CLOUDANT_IMAGE_DATABASE
rules:
# Rule named "update-trigger-rule"
# Creating the rule that links the trigger to the sequence
update-trigger-rule:
trigger: update-trigger
action: update-document-with-watson1