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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
version: '3.8'
services:
mariadb:
image: nexus3.onap.org:10001/mariadb:10.10.2
container_name: mariadb
hostname: mariadb
command: ['--lower-case-table-names=1', '--wait_timeout=28800', '--default-authentication-plugin=mysql_native_password']
env_file: ./config/db/db.conf
volumes:
- ./config/db:/docker-entrypoint-initdb.d
- ./config/clamp/policy-clamp-create-tables.sql:/tmp/policy-clamp-create-tables.sql
ports:
- "3306:3306"
policy-db-migrator:
image: nexus3.onap.org:10001/onap/policy-db-migrator:4.0.1-SNAPSHOT
container_name: policy-db-migrator
hostname: policy-db-migrator
depends_on:
- mariadb
expose:
- 6824
env_file: ./config/db/db.conf
environment:
SQL_DB: policyadmin
SQL_HOST: mariadb
volumes:
- ./config/db-migrator/init.sh:/opt/app/policy/bin/db_migrator_policy_init.sh:ro
- ./wait_for_port.sh:/tmp/wait_for_port.sh
entrypoint: sh /tmp/wait_for_port.sh
command: [
'-c',
'/opt/app/policy/bin/db_migrator_policy_init.sh',
'mariadb', '3306'
]
api:
image: nexus3.onap.org:10001/onap/policy-api:4.0.1-SNAPSHOT
container_name: policy-api
depends_on:
- policy-db-migrator
hostname: policy-api
ports:
- 30002:6969
volumes:
- ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro
- ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro
- ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh
entrypoint: sh wait_for_port.sh
command: [
'-c', './policy-api.sh',
'mariadb', '3306',
'policy-db-migrator', '6824'
]
pap:
image: nexus3.onap.org:10001/onap/policy-pap:4.0.1-SNAPSHOT
container_name: policy-pap
depends_on:
- mariadb
- kafka
- api
hostname: policy-pap
ports:
- 30003:6969
volumes:
- ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
- ./config/pap/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
- ./config/pap/logback.xml:/opt/app/policy/pap/etc/logback.xml:ro
- ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh
entrypoint: sh wait_for_port.sh
command: [
'-c', './policy-pap.sh',
'mariadb', '3306',
'kafka', '9092',
'api', '6969'
]
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 2181:2181
pdp:
image: docker.io/opa-pdp:1.0.0
container_name: opa-pdp
depends_on:
- mariadb
- kafka
- api
- pap
hostname: opa-pdp
volumes:
- ./config/opa-pdp/config.json:/app/config/config.json:ro
- ./config/opa-pdp/groups.json:/app/groups.json:ro
- ./config/opa-pdp/policy-opa-pdp.sh:/app/policy-opa-pdp.sh:ro
- ./wait_for_port.sh:/app/wait_for_port.sh
- ./scripts.sh:/app/scripts.sh
- ./Opagroup.json:/app/Opagroup.json
- ./policy-new.yaml:/app/policy-new.yaml
- type: bind
source: ./policies
target: /app/policies
environment:
LOG_LEVEL: debug
KAFKA_URL: "kafka:9092"
PAP_TOPIC: policy-pdp-pap
GROUPID: opa-pdp
API_USER: policyadmin
API_PASSWORD: "zb!XztG34"
entrypoint: sh wait_for_port.sh
command: [
'-c', './policy-opa-pdp.sh',
'mariadb', '3306',
'kafka', '9092',
'api', '6969',
'pap', '6969'
]
ports:
- 8282:8282
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 2181:2181
kafka:
image: confluentinc/cp-kafka:latest
container_name: kafka
depends_on:
- zookeeper
ports:
- 29092:29092
- 9092:9092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|