-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoriginal-sample.yml
245 lines (228 loc) · 9.06 KB
/
original-sample.yml
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
tosca_definitions_version: tosca_simple_yaml_1_3
description: This is a demo short service blueprint.
node_types:
radon.nodes.VM.OpenStack:
derived_from: tosca.nodes.Compute
properties:
name:
type: string
image:
type: string
flavor:
type: string
description: OpenStack flavor id (flavor names are not accepted)
network:
type: string
description: OpenStack network id (network names are not accepted)
key_name:
type: string
description: OpenStack SSH key name that should be placed on the VM
attributes:
id:
type: string
description: OpenStack id of the VM
interfaces:
Standard:
type: tosca.interfaces.node.lifecycle.Standard
operations:
create:
inputs:
vm_name: { default: { get_property: [ SELF, name ] } }
implementation: nodetypes/vm/create.yml
delete:
inputs:
id: { default: { get_attribute: [ SELF, id ] } }
implementation: nodetypes/vm/delete.yml
radon.nodes.abstract.DataPipeline:
derived_from: tosca.nodes.Root
radon.nodes.nifi.Nifi:
derived_from: tosca.nodes.SoftwareComponent
properties:
component_version:
description: The version of Apache Nifi
type: string
required: true
port:
description: The port exposed by Apache Nifi
required: true
type: string
default: 8080
capabilities:
host:
type: tosca.capabilities.Container
# valid_source_types: [ radon.nodes.nifi.nifipipeline ]
interfaces:
Standard:
type: tosca.interfaces.node.lifecycle.Standard
operations:
create:
inputs:
tarball_version: { default: { get_property: [ SELF, component_version ] } }
implementation: nodetypes/radon/nodes/nifi/nifiplatform/files/create.yml
start:
implementation: nodetypes/radon/nodes/nifi/nifiplatform/files/start.yml
stop:
implementation: nodetypes/radon/nodes/nifi/nifiplatform/files/stop.yml
delete:
inputs:
tarball_version: { default: { get_property: [ SELF, component_version ] } }
implementation: nodetypes/radon/nodes/nifi/nifiplatform/files/delete.yml
configure:
inputs:
tarball_version: { default: { get_property: [ SELF, component_version ] } }
implementation: nodetypes/radon/nodes/nifi/nifiplatform/files/configure.yml
radon.nodes.nifi.nifipipeline:
derived_from: radon.nodes.abstract.DataPipeline
properties:
template_file:
type: string
description: XML implementation of the pipeline
template_name:
type: string
description: name of the pipeline
cred_file_path:
type: string
description: credential file for access and secret key
object_name:
type: string
description: object name in the process group
attributes:
id:
type: string
description: Unique ID of the pipeline
pipeline_type:
type: string
description: type of the pipeline. e.g. processor, process-groups, inputPorts, RPG etc
requirements:
- host:
capability: tosca.capabilities.Container
node: radon.nodes.nifi.Nifi
relationship: tosca.relationships.HostedOn
- connectToPipeline:
capability: tosca.capabilities.Endpoint
node: radon.nodes.nifi.nifipipeline
relationship: radon.relationships.datapipelines.ConnectNiFi
occurrences: [0, 1]
capabilities:
connectToPipeline:
type: tosca.capabilities.Endpoint
description: Capability to receive data from other pipeline nodes
valid_source_types: [ radon.nodes.nifi.nifipipeline ]
occurrences: [0, UNBOUNDED]
interfaces:
Standard:
type: tosca.interfaces.node.lifecycle.Standard
operations:
create:
inputs:
template_file: { default: { get_property: [ SELF, template_file ] } }
template_name: { default: { get_property: [ SELF, template_name ] } }
implementation: nodetypes/radon/nodes/nifi/nifipipeline/files/create.yml
start:
inputs:
pipeline_id: { default: { get_attribute: [ SELF, id ] } }
pipeline_type: { default: { get_attribute: [ SELF, pipeline_type ] } }
implementation: nodetypes/radon/nodes/nifi/nifipipeline/files/start.yml
stop:
inputs:
pipeline_id: { default: { get_attribute: [ SELF, id ] } }
pipeline_type: { default: { get_attribute: [ SELF, pipeline_type ] } }
implementation: nodetypes/radon/nodes/nifi/nifipipeline/files/stop.yml
configure:
inputs:
# pipeline_id: { default: { get_attribute: [ SELF, id ] } }
# pipeline_type: { default: { get_attribute: [ SELF, pipeline_type ] } }
cred_file_path: { default: { get_property: [ SELF, cred_file_path ] } }
object_name: { default: { get_property: [ SELF, object_name ] } }
implementation: nodetypes/radon/nodes/nifi/nifipipeline/files/configure.yml
delete:
inputs:
pipeline_id: { default: { get_attribute: [ SELF, id ] } }
pipeline_type: { default: { get_attribute: [ SELF, pipeline_type ] } }
implementation: nodetypes/radon/nodes/nifi/nifipipeline/files/delete.yml
relationship_types:
radon.relationships.datapipelines.ConnectNiFi:
derived_from: tosca.relationships.ConnectsTo
description: Connecting two nifi data pipelines for forwarding data. The pipelines should be on same server.
# valid_target_types: [ radon.nodes.nifi.nifipipeline ]
interfaces:
Configure:
operations:
post_configure_source:
inputs:
source_pipeline_id: { default: { get_attribute: [SOURCE, id] } }
target_pipeline_id: { default: { get_attribute: [TARGET, id] } }
source_pipeline_server_ip: { default: { get_attribute: [SOURCE, host, host, public_address] } }
target_pipeline_server_ip: { default: { get_attribute: [TARGET, host, host, public_address] } }
implementation:
primary: dpp/connectPipelines.yml
topology_template:
node_templates:
vmone:
type: radon.nodes.VM.OpenStack
properties:
name: vmone_centos1
image: 13a94b11-98ee-43a4-ad29-00ae97e8f790
flavor: m2.tiny
network: provider_64_net
key_name: macbook-chinmaya
vmtwo:
type: radon.nodes.VM.OpenStack
properties:
name: vmtwo_centos2
image: 13a94b11-98ee-43a4-ad29-00ae97e8f790
flavor: m2.tiny
network: provider_64_net
key_name: macbook-chinmaya
requirements:
- dependency: vmone
# INSTALL and CONFIGURE nifi on this instance
nifi_vmone:
type: radon.nodes.nifi.Nifi
requirements:
- host: vmone
properties:
component_version: "1.11.1"
# INSTALL and CONFIGURE nifi on this instance
nifi_vmtwo:
type: radon.nodes.nifi.Nifi
requirements:
- host: vmtwo
properties:
component_version: "1.11.1"
# This will RECEIVE the original image and the INVOKE the Lambda function (and receive the result from lambda)
pipeline2_invokeLmabda:
type: radon.nodes.nifi.nifipipeline
requirements:
- host: nifi_vmtwo
- connectToPipeline: pipeline3_pushImg
properties:
template_file: "/home/opera_0.5.2/DP_demo/V1/files/invokeLambda_PG.xml"
cred_file_path: "/home/opera_0.5.2/DP_demo/V1/files/credentials"
object_name: "invokeLambda"
# template name SHOULD MATCH with the name mentioned in the template file
template_name: "invokeLambda_PG"
# this will PUSH the thumbnail image to another bucket
pipeline3_pushImg:
type: radon.nodes.nifi.nifipipeline
requirements:
- host: nifi_vmtwo
properties:
template_file: "/home/opera_0.5.2/DP_demo/V1/files/pushToS3_PG.xml"
cred_file_path: "/home/opera_0.5.2/DP_demo/V1/files/credentials"
# below variable name is used only during the configuration
object_name: "PutS3Object"
# template name SHOULD MATCH with the name mentioned in the template file
template_name: "pushToS3_PG"
# This will READ the image files from S3 bucket
pipeline1_getS3Img:
type: radon.nodes.nifi.nifipipeline
requirements:
- host: nifi_vmone
- connectToPipeline: pipeline2_invokeLmabda
properties:
template_file: /home/opera_0.5.2/DP_demo/V1/files/readFrmS3_PG.xml
cred_file_path: "/home/opera_0.5.2/DP_demo/V1/files/credentials"
object_name: "ListS3"
# template name should match with the name mentioned in the template file
template_name: "readFrmS3_PG"