Bulk blueprint update
[dcaegen2/platform/blueprints.git] / blueprints / reference_templates / holmes-engine.yaml-template
1 tosca_definitions_version: cloudify_dsl_1_3
2 imports:
3 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml"
4 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dcaepolicyplugin/1/dcaepolicyplugin_types.yaml"
5 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
6 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
7 inputs:
8   dcae_CL_publish_url:
9     type: string
10     default: "http://10.0.11.1:3904/events/unauthenticated.DCAE_CL_OUTPUT"
11   ves_fault_publish_url:
12     type: string
13     default: "http://10.0.11.1:3904/events/unauthenticated.SEC_FAULT_OUTPUT"
14   docker_host_override:
15     type: string
16     default: "component_dockerhost"
17   dh_location_id:
18     type: string
19     default: "zone1"
20   msb_hostname:
21     type: string
22     default: ""  
23   location_domain: 
24     type: string 
25   location_prefix: 
26     type: string
27   pgaas_cluster_name:
28     type: string
29     # use the single-VM PG instance
30     default: pgvm
31   database_name:
32     type: string
33     default: holmes     
34 node_templates:
35   pgaasvm:
36     type: dcae.nodes.pgaas.database
37     properties:
38       writerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
39       name: { get_input: database_name }
40       use_existing: true      
41   docker_holmes_host:
42     type: dcae.nodes.SelectedDockerHost
43     properties:
44       docker_host_override:
45         get_input: docker_host_override
46       location_id:
47         get_input: dh_location_id
48   holmesengine:
49     type: dcae.nodes.DockerContainerForComponentsUsingDmaap
50     interfaces:
51       cloudify.interfaces.lifecycle:
52         start:
53           inputs:
54            envs:
55             URL_JDBC:
56                 { get_attribute: [ pgaasvm, admin, host ] }
57             JDBC_PASSWORD:
58                 { get_attribute: [ pgaasvm, admin, password ] }
59             JDBC_USERNAME:
60                 { get_attribute: [ pgaasvm, admin, user ] }
61             MSB_ADDR:
62                 get_input: msb_hostname    
63     properties:
64       application_config:
65         msb.hostname: 
66          get_input: msb_hostname
67         msb.uri: /api/microservices/v1/services
68         services_calls: {}
69         streams_publishes:
70           dcae_cl_out:
71             dmaap_info: 
72              topic_url:
73                   get_input: dcae_CL_publish_url
74             type: message_router
75         streams_subscribes: 
76           ves_fault:
77             dmaap_info:
78              topic_url:
79                   get_input: ves_fault_publish_url
80             type: message_router
81       docker_config:
82         healthcheck:
83           endpoint: /api/holmes-engine-mgmt/v1/healthcheck
84           interval: 15s
85           timeout: 1s
86           type: http
87         ports:
88         - 9102:9102
89       image: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/holmes/engine-management:v1.0.0"
90       location_id:
91         get_input: dh_location_id
92       service_component_type: dcae-analytics-holmes-engine-management
93     relationships:
94     - type: cloudify.relationships.depends_on
95       target: pgaasvm    
96     - target: docker_holmes_host
97       type: dcae.relationships.component_contained_in
98