17f2435225ef4c51ac93495fbd850e90abef8247
[oam.git] / solution / integration / smo / onap-policy / docker-compose.yml
1 #
2 # ===========LICENSE_START====================================================
3 #  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
4 #  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
5 #  Modifications Copyright (C) 2021 Nordix Foundation. 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 version: '2'
21 networks:
22   nonrtric:
23     driver: bridge
24     name: nonrtric
25   smo:
26     external: true
27
28 services:
29    mariadb:
30       image: nexus3.onap.org:10001/mariadb:10.5.8
31       container_name: mariadb
32       hostname: mariadb
33       command: ['--lower-case-table-names=1', '--wait_timeout=28800']
34       env_file: config/db/db.conf
35       volumes:
36          - ./config/db:/docker-entrypoint-initdb.d:ro
37       expose:
38        - 3306
39       networks:
40        - nonrtric
41    api:
42       image: nexus3.onap.org:10001/onap/policy-api:2.4.2
43       container_name: policy-api
44       depends_on:
45        - mariadb
46       hostname: policy-api
47       ports:
48        - "6969:6969"
49       expose:
50        - 6969
51       volumes:
52        - ./config/ks.jks:/opt/app/policy/api/etc/ssl/policy-keystore.jks:ro
53        - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
54       entrypoint: ./wait_for_port.sh
55       command: [
56         '-c', './policy-api.sh',
57         'mariadb', '3306'
58         ]
59       networks:
60        - nonrtric
61    pap:
62       image: nexus3.onap.org:10001/onap/policy-pap:2.4.2
63       container_name: policy-pap
64       depends_on:
65        - mariadb
66        - api
67       hostname: policy-pap
68       ports:
69        - "6868:6969"
70       expose:
71        - 6868
72       volumes:
73        - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro
74        - ./config/ks.jks:/opt/app/policy/pap/etc/ssl/policy-keystore.jks:ro
75        - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
76       entrypoint: ./wait_for_port.sh
77       command: [
78         '-c', './policy-pap.sh',
79         'mariadb', '3306',
80         'onap-dmaap', '3904',
81         'api', '6969'
82         ]
83       networks:
84        - nonrtric
85        - smo
86    xacml-pdp:
87       image: nexus3.onap.org:10001/onap/policy-xacml-pdp:2.4.2
88       container_name: policy-xacml-pdp
89       depends_on:
90        - mariadb
91        - pap
92       hostname: policy-xacml-pdp
93       expose:
94        - 6969
95       volumes:
96        - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
97        - ./config/ks.jks:/opt/app/policy/pdpx/etc/ssl/policy-keystore.jks:ro
98        - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro
99       entrypoint: ./wait_for_port.sh
100       command: [
101         '-c', './policy-pdpx.sh',
102         'mariadb', '3306',
103         'onap-dmaap', '3904',
104         'pap', '6969'
105         ]
106       networks:
107        - nonrtric
108        - smo
109    drools:
110       image: nexus3.onap.org:10001/onap/policy-drools:1.8.2
111       container_name: drools
112       depends_on:
113        - mariadb
114        - pap
115       hostname: drools
116       expose:
117        - 6969
118        - 9696
119       volumes:
120        - ./config/drools/custom:/tmp/policy-install/config:ro
121        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
122       env_file:
123         - config/drools/env/base.conf
124       entrypoint: /opt/app/policy/bin/wait_for_port.sh
125       command: [
126         '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot',
127         'mariadb', '3306',
128         'onap-dmaap', '3904'
129         ]
130       networks:
131        - nonrtric
132        - smo
133    drools-apps:
134       image: nexus3.onap.org:10001/onap/policy-pdpd-cl:1.8.2
135       container_name: drools-apps
136       depends_on:
137        - mariadb
138        - pap
139        - xacml-pdp
140       hostname: drools-apps
141       expose:
142        - 6969
143        - 9696
144       volumes:
145        - ./config/drools-apps/custom:/tmp/policy-install/config:ro
146        - ./config/drools-apps/custom/feature-lifecycle.properties:/opt/app/policy/features/lifecycle/config/feature-lifecycle.properties:ro
147        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
148       env_file:
149         - config/drools-apps/env/base.conf
150         - config/drools-apps/env/feature-healthcheck.conf
151         - config/drools-apps/env/feature-pooling-dmaap.conf
152       entrypoint: /opt/app/policy/bin/wait_for_port.sh
153       command: [
154         '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot',
155         'mariadb', '3306',
156         'onap-dmaap', '3904',
157         'pap', '6969'
158         ]
159       networks:
160        - nonrtric
161        - smo
162    apex-pdp:
163       image: registry.nordix.org/onap/policy-apex-pdp:2.6.0-SNAPSHOT
164       container_name: policy-apex-pdp
165       depends_on:
166        - mariadb
167        - pap
168       hostname: policy-apex-pdp
169       expose:
170        - 6969
171        - 23324
172       volumes:
173        - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
174        - ./config/ks.jks:/opt/app/policy/apex-pdp/etc/ssl/policy-keystore.jks:ro
175        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
176       entrypoint: /opt/app/policy/bin/wait_for_port.sh
177       command: [
178         '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
179         'mariadb', '3306',
180         'onap-dmaap', '3904',
181         'pap', '6969'
182         ]
183       networks:
184        - nonrtric
185        - smo
186    distribution:
187       image: nexus3.onap.org:10001/onap/policy-distribution:2.5.2
188       container_name: policy-distribution
189       depends_on:
190        - mariadb
191        - api
192        - pap
193        - apex-pdp
194       hostname: policy-distribution
195       volumes:
196        - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro
197        - ./config/ks.jks:/opt/app/policy/distribution/etc/ssl/policy-keystore.jks:ro
198        - ./distribution/config/temp/:/opt/app/policy/distribution/etc/temp/:ro
199        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
200       entrypoint: /opt/app/policy/bin/wait_for_port.sh
201       command: [
202         '-c', './policy-dist.sh',
203         'mariadb', '3306',
204         'onap-dmaap', '3904',
205         'pap', '6969',
206         'apex-pdp', '6969'
207         ]
208       networks:
209        - nonrtric
210        - smo