aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
blob: 6459ad27fafcc387f431b7c810fb66244de12957 (plain)
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
version: "2.2"
services:
  prh:
    image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest
    ports:
      - "8100:8100"
      - "8433:8433"
    volumes:
      - ./simulator/certs:/tmp/certs
    environment:
      - LOG_LEVEL
      - PRH_LOG_LEVEL
      - HOSTNAME
      - CONSUL_HOST
      - CONFIG_BINDING_SERVICE
    container_name: prh
    depends_on:
      cbs:
        condition: service_healthy
      dmaap-mr:
        condition: service_started
      aai:
        condition: service_started

  dmaap-mr:
    build:
      context: simulator
      dockerfile: DMaaP_simulator
    ports:
      - "2222:2222"
      - "2223:2223"
      - "2224:2224"
    container_name: dmaap_simulator

  aai:
    build:
      context: simulator
      dockerfile: AAI_simulator
    ports:
      - "3333:3333"
      - "3334:3334"
      - "3335:3335"
    container_name: aai_simulator

  consul:
    image: consul:1.0.6
    ports:
      - "8500:8500"
    command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-ui", "-config-dir=/consul/consul.d"]
    volumes:
      - ./consul.d/:/consul/consul.d
    container_name: consul

  consul-cfg:
    image: consul:1.0.6
    restart: on-failure
    command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-prh", '{
                                              "dmaap.dmaapConsumerConfiguration.dmaapUrl":"https://dmaap-mr:2223/events/unauthenticated.VES_PNFREG_OUTPUT",
                                              "dmaap.dmaapConsumerConfiguration.dmaapHostName":"dmaap-mr",
                                              "dmaap.dmaapConsumerConfiguration.dmaapPortNumber":2223,
                                              "dmaap.dmaapConsumerConfiguration.dmaapTopicName": "events/unauthenticated.VES_PNFREG_OUTPUT",
                                              "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"https",
                                              "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin",
                                              "dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin",
                                              "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json",
                                              "dmaap.dmaapConsumerConfiguration.consumerId": "c12",
                                              "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDCAE-c12",
                                              "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
                                              "dmaap.dmaapConsumerConfiguration.messageLimit": -1,

                                              "dmaap.dmaapProducerConfiguration.dmaapUrl":"https://dmaap-mr:2223/events/unauthenticated.PNF_READY",
                                              "dmaap.dmaapProducerConfiguration.dmaapHostName":"dmaap-mr",
                                              "dmaap.dmaapProducerConfiguration.dmaapPortNumber":2223,
                                              "dmaap.dmaapProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_READY",
                                              "dmaap.dmaapProducerConfiguration.dmaapProtocol":"https",
                                              "dmaap.dmaapProducerConfiguration.dmaapUserName":"admin",
                                              "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin",
                                              "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json",

                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapUrl":"https://dmaap-mr:2223/events/unauthenticated.PNF_UPDATE",
                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapHostName": "dmaap-mr",
                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapPortNumber": 2223,
                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_UPDATE",
                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapProtocol": "https",
                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin",
                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin",
                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json",

                                              "aai.aaiClientConfiguration.pnfUrl":"https://aai:3334/aai/v12/network/pnfs/pnf",
                                              "aai.aaiClientConfiguration.aaiHost":"aai",
                                              "aai.aaiClientConfiguration.aaiHostPortNumber":3334,
                                              "aai.aaiClientConfiguration.aaiProtocol":"https",
                                              "aai.aaiClientConfiguration.aaiUserName": "DCAE",
                                              "aai.aaiClientConfiguration.aaiUserPassword": "DCAE",
                                              "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
                                              "aai.aaiClientConfiguration.aaiBasePath": "/aai/v12",
                                              "aai.aaiClientConfiguration.aaiPnfPath": "/network/pnfs/pnf",
                                              "aai.aaiClientConfiguration.aaiServiceInstancePath":"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
                                              "aai.aaiClientConfiguration.aaiHeaders":{
                                                        "X-FromAppId": "prh",
                                                        "X-TransactionId": "9999",
                                                        "Accept": "application/json",
                                                        "Real-Time": "true",
                                                        "Authorization": "Basic QUFJOkFBSQ=="
                                              },

                                              "security.trustStorePath":"/tmp/certs/truststore.jks",
                                              "security.trustStorePasswordPath":"/tmp/certs/truststore.password",
                                              "security.keyStorePath":"/tmp/certs/keystore.p12",
                                              "security.keyStorePasswordPath":"/tmp/certs/keystore.password",
                                              "security.enableAaiCertAuth":true,
                                              "security.enableDmaapCertAuth":true,

                                              "streams_publishes":{
                                                "pnf-update":{
                                                  "type": "message_router",
                                                  "dmaap_info":{
                                                    "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_UPDATE"
                                                  }
                                                },
                                                "pnf-ready":{
                                                  "type": "message_router",
                                                  "dmaap_info":{
                                                    "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_READY"
                                                  }
                                                }
                                              },
                                              "streams_subscribes":{
                                                "ves-reg-output":{
                                                  "type": "message_router",
                                                  "dmaap_info":{
                                                    "topic_url":"https://dmaap-mr:2223/events/unauthenticated.VES_PNFREG_OUTPUT"
                                                  }
                                                }
                                              }
                                            }'
    ]
    container_name: consul-cfg
    depends_on:
      - consul

  consul-cfg-dcae-ves-collector:
    image: consul:1.0.6
    restart: on-failure
    command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-ves-collector",'{
                                            "collector.dynamic.config.update.frequency": "5",
                                            "event.transform.flag": "0",
                                            "collector.schema.checkflag": "1",
                                            "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",
                                            "collector.service.port": "8080",
                                            "collector.schema.file":"{
                                              \"v1\":\"./etc/CommonEventFormat_27.2.json\",
                                              \"v2\":\"./etc/CommonEventFormat_27.2.json\",
                                              \"v3\":\"./etc/CommonEventFormat_27.2.json\",
                                              \"v4\":\"./etc/CommonEventFormat_27.2.json\",
                                              \"v5\":\"./etc/CommonEventFormat_28.4.1.json\",
                                              \"v7\":\"./etc/CommonEventFormat_30.0.1.json\"
                                            }",
                                            "collector.keystore.passwordfile": "/opt/app/VESCollector/etc/passwordfile",
                                            "collector.inputQueue.maxPending": "8096",
                                            "streams_publishes":{
                                              "ves-measurement": {
                                                "type": "message_router",
                                                "dmaap_info": {
                                                  "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_MEASUREMENT_OUTPUT/"
                                                }
                                              },
                                              "ves-fault": {
                                                "type": "message_router",
                                                "dmaap_info": {
                                                  "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_FAULT_OUTPUT/"
                                                }
                                              },
                                              "ves-pnfRegistration": {
                                                "type": "message_router",
                                                "dmaap_info": {
                                                  "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT/"
                                                }
                                              },
                                              "ves-other": {
                                                "type": "message_router",
                                                "dmaap_info": {
                                                  "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_OTHER_OUTPUT/"
                                                }
                                              },
                                              "ves-heartbeat": {
                                                "type": "message_router",
                                                "dmaap_info": {
                                                  "topic_url": "http://dmaap-mr:2222/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/"
                                                }
                                              },
                                              "ves-notification": {
                                                "type": "message_router",
                                                "dmaap_info": {
                                                  "topic_url": "http://dmaap-mr:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/"
                                                  }
                                              }
                                            },
                                            "collector.service.secure.port": "8443",
                                            "header.authflag": "0",
                                            "collector.keystore.file.location": "/opt/app/VESCollector/etc/keystore",
                                            "collector.keystore.alias":
                                            "dynamically generated",
                                            "services_calls": [],
                                            "header.authlist": "sample1,c2FtcGxlMQ=="
                                            }']
    container_name: consul-cfg-dcae-ves-collector
    depends_on:
      - consul


  cbs:
    image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.2.4
    ports:
      - "10000:10000"
    environment:
      - CONSUL_HOST
    depends_on:
      - consul-cfg
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:10000/service_component_all/dcae-prh"]
      interval: 3s
      timeout: 2s
      retries: 20
    container_name: cbs