fix copyright from 2018 to 2017-2018
[dcaegen2/platform/plugins.git] / docker / examples / blueprint-laika-dmaap-subs.yaml
1 tosca_definitions_version: cloudify_dsl_1_3
2
3 description: >
4   This Blueprint installs a chain of two laika instances on a Docker cluster
5
6 imports:
7   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
8   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/docker/2.2.0/node-type.yaml
9   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/relationship/1.0.0/node-type.yaml
10   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/dmaap/1.1.0/dmaap.yaml
11
12
13 inputs:
14
15   service_id:
16     description: Unique id used for an instance of this DCAE service. Use deployment id
17     default: 'foobar'
18
19   topic00_aaf_username:
20   topic00_aaf_password:
21   topic00_location:
22     default: mtc5
23   topic00_client_role:
24
25   topic01_aaf_username:
26   topic01_aaf_password:
27   topic01_location:
28     default: mtc5
29   topic01_client_role:
30
31   feed00_location:
32     default: mtc5
33
34   feed01_location:
35     default: mtc5
36   
37   topic00fqtn:
38     type: string
39   topic01fqtn:
40     type: string
41   laika_image:
42     type: string
43
44 node_templates:
45
46   topic00:
47     type: dcae.nodes.ExistingTopic
48     properties:
49       fqtn: { get_input : topic00fqtn } 
50   
51   topic01:
52     type: dcae.nodes.ExistingTopic
53     properties:
54       fqtn: { get_input : topic01fqtn }
55
56   feed00:
57      type: dcae.nodes.Feed
58      properties:
59         # NOTE: Had to manually make unique feed names per test because I've been told there's
60         # an issue with feeds not being deleted by uninstall.
61         feed_name: "feed00-sub-laika"
62         feed_description: "Feed00 to test sub for laika"
63         feed_version: 1.0.0
64         aspr_classification: "unclassified"
65
66   feed01:
67      type: dcae.nodes.Feed
68      properties: 
69         feed_name: "feed01-sub-laika"
70         feed_description: "Feed01 to test sub for laika"
71         feed_version: 1.0.0
72         aspr_classification: "unclassified"
73
74   laika-one:
75     type: dcae.nodes.DockerContainerForComponentsUsingDmaap
76     properties:
77         service_component_type:
78             'laika'
79         service_id:
80             { get_input: service_id }
81         location_id:
82             'rework-central'
83         application_config:
84             some-param: "Lorem ipsum dolor sit amet"
85             streams_publishes: {}
86             streams_subscribes:
87               topic-alpha:
88                 aaf_username: { get_input: topic00_aaf_username }
89                 aaf_password: { get_input: topic00_aaf_password }
90                 type: "message_router"
91                 dmaap_info: "<< topic00 >>"
92               topic-beta:
93                 aaf_username: { get_input: topic01_aaf_username }
94                 aaf_password: { get_input: topic01_aaf_password }
95                 type: "message_router"
96                 dmaap_info: "<< topic01 >>"
97               feed-gamma:
98                 type: "data_router"
99                 dmaap_info: "<< feed00 >>"
100               feed-kappa:
101                 type: "data_router"
102                 dmaap_info: "<< feed01 >>"
103             services_calls: {}
104         image: { get_input : laika_image }
105         docker_config:
106             healthcheck:
107                 type: "http"
108                 endpoint: "/health"
109         streams_publishes: []
110         streams_subscribes:
111             - name: topic00
112               location: { get_input: topic00_location }
113               client_role: { get_input: topic00_client_role }
114               type: message_router
115             - name: topic01
116               location: { get_input: topic01_location }
117               client_role: { get_input: topic01_client_role }
118               type: message_router
119             - name: feed00
120               location: { get_input: feed00_location }
121               type: data_router
122               username: king
123               password: !!str 123456
124               route: identity
125               scheme: https
126             # This feed should have username/password generated
127             - name: feed01
128               location: { get_input: feed01_location }
129               type: data_router
130               route: identity
131               scheme: https
132     relationships:
133       - type: dcae.relationships.component_contained_in
134         target: docker_host
135       - type: dcae.relationships.subscribe_to_events
136         target: topic00
137       - type: dcae.relationships.subscribe_to_events
138         target: topic01
139       - type: dcae.relationships.subscribe_to_files
140         target: feed00
141       - type: dcae.relationships.subscribe_to_files
142         target: feed01
143     interfaces:
144       cloudify.interfaces.lifecycle:
145         stop:
146           inputs:
147             cleanup_image:
148               False
149
150   docker_host:
151     type: dcae.nodes.SelectedDockerHost
152     properties:
153         location_id:
154             'rework-central'
155         docker_host_override:
156             'component_dockerhost'