You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/11/14 18:40:11 UTC

[GitHub] csantanapr commented on a change in pull request #3: stream install catalog with push package

csantanapr commented on a change in pull request #3: stream install catalog with push package
URL: https://github.com/apache/incubator-openwhisk-package-deploy/pull/3#discussion_r150924506
 
 

 ##########
 File path: packages/installCatalog.sh
 ##########
 @@ -4,49 +4,43 @@
 # automatically
 #
 # To run this command
-# ./installCatalog.sh <authkey> <edgehost> <apihost> <workers>
+# ./installCatalog.sh  <AUTH> <APIHOST> <WSK_CLI>
+# AUTH and APIHOST are found in $HOME/.wskprops
+# WSK_CLI="$OPENWHISK_HOME/bin/wsk"
 
 set -e
 set -x
 
-: ${OPENWHISK_HOME:?"OPENWHISK_HOME must be set and non-empty"}
-WSK_CLI="$OPENWHISK_HOME/bin/wsk"
-
 if [ $# -eq 0 ]
 then
-echo "Usage: ./installCatalog.sh <authkey> <edgehost> <apihost>"
+echo "Usage: ./installCatalog.sh <authkey> <apihost> <pathtowskcli>"
 fi
 
 AUTH="$1"
-EDGEHOST="$2"
-APIHOST="$3"
+APIHOST="$2"
+WSK_CLI="$3"
 
 # If the auth key file exists, read the key in the file. Otherwise, take the
 # first argument as the key itself.
 if [ -f "$AUTH" ]; then
     AUTH=`cat $AUTH`
 fi
 
-# Make sure that the EDGEHOST is not empty.
-: ${EDGEHOST:?"EDGEHOST must be set and non-empty"}
-
-# Make sure that the APIHOST is not empty.
-: ${APIHOST:?"APIHOST must be set and non-empty"}
-
 PACKAGE_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 export WSK_CONFIG_FILE= # override local property file to avoid namespace clashes
 
-echo Installing Deploy package.
+# wskdeploy actions
+
+echo Installing wskdeploy package.
 
-$WSK_CLI -i --apihost "$EDGEHOST" package update --auth "$AUTH" --shared yes deploy \
-     -a description 'Alarms and periodic utility' \
-     -a parameters '[ {"message":"theMessage", "required":true} ]' \
-     -p apihost "$APIHOST" \
-     -p trigger_payload ''
+$WSK_CLI -i --apihost "$APIHOST"  package update --auth "$AUTH"  --shared yes "deploy" \
+-a description "This package offers a convenient way for you to describe and deploy any part of the OpenWhisk programming model using a Manifest file written in YAML." \
+-a prettyName "Whisk Deploy"
 
-$WSK_CLI -i --apihost "$EDGEHOST" action update --auth "$AUTH" deploy/wskdeploy "$PACKAGE_HOME/actions/deploy.js" \
-     -a description 'Creates an action that allows you to run wskdeploy from OpenWhisk' \
-     -a parameters '[ {"name":"gitUrl", "required":true, "bindTime":true, "description": "The URL to the GitHub repository to deploy"}, {"name":"manifestPath", "required":false, "bindTime":true, "description": "The relative path to the manifest file from the GitHub repo root"},{"name":"wskApiHost", "required":false, "description": "The URL of the OpenWhisk api host you want to use"}, {"name":"envData", "required":false, "description": "Blueprint-specific environment data object"} ]' \
-     -a sampleInput '{"gitUrl":"github.com/my_blueprint", "manifestPath":"runtimes/swift", "wskApiHost":"openwhisk.stage1.ng.bluemix.net", "envData": "{\"KAFKA_ADMIN_URL\":\"https://my_kafka_service\", \"MESSAGEHUB_USER\":\"MY_MESSAGEHUB_USERNAME\"}"}' \
-     --docker "openwhisk/wskdeploy:0.8.9.2"
+$WSK_CLI -i --apihost "$APIHOST" action update --auth "$AUTH" "deploy/wskdeploy" "$PACKAGE_HOME/actions/deploy.js" \
+-a description 'Creates an action that allows you to run wskdeploy from OpenWhisk' \
+-a parameters '[ {"name":"gitUrl", "required":true, "bindTime":true, "description": "The URL to the GitHub repository to deploy"}, {"name":"manifestPath", "required":false, "bindTime":true, "description": "The relative path to the manifest file from the GitHub repo root"},{"name":"wskApiHost", "required":false, "description": "The URL of the OpenWhisk api host you want to use"}, {"name":"envData", "required":false, "description": "Blueprint-specific environment data object"} ]' \
+-a sampleInput '{"gitUrl":"github.com/my_blueprint", "manifestPath":"runtimes/swift", "wskApiHost":"$APIHOST", "envData": "{\"KAFKA_ADMIN_URL\":\"https://my_kafka_service\", \"MESSAGEHUB_USER\":\"MY_MESSAGEHUB_USERNAME\"}"}' \
+--docker "openwhisk/wskdeploy:0.8.9.2"
 
 Review comment:
   Can you parameterized this value `openwhisk/wskdeploy:0.8.9.2` here?
   
   This way is easier to override from calling script like ansible.
   
   Have the script take an additional argument if not passed then use default value of `openwhisk/wskdeploy:0.8.9.2` at the top of this script
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services