[DCAE] INFO.yaml update
[dcaegen2/platform/blueprints.git] / blueprints / k8s-prh.yaml
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START====================================================
4 # =============================================================================
5 # Copyright (c) 2018-2020 AT&T
6 # Copyright (c) 2018-2020 NOKIA
7 # =============================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #
12 #      http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19 # ============LICENSE_END======================================================
20
21 tosca_definitions_version: cloudify_dsl_1_3
22
23 imports:
24   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
25   - plugin:k8splugin?version=>=3.4.3,<4.0.0
26 inputs:
27   pnfUrl:
28     type: string
29     default: "https://aai.onap.svc.cluster.local:8443/aai/v23/network/pnfs/pnf"
30   baseUrl:
31     type: string
32     default: "https://aai.onap.svc.cluster.local:8443/aai/v23"
33   aaiEnrichmentHost:
34     type: string
35     default: "aai.onap.svc.cluster.local"
36   aaiEnrichmentPort:
37     type: integer
38     default: 8443
39   aaiEnrichmentUser:
40     type: string
41     description: aai user name
42     default: "AAI"
43   aaiEnrichmentPasswd:
44     type: string
45     description: aai password
46     default: "AAI"
47   dmaap_pnfReady_url:
48     type: string
49     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_READY"
50   dmaap_vesPnfRegOutput_url:
51     type: string
52     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT"
53   dmaap_pnfUpdate_url:
54     type: string
55     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_UPDATE"
56   dmaap_user:
57     type: string
58     description: dmap user name
59     default: "admin"
60   dmaap_passwd:
61     type: string
62     description: dmap password
63     default: "admin"
64   tag_version:
65     type: string
66     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.7.1"
67   replicas:
68     type: integer
69     description: number of instances
70     default: 1
71   host_port:
72     description: port on Kubernetes host where PRH API will be exposed
73     default: 0
74   container_port:
75     type: integer
76     description: Network port that the platform service exposes in the container
77     default: 8100
78   service_component_type:
79     type: string
80     default: "dcae-prh"
81   service_id:
82     type: string
83     default: "dcae-prh"
84   secureEnableCert:
85     type: boolean
86     description: enable certificate base connection with AAI and DMaap
87     default: false
88   service_component_name_override:
89     type: string
90     default: "dcae-prh"
91 node_templates:
92   prh:
93     properties:
94       application_config:
95         dmaap.dmaapConsumerConfiguration.dmaapUserName: { get_input: dmaap_user }
96         dmaap.dmaapConsumerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }
97         dmaap.dmaapConsumerConfiguration.dmaapContentType: "application/json"
98         dmaap.dmaapConsumerConfiguration.consumerId: "c12"
99         dmaap.dmaapConsumerConfiguration.consumerGroup: "OpenDCAE-c12"
100         dmaap.dmaapConsumerConfiguration.timeoutMs: -1
101         dmaap.dmaapProducerConfiguration.dmaapUserName: { get_input: dmaap_user }
102         dmaap.dmaapProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }
103         dmaap.dmaapProducerConfiguration.dmaapContentType: "application/json"
104         dmaap.dmaapUpdateProducerConfiguration.dmaapUserName: { get_input: dmaap_user }
105         dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }
106         dmaap.dmaapUpdateProducerConfiguration.dmaapContentType: "application/json"
107         aai.aaiClientConfiguration.pnfUrl: { get_input: pnfUrl }
108         aai.aaiClientConfiguration.baseUrl: { get_input: baseUrl }
109         aai.aaiClientConfiguration.aaiHost: { get_input: aaiEnrichmentHost }
110         aai.aaiClientConfiguration.aaiHostPortNumber: { get_input: aaiEnrichmentPort }
111         aai.aaiClientConfiguration.aaiProtocol: "https"
112         aai.aaiClientConfiguration.aaiUserName: { get_input: aaiEnrichmentUser }
113         aai.aaiClientConfiguration.aaiUserPassword: { get_input: aaiEnrichmentPasswd }
114         aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors: true
115         aai.aaiClientConfiguration.aaiBasePath: "/aai/v23"
116         aai.aaiClientConfiguration.aaiPnfPath: "/network/pnfs/pnf"
117         aai.aaiClientConfiguration.aaiServiceInstancePath: "/business/customers/customer/{{customer}}/service-subscriptions/service-subscription/{{serviceType}}/service-instances/service-instance/{{serviceInstanceId}}"
118         aai.aaiClientConfiguration.aaiHeaders:
119             X-FromAppId: "prh"
120             X-TransactionId: "9999"
121             Accept: "application/json"
122             Real-Time: "true"
123             Authorization: "Basic QUFJOkFBSQ=="
124         security.trustStorePath: "/opt/app/prh/etc/cert/trust.jks"
125         security.trustStorePasswordPath: "/opt/app/prh/etc/cert/trust.pass"
126         security.keyStorePath: "/opt/app/prh/etc/cert/cert.jks"
127         security.keyStorePasswordPath: "/opt/app/prh/etc/cert/jks.pass"
128         security.enableAaiCertAuth: { get_input: secureEnableCert }
129         security.enableDmaapCertAuth: { get_input: secureEnableCert }
130         streams_publishes:
131             pnf-update:
132               type: "message_router"
133               dmaap_info:
134                 topic_url: {get_input: dmaap_pnfUpdate_url }
135             pnf-ready:
136               type: "message_router"
137               dmaap_info:
138                 topic_url: { get_input: dmaap_pnfReady_url }
139         streams_subscribes:
140             ves-reg-output:
141               type: "message_router"
142               dmaap_info:
143                 topic_url: { get_input: dmaap_vesPnfRegOutput_url }
144       docker_config:
145         healthcheck:
146           endpoint: /heartbeat
147           interval: 15s
148           timeout: 1s
149           type: http
150         ports:
151           - { concat: [ { get_input: container_port }, ':', { get_input: host_port } ] }
152       image:
153         { get_input: tag_version }
154       replicas: {get_input: replicas}
155       service_component_type: { get_input: service_component_type }
156       service_id: { get_input: service_id }
157       service_component_name_override: { get_input: service_component_name_override }
158       log_info:
159         log_directory: "/opt/app/prh/logs"
160       tls_info:
161         cert_directory: '/opt/app/prh/etc/cert'
162         use_tls: true
163     type: dcae.nodes.ContainerizedServiceComponent
164