summaryrefslogtreecommitdiffstats
path: root/dpo/blueprints/k8s-rcc-policy.yaml-template
blob: d6673ac271f54f7549012025984d82ce89084f75 (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
#
# ============LICENSE_START====================================================
# =============================================================================
# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Huawei. All rights reserved.
# =============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END======================================================

tosca_definitions_version: cloudify_dsl_1_3

description: >
  This blueprint deploys/manages the RestConf Collector module as a Docker container

imports:
  - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.5/k8splugin_types.yaml
inputs:
  dmaap_host:
    type: string
    default: message-router.onap.svc.cluster.local
  dmaap_port:
    type: string
    default: "3904"
  tag_version:
    type: string
    default: "nexus3.onap.org:10001/org.onap.dcaegen2.collectors.restconfcollector:1.0.1"
  consul_host:
    type: string
    default: consul-server.onap.svc.cluster.local
  consul_port:
    type: string
    default: "8500"
  cbs_host:
    type: string
    default: "config-binding-service.dcae.svc.cluster.local"
  cbs_port:
    type: string
    default: "10000"
  external_port:
    type: string
    description: Kubernetes node port on which collector is exposed
    default: "30416"
  notification_publish_url:
    type: string
    default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT"

node_templates:
  rcc_k8s:
    type: dcae.nodes.ContainerizedPlatformComponent
    properties:
        name: 'dcaegen2-collectors-rcc'
        docker_config:
            healthcheck:
              endpoint: /healthcheck
              interval: 15s
              timeout: 1s
              type: http
        image:
          get_input: tag_version
        log_info:
          log_directory: "/opt/app/RCCollector/logs"
        application_config:
            collector.rcc.appDescription: DCAE RestConf Collector Application
            collector.rcc.appName: "dcae-rcc"
            collector.rcc.dmaap.streamid: "notification=device-registration"
            collector.rcc.inputQueue.maxPending: "8096"
            tomcat.maxthreads: "200"
            collector.rcc.service.port: "8686"
            collector.rcc.service.secure.port: "8687"
            collector.rcc.keystore.file.location: "/opt/app/restconfcollector/etc/keystore"
            collector.rcc.keystore.passwordfile: "/opt/app/restconfcollector/etc/rcc_password"
            collector.rcc.keystore.alias: "dynamically generated"
            collector.rcc.truststore.file.location: "/opt/app/restconfcollector/etc/truststore.onap.client.jks"
            collector.rcc.truststore.passwordfile: "/opt/app/restconfcollector/etc/trustpasswordfile"
            collector.keystore.file.location: "/opt/app/restconfcollector/etc/sdnc.p12"
            collector.keystore.passwordfile: "/opt/app/restconfcollector/etc/passwordfile"
            collector.header.authflag: "0"
            collector.header.authlist: "sample1,c2FtcGxlMQ=="
            collector.rcc.service.secure.clientauth: "0"
            streams_publishes:
                        notification:
                          dmaap_info:
                            topic_url:
                              get_input: notification_publish_url
                          type: message_router
            rcc_policy: '[{"controller_name":"AccessM&C","controller_restapiUrl":"192.167.1.3:8080","controller_restapiUser":"access","controller_restapiPassword":"Huawei@123","controller_accessTokenUrl":"/rest/plat/smapp/v1/oauth/token","controller_accessTokenFile":"./etc/access-token.json","controller_accessTokenMethod":"put","controller_subsMethod":"post","controller_subscriptionUrl":"/restconf/v1/operations/huawei-nce-notification-action:establish-subscription","event_details":[{"event_name":"ONT_registration","event_description":"ONTregistartionevent","event_sseventUrlEmbed":"true","event_sseventsField":"output.url","event_sseventsUrl":"null","event_subscriptionTemplate":"./etc/ont_registartion_subscription_template.json","event_unSubscriptionTemplate":"./etc/ont_registartion_unsubscription_template.json","event_ruleId":"12345678"}]}]'
    interfaces:
      cloudify.interfaces.lifecycle:
        start:
          inputs:
            envs:
                DMAAPHOST:
                    { get_input: dmaap_host }
                DMAAPPORT:
                    { get_input: dmaap_port }
                DMAAPPUBTOPIC: "unauthenticated.DCAE_RCC_OUTPUT"
                CONSUL_HOST:
                    { get_input: consul_host }
                CONSUL_PORT:
                    { get_input: consul_port }
                CBS_HOST:
                    { get_input: cbs_host }
                CBS_PORT:
                    { get_input: cbs_port }
                CONFIG_BINDING_SERVICE: "config_binding_service"
            ports:
              - concat: ["8080:", { get_input: external_port }]