openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From japet...@apache.org
Subject [incubator-openwhisk-package-kafka] branch master updated: Optionally Install Producer Action (#305)
Date Fri, 09 Nov 2018 23:53:56 GMT
This is an automated email from the ASF dual-hosted git repository.

japetrsn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-kafka.git


The following commit(s) were added to refs/heads/master by this push:
     new 496467e  Optionally Install Producer Action (#305)
496467e is described below

commit 496467e2930530fc53a3b194c6c8ca73030cd5f1
Author: James Dubee <jwdubee@us.ibm.com>
AuthorDate: Fri Nov 9 18:53:52 2018 -0500

    Optionally Install Producer Action (#305)
    
    * Optionally Install Producer Action
    
    * Use Environment Variable
---
 installCatalog.sh | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/installCatalog.sh b/installCatalog.sh
index 855e6be..552619e 100755
--- a/installCatalog.sh
+++ b/installCatalog.sh
@@ -15,7 +15,7 @@ WSK_CLI="$OPENWHISK_HOME/bin/wsk"
 
 if [ $# -eq 0 ]
 then
-echo "Usage: ./installCatalog.sh <authkey> <edgehost> <dburl> <dbprefix>
<apihost>"
+echo "Usage: ./installCatalog.sh <authkey> <edgehost> <dburl> <dbprefix>
<apihost> <workers>"
 fi
 
 AUTH="$1"
@@ -24,6 +24,7 @@ DB_URL="$3"
 DB_NAME="${4}ow_kafka_triggers"
 APIHOST="$5"
 WORKERS="$6"
+INSTALL_PRODUCE_ACTION=${INSTALL_PRODUCE_ACTION:="true"}
 
 # If the auth key file exists, read the key in the file. Otherwise, take the
 # first argument as the key itself.
@@ -105,10 +106,12 @@ $WSK_CLI -i --apihost "$EDGEHOST" action update --kind nodejs:6 messagingWeb/mes
     -a description 'Write a new trigger to MH provider DB' \
     -a parameters '[ {"name":"kafka_brokers_sasl", "required":true, "description": "Array
of Message Hub brokers"},{"name":"user", "required":true, "description": "Message Hub username"},{"name":"password",
"required":true, "description": "Message Hub password", "type":"password"},{"name":"topic",
"required":true, "description": "Topic to subscribe to"},{"name":"isJSONData", "required":false,
"description": "Attempt to parse message value as JSON"},{"name":"isBinaryKey", "required":false
[...]
 
-$WSK_CLI -i --apihost "$EDGEHOST" action update messaging/messageHubProduce "$PACKAGE_HOME/action/messageHubProduce.py"
\
-    --auth "$AUTH" \
-    --kind python:3 \
-    -a deprecated true \
-    -a description 'Deprecated - Produce a message to Message Hub' \
-    -a parameters '[ {"name":"kafka_brokers_sasl", "required":true, "description": "Array
of Message Hub brokers"},{"name":"user", "required":true, "description": "Message Hub username"},{"name":"password",
"required":true, "description": "Message Hub password", "type":"password"},{"name":"topic",
"required":true, "description": "Topic that you wish to produce a message to"},{"name":"value",
"required":true, "description": "The value for the message you want to produce"},{"name":"key",
" [...]
-    -a sampleInput '{"kafka_brokers_sasl":"[\"kafka01-prod01.messagehub.services.us-south.bluemix.net:9093\"]",
"username":"someUsername", "password":"somePassword", "topic":"mytopic", "value": "This is
my message"}'
+if [ $INSTALL_PRODUCE_ACTION == "true" ]; then
+  $WSK_CLI -i --apihost "$EDGEHOST" action update messaging/messageHubProduce "$PACKAGE_HOME/action/messageHubProduce.py"
\
+      --auth "$AUTH" \
+      --kind python:3 \
+      -a deprecated true \
+      -a description 'Deprecated - Produce a message to Message Hub' \
+      -a parameters '[ {"name":"kafka_brokers_sasl", "required":true, "description": "Array
of Message Hub brokers"},{"name":"user", "required":true, "description": "Message Hub username"},{"name":"password",
"required":true, "description": "Message Hub password", "type":"password"},{"name":"topic",
"required":true, "description": "Topic that you wish to produce a message to"},{"name":"value",
"required":true, "description": "The value for the message you want to produce"},{"name":"key",
[...]
+      -a sampleInput '{"kafka_brokers_sasl":"[\"kafka01-prod01.messagehub.services.us-south.bluemix.net:9093\"]",
"username":"someUsername", "password":"somePassword", "topic":"mytopic", "value": "This is
my message"}'
+fi


Mime
View raw message