blueprint syncup
[dcaegen2/platform/blueprints.git] / blueprints / k8s-holmes-engine.yaml-template
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START====================================================
4 # =============================================================================
5 # Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 # =============================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=====================================================
19
20 tosca_definitions_version: cloudify_dsl_1_3
21 imports:
22 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml"
23 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml"
24 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
25 inputs:
26   dcae_CL_publish_url:
27     type: string
28     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT"
29     #default: "http://10.0.11.1:3904/events/unauthenticated.DCAE_CL_OUTPUT"
30   ves_fault_publish_url:
31     type: string
32     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT"
33     #default: "http://10.0.11.1:3904/events/unauthenticated.SEC_FAULT_OUTPUT"
34   msb_hostname:
35     type: string
36     default: "msb-discovery.onap.svc.cluster.local"
37   pgaas_cluster_name:
38     type: string
39     default: "dcae-postgres.onap.svc.cluster.local"
40     # use the single-VM PG instance
41     #default: pgvm
42   database_name:
43     type: string
44     default: holmes
45   he_image:
46     type: string
47     default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/holmes/engine-management:v1.0.0"
48
49 node_templates:
50   pgaasvm:
51     type: dcae.nodes.pgaas.database
52     properties:
53       #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '-write.' ] }
54       writerfqdn: { get_input: pgaas_cluster_name }
55       name: { get_input: database_name }
56       use_existing: true
57
58   holmesengine:
59     type:  dcae.nodes.ContainerizedPlatformComponent
60     interfaces:
61       cloudify.interfaces.lifecycle:
62         start:
63           inputs:
64            envs:
65             URL_JDBC:
66                 { get_attribute: [ pgaasvm, admin, host ] }
67             JDBC_PASSWORD:
68                 { get_attribute: [ pgaasvm, admin, password ] }
69             JDBC_USERNAME:
70                 { get_attribute: [ pgaasvm, admin, user ] }
71             MSB_ADDR:
72                 get_input: msb_hostname
73            ports:
74              - '9102:0'
75     properties:
76       name: 'holmes-engine-mgmt'
77       dns_name: 'holmes-engine-mgmt'
78       application_config:
79         msb.hostname:
80          get_input: msb_hostname
81         msb.uri: /api/microservices/v1/services
82         services_calls: {}
83         streams_publishes:
84           dcae_cl_out:
85             dmaap_info:
86              topic_url:
87                   get_input: dcae_CL_publish_url
88             type: message_router
89         streams_subscribes:
90           ves_fault:
91             dmaap_info:
92              topic_url:
93                   get_input: ves_fault_publish_url
94             type: message_router
95       image: { get_input: he_image }
96       # need to use truncated name!!
97       #service_component_type: dcae-analytics-holmes-engin-management
98     relationships:
99     - type: cloudify.relationships.depends_on
100       target: pgaasvm