6fab504b2ce8e5f9b7db66b432864ce16a8f4d60
[clamp.git] / src / test / resources / example / sdc / blueprint-dcae / tca_3.yaml
1 tosca_definitions_version: cloudify_dsl_1_3
2
3 description: >
4   This blueprint deploys/manages the TCA module as a Docker container
5
6 imports:
7   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
8   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml
9   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml
10 inputs:
11   aaiEnrichmentHost:
12     type: string
13     default: "aai.onap.svc.cluster.local"
14   aaiEnrichmentPort:
15     type: string
16     default: "8443"
17   enableAAIEnrichment:
18     type: string
19     default: true
20   dmaap_host:
21     type: string
22     default: message-router.onap.svc.cluster.local
23   dmaap_port:
24     type: string
25     default: "3904"
26   enableRedisCaching:
27     type: string
28     default: false
29   redisHosts:
30     type: string
31     default: dcae-redis.onap.svc.cluster.local:6379
32   tag_version:
33     type: string
34     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0-STAGING-latest"
35   consul_host:
36     type: string
37     default: consul-server.onap.svc.cluster.local
38   consul_port:
39     type: string
40     default: "8500"
41   cbs_host:
42     type: string
43     default: "config-binding-service.dcae.svc.cluster.local"
44   cbs_port:
45     type: string
46     default: "10000"
47   policy_id:
48     type: string
49     default: "none"
50   external_port:
51     type: string
52     description: Kubernetes node port on which CDAPgui is exposed
53     default: "32012"
54   policy_model_id:
55     type: string
56     default: "onap.policies.monitoring.cdap.tca.hi.lo.app"
57
58 node_templates:
59   tca_k8s:
60     type: dcae.nodes.ContainerizedServiceComponent
61     relationships:
62       - target: tca_policy
63         type: cloudify.relationships.depends_on
64     properties:
65         service_component_type: 'dcaegen2-analytics-tca'
66         application_config: {}
67         docker_config: {}
68         image:
69           get_input: tag_version
70         log_info:
71           log_directory: "/opt/app/TCAnalytics/logs"
72         application_config:
73             app_config:
74                 appDescription: DCAE Analytics Threshold Crossing Alert Application
75                 appName: dcae-tca
76                 tcaAlertsAbatementTableName: TCAAlertsAbatementTable
77                 tcaAlertsAbatementTableTTLSeconds: '1728000'
78                 tcaSubscriberOutputStreamName: TCASubscriberOutputStream
79                 tcaVESAlertsTableName: TCAVESAlertsTable
80                 tcaVESAlertsTableTTLSeconds: '1728000'
81                 tcaVESMessageStatusTableName: TCAVESMessageStatusTable
82                 tcaVESMessageStatusTableTTLSeconds: '86400'
83                 thresholdCalculatorFlowletInstances: '2'
84             app_preferences:
85                 aaiEnrichmentHost:
86                     get_input: aaiEnrichmentHost
87                 aaiEnrichmentIgnoreSSLCertificateErrors: 'true'
88                 aaiEnrichmentPortNumber: '8443'
89                 aaiEnrichmentProtocol: https
90                 aaiEnrichmentUserName: dcae@dcae.onap.org
91                 aaiEnrichmentUserPassword: demo123456!
92                 aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query
93                 aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf
94                 enableAAIEnrichment:
95                     get_input: enableAAIEnrichment
96                 enableRedisCaching:
97                     get_input: enableRedisCaching
98                 redisHosts:
99                     get_input: redisHosts
100                 enableAlertCEFFormat: 'false'
101                 publisherContentType: application/json
102                 publisherHostName:
103                     get_input: dmaap_host
104                 publisherHostPort:
105                     get_input: dmaap_port
106                 publisherMaxBatchSize: '1'
107                 publisherMaxRecoveryQueueSize: '100000'
108                 publisherPollingInterval: '20000'
109                 publisherProtocol: http
110                 publisherTopicName: unauthenticated.DCAE_CL_OUTPUT
111                 subscriberConsumerGroup: OpenDCAE-c12
112                 subscriberConsumerId: c12
113                 subscriberContentType: application/json
114                 subscriberHostName:
115                     get_input: dmaap_host
116                 subscriberHostPort:
117                     get_input: dmaap_port
118                 subscriberMessageLimit: '-1'
119                 subscriberPollingInterval: '30000'
120                 subscriberProtocol: http
121                 subscriberTimeoutMS: '-1'
122                 subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT
123                 tca_policy: ''
124         service_component_type: dcaegen2-analytics_tca
125     interfaces:
126       cloudify.interfaces.lifecycle:
127         start:
128           inputs:
129             envs:
130                 DMAAPHOST:
131                     { get_input: dmaap_host }
132                 DMAAPPORT:
133                     { get_input: dmaap_port }
134                 DMAAPPUBTOPIC: "unauthenticated.DCAE_CL_OUTPUT"
135                 DMAAPSUBTOPIC: "unauthenticated.VES_MEASUREMENT_OUTPUT"
136                 AAIHOST:
137                     { get_input: aaiEnrichmentHost }
138                 AAIPORT:
139                     { get_input: aaiEnrichmentPort }
140                 CONSUL_HOST:
141                     { get_input: consul_host }
142                 CONSUL_PORT:
143                     { get_input: consul_port }
144                 CBS_HOST:
145                     { get_input: cbs_host }
146                 CBS_PORT:
147                     { get_input: cbs_port }
148                 CONFIG_BINDING_SERVICE: "config_binding_service"
149             ports:
150               - concat: ["11011:", { get_input: external_port }]
151   tca_policy:
152     type: dcae.nodes.policy
153     properties:
154       policy_id:
155            get_input: policy_id
156       policy_model_id: 
157            get_input: policy_model_id