UNPKG

1.45 kBMarkdownView Raw
1# Deploy
2
3This plugin (re)deploys the service to OpenWhisk.
4
5## How it works
6
7`Deploy` starts by hooking into the
8[`deploy:initializeResources`](/lib/plugins/deploy) lifecycle. It fetches the
9user credentials for the OpenWhisk service being used, storing them under
10`serverless.service.defaults`.
11
12### User Credentials
13
14The plugin attempts to parse configuration settings from the `.wskprops` file in the user's home directory. These
15settings can be set manually using the following environment parameters.
16
17- **OW_AUTH** - Authentication key for OpenWhisk provider.
18- **OW_APIHOST** - API endpoint for OpenWhisk provider.
19- **OW_NAMESPACE** - User namespace for OpenWhisk resources.
20
21If both the properties file and environment parameters are missing one of these
22values, an error will be thrown.
23
24**Note:** Other plugins (e.g. the `Compile Functions` plugin) use these
25`defaults` property when compiling resource definitions and using the OpenWhisk
26APIs.
27
28### Deploying Functions, Triggers, Rules and Feeds
29
30Next up it hooks into the [`deploy:deploy`](/lib/plugins/deploy) lifecycle and deploys the
31previously created resource definitions for Actions, Triggers, Feeds and Rules
32using the OpenWhisk APIs.
33
34Resources are deployed in the following order:
35
36- **Actions**
37- **Triggers**
38- **Feeds**
39- **Rules**
40
41Failure to deploy a single resource at any stage will cause the entire
42deployment to halt with the error message from the failed deployment.