Merge "Refactor PrhLibrary.py"
[integration/csit.git] / tests / dcaegen2 / prh-testcases / resources / docker-compose.yml
1 version: "2.2"
2 services:
3   prh:
4     image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest
5     ports:
6       - "8100:8100"
7       - "8433:8433"
8     volumes:
9       - ./simulator/certs:/tmp/certs
10     environment:
11       - LOG_LEVEL
12       - PRH_LOG_LEVEL
13       - HOSTNAME
14       - CONSUL_HOST
15       - CONFIG_BINDING_SERVICE
16     container_name: prh
17     depends_on:
18       cbs:
19         condition: service_healthy
20       dmaap-mr:
21         condition: service_started
22       aai:
23         condition: service_started
24
25   dmaap-mr:
26     build:
27       context: simulator
28       dockerfile: DMaaP_simulator
29     ports:
30       - "2222:2222"
31       - "2223:2223"
32       - "2224:2224"
33     container_name: dmaap_simulator
34
35   aai:
36     build:
37       context: simulator
38       dockerfile: AAI_simulator
39     ports:
40       - "3333:3333"
41       - "3334:3334"
42       - "3335:3335"
43     container_name: aai_simulator
44
45   consul:
46     image: consul:1.0.6
47     ports:
48       - "8500:8500"
49     command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-ui", "-config-dir=/consul/consul.d"]
50     volumes:
51       - ./consul.d/:/consul/consul.d
52     container_name: consul
53
54   consul-cfg:
55     image: consul:1.0.6
56     restart: on-failure
57     command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-prh", '{
58                                               "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin",
59                                               "dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin",
60                                               "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json",
61                                               "dmaap.dmaapConsumerConfiguration.consumerId": "c12",
62                                               "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDCAE-c12",
63                                               "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
64                                               "dmaap.dmaapProducerConfiguration.dmaapUserName":"admin",
65                                               "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin",
66                                               "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json",
67                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin",
68                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin",
69                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json",
70                                               "aai.aaiClientConfiguration.pnfUrl":"https://aai:3334/aai/v12/network/pnfs/pnf",
71                                               "aai.aaiClientConfiguration.aaiUserName": "DCAE",
72                                               "aai.aaiClientConfiguration.aaiUserPassword": "DCAE",
73                                               "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
74                                               "aai.aaiClientConfiguration.aaiServiceInstancePath":"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
75                                               "aai.aaiClientConfiguration.aaiHeaders":{
76                                                 "X-FromAppId": "prh",
77                                                 "X-TransactionId": "9999",
78                                                 "Accept": "application/json",
79                                                 "Real-Time": "true",
80                                                 "Authorization": "Basic QUFJOkFBSQ=="
81                                               },
82                                               "security.trustStorePath":"/tmp/certs/truststore.jks",
83                                               "security.trustStorePasswordPath":"/tmp/certs/truststore.password",
84                                               "security.keyStorePath":"/tmp/certs/keystore.p12",
85                                               "security.keyStorePasswordPath":"/tmp/certs/keystore.password",
86                                               "security.enableAaiCertAuth":true,
87                                               "security.enableDmaapCertAuth":true,
88
89                                               "streams_publishes":{
90                                                 "pnf-update":{
91                                                   "type": "message_router",
92                                                   "dmaap_info":{
93                                                     "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_UPDATE"
94                                                   }
95                                                 },
96                                                 "pnf-ready":{
97                                                   "type": "message_router",
98                                                   "dmaap_info":{
99                                                     "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_READY"
100                                                   }
101                                                 }
102                                               },
103                                               "streams_subscribes":{
104                                                 "ves-reg-output":{
105                                                   "type": "message_router",
106                                                   "dmaap_info":{
107                                                     "topic_url":"https://dmaap-mr:2223/events/unauthenticated.VES_PNFREG_OUTPUT"
108                                                   }
109                                                 }
110                                               }
111                                             }'
112     ]
113     container_name: consul-cfg
114     depends_on:
115       - consul
116
117   consul-cfg-dcae-ves-collector:
118     image: consul:1.0.6
119     restart: on-failure
120     command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-ves-collector",'{
121                                             "collector.dynamic.config.update.frequency": "5",
122                                             "event.transform.flag": "0",
123                                             "collector.schema.checkflag": "1",
124                                             "collector.dmaap.streamid": "fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration",
125                                             "collector.service.port": "8080",
126                                             "collector.schema.file":"{
127                                               \"v1\":\"./etc/CommonEventFormat_27.2.json\",
128                                               \"v2\":\"./etc/CommonEventFormat_27.2.json\",
129                                               \"v3\":\"./etc/CommonEventFormat_27.2.json\",
130                                               \"v4\":\"./etc/CommonEventFormat_27.2.json\",
131                                               \"v5\":\"./etc/CommonEventFormat_28.4.1.json\",
132                                               \"v7\":\"./etc/CommonEventFormat_30.0.1.json\"
133                                             }",
134                                             "collector.keystore.passwordfile": "/opt/app/VESCollector/etc/passwordfile",
135                                             "collector.inputQueue.maxPending": "8096",
136                                             "streams_publishes":{
137                                               "ves-measurement": {
138                                                 "type": "message_router",
139                                                 "dmaap_info": {
140                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_MEASUREMENT_OUTPUT/"
141                                                 }
142                                               },
143                                               "ves-fault": {
144                                                 "type": "message_router",
145                                                 "dmaap_info": {
146                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_FAULT_OUTPUT/"
147                                                 }
148                                               },
149                                               "ves-pnfRegistration": {
150                                                 "type": "message_router",
151                                                 "dmaap_info": {
152                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT/"
153                                                 }
154                                               },
155                                               "ves-other": {
156                                                 "type": "message_router",
157                                                 "dmaap_info": {
158                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_OTHER_OUTPUT/"
159                                                 }
160                                               },
161                                               "ves-heartbeat": {
162                                                 "type": "message_router",
163                                                 "dmaap_info": {
164                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/"
165                                                 }
166                                               },
167                                               "ves-notification": {
168                                                 "type": "message_router",
169                                                 "dmaap_info": {
170                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/"
171                                                   }
172                                               }
173                                             },
174                                             "collector.service.secure.port": "8443",
175                                             "header.authflag": "0",
176                                             "collector.keystore.file.location": "/opt/app/VESCollector/etc/keystore",
177                                             "collector.keystore.alias":
178                                             "dynamically generated",
179                                             "services_calls": [],
180                                             "header.authlist": "sample1,c2FtcGxlMQ=="
181                                             }']
182     container_name: consul-cfg-dcae-ves-collector
183     depends_on:
184       - consul
185
186
187   cbs:
188     image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.2.4
189     ports:
190       - "10000:10000"
191     environment:
192       - CONSUL_HOST
193     depends_on:
194       - consul-cfg
195     healthcheck:
196       test: ["CMD", "curl", "-f", "http://localhost:10000/service_component_all/dcae-prh"]
197       interval: 3s
198       timeout: 2s
199       retries: 20
200     container_name: cbs