This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathmanifest.yaml
61 lines (58 loc) · 2.33 KB
/
manifest.yaml
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
51
52
53
54
55
56
57
58
59
60
61
# Manifest for openwhisk-data-processing-cloudant
# Repo is located at https://github.com/IBM/openwhisk-data-processing-cloudant
# Installing openwhisk actions, triggers, and rules for Cloudant sample
# Deployment using this manifest file creates following OpenWhisk components:
# Package: openwhisk-cloudant
# Package: data-processing
# Action: data-processing/write-to-cloudant
# Action: data-processing/write-from-cloudant
# Sequence: data-processing/write-from-cloudant-sequence
# Trigger: image-uploaded
# Rule: echo-images
# This manifest file expects following env. variables:
# CLOUDANT_HOSTNAME
# CLOUDANT_USERNAME
# CLOUDANT_PASSWORD
# CLOUDANT_DATABASE
package:
name: data-processing
namespace: _
dependencies:
# binding cloudant package named openwhisk-cloudant
openwhisk-cloudant:
location: /whisk.system/cloudant
inputs:
username: $CLOUDANT_USERNAME
password: $CLOUDANT_PASSWORD
host: $CLOUDANT_HOSTNAME
triggers:
# Trigger named "image-uploaded"
# Creating trigger to fire events when data is inserted
image-uploaded:
source: openwhisk-cloudant/changes
inputs:
dbname: $CLOUDANT_DATABASE
actions:
# Action named "write-to-cloudant"
# Creating action that is manually invoked to write to the database
write-to-cloudant:
location: actions/write-to-cloudant.js
inputs:
CLOUDANT_USERNAME: $CLOUDANT_USERNAME
CLOUDANT_PASSWORD: $CLOUDANT_PASSWORD
CLOUDANT_DATABASE: $CLOUDANT_DATABASE
# Action named "write-from-cloudant"
# Creating action to respond to database insertions
write-from-cloudant:
location: actions/write-from-cloudant.js
sequences:
# Sequence named "write-from-cloudant-sequence"
# Creating sequence that ties database read to handling action
write-from-cloudant-sequence:
actions: openwhisk-cloudant/read, write-from-cloudant
rules:
# Rule named "echo-images"
# Creating rule that maps database change trigger to sequence
echo-images:
trigger: image-uploaded
action: data-processing/write-from-cloudant-sequence