blob: ae34fc360634b789d6f2ca2f28834fdcb6f6160d [file] [log] [blame]
Claudio D. Gasparini4e07d482021-02-11 08:51:06 +01001# ============LICENSE_START=======================================================
2# Copyright (c) 2020 Pantheon.tech.
3# Modifications Copyright (C) 2021 Bell Canada.
danielhanrahan9d152cb2024-01-29 13:44:13 +00004# Modifications Copyright (C) 2022-2024 Nordix Foundation.
Claudio D. Gasparini4e07d482021-02-11 08:51:06 +01005# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17# ============LICENSE_END=========================================================
18
Claudio David Gasparini900ba022020-11-08 22:18:36 +010019services:
JosephKeenand181b0e2021-10-01 10:40:47 +010020
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +000021 ### docker-compose --profile dmi-service up -d -> run CPS services incl. dmi-plugin ###
22 ### docker-compose --profile dmi-stub --profile monitoring up -d -> run CPS with stubbed dmi-plugin (for registration performance testing)
sourabh_sourabhe2527ea2024-07-19 17:27:54 +010023 ### docker-compose --profile dmi-stub --profile tracing up -d -> run CPS with stubbed dmi-plugin (for open telemetry tracing testing make ONAP_TRACING_ENABLED "true" later "http://localhost:16686" can be accessed from browser)
ToineSiebelink6191d412024-09-16 15:42:30 +010024 ### docker-compose --profile dmi-stub --profile policy-executor-stub up -d -> run CPS with stubbed dmi-plugin and policy executor stub (for policy executor service testing make POLICY_SERVICE_ENABLED "true")
JosephKeenan1c908482022-06-16 16:19:09 +010025 ### to disable notifications make notification.enabled to false & comment out kafka/zookeeper services ###
ToineSiebelink77e469b2024-10-01 18:40:39 +010026 ### DEBUG: Look for '### DEBUG' comments to enable CPS-NCMP debugging
halil.cakalfbb15112024-10-31 10:37:13 +000027 ### docker-compose --profile dmi-stub --project-name endurance --env-file config/endurance.env up -d -> run CPS with stubbed dmi-plugin for endurance testing
28 ### docker-compose --profile dmi-stub --project-name endurance down --volumes
Ruslan Kashapov1e5bd942021-01-22 12:53:01 +020029
Claudio David Gasparini900ba022020-11-08 22:18:36 +010030 dbpostgresql:
halil.cakalfbb15112024-10-31 10:37:13 +000031 container_name: ${DB_CONTAINER_NAME:-dbpostgresql}
DylanB95EST6c26ba62022-08-04 13:25:31 +010032 image: postgres:14.1-alpine
Claudio David Gasparini900ba022020-11-08 22:18:36 +010033 ports:
puthuparambil.aditya73d58862022-01-28 13:22:33 +000034 - ${DB_PORT:-5432}:5432
Claudio David Gasparini900ba022020-11-08 22:18:36 +010035 environment:
Claudio David Gasparini5faa49c2020-11-12 08:28:07 +010036 POSTGRES_DB: cpsdb
Bruno Sakoto6658f502021-07-01 22:28:17 -040037 POSTGRES_USER: ${DB_USERNAME:-cps}
38 POSTGRES_PASSWORD: ${DB_PASSWORD:-cps}
danielhanrahan4e2c9272024-03-14 18:02:09 +000039 volumes:
danielhanrahanfe226882024-08-23 13:29:11 +010040 - ./config/postgres-init.sql:/docker-entrypoint-initdb.d/postgres-init.sql
danielhanrahan9d152cb2024-01-29 13:44:13 +000041 deploy:
42 resources:
43 reservations:
44 cpus: '1'
45 memory: 1G
46 limits:
47 cpus: '6'
48 memory: 3G
Renu Kumariff52b942021-05-27 23:16:32 -040049
JosephKeenand181b0e2021-10-01 10:40:47 +010050 cps-and-ncmp:
tragaitdd6021e2021-10-19 16:46:21 +010051 image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-and-ncmp:${CPS_VERSION:-latest}
JosephKeenand181b0e2021-10-01 10:40:47 +010052 environment:
tragaitdd6021e2021-10-19 16:46:21 +010053 CPS_USERNAME: ${CPS_CORE_USERNAME:-cpsuser}
54 CPS_PASSWORD: ${CPS_CORE_PASSWORD:-cpsr0cks!}
DylanB95EST4472bef2021-11-03 11:20:07 +000055 DB_HOST: ${DB_HOST:-dbpostgresql}
JosephKeenand181b0e2021-10-01 10:40:47 +010056 DB_USERNAME: ${DB_USERNAME:-cps}
57 DB_PASSWORD: ${DB_PASSWORD:-cps}
58 DMI_USERNAME: ${DMI_USERNAME:-cpsuser}
59 DMI_PASSWORD: ${DMI_PASSWORD:-cpsr0cks!}
halil.cakal1340c572023-04-12 15:19:45 +010060 KAFKA_BOOTSTRAP_SERVER: kafka:29092
JosephKeenan1c908482022-06-16 16:19:09 +010061 notification.enabled: 'true'
sourabh_sourabhe2527ea2024-07-19 17:27:54 +010062 ONAP_TRACING_ENABLED: 'false'
63 ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT: http://jaeger-service:14250
64 ONAP_OTEL_EXPORTER_ENDPOINT: http://jaeger-service:4317
ToineSiebelink6191d412024-09-16 15:42:30 +010065 POLICY_SERVICE_ENABLED: 'false'
ToineSiebelink77e469b2024-10-01 18:40:39 +010066 POLICY_SERVICE_DEFAULT_DECISION: 'deny from env'
halil.cakal3f9f1932024-09-23 11:05:16 +010067 JAVA_TOOL_OPTIONS: "-XX:InitialRAMPercentage=75.0 -XX:MaxRAMPercentage=75.0"
ToineSiebelink77e469b2024-10-01 18:40:39 +010068 ### DEBUG: Uncomment next line to enable java debugging
69 ### DEBUG: JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
JosephKeenand181b0e2021-10-01 10:40:47 +010070 restart: unless-stopped
71 depends_on:
JosephKeenanf31c7f82022-05-24 18:59:25 +010072 - dbpostgresql
danielhanrahan9d152cb2024-01-29 13:44:13 +000073 deploy:
ToineSiebelink77e469b2024-10-01 18:40:39 +010074 ### DEBUG: For easier debugging use just 1 instance (also update docker-compose/config/nginx/nginx.conf !)
halil.cakal3a9613f2024-06-17 09:24:59 +010075 replicas: 2
danielhanrahan9d152cb2024-01-29 13:44:13 +000076 resources:
danielhanrahan9d152cb2024-01-29 13:44:13 +000077 limits:
78 cpus: '3'
halil.cakal3f9f1932024-09-23 11:05:16 +010079 memory: 2G
ToineSiebelink77e469b2024-10-01 18:40:39 +010080 ### DEBUG: Uncomment next 2 lines to enable java debugging (ensure 'ports' aligns with 'deploy')
81 ### DEBUG ports:
82 ### DEBUG - ${CPS_CORE_DEBUG_PORT:-5005}:5005
JosephKeenanf31c7f82022-05-24 18:59:25 +010083
halil.cakal3a9613f2024-06-17 09:24:59 +010084 nginx:
halil.cakalfbb15112024-10-31 10:37:13 +000085 container_name: ${NGINX_CONTAINER_NAME:-nginx-loadbalancer}
halil.cakal3a9613f2024-06-17 09:24:59 +010086 image: nginx:latest
87 ports:
88 - ${CPS_CORE_PORT:-8883}:80
89 depends_on:
90 - cps-and-ncmp
91 volumes:
danielhanrahanfe226882024-08-23 13:29:11 +010092 - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
93 - ./config/nginx/proxy_params:/etc/nginx/proxy_params
halil.cakal3a9613f2024-06-17 09:24:59 +010094
JosephKeenanf31c7f82022-05-24 18:59:25 +010095 ### if kafka is not required comment out zookeeper and kafka ###
96 zookeeper:
97 image: confluentinc/cp-zookeeper:6.2.1
halil.cakalfbb15112024-10-31 10:37:13 +000098 container_name: ${ZOOKEEPER_CONTAINER_NAME:-zookeeper}
JosephKeenanf31c7f82022-05-24 18:59:25 +010099 ports:
halil.cakalfbb15112024-10-31 10:37:13 +0000100 - ${ZOOKEEPER_PORT:-2181}:2181
JosephKeenanf31c7f82022-05-24 18:59:25 +0100101 environment:
102 ZOOKEEPER_CLIENT_PORT: 2181
103
104 kafka:
105 image: confluentinc/cp-kafka:6.2.1
halil.cakalfbb15112024-10-31 10:37:13 +0000106 container_name: ${KAFKA_CONTAINER_NAME:-kafka}
JosephKeenanf31c7f82022-05-24 18:59:25 +0100107 ports:
halil.cakalfbb15112024-10-31 10:37:13 +0000108 - ${KAFKA_PORT:-9092}:9092
JosephKeenanf31c7f82022-05-24 18:59:25 +0100109 depends_on:
110 - zookeeper
111 environment:
112 KAFKA_BROKER_ID: 1
113 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
JosephKeenanf31c7f82022-05-24 18:59:25 +0100114 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONNECTIONS_FROM_HOST:PLAINTEXT
halil.cakal1340c572023-04-12 15:19:45 +0100115 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,CONNECTIONS_FROM_HOST://localhost:9092
JosephKeenanf31c7f82022-05-24 18:59:25 +0100116 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
117
JosephKeenanf31c7f82022-05-24 18:59:25 +0100118 ncmp-dmi-plugin:
halil.cakalfbb15112024-10-31 10:37:13 +0000119 container_name: ${NCMP_DMI_PLUGIN_CONTAINER_NAME:-ncmp-dmi-plugin}
mpriyank35e0df32024-06-14 15:02:53 +0100120 image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/ncmp-dmi-plugin:${DMI_VERSION:-1.6.0-SNAPSHOT-latest}
JosephKeenanf31c7f82022-05-24 18:59:25 +0100121 ports:
122 - ${DMI_PORT:-8783}:8080
JosephKeenanf31c7f82022-05-24 18:59:25 +0100123 environment:
124 CPS_USERNAME: ${CPS_CORE_USERNAME:-cpsuser}
125 CPS_PASSWORD: ${CPS_CORE_PASSWORD:-cpsr0cks!}
126 CPS_CORE_HOST: ${CPS_CORE_HOST:-cps-and-ncmp}
127 CPS_CORE_PORT: ${CPS_CORE_PORT:-8080}
128 CPS_CORE_USERNAME: ${CPS_CORE_USERNAME:-cpsuser}
129 CPS_CORE_PASSWORD: ${CPS_CORE_PASSWORD:-cpsr0cks!}
130 SDNC_HOST: ${SDNC_HOST:-sdnc}
131 SDNC_PORT: ${SDNC_PORT:-8181}
132 SDNC_USERNAME: ${SDNC_USERNAME:-admin}
133 SDNC_PASSWORD: ${SDNC_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
134 DMI_SERVICE_URL: ${DMI_SERVICE_URL:-http://ncmp-dmi-plugin:8783}
halil.cakal1340c572023-04-12 15:19:45 +0100135 DMI_SERVICE_NAME: ${DMI_SERVICE_NAME:-dminame1}
JosephKeenanf31c7f82022-05-24 18:59:25 +0100136 DMI_USERNAME: ${DMI_USERNAME:-cpsuser}
137 DMI_PASSWORD: ${DMI_PASSWORD:-cpsr0cks!}
halil.cakal1340c572023-04-12 15:19:45 +0100138 KAFKA_BOOTSTRAP_SERVER: kafka:29092
JosephKeenanf31c7f82022-05-24 18:59:25 +0100139 restart: unless-stopped
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000140 profiles:
141 - dmi-service
142
sourabh_sourabh7cda5e92023-07-05 00:56:05 +0100143 ncmp-dmi-plugin-demo-and-csit-stub:
halil.cakalfbb15112024-10-31 10:37:13 +0000144 container_name: ${NCMP_DMI_PLUGIN_DEMO_AND_CSIT_STUB_CONTAINER_NAME:-ncmp-dmi-plugin-demo-and-csit-stub}
sourabh_sourabh5d3fb852024-11-26 16:23:48 +0000145 image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/dmi-stub:${DMI_DEMO_STUB_VERSION:-latest}
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000146 ports:
sourabh_sourabh7cda5e92023-07-05 00:56:05 +0100147 - ${DMI_DEMO_STUB_PORT:-8784}:8092
148 environment:
halil.cakal1340c572023-04-12 15:19:45 +0100149 KAFKA_BOOTSTRAP_SERVER: kafka:29092
sourabh_sourabh7cda5e92023-07-05 00:56:05 +0100150 NCMP_CONSUMER_GROUP_ID: ncmp-group
151 NCMP_ASYNC_M2M_TOPIC: ncmp-async-m2m
danielhanrahan156ae0b2024-10-18 12:38:12 +0100152 MODULE_INITIAL_PROCESSING_DELAY_MS: 120000
JvD_Ericsson1516fa02024-01-31 13:47:28 +0000153 MODULE_REFERENCES_DELAY_MS: 100
154 MODULE_RESOURCES_DELAY_MS: 1000
halil.cakala9ee0ab2024-07-16 13:53:05 +0100155 READ_DATA_FOR_CM_HANDLE_DELAY_MS: 300
156 WRITE_DATA_FOR_CM_HANDLE_DELAY_MS: 670
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000157 restart: unless-stopped
158 profiles:
159 - dmi-stub
sourabh_sourabh7cda5e92023-07-05 00:56:05 +0100160 - dmi-service
emacleef6f16f52023-01-25 12:18:15 +0000161
ToineSiebelinkd7914bc2024-07-04 15:15:36 +0100162 policy-executor-stub:
halil.cakalfbb15112024-10-31 10:37:13 +0000163 container_name: ${POLICY_EXECUTOR_STUB_CONTAINER_NAME:-policy-executor-stub}
ToineSiebelinkd7914bc2024-07-04 15:15:36 +0100164 image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/policy-executor-stub:latest
165 ports:
halil.cakalfbb15112024-10-31 10:37:13 +0000166 - ${POLICY_EXECUTOR_STUB_PORT:-8785}:8093
ToineSiebelinkd7914bc2024-07-04 15:15:36 +0100167 restart: unless-stopped
168 profiles:
169 - policy-executor-stub
170
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000171 prometheus:
halil.cakalfbb15112024-10-31 10:37:13 +0000172 container_name: ${PROMETHEUS_CONTAINER_NAME:-prometheus}
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000173 image: prom/prometheus:latest
174 ports:
halil.cakalfbb15112024-10-31 10:37:13 +0000175 - ${PROMETHEUS_PORT:-9090}:9090
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000176 restart: always
177 volumes:
danielhanrahanfe226882024-08-23 13:29:11 +0100178 - ./config/prometheus.yml:/etc/prometheus/prometheus.yml
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000179 profiles:
180 - monitoring
181
182 grafana:
183 image: grafana/grafana-oss:latest
184 user: ""
halil.cakalfbb15112024-10-31 10:37:13 +0000185 container_name: ${GRAFANA_CONTAINER_NAME:-grafana}
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000186 depends_on:
187 prometheus:
188 condition: service_started
189 ports:
halil.cakalfbb15112024-10-31 10:37:13 +0000190 - ${GRAFANA_PORT:-3000}:3000
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000191 volumes:
danielhanrahanfe226882024-08-23 13:29:11 +0100192 - ./config/grafana/provisioning/:/etc/grafana/provisioning/
193 - ./config/grafana/jvm-micrometer-dashboard.json:/var/lib/grafana/dashboards/jvm-micrometer-dashboard.json
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000194 - grafana:/var/lib/grafana
195 environment:
196 - GF_SECURITY_ADMIN_PASSWORD=admin
197 - GF_SERVER_DOMAIN:localhost
198 profiles:
199 - monitoring
200
halil.cakal65b870b2024-07-25 11:12:29 +0100201 kafka-ui:
halil.cakalfbb15112024-10-31 10:37:13 +0000202 container_name: ${KAFKA_UI_CONTAINER_NAME:-kafka-ui}
halil.cakal65b870b2024-07-25 11:12:29 +0100203 image: provectuslabs/kafka-ui:latest
204 ports:
halil.cakalfbb15112024-10-31 10:37:13 +0000205 - ${KAFKA_UI_PORT:-8089}:8080
halil.cakal65b870b2024-07-25 11:12:29 +0100206 environment:
207 DYNAMIC_CONFIG_ENABLED: 'true'
208 KAFKA_CLUSTERS_0_NAME: 'cps-kafka-local'
209 KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
210 profiles:
211 - monitoring
212
sourabh_sourabhe2527ea2024-07-19 17:27:54 +0100213 jaeger-service:
halil.cakalfbb15112024-10-31 10:37:13 +0000214 container_name: ${JAEGER_SERVICE_CONTAINER_NAME:-jaeger-service}
sourabh_sourabhe2527ea2024-07-19 17:27:54 +0100215 image: jaegertracing/all-in-one:latest
216 ports:
halil.cakalfbb15112024-10-31 10:37:13 +0000217 - ${JAEGER_SERVICE_PORT:-16686}:16686
sourabh_sourabhe2527ea2024-07-19 17:27:54 +0100218 restart: unless-stopped
219 profiles:
220 - tracing
221
ToineSiebelinkb2c8bc62023-02-07 10:30:03 +0000222volumes:
223 grafana: