blueprint syncup
[dcaegen2/platform/blueprints.git] / blueprints / k8s-snmptrap.yaml-template
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START====================================================
4 # =============================================================================
5 # Copyright (c) 2018-2019 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
22 imports:
23   - "http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"
24   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
25 inputs:
26   tag_version:
27     type: string
28     default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.collectors.snmptrap:1.4.0"
29   cache:
30     type: string
31     default:
32       dns_cache_ttl_seconds: 60
33   files:
34     type: string
35     default:
36       arriving_traps_log: snmptrapd_arriving_traps.log
37       data_dir: data
38       eelf_audit: audit.log
39       eelf_base_dir: /opt/app/snmptrap/logs
40       eelf_debug: debug.log
41       eelf_error: error.log
42       eelf_metrics: metrics.log
43       log_dir: logs
44       minimum_severity_to_log: 2
45       perm_status_file: snmptrapd_status.log
46       pid_dir: tmp
47       roll_frequency: day
48       runtime_base_dir: /opt/app/snmptrap
49       snmptrapd_diag: snmptrapd_prog_diag.log
50       traps_stats_log: snmptrapd_stats.csv
51   protocols:
52     type: string
53     default:
54       ipv4_interface: 0.0.0.0
55       ipv4_port: 6162
56       ipv6_interface: ::1
57       ipv6_port: 6162
58   publisher:
59     type: string
60     default:
61       http_milliseconds_between_retries: 750
62       http_milliseconds_timeout: 1500
63       http_peer_publisher: unavailable
64       http_primary_publisher: 'true'
65       http_retries: 3
66       max_milliseconds_between_publishes: 10000
67       max_traps_between_publishes: 10
68   sec_fault_unsecure_topic:
69     type: string
70     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP"
71   snmptrapd:
72     type: string
73     default:
74       title: Collector for receiving SNMP traps and publishing to DMAAP/MR
75       version: 1.4.0
76   external_port:
77     type: string
78     description: Kubernetes node port on which collector is exposed
79     default: "30470"
80   replicas:
81     type: integer
82     description: number of instances
83     default: 1
84
85 node_templates:
86   snmptrap:
87     interfaces:
88       cloudify.interfaces.lifecycle:
89         start:
90           inputs:
91            ports:
92              - concat: ["6162/udp:", { get_input: external_port }]
93     properties:
94       application_config:
95         StormWatchPolicy: ''
96         cache:
97           get_input: cache
98         files:
99           get_input: files
100         protocols:
101           get_input: protocols
102         publisher:
103           get_input: publisher
104         services_calls: {}
105         snmptrapd:
106           get_input: snmptrapd
107         sw_interval_in_seconds: 60
108         streams_publishes:
109             sec_fault_unsecure:
110               dmaap_info:
111                 topic_url:
112                   get_input: sec_fault_unsecure_topic
113               type: message_router
114
115       image:
116         get_input: tag_version
117       replicas: {get_input: replicas}
118       name: 'dcae-snmptrap-collector'
119       dns_name: 'dcae-snmptrap-collector'
120     type: dcae.nodes.ContainerizedPlatformComponent