blob: e1e0adbed57cd0baf784db7f0dc14f3769506777 (
plain)
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
|
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
- {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/cdap/14.0.2/cdap_types.yaml
- {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/dmaap/1.1.0/dmaap.yaml
inputs:
hello_world_jar_url:
type: string
connected_broker_dns_name:
type: string
default : "cdap_broker"
#aaf inputs
client_role:
type: string
topic00fqtn:
type: string
topic01fqtn:
type: string
aafu0:
type: string
default: "foo0"
aafp0:
type: string
default: "bar0"
aafu1:
type: string
default : "foo1"
aafp1:
type: string
default : "bar1"
aafu2:
type: string
default: "foo2"
aafp2:
type: string
default: "bar2"
aafu3:
type: string
default : "foo3"
aafp3:
type: string
default : "bar3"
node_templates:
topic00:
type: dcae.nodes.ExistingTopic
properties:
fqtn: { get_input : topic00fqtn }
topic01:
type: dcae.nodes.ExistingTopic
properties:
fqtn: { get_input : topic01fqtn }
hw_cdap_app:
type: dcae.nodes.MicroService.cdap
properties:
service_component_type:
'hello_world'
jar_url: { get_input : hello_world_jar_url }
artifact_name: "HelloWorld"
artifact_version: "3.4.3"
namespace: "cloudifyhwtest"
programs:
[{"program_type" : "flows", "program_id" : "WhoFlow"}, {"program_type" : "services", "program_id" : "Greeting"}]
streamname:
'who'
service_endpoints:
[{"service_name" : "Greeting", "service_endpoint" : "greet", "endpoint_method" : "GET"}]
#special key for CDAP plugin
connections:
streams_publishes:
- name: topic00 #MR pub 1
location: mtc5
client_role: { get_input: client_role }
type: message_router
config_key: "myconfigkey0"
aaf_username: { get_input: aafu0 }
aaf_password: { get_input: aafp0 }
- name: topic01 #MR pub 2
location: mtc5
client_role: { get_input: client_role }
type: message_router
config_key: "myconfigkey1"
aaf_username: { get_input: aafu1 }
aaf_password: { get_input: aafp1 }
streams_subscribes:
- name: topic00 #MEANT FOR DEMO ONLY! Subscribing and publishing to same topic. Not real example.
location: mtc5
client_role: { get_input: client_role }
type: message_router
config_key: "myconfigkey2"
aaf_username: { get_input: aafu2 }
aaf_password: { get_input: aafp2 }
- name: topic01
location: mtc5
client_role: { get_input: client_role }
type: message_router
config_key: "myconfigkey3"
aaf_username: { get_input: aafu3 }
aaf_password: { get_input: aafp3 }
relationships:
- type: dcae.relationships.publish_events
target: topic00 #MEANT FOR DEMO ONLY! Subscribing and publishing to same topic. Not real example.
- type: dcae.relationships.publish_events
target: topic01
- type: dcae.relationships.subscribe_to_events
target: topic00
- type: dcae.relationships.subscribe_to_events
target: topic01
interfaces:
cloudify.interfaces.lifecycle:
create:
inputs:
connected_broker_dns_name: { get_input: connected_broker_dns_name }
outputs:
hw_cdap_app_name:
value: {get_attribute:[hw_cdap_app, service_component_name]}
topic00_data:
description: "Topic 00 data"
value: { get_attribute: [hw_cdap_app, topic00]}
topic01_data:
description: "Topic 01 data"
value: { get_attribute: [hw_cdap_app, topic01]}
|