Merge "Clean up startup script"
[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                                               "logging.level.org.onap.dcaegen2.services.prh.controllers.AppInfoController": "off",
61                                               "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin",
62                                               "dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin",
63                                               "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json",
64                                               "dmaap.dmaapConsumerConfiguration.consumerId": "c12",
65                                               "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDCAE-c12",
66                                               "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
67                                               "dmaap.dmaapProducerConfiguration.dmaapUserName":"admin",
68                                               "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin",
69                                               "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json",
70                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin",
71                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin",
72                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json",
73                                               "aai.aaiClientConfiguration.pnfUrl":"https://aai:3334/aai/v12/network/pnfs/pnf",
74                                               "aai.aaiClientConfiguration.aaiUserName": "DCAE",
75                                               "aai.aaiClientConfiguration.aaiUserPassword": "DCAE",
76                                               "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
77                                               "aai.aaiClientConfiguration.aaiServiceInstancePath":"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
78                                               "aai.aaiClientConfiguration.aaiHeaders":{
79                                                 "X-FromAppId": "prh",
80                                                 "X-TransactionId": "9999",
81                                                 "Accept": "application/json",
82                                                 "Real-Time": "true",
83                                                 "Authorization": "Basic QUFJOkFBSQ=="
84                                               },
85                                               "security.trustStorePath":"/tmp/certs/truststore.jks",
86                                               "security.trustStorePasswordPath":"/tmp/certs/truststore.password",
87                                               "security.keyStorePath":"/tmp/certs/keystore.p12",
88                                               "security.keyStorePasswordPath":"/tmp/certs/keystore.password",
89                                               "security.enableAaiCertAuth":true,
90                                               "security.enableDmaapCertAuth":true,
91
92                                               "streams_publishes":{
93                                                 "pnf-update":{
94                                                   "type": "message_router",
95                                                   "dmaap_info":{
96                                                     "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_UPDATE"
97                                                   }
98                                                 },
99                                                 "pnf-ready":{
100                                                   "type": "message_router",
101                                                   "dmaap_info":{
102                                                     "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_READY"
103                                                   }
104                                                 }
105                                               },
106                                               "streams_subscribes":{
107                                                 "ves-reg-output":{
108                                                   "type": "message_router",
109                                                   "dmaap_info":{
110                                                     "topic_url":"https://dmaap-mr:2223/events/unauthenticated.VES_PNFREG_OUTPUT"
111                                                   }
112                                                 }
113                                               }
114                                             }'
115     ]
116     container_name: consul-cfg
117     depends_on:
118       - consul
119
120   consul-cfg-dcae-ves-collector:
121     image: consul:1.0.6
122     restart: on-failure
123     command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-ves-collector",'{
124                                             "collector.dynamic.config.update.frequency": "5",
125                                             "event.transform.flag": "0",
126                                             "collector.schema.checkflag": "1",
127                                             "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",
128                                             "collector.service.port": "8080",
129                                             "collector.schema.file":"{
130                                               \"v1\":\"./etc/CommonEventFormat_27.2.json\",
131                                               \"v2\":\"./etc/CommonEventFormat_27.2.json\",
132                                               \"v3\":\"./etc/CommonEventFormat_27.2.json\",
133                                               \"v4\":\"./etc/CommonEventFormat_27.2.json\",
134                                               \"v5\":\"./etc/CommonEventFormat_28.4.1.json\",
135                                               \"v7\":\"./etc/CommonEventFormat_30.0.1.json\"
136                                             }",
137                                             "collector.keystore.passwordfile": "/opt/app/VESCollector/etc/passwordfile",
138                                             "collector.inputQueue.maxPending": "8096",
139                                             "streams_publishes":{
140                                               "ves-measurement": {
141                                                 "type": "message_router",
142                                                 "dmaap_info": {
143                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_MEASUREMENT_OUTPUT/"
144                                                 }
145                                               },
146                                               "ves-fault": {
147                                                 "type": "message_router",
148                                                 "dmaap_info": {
149                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_FAULT_OUTPUT/"
150                                                 }
151                                               },
152                                               "ves-pnfRegistration": {
153                                                 "type": "message_router",
154                                                 "dmaap_info": {
155                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT/"
156                                                 }
157                                               },
158                                               "ves-other": {
159                                                 "type": "message_router",
160                                                 "dmaap_info": {
161                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_OTHER_OUTPUT/"
162                                                 }
163                                               },
164                                               "ves-heartbeat": {
165                                                 "type": "message_router",
166                                                 "dmaap_info": {
167                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/"
168                                                 }
169                                               },
170                                               "ves-notification": {
171                                                 "type": "message_router",
172                                                 "dmaap_info": {
173                                                   "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/"
174                                                   }
175                                               }
176                                             },
177                                             "collector.service.secure.port": "8443",
178                                             "header.authflag": "0",
179                                             "collector.keystore.file.location": "/opt/app/VESCollector/etc/keystore",
180                                             "collector.keystore.alias":
181                                             "dynamically generated",
182                                             "services_calls": [],
183                                             "header.authlist": "sample1,c2FtcGxlMQ=="
184                                             }']
185     container_name: consul-cfg-dcae-ves-collector
186     depends_on:
187       - consul
188
189
190   cbs:
191     image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.2.4
192     ports:
193       - "10000:10000"
194     environment:
195       - CONSUL_HOST
196     depends_on:
197       - consul-cfg
198     healthcheck:
199       test: ["CMD", "curl", "-f", "http://localhost:10000/service_component_all/dcae-prh"]
200       interval: 3s
201       timeout: 2s
202       retries: 20
203     container_name: cbs