This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 0fad582280 Add BanyanDB to docker-compose quickstart (#12006)
0fad582280 is described below

commit 0fad5822808207e11f30216b636697776837c264
Author: kezhenxu94 <kezhenx...@apache.org>
AuthorDate: Tue Mar 12 16:37:52 2024 +0800

    Add BanyanDB to docker-compose quickstart (#12006)
---
 docker/.env                |  7 +++--
 docker/README.md           | 23 ++++++++++++--
 docker/docker-compose.yml  | 76 ++++++++++++++++++++++++++++++++++------------
 docs/en/changes/changes.md |  1 +
 4 files changed, 82 insertions(+), 25 deletions(-)

diff --git a/docker/.env b/docker/.env
index 600d4c79a1..878a27992d 100644
--- a/docker/.env
+++ b/docker/.env
@@ -5,6 +5,7 @@
 # export UI_IMAGE=apache/skywalking-ui:<tag>
 # docker compose up
 
-ES_VERSION=7.4.2
-OAP_IMAGE=skywalking/oap:latest
-UI_IMAGE=skywalking/ui:latest
+ELASTICSEARCH_IMAGE=docker.elastic.co/elasticsearch/elasticsearch-oss:7.4.2
+BANYANDB_IMAGE=ghcr.io/apache/skywalking-banyandb:84f32b3969cdcc676aaee428383b34b3b67dbdf5
+OAP_IMAGE=ghcr.io/apache/skywalking/oap:latest
+UI_IMAGE=ghcr.io/apache/skywalking/oap:latest
diff --git a/docker/README.md b/docker/README.md
index 0070b1574d..4d63844303 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -12,6 +12,8 @@ You can use `Makefile` located at the root folder to build a 
docker image with t
 
 ```shell
 make docker
+# OR skip the tests
+make docker SKIP_TEST=true
 ```
 
 It not only contains the process of building a docker image but also includes 
all the required steps, for instance, init
@@ -50,10 +52,25 @@ The tag of docker image. The default value is `latest`.
 
 ## Running containers with docker-compose
 
-We can start up backend cluster by docker-compose
+We can start up backend cluster by docker-compose. There are two profiles with
+different storage options that you can choose, `elasticsearch` and `banyandb`.
+
+To start up the backend cluster with `elasticsearch` as the storage, run the
+following command:
+
+```shell
+docker compose --profile elasticsearch up
+```
+
+To start up the backend cluster with `banyandb` as the storage, run the
+following command:
 
 ```shell
-docker compose up
+docker compose --profile banyandb up
 ```
 
-[docker/.env](./.env) file contains the default elasticsearch tag (`ES_TAG`).
+[docker/.env](./.env) file contains some configurations that you can customize,
+such as the Docker image registry and tags.
+
+After the services are up and running, you can send telemetry data to
+localhost:11800 and access the UI at http://localhost:8080.
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index d1ebf16289..a78e0ea590 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -17,10 +17,14 @@
 version: '3.8'
 services:
   elasticsearch:
-    image: docker.elastic.co/elasticsearch/elasticsearch-oss:${ES_VERSION}
+    profiles:
+      - "elasticsearch"
+    image: 
${ELASTICSEARCH_IMAGE:-docker.elastic.co/elasticsearch/elasticsearch-oss:7.4.2}
     container_name: elasticsearch
     ports:
       - "9200:9200"
+    networks:
+      - demo
     healthcheck:
       test: [ "CMD-SHELL", "curl --silent --fail 
localhost:9200/_cluster/health || exit 1" ]
       interval: 30s
@@ -36,40 +40,74 @@ services:
         soft: -1
         hard: -1
 
-  oap:
-    image: ${OAP_IMAGE}
-    container_name: oap
-    depends_on:
-      elasticsearch:
-        condition: service_healthy
-    links:
-      - elasticsearch
+  banyandb:
+    profiles:
+      - "banyandb"
+    image: 
${BANYANDB_IMAGE:-ghcr.io/apache/skywalking-banyandb:84f32b3969cdcc676aaee428383b34b3b67dbdf5}
+    container_name: banyandb
+    networks:
+      - demo
+    expose:
+      - 17912
+    command: standalone --stream-root-path /tmp/stream-data 
--measure-root-path /tmp/measure-data
+    healthcheck:
+      test: [ "CMD", "sh", "-c", "nc -nz 127.0.0.1 17912" ]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  oap-base: &oap-base
+    profiles: [ "none" ]
+    image: ${OAP_IMAGE:-ghcr.io/apache/skywalking/oap:latest}
     ports:
       - "11800:11800"
       - "12800:12800"
+    networks:
+      - demo
     healthcheck:
-      test: [ "CMD-SHELL", "/skywalking/bin/swctl ch" ]
+      test: [ "CMD-SHELL", "curl http://localhost:12800/internal/l7check"; ]
       interval: 30s
       timeout: 10s
       retries: 3
       start_period: 10s
-    environment:
-      SW_STORAGE: elasticsearch
-      SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
+    environment: &oap-env
       SW_HEALTH_CHECKER: default
       SW_TELEMETRY: prometheus
       JAVA_OPTS: "-Xms2048m -Xmx2048m"
 
-  ui:
-    image: ${UI_IMAGE}
-    container_name: ui
+  oap-es:
+    <<: *oap-base
+    profiles: 
+      - "elasticsearch"
+    container_name: oap
     depends_on:
-      oap:
+      elasticsearch:
         condition: service_healthy
-    links:
-      - oap
+    environment:
+      <<: *oap-env
+      SW_STORAGE: elasticsearch
+      SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
+
+  oap-bdb:
+    <<: *oap-base
+    profiles:
+      - "banyandb"
+    container_name: oap
+    environment:
+      <<: *oap-env
+      SW_STORAGE: banyandb
+      SW_STORAGE_BANYANDB_TARGETS: banyandb:17912
+
+  ui:
+    image: ${UI_IMAGE:-ghcr.io/apache/skywalking/ui:latest}
+    container_name: ui
     ports:
       - "8080:8080"
+    networks:
+      - demo
     environment:
       SW_OAP_ADDRESS: http://oap:12800
       SW_ZIPKIN_ADDRESS: http://oap:9412
+
+networks:
+  demo:
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index f11a74a398..327b30ae81 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -8,6 +8,7 @@
 * Upgrade PostgreSQL driver to `42.4.4` to fix CVE-2024-1597.
 * Remove CLI(`swctl`) from the image.
 * Remove CLI_VERSION variable from Makefile build.
+* Add BanyanDB to docker-compose quickstart.
 
 #### OAP Server
 

Reply via email to