| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| ############################## |
| |
| # Wskdeploy manifest for openwhisk-node-cloudant-trigger |
| # Installing openwhisk actions, triggers, and rules for OpenWhisk building block - Cloudant Trigger |
| |
| # Deployment using this manifest file creates following OpenWhisk components: |
| # Package: node-openwhisk-cloudant |
| # Package: node-cloudant-trigger |
| # Action: node-cloudant-trigger/process-change.js |
| # Sequence: node-cloudant-trigger/process-change-cloudant-sequence |
| # Trigger: node-data-inserted-trigger |
| # Rule: node-log-change-rule |
| |
| # This manifest file reads following env. variables: |
| # CLOUDANT_USERNAME |
| # CLOUDANT_PASSWORD |
| # CLOUDANT_DATABASE |
| |
| packages: |
| node-cloudant-trigger: |
| dependencies: |
| # binding cloudant package named node-openwhisk-cloudant |
| node-openwhisk-cloudant: |
| location: /whisk.system/cloudant |
| inputs: |
| username: $CLOUDANT_USERNAME |
| password: $CLOUDANT_PASSWORD |
| host: ${CLOUDANT_USERNAME}.cloudant.com |
| triggers: |
| # Trigger named "node-data-inserted-trigger" |
| # Creating trigger to fire events when data is inserted into database |
| node-data-inserted-trigger: |
| source: node-openwhisk-cloudant/changes |
| inputs: |
| dbname: $CLOUDANT_DATABASE |
| actions: |
| # Action named "process-change" |
| # Creating action that is printing data which is written to the database |
| process-change: |
| function: actions/process-change.js |
| |
| sequences: |
| # Sequence named "process-change-cloudant-sequence" |
| # Creating sequence to connect the cloudant "read" action with the "process-change" action |
| process-change-cloudant-sequence: |
| actions: node-openwhisk-cloudant/read, process-change |
| rules: |
| # Rule named "node-log-change-rule" |
| # Creating rule that maps database change trigger to sequence |
| node-log-change-rule: |
| trigger: node-data-inserted-trigger |
| action: process-change-cloudant-sequence |