-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathplugin.yaml
315 lines (303 loc) · 11.9 KB
/
plugin.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# The tosca_definitions_version is a top-level property of the blueprint that #
# is used to specify the DSL version used. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
tosca_definitions_version: cloudify_dsl_1_2
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Plugin declarations allow the installation and use of Python modules #
# to perform different operations. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
plugins:
mist:
executor: central_deployment_agent
source: "https://github.com/mistio/cloudify-mist-plugin/archive/master.zip"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# data_types are groups of re-usable common set of properties together with #
# their types and default values. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
data_types:
cloudify.datatypes.mist.Config:
properties:
mist_token:
description: >
An API Token generated by Mist.io in order to be used with every request
to authenticate to the Mist.io API. Either a username/password combo or
a Mist.io Token has to be specified. In the former case, the username &
password will be used in order to auto-generate an API Token to be used
in subsequent API calls.
type: string
default: ''
mist_uri:
description: >
The Mist.io URI. Points to the Mist.io service that will handle the
workflows' execution. You should NOT this input, unless you are running
your own Mist.io installation. Defaults to the Mist.io SaaS.
type: string
default: https://mist.io
cloudify.datatypes.mist.MachineParams:
properties:
machine_id:
type: string
default: ''
cloud_id:
description: >
The cloud id on which the machine will be created. This is the mist.io
specific cloud id that is generated when adding a cloud on the platform.
type: string
default: ''
name:
description: >
The name to assign to a new VM. If not specified, one will be generated.
type: string
default: ''
key_id:
description: >
The ID or name of the SSH Key (that may already exists in Mist.io) to be
deployed on the newly provisioned VMs. If the key does not already exist,
it will be created.
type: string
default: ''
image_id:
description: >
The id of an image to be used on the newly created machine. This is the id
that is provided by the specific cloud platform.
type: string
default: ''
size_id:
description: >
The id of the VM size of the machine to be provisioned. Same as with the
machine image this is provider specific, e.g. 't2.micro' or 'm2.xxlarge'
for the AWS provider.
type: string
default: ''
location_id:
description: >
The location/region to create resources in. If the IaaS supports regions,
the region will have to be specified by its code and letter identifiers,
such as "us-east-1" for US East (N. Virginia) in case of Amazon Services.
type: string
default: ''
image_extra:
description: >
Image specific extra details. This is used only when provisioning machines
in Linode.
type: string
default: ''
disk:
description: >
The disk that this machine will have. This is only required when provisioning
Linode machines.
type: string
default: ''
script:
description: >
An inline script to run against the machine. For using scripts added to mist
use the script_id, script_params parameters
type: string
default: ''
monitoring:
description: >
This field indicates whether on not to enable monitoring on this machine.
type: boolean
default: false
ips:
description: >
A list of IPs to assign to this machine
default: []
networks:
description: >
A list of networks that this machine belongs to
default: []
docker_command:
description: >
Run a docker command
type: string
default: ''
script_id:
description: >
The id of a script that has been added to mist, to run against this machine.
type: string
default: ''
script_params:
description: >
Provides a list of parameters that will be provided to the script indicated
by the script_id above.
type: string
default: ''
# This is only used in OpenStack clouds
associate_floating_ip:
type: boolean
default: true
tags:
description: >
A set of tags to assign to this machine. The tags will should be
in the {'key':'provided_tag_key', 'value':'provided_tag_value'}
default: {}
node_types:
cloudify.mist.nodes.KeyPair:
derived_from: cloudify.nodes.Root
properties:
install_agent:
description: >
Indicates whether or not to install a Cloudify Agent on this host.
type: boolean
default: false
use_external_resource:
description: >
Indicate whether the resource exists or if Cloudify should create the resource.
type: boolean
default: false
resource_id:
description: >
Either the name or ID of the resource in Cloudify. If this is an existing
resource, you should provide the name or the ID of the resource in Amazon AWS.
type: string
default: ''
private_key_path:
description: >
The path where the key should be saved on the machine. If this is a bootstrap
process, this refers to the local computer. If this will run on the manager,
this will be saved on the manager.
type: string
default: ''
parameters:
description: >
The key value pair parameters required by Mist Client to use
the mist.client.backend.create_machine command.(backend_id,image_id
size_id, location_id, name, monitoring, ssh_user, networks)
default: {}
mist_config:
description: >
A dictionary of values to pass to authenticate with the Mist API.
type: cloudify.datatypes.mist.Config
interfaces:
cloudify.interfaces.lifecycle:
create: mist.plugin.keypair.create
delete: mist.plugin.keypair.delete
cloudify.interfaces.validation:
creation: mist.plugin.keypair.creation_validation
cloudify.mist.nodes.Server:
derived_from: cloudify.nodes.Compute
properties:
install_agent:
description: >
Indicates whether or not to install a Cloudify Agent on this host.
type: boolean
default: false
use_external_resource:
description: >
Indicate whether the resource exists or if Cloudify should create the resource.
type: boolean
default: false
resource_id:
description: >
Either the name or ID of the resource in Cloudify. If this is an existing
resource, you should provide the name or the ID of the resource in Mist.io.
type: string
default: ''
parameters:
description: >
The key value pair parameters required by Mist Client to use
the mist.client.backend.create_machine command.(backend_id,image_id
size_id, location_id, name, monitoring, ssh_user, networks )
type: cloudify.datatypes.mist.MachineParams
mist_config:
description: >
A dictionary of values to pass to authenticate with the Mist API.
type: cloudify.datatypes.mist.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: mist.plugin.server.create
inputs:
use_external_resource:
description: >
Indicate whether the resource exists or if Cloudify should create the resource.
type: boolean
default: false
mist_config:
description: >
A dictionary of values to pass to authenticate with the Mist API.
default: {}
start:
implementation: mist.plugin.server.start
inputs:
start_retry_interval:
description: Polling interval until the server is active in seconds
type: integer
default: 30
stop:
implementation: mist.plugin.server.stop
inputs:
mist_config:
description: >
A dictionary of values to pass to authenticate with the Mist API.
default: {}
delete:
implementation: mist.plugin.server.delete
inputs:
mist_config:
description: >
A dictionary of values to pass to authenticate with the Mist API.
default: {}
cloudify.interfaces.validation:
creation:
implementation: mist.plugin.server.creation_validation
inputs:
args:
default: {}
cloudify.mist.nodes.Network:
derived_from: cloudify.nodes.Network
properties:
install_agent:
default: false
use_external_resource:
description: >
Indicate whether the resource exists or if Cloudify should create the resource.
type: boolean
default: false
resource_id:
description: >
Either the name or ID of the resource in Cloudify. If this is an existing
resource, you should provide the name or the ID of the resource in Mist.io.
type: string
default: ''
parameters:
description: >
The key value pair parameters required by Mist Client to use
the mist.client.cloud.create_network command.(
{"network":{"name":"testnet","admin_state_up":true},
"subnet":{"name":"happy_subnet","ip_version":"4","cidr":"",
"gateway_ip":"","enable_dhcp":true,
"allocation_pools":[{"start":"","end":""}]}}: )
default: {}
mist_config:
description: >
A dictionary of values to pass to authenticate with the Mist API.
default: {}
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: mist.plugin.network.create
delete:
implementation: mist.plugin.network.delete
relationships:
cloudify.mist.relationships.server_connected_to_keypair:
derived_from: cloudify.relationships.connected_to
cloudify.mist.relationships.server_connected_to_network:
derived_from: cloudify.relationships.depends_on
target_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: mist.plugin.network.associate_network
inputs:
ip:
default: ''
assign:
default: true