Update license references
[nonrtric/plt/a1policymanagementservice.git] / dpo / blueprints / k8s-policy-agent.yaml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2020-2022 Nordix Foundation. All rights reserved.
3 #  ========================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #  ============LICENSE_END=================================================
16 #
17
18 #description: Docker application of Policy Agent managing policies
19 #blueprint_version: 1.0.0
20 ---
21 tosca_definitions_version: cloudify_dsl_1_3
22 description: Docker application to collect log file from PNF
23 imports:
24   - http://www.getcloudify.org/spec/cloudify/4.3.1/types.yaml
25   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/k8splugin/1.6.0/k8splugin_types.yaml
26   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml
27 inputs:
28   policy-agent_cpu_limit:
29     type: string
30     default: "250m"
31   policy-agent_cpu_request:
32     type: string
33     default: "250m"
34   policy-agent_memory_limit:
35     type: string
36     default: "256Mi"
37   policy-agent_memory_request:
38     type: string
39     default: "256Mi"
40   envs:
41     default: {}
42   external_port:
43     type: string
44     default: ":0"
45   publish_topic_name:
46     type: string
47     default: "A1-POLICY-AGENT-WRITE"
48   subscribe_topic_name:
49     type: string
50     default: "A1-POLICY-AGENT-READ"
51   consumer_group:
52     type: string
53     default: "users"
54   consumer_id:
55     type: string
56     default: "policy-agent"
57   log_directory:
58     type: string
59     default: "/var/log/policy-agent"
60   replicas:
61     type: integer
62     description: number of instances
63     default: 1
64   tag_version:
65     type: string
66     default: "nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent:1.0.0"
67 node_templates:
68   policy-agent:
69     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
70     interfaces:
71       cloudify.interfaces.lifecycle:
72         start:
73           inputs:
74             envs:
75               get_input: envs
76     properties:
77       application_config:
78         streams_publishes:
79           dmaap_publisher:
80             dmaap_info:
81               topic_url: { concat: ['https://message-router:3905/events/',{ get_input: publish_topic_name }] }
82             type: message_router
83         streams_subscribes:
84           dmaap_subscriber:
85             dmaap_info:
86               topic_url: { concat: ['https://message-router:3905/events/',{ get_input: subscribe_topic_name }, '/', { get_input: consumer_group }, "/", { get_input: consumer_id }, "?timeout=15000&limit=100"] }
87             type: message_router
88         ric:
89           - name: ric1
90             baseUrl: http://localhost:8083/
91             managedElementIds:
92               - kista_1
93               - kista_2
94           - name: ric2
95             baseUrl: http://localhost:8085/
96             managedElementIds:
97               - kista_3
98               - kista_4
99       docker_config:
100         healthcheck:
101           interval: 15s
102           timeout: 1s
103           type: http
104           endpoint: /status
105         ports:
106           - concat: ["8081", {get_input: external_port}]
107       image:
108         get_input: tag_version
109       service_component_type: policy-agent
110       log_info:
111         log_directory:
112           get_input: log_directory
113       replicas:
114         get_input: replicas
115       resource_config:
116         limits:
117           cpu:
118             get_input: policy-agent_cpu_limit
119           memory:
120             get_input: policy-agent_memory_limit
121         requests:
122           cpu:
123             get_input: policy-agent_cpu_request
124           memory:
125             get_input: policy-agent_memory_request
126
127