-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplugin_1_4.yaml
163 lines (148 loc) · 4.77 KB
/
plugin_1_4.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
plugins:
sl:
executor: central_deployment_agent
package_name: cloudify-serverless-plugin
package_version: '0.1.3'
data_types:
cloudify.types.serverless.ServerlessConfig:
properties:
executable_path:
type: string
default: ''
description: File path to Serverless binary. Leave blank and Cloudify will store the binary.
cloudify.types.serverless.ClientConfig:
properties:
provider:
type: string
description: The Serverless provider name.
required: false
credentials:
type: dict
required: false
description: Credentials of the provider.
cloudify.types.serverless.ServiceConfig:
properties:
name:
type: string
description: The Serverless service name.
required: true
template:
type: string
description: Template for the service.
required: true
template_url:
type: string
description: Template URL for the service. Supports GitHub, BitBucket.
required: false
template_path:
type: string
description: Template local path for the service.
required: false
functions:
type: list
required: true
description: List of cloudify.types.serverless.FunctionConfig.
env:
type: dict
required: false
description: >
A dict of environment variables to use during execution of serverless CLI calls.
# For example, you can provide AWS credentials:
# env:
# AWS_ACCESS_KEY_ID: { get_secret: AWS_ACCESS_KEY_ID }
# AWS_SECRET_ACCESS_KEY: { get_secret: AWS_SECRET_ACCESS_KEY }
cloudify.types.serverless.FunctionConfig:
properties:
name:
type: string
description: The Serverless function name.
required: true
handler:
type: string
description: The Serverless function handelr.
required: true
events:
type: list
description: List of events assoicated with the function.
required: false
environment:
type: dict
description: Function environment variables.
required: false
dsl_definitions:
serverless_configuration: &serverless_config
serverless_config:
type: cloudify.types.serverless.ServerlessConfig
use_external_resource_desc: &use_external_resource_desc >
Indicate whether the resource exists or if Cloudify should create the resource,
true if you are bringing an existing resource, false if you want cloudify to create it.
external_resource: &external_resource
use_external_resource:
description: *use_external_resource_desc
type: boolean
default: false
node_types:
cloudify.nodes.serverless.Binary:
derived_from: cloudify.nodes.SoftwareComponent
properties:
<<: *serverless_config
<<: *external_resource
installation_source:
type: string
default: 'https://github.com/serverless/serverless/releases/download/v3.22.0/serverless-linux-x64'
description: >
Location to download the Helm installation from. Ignored if 'use_existing_resource' is true.
max_sleep_time:
type: integer
default: 300
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: sl.serverless_plugin.tasks.install_binary
delete:
implementation: sl.serverless_plugin.tasks.uninstall_binary
cloudify.nodes.serverless.Service:
derived_from: cloudify.nodes.SoftwareComponent
properties:
<<: *serverless_config
<<: *external_resource
client_config:
type: cloudify.types.serverless.ClientConfig
description: Configure the Serverless provider and client credentials.
required: true
resource_config:
type: cloudify.types.serverless.ServiceConfig
required: true
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: sl.serverless_plugin.tasks.create
configure:
implementation: sl.serverless_plugin.tasks.configure
start:
implementation: sl.serverless_plugin.tasks.start
poststart:
implementation: sl.serverless_plugin.tasks.poststart
stop:
implementation: sl.serverless_plugin.tasks.stop
delete:
implementation: sl.serverless_plugin.tasks.delete
serverless.interface:
invoke:
implementation: sl.serverless_plugin.tasks.invoke
inputs:
functions:
default: []
metrics:
implementation: sl.serverless_plugin.tasks.metrics
inputs:
functions:
default: []
blueprint_labels:
obj-type:
values:
- serverless
labels:
obj-type:
values:
- serverless