adheli.tavares | d802fd9 | 2024-08-15 12:39:19 +0100 | [diff] [blame] | 1 | # |
| 2 | # ===========LICENSE_START==================================================== |
| 3 | # Copyright (C) 2024 Nordix Foundation. |
| 4 | # ============================================================================ |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # ============LICENSE_END===================================================== |
| 17 | # |
| 18 | |
| 19 | services: |
| 20 | |
| 21 | simulator: |
| 22 | image: ${CONTAINER_LOCATION}onap/policy-models-simulator:${POLICY_MODELS_VERSION} |
| 23 | container_name: simulator |
| 24 | hostname: simulator |
| 25 | networks: |
| 26 | default: |
| 27 | aliases: |
| 28 | - aai-sim |
| 29 | - grpc-sim |
| 30 | - sdnc-sim |
| 31 | - so-sim |
| 32 | - vfc-sim |
| 33 | volumes: |
| 34 | - ./config/sim-all:/opt/app/policy/simulators/etc/mounted:ro |
| 35 | - ./config/sim-all/logback.xml:/opt/app/policy/simulators/etc/mounted/logback.xml:ro |
| 36 | expose: |
| 37 | - 6666 |
| 38 | - 6668 |
| 39 | - 6669 |
| 40 | - 6670 |
| 41 | - 6680 |
| 42 | ports: |
| 43 | - ${SIMULATOR_PORT}:6666 |
| 44 | |
| 45 | policy-clamp-ac-sim-ppnt: |
| 46 | image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-sim-ppnt:${POLICY_CLAMP_PPNT_VERSION} |
| 47 | container_name: policy-clamp-ac-sim-ppnt |
| 48 | hostname: policy-clamp-ac-sim-ppnt |
| 49 | depends_on: |
| 50 | - kafka |
| 51 | - jaeger |
| 52 | environment: |
| 53 | OTEL_SERVICE_NAME: sim-ppnt |
| 54 | OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf |
| 55 | OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf |
| 56 | OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318 |
| 57 | SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default} |
| 58 | ports: |
| 59 | - ${SIM_PARTICIPANT_PORT}:6969 |
| 60 | volumes: |
| 61 | - ./config/clamp/SimulatorParticipantParameters.yaml:/opt/app/policy/clamp/etc/SimulatorParticipantParameters.yaml:ro |
| 62 | - ./config/clamp/sim-participant.sh:/opt/app/policy/clamp/bin/sim-participant.sh:rw |
| 63 | - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro |
| 64 | - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro |
| 65 | entrypoint: /opt/app/policy/bin/wait_for_port.sh |
| 66 | command: [ |
| 67 | '-c', './sim-participant.sh', |
| 68 | 'kafka', '9092' |
| 69 | ] |
| 70 | |
| 71 | # metrics services: |
| 72 | prometheus: |
| 73 | image: nexus3.onap.org:10001/prom/prometheus:latest |
| 74 | container_name: prometheus |
| 75 | hostname: prometheus |
| 76 | ports: |
| 77 | - ${PROMETHEUS_PORT}:9090 |
| 78 | volumes: |
| 79 | - ./metrics/prometheus.yml:/etc/prometheus/prometheus.yml |
| 80 | |
| 81 | grafana: |
| 82 | image: nexus3.onap.org:10001/grafana/grafana:latest |
| 83 | container_name: grafana |
| 84 | hostname: grafana |
| 85 | depends_on: |
| 86 | - prometheus |
| 87 | ports: |
| 88 | - ${GRAFANA_PORT}:3000 |
| 89 | volumes: |
| 90 | - ./metrics/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml |
| 91 | - ./metrics/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml |
| 92 | - ./metrics/dashboards:/var/lib/grafana/dashboards |
| 93 | |
| 94 | # messaging services: |
| 95 | zookeeper: |
| 96 | image: confluentinc/cp-zookeeper:latest |
| 97 | container_name: zookeeper |
| 98 | hostname: zookeeper |
| 99 | ports: |
| 100 | - "2181:2181" |
| 101 | environment: |
| 102 | ZOOKEEPER_CLIENT_PORT: 2181 |
| 103 | |
| 104 | kafka: |
| 105 | image: confluentinc/cp-kafka:latest |
| 106 | container_name: kafka |
| 107 | hostname: kafka |
| 108 | depends_on: |
| 109 | - zookeeper |
| 110 | ports: |
| 111 | - "9092:9092" |
| 112 | - "29092:29092" |
| 113 | environment: |
| 114 | KAFKA_BROKER_ID: 1 |
| 115 | KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" |
| 116 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT |
| 117 | KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 |
| 118 | KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT |
| 119 | KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |
| 120 | KAFKA_ADVERTISED_HOST_NAME: kafka |
| 121 | |
| 122 | jaeger: |
| 123 | image: jaegertracing/all-in-one:1.58 |
| 124 | container_name: jaeger |
| 125 | ports: |
| 126 | - "4318:4318" |
| 127 | - "4317:4317" |
| 128 | - "14250:14250" |
| 129 | - "16686:16686" |
| 130 | environment: |
| 131 | - COLLECTOR_OTLP_ENABLED=true |
| 132 | |
| 133 | # integration tests: |
| 134 | csit-tests: |
| 135 | image: policy-csit-robot:latest |
| 136 | container_name: policy-csit |
| 137 | hostname: policy-csit |
| 138 | volumes: |
| 139 | - ${ROBOT_LOG_DIR:-/tmp}:/tmp/results |
| 140 | - /tmp/distribution:/tmp/distribution |
| 141 | environment: |
| 142 | ROBOT_FILE: ${ROBOT_FILES:-none} |
| 143 | TEST_ENV: ${TEST_ENV:-docker} |