daisy-ycguo commented on issue #365: Bluemix Stage 1 errors creating triggers
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/365#issuecomment-323935140
 
 
   @zachschultz I checked this case in my environment, but I didn't meet with 
errors. Please refer to my steps and let me know what happens in your 
environment. Thank you.
   
   Have a clean OpenWhisk environment firstly and have the latest version of 
wskdeploy.
   
   1. Create a Cloudant service in Bluemix, with the service name as 
"openwhisk-cloudant", creating a database named "cats".
   2. Check out your source code `zachschultz/owbp-cloudant-trigger`
   3. Set environment values ( make sure to run this step and set the correct 
values. Refer to [this 
page](https://console.bluemix.net/docs/services/Cloudant/getting-started.html#getting-started-with-cloudant)
 to get the correct values of HOSTNAME,USERNAME and PASSWORD.)
   ```
   export CLOUDANT_HOSTNAME=f24a57b7-0167-bluemix.cloudant.com
   export CLOUDANT_DATABASE="cats"
   export CLOUDANT_USERNAME="f24a57b7-0167-bluemix"
   export CLOUDANT_PASSWORD="24b84123bd42b1d3e"
   ```
   4. Run WskDeploy:
   `wskdeploy -m ~/workspace/owbp-cloudant-trigger/runtimes/node/manifest.yaml`
   Then you will see a deployment success message:
   ```
   2017/08/22 06:16:25 Deploying package cloudant-trigger ... 
   2017/08/22 06:16:26 Done!
   Deploying dependency openwhisk-cloudant ... 
   2017/08/22 06:16:26 Deploying package bindingopenwhisk-cloudant ... 
   2017/08/22 06:16:27 Done!
   2017/08/22 06:16:27 Deploying action cloudant-trigger/process-change ... 
   2017/08/22 06:16:27 Done!
   2017/08/22 06:16:27 Deploying action 
cloudant-trigger/process-change-cloudant-sequence ... 
   2017/08/22 06:16:27 Done!
   2017/08/22 06:16:27 Deploying trigger feed data-inserted-trigger ... 
   Done!
   Deploying rule log-change-rule ... Done!
   
   Deployment completed successfully.
   ```
   5. Begin streaming the OpenWhisk activation log in a second terminal window 
by `wsk activation poll`
   6. add a document to `cats` database from the Cloudant WebUI in Bluemix, 
   ```
   {
     "_id": "5899d103fbd5a7770fb4d34105b8277e",
     "name": "hello world",
     "color": "blue"
   }
   ```
   7. Check the OpenWhisk activation log, you will see the successful 
invocation:
   ```
   Activation: process-change (0f1995b7e8ae410498764be8653c12cd)
   [
       "2017-08-22T06:33:06.910107729Z stdout: hello world",
       "2017-08-22T06:33:06.910175137Z stdout: blue",
       "2017-08-22T06:33:06.910184627Z stdout: A blue cat named hello world was 
added."
   ]
   
   Activation: read (7eae3fbf35f441aeb06392901e3ce753)
   [
       "2017-08-22T06:33:06.832994483Z stdout: success { _id: 
'5899d103fbd5a7770fb4d34105b8277e',",
       "2017-08-22T06:33:06.833026012Z stdout: _rev: 
'2-6ebc654e16f02a8dd9b1dc62d4e5df74',",
       "2017-08-22T06:33:06.83303362Z  stdout: name: 'hello world',",
       "2017-08-22T06:33:06.833039425Z stdout: color: 'blue' }"
   ]
   
   Activation: process-change-cloudant-sequence 
(91e773991eb540409fe9d5bfbaa32fa4)
   [
       "7eae3fbf35f441aeb06392901e3ce753",
       "0f1995b7e8ae410498764be8653c12cd"
   ]
   
   Activation: log-change-rule (c2e1d7c4b3294d47b14fd6d7d749dd04)
   []
   
   Activation: data-inserted-trigger (590d300c97d142f8b055ff8bd6261af8)
   []
   ```
   
   Regards
   Daisy
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to