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