Merge "ICS sample producer and consumer"
[nonrtric.git] / sample-services / ics-producer-consumer / docker-compose.yaml
diff --git a/sample-services/ics-producer-consumer/docker-compose.yaml b/sample-services/ics-producer-consumer/docker-compose.yaml
new file mode 100644 (file)
index 0000000..d9239bc
--- /dev/null
@@ -0,0 +1,83 @@
+#  ========================LICENSE_START=================================\r
+#  O-RAN-SC\r
+#\r
+#  Copyright (C) 2024: OpenInfra Foundation Europe\r
+#  ========================================================================\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#       http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#  ============LICENSE_END=================================================\r
+\r
+version: '2'\r
+\r
+networks:\r
+  my-network:\r
+    name: kafka\r
+    driver: bridge\r
+\r
+services:\r
+  kafka-zkless:\r
+    container_name: kafka-zkless\r
+    image: quay.io/strimzi/kafka:latest-kafka-2.8.1-amd64\r
+    command:\r
+      [\r
+        "sh",\r
+        "-c",\r
+        "export CLUSTER_ID=$$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t $$CLUSTER_ID -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS}",\r
+      ]\r
+    ports:\r
+      - "9092:9092"\r
+    environment:\r
+      LOG_DIR: "/tmp/logs"\r
+      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT\r
+      KAFKA_LISTENERS: PLAINTEXT://:29092,PLAINTEXT_HOST://:9092,CONTROLLER://:9093\r
+      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-zkless:29092,PLAINTEXT_HOST://kafka-zkless:9092\r
+    tty: true\r
+    stdin_open: true\r
+    networks:\r
+      - my-network\r
+\r
+  informationcoordinator:\r
+    image: nexus3.o-ran-sc.org:10001/o-ran-sc/nonrtric-plt-informationcoordinatorservice:1.6.0\r
+    container_name: informationcoordinatorservice\r
+    ports:\r
+      - "8083:8083"\r
+    volumes:\r
+      - ./application.yaml:/opt/app/information-coordinator-service/config/application.yaml\r
+    networks:\r
+      - my-network\r
+\r
+  kafka-producer:\r
+    image: o-ran-sc/nonrtric-sample-icsproducer:latest\r
+    container_name: kafka-producer\r
+    environment:\r
+      - KAFKA_SERVERS=kafka-zkless:9092\r
+    ports:\r
+      - "8080:8080"\r
+    networks:\r
+      - my-network\r
+\r
+  kafka-consumer:\r
+    image: o-ran-sc/nonrtric-sample-icsconsumer:latest\r
+    container_name: kafka-consumer\r
+    environment:\r
+      - KAFKA_SERVERS=kafka-zkless:9092\r
+    ports:\r
+      - "8081:8081"\r
+    networks:\r
+      - my-network\r
+\r
+  curl-client:\r
+    image: curlimages/curl:latest\r
+    container_name: curl-client\r
+    command: ["tail", "-f", "/dev/null"]\r
+    networks:\r
+      - my-network\r