17
17
#
18
18
-->
19
19
20
- # Apache OpenWhisk Composer
20
+ # @ ibm-functions/composer
21
21
22
- [ ![ Travis] ( https://travis-ci.com/apache/openwhisk- composer.svg?branch=master )] ( https://travis-ci.com/apache/openwhisk- composer )
22
+ [ ![ Travis] ( https://travis-ci.org/ibm-functions/ composer.svg?branch=master )] ( https://travis-ci.org/ibm-functions/ composer )
23
23
[ ![ License] ( https://img.shields.io/badge/license-Apache%202.0-blue.svg )] ( https://opensource.org/licenses/Apache-2.0 )
24
24
[ ![ Join
25
25
Slack] ( https://img.shields.io/badge/join-slack-9B69A0.svg )] ( http://slack.openwhisk.org/ )
@@ -47,7 +47,7 @@ This repository includes:
47
47
Composer is distributed as Node.js package. To install this package, use the
48
48
Node Package Manager:
49
49
```
50
- npm install -g openwhisk- composer
50
+ npm install -g @ibm-functions/ composer
51
51
```
52
52
We recommend installing the package globally (with ` -g ` option) if you intend to
53
53
use the ` compose ` and ` deploy ` commands to compile and deploy compositions.
@@ -57,7 +57,7 @@ use the `compose` and `deploy` commands to compile and deploy compositions.
57
57
A composition is typically defined by means of a JavaScript expression as
58
58
illustrated in [ samples/demo.js] ( samples/demo.js ) :
59
59
``` javascript
60
- const composer = require (' openwhisk- composer' )
60
+ const composer = require (' @ibm-functions/ composer' )
61
61
62
62
module .exports = composer .if (
63
63
composer .action (' authenticate' , { action : function ({ password }) { return { value: password === ' abc123' } } }),
@@ -98,17 +98,17 @@ existing definitions.
98
98
## Running a composition
99
99
100
100
The ` demo ` composition may be invoked like any action, for instance using the
101
- OpenWhisk CLI:
101
+ [ IBM Cloud CLI] ( https://cloud.ibm.com/docs/cli ) :
102
102
```
103
- wsk action invoke demo -p password passw0rd
103
+ ibmcloud fn action invoke demo -p password passw0rd
104
104
```
105
105
```
106
106
ok: invoked /_/demo with id 09ca3c7f8b68489c8a3c7f8b68b89cdc
107
107
```
108
108
The result of this invocation is the result of the last action in the
109
109
composition, in this case the ` failure ` action since the password in incorrect:
110
110
```
111
- wsk activation result 09ca3c7f8b68489c8a3c7f8b68b89cdc
111
+ ibmcloud fn activation result 09ca3c7f8b68489c8a3c7f8b68b89cdc
112
112
```
113
113
``` json
114
114
{
@@ -119,7 +119,7 @@ wsk activation result 09ca3c7f8b68489c8a3c7f8b68b89cdc
119
119
120
120
This invocation creates a trace, i.e., a series of activation records:
121
121
```
122
- wsk activation list
122
+ ibmcloud fn activation list
123
123
```
124
124
<pre >
125
125
Datetime Activation ID Kind Start Duration Status Entity
@@ -211,9 +211,8 @@ combinators or the `async` combinator.
211
211
# Installation from Source
212
212
213
213
To install composer from a source release, download the composer source code
214
- from the [ Apache OpenWhisk
215
- Downloads] ( https://openwhisk.apache.org/downloads.html ) page, rename the release
216
- tarball to ` openwhisk-composer.tgz ` and install it with command:
214
+ from [ our GitHub repo] ( https://github.com/ibm-functions/composer/releases ) ,
215
+ rename the release tarball to ` composer.tgz ` and install it with command:
217
216
``` shell
218
- npm install -g openwhisk- composer.tgz
217
+ npm install -g composer.tgz
219
218
```
0 commit comments