Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 6f4d23c

Browse files
authored
Merge pull request #59 from pritidesai/wskdeploy
Adding whisk deploy manifest and instructions to readme
2 parents c76ea52 + 3ece08a commit 6f4d23c

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,28 @@ wsk property get --cliversion
134134
```
135135

136136
# Alternative deployment methods
137-
`deploy.sh` will be replaced with [`wskdeploy`](https://github.com/openwhisk/openwhisk-wskdeploy) in the future. `wskdeploy` uses a manifest to deploy declared triggers, actions, and rules to OpenWhisk.
137+
138+
## Whisk Deploy
139+
Download latest `wskdeploy` from the [release page](https://github.com/apache/incubator-openwhisk-wskdeploy/releases) of [openwhisk-wskdeploy](https://github.com/apache/incubator-openwhisk-wskdeploy) project.
140+
141+
### Pre-requisites:
142+
* [Configure IBM Message Hub](#1-configure-ibm-message-hub)
143+
144+
145+
### Deployment
146+
```
147+
git clone https://github.com/IBM/ibm-cloud-functions-data-processing-message-hub.git
148+
cd ibm-cloud-functions-data-processing-message-hub
149+
wsk package refresh
150+
wskdeploy
151+
```
152+
153+
### Undeploy:
154+
```
155+
wskdeploy undeploy
156+
```
157+
158+
## One Click Deployment
138159

139160
You can also use the following button to clone a copy of this repository and deploy to the IBM Cloud as part of a DevOps toolchain. Supply your OpenWhisk and Message Hub credentials under the Delivery Pipeline icon, click Create, then run the Deploy stage for the Delivery Pipeline.
140161

manifest.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Manifest for ibm-cloud-functions-data-processing-message-hub
2+
# Repo is located at https://github.com/IBM/ibm-cloud-functions-data-processing-message-hub
3+
# Installing openwhisk actions, triggers, and rules for Message Hub sample app
4+
5+
# Deployment using this manifest file creates following OpenWhisk components:
6+
# Package: data-processing-message-hub
7+
# Action: data-processing-message-hub/receive-consume
8+
# Action: data-processing-message-hub/transform-produce
9+
# Sequence: data-processing-message-hub/message-processing-sequence
10+
# Trigger: message-trigger
11+
# Rule: message-rule
12+
13+
# This manifest file expects following env. variables:
14+
# KAFKA_INSTANCE
15+
# SRC_TOPIC
16+
# DEST_TOPIC
17+
packages:
18+
data-processing-message-hub:
19+
actions:
20+
# Action named "receive-consume"
21+
# Creating action as a regular Node.js action
22+
receive-consume:
23+
function: actions/receive-consume.js
24+
# Action named "transform-produce"
25+
transform-produce:
26+
function: actions/transform-produce.js
27+
inputs:
28+
topic: $DEST_TOPIC
29+
kafka: $KAFKA_INSTANCE
30+
sequences:
31+
# Sequence named "message-processing-sequence"
32+
# Creating the sequence that links the get and post actions
33+
message-processing-sequence:
34+
actions: receive-consume, transform-produce
35+
triggers:
36+
# Creating the message-trigger trigger"
37+
message-trigger:
38+
feed: Bluemix_${KAFKA_INSTANCE}_Credentials-1/messageHubFeed
39+
inputs:
40+
isJSONData: true
41+
topic: $SRC_TOPIC
42+
rules:
43+
# Rule named "message-rule"
44+
# Creating the rule that links the trigger to the sequence
45+
kafka-inbound-rule:
46+
trigger: message-trigger
47+
action: message-processing-sequence
48+

0 commit comments

Comments
 (0)