summaryrefslogtreecommitdiffstats
path: root/docker/examples/blueprint-laika-dmaap-pubs.yaml
blob: 4616b0c57ece8d41c06aab5ea788243daee76672 (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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
tosca_definitions_version: cloudify_dsl_1_3

description: >
  This Blueprint installs a chain of two laika instances on a Docker cluster

imports:
  - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/docker/2.2.0/node-type.yaml
  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/relationship/1.0.0/node-type.yaml
  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2 }}/type_files/dmaap/1.1.0/dmaap.yaml

inputs:

  service_id:
    description: Unique id used for an instance of this DCAE service. Use deployment id
    default: 'foobar'

  topic00_aaf_username:
  topic00_aaf_password:
  topic00_location:
    default: mtc5
  topic00_client_role: 

  topic01_aaf_username:
  topic01_aaf_password:
  topic01_location:
    default: mtc5
  topic01_client_role:

  feed00_location:
    default: mtc5

  feed01_location:
    default: mtc5
  
  topic00fqtn:
    type: string
  topic01fqtn:
    type: string
  laika_image:
    type: string

node_templates:

  topic00:
    type: dcae.nodes.ExistingTopic
    properties:
      fqtn: { get_input : topic00fqtn } 
  
  topic01:
    type: dcae.nodes.ExistingTopic
    properties:
      fqtn: { get_input : topic01fqtn }

  feed00:
     type: dcae.nodes.Feed
     properties:
        # NOTE: Had to manually make unique feed names per test because I've been told there's
        # an issue with feeds not being deleted by uninstall.
        feed_name: "feed00-pub-laika"
        feed_description: "Feed00 to test pub for laika"
        feed_version: 1.0.0
        aspr_classification: "unclassified"

  feed01:
     type: dcae.nodes.Feed
     properties: 
        feed_name: "feed01-pub-laika"
        feed_description: "Feed01 to test pub for laika"
        feed_version: 1.0.0
        aspr_classification: "unclassified"

  laika-one:
    type: dcae.nodes.DockerContainerForComponentsUsingDmaap
    properties:
        service_component_type:
            'laika'
        service_id:
            { get_input: service_id }
        location_id:
            'rework-central'
        application_config:
            some-param: "Lorem ipsum dolor sit amet"
            streams_publishes:
              topic-alpha:
                aaf_username: { get_input: topic00_aaf_username }
                aaf_password: { get_input: topic00_aaf_password }
                type: "message_router"
                dmaap_info: "<< topic00 >>"
              topic-beta:
                aaf_username: { get_input: topic01_aaf_username }
                aaf_password: { get_input: topic01_aaf_password }
                type: "message_router"
                dmaap_info: "<< topic01 >>"
              feed-gamma:
                type: "data_router"
                dmaap_info: "<< feed00 >>"
              feed-kappa:
                type: "data_router"
                dmaap_info: "<< feed01 >>"
            streams_subscribes: {}
            services_calls: {}
        image: { get_input : laika_image }
        docker_config:
            healthcheck:
                type: "http"
                endpoint: "/health"
        streams_publishes:
            - name: topic00
              location: { get_input: topic00_location }
              client_role: { get_input: topic00_client_role }
              type: message_router
            - name: topic01
              location: { get_input: topic01_location }
              client_role: { get_input: topic01_client_role }
              type: message_router
            - name: feed00
              location: { get_input: feed00_location }
              type: data_router
            - name: feed01
              location: { get_input: feed01_location }
              type: data_router
        streams_subscribes: []
    relationships:
      - type: dcae.relationships.component_contained_in
        target: docker_host
      - type: dcae.relationships.publish_events
        target: topic00
      - type: dcae.relationships.publish_events
        target: topic01
      - type: dcae.relationships.publish_files
        target: feed00
      - type: dcae.relationships.publish_files
        target: feed01
    interfaces:
      cloudify.interfaces.lifecycle:
        stop:
          inputs:
            cleanup_image:
              False

  docker_host:
    type: dcae.nodes.SelectedDockerHost
    properties:
        location_id:
            'rework-central'
        docker_host_override:
            'component_dockerhost'