Skip to content

Commit 219dc6e

Browse files
committed
Updating OpenWhisk provider plugin instructions
See serverless/serverless#5015
1 parent 0a76938 commit 219dc6e

File tree

28 files changed

+71
-180
lines changed

28 files changed

+71
-180
lines changed

openwhisk-go-simple/README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Project Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Compile Go Binary
15+
## 2. Compile Go Binary
1916

2017
```
2118
$ env GOOS=linux GOARCH=amd64 go build handler.go
2219
```
2320

24-
## 4. Deploy
21+
## 3. Deploy
2522
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2623

2724
```
@@ -42,7 +39,7 @@ actions:
4239
go-service-dev-greeting
4340
```
4441

45-
## 5. Invoke deployed function
42+
## 4. Invoke deployed function
4643
`serverless invoke --function greeting` or `serverless invoke -f greeting`
4744

4845
`-f` is shorthand for `--function`

openwhisk-go-simple/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"name": "openwhisk-go-simple",
33
"version": "0.1.0",
44
"description": "Example demonstrates how to setup a simple Go function with OpenWhisk.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
5+
"dependencies": {
6+
"serverless-openwhisk": ">=0.13.0"
87
}
98
}

openwhisk-node-and-docker-chaining-functions/README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Service Dependencies & Provider Plugin
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

2118
```
@@ -38,7 +35,7 @@ actions:
3835
testing-dev-location_sunrise_sunset testing-dev-sunrise_sunset testing-dev-location_from_address testing-dev-jq
3936
```
4037

41-
## 4. Invoke sequence function
38+
## 3. Invoke sequence function
4239
`serverless invoke -f location_sunrise_sunset -d '{"address": "london"}'`
4340

4441
`-f` is also shorthand for `--function`

openwhisk-node-and-docker-chaining-functions/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"name": "openwhisk-node-and-docker-chaining-functions",
33
"version": "0.1.0",
44
"description": "Example of chaining function calls using sequences and docker images.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
5+
"dependencies": {
6+
"serverless-openwhisk": ">=0.13.0"
87
}
98
}

openwhisk-node-chaining-functions/README.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,13 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Provider Plugin & Service Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

21-
Make a note of the API endpoint that is logged to the console during deployment.
22-
23-
```
24-
Serverless: Configured API endpoint: https://xxx-yyy-zzz-gws.api-gw.mybluemix.net/my_service
25-
```
26-
27-
## 4. Invoke sequence function
18+
## 3. Invoke sequence function
2819
`serverless invoke --function chained_seq --data '{"message": "a b c d e"}'`
2920

3021
`-f` is also shorthand for `--function`
@@ -37,7 +28,7 @@ In your terminal window you should see the response from Apache OpenWhisk
3728
}
3829
```
3930

40-
## 5. Invoke chained function
31+
## 4. Invoke chained function
4132
`serverless invoke --function manual_seq --data '{"message": "a b c d e"}'`
4233

4334
`-f` is also shorthand for `--function`

openwhisk-node-chaining-functions/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"name": "openwhisk-node-chaining-functions",
33
"version": "0.1.0",
44
"description": "Example of chaining function calls using sequences and the sdk.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
5+
"dependencies": {
6+
"serverless-openwhisk": ">=0.13.0"
87
}
98
}

openwhisk-node-scheduled-cron/README.md

+2-41
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,10 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Provider Plugin & Service Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

21-
Make a note of the API endpoint that is logged to the console during deployment.
22-
23-
```
24-
Serverless: Configured API endpoint: https://xxx-yyy-zzz-gws.api-gw.mybluemix.net/my_service
25-
```
26-
27-
## 4. Invoke deployed function
28-
`serverless invoke --function time` or `serverless invoke -f time`
29-
30-
`-f` is shorthand for `--function`
31-
32-
In your terminal window you should see the response from Apache OpenWhisk
33-
34-
```bash
35-
{
36-
"payload": "The time in Europe/London is: 16:01:14."
37-
}
38-
```
39-
40-
## 5. Test HTTP endpoint
41-
42-
Use a HTTP client to access the endpoint for your function. The endpoint will
43-
be the API gateway root path, logged during deployment, and your configured
44-
function path.
45-
46-
```
47-
$ http get https://xxx-yyy-zzz-gws.api-gw.mybluemix.net/my_service/time
48-
{
49-
"payload": "The time in Europe/London is: 16:01:07."
50-
}
51-
$ http get https://xxx-yyy-zzz-gws.api-gw.mybluemix.net/my_service/time?timezone=Europe/Berlin
52-
{
53-
"payload": "The time in Europe/Berlin is: 17:01:11."
54-
}
55-
```
56-
5718
**For more information on the Serverless OpenWhisk plugin, please see the project repository: [https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).**

openwhisk-node-scheduled-cron/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"name": "openwhisk-node-scheduled-cron",
33
"version": "0.1.0",
44
"description": "Example of creating a function that runs as a cron job using the serverless schedule event.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
5+
"dependencies": {
6+
"serverless-openwhisk": ">=0.13.0"
87
}
98
}

openwhisk-node-simple-http-endpoint/README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Provider Plugin & Service Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

2118
Make a note of the API endpoint that is logged to the console during deployment.
@@ -24,7 +21,7 @@ Make a note of the API endpoint that is logged to the console during deployment.
2421
Serverless: Configured API endpoint: https://xxx-yyy-zzz-gws.api-gw.mybluemix.net/my_service
2522
```
2623

27-
## 4. Invoke deployed function
24+
## 3. Invoke deployed function
2825
`serverless invoke --function time` or `serverless invoke -f time`
2926

3027
`-f` is shorthand for `--function`
@@ -37,7 +34,7 @@ In your terminal window you should see the response from Apache OpenWhisk
3734
}
3835
```
3936

40-
## 5. Test HTTP endpoint
37+
## 4. Test HTTP endpoint
4138

4239
Use a HTTP client to access the endpoint for your function. The endpoint will
4340
be the API gateway root path, logged during deployment, and your configured

openwhisk-node-simple-http-endpoint/package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
"name": "openwhisk-node-simple-http",
33
"version": "0.1.0",
44
"description": "Example demonstrates how to setup a simple HTTP GET endpoint with OpenWhisk.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
95
"dependencies": {
10-
"moment-timezone": "^0.5.11"
6+
"moment-timezone": "^0.5.11",
7+
"serverless-openwhisk": ">=0.13.0"
118
}
129
}

openwhisk-node-simple/README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Provider Plugin & Service Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

21-
## 4. Invoke deployed function
18+
## 3. Invoke deployed function
2219
`serverless invoke --function hello_world` or `serverless invoke -f hello_world`
2320

2421
`-f` is shorthand for `--function`

openwhisk-node-simple/package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
"name": "openwhisk-node-simple",
33
"version": "0.1.0",
44
"description": "Simple example demonstrating OpenWhisk provider support.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
95
"dependencies": {
10-
"left-pad": "^1.1.3"
6+
"left-pad": "^1.1.3",
7+
"serverless-openwhisk": ">=0.13.0"
118
}
129
}

openwhisk-php-simple/README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Project Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

2118
```
@@ -36,7 +33,7 @@ actions:
3633
php-service-dev-greeting
3734
```
3835

39-
## 4. Invoke deployed function
36+
## 3. Invoke deployed function
4037
`serverless invoke --function greeting` or `serverless invoke -f greeting`
4138

4239
`-f` is shorthand for `--function`

openwhisk-php-simple/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"name": "openwhisk-php-simple",
33
"version": "0.1.0",
44
"description": "Example demonstrates how to setup a simple PHP function with OpenWhisk.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
5+
"dependencies": {
6+
"serverless-openwhisk": ">=0.13.0"
87
}
98
}

openwhisk-python-scheduled-cron/README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Project Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

2118
```
@@ -46,7 +43,7 @@ rules:
4643
python_service_cron_schedule_rule
4744
```
4845

49-
## 4. Monitor function logs
46+
## 3. Monitor function logs
5047

5148
After sixty seconds the function should be executed and you can review the
5249
logging output using `serverless logs --function cron` or `serverless logs -f cron`

openwhisk-python-scheduled-cron/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"name": "openwhisk-python-scheduled-cron",
33
"version": "0.1.0",
44
"description": "Example of creating a Python function that runs as a cron job using the serverless schedule event.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
5+
"dependencies": {
6+
"serverless-openwhisk": ">=0.13.0"
87
}
98
}

openwhisk-python-simple-http-endpoint/README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ Make sure `serverless` is installed. [See installation guide](https://serverless
99

1010
You will also need to set up your OpenWhisk account credentials using environment variables or a configuration file. Please see the [this guide for more information](https://serverless.com/framework/docs/providers/openwhisk/guide/credentials/).
1111

12-
## 1. Install Provider Plugin
13-
`npm install -g serverless-openwhisk`
14-
15-
## 2. Install Service Dependencies
12+
## 1. Install Project Dependencies
1613
`npm install` in this directory to download the modules from `package.json`.
1714

18-
## 3. Deploy
15+
## 2. Deploy
1916
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
2017

2118
Make a note of the API endpoint that is logged to the console during deployment.
@@ -25,7 +22,7 @@ endpoints:
2522
GET https://xxx.api-gw.mybluemix.net/python-service/ping --> python-service-dev-currentTime
2623
```
2724

28-
## 4. Invoke deployed function
25+
## 3. Invoke deployed function
2926
`serverless invoke --function currentTime` or `serverless invoke -f currentTime`
3027

3128
`-f` is shorthand for `--function`
@@ -38,7 +35,7 @@ In your terminal window you should see the response from Apache OpenWhisk
3835
}
3936
```
4037

41-
## 5. Test HTTP endpoint
38+
## 4. Test HTTP endpoint
4239

4340
Use a HTTP client to access the endpoint for your function. The endpoint will
4441
be the API gateway root path, logged during deployment, and your configured

openwhisk-python-simple-http-endpoint/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"name": "openwhisk-python-simple-http-endpoint",
33
"version": "0.1.0",
44
"description": "Example demonstrates how to setup a simple HTTP GET endpoint with OpenWhisk.",
5-
"scripts": {
6-
"postinstall": "npm link serverless-openwhisk",
7-
"test": "echo \"Error: no test specified\" && exit 1"
5+
"dependencies": {
6+
"serverless-openwhisk": ">=0.13.0"
87
}
98
}

0 commit comments

Comments
 (0)