# 🔍 Description ## Issue References 🔗 This pull request fixes #5944 ## Describe Your Solution 🔧 Add prometheus and grafana docker image to docker compose yaml, and by defaults, prometheus will get kyuubi server's metrics and grafana set prometheus as default datasource. Help developers quickly build a dashboard development environment. ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 In local test - [x] all container start success - [x] By defaults, prometheus get kyuubi's metrics - [x] Grafana take the prometheus as default datasource #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #5945 from zwangsheng/KYUUBI#5944. Closes #5944 031deedeb [Binjie Yang] Update docker/playground/README.md dbf41e37d [zwangsheng] declare metrics related config e6efe3071 [zwangsheng] make grafana as anonymous 404dd42ff [zwangsheng] fix comments f7ca4ae1c [zwangsheng] fix prometheus 089f8d08c [zwangsheng] eof 68720788e [zwangsheng] add license header cfa6edfef [zwangsheng] [KYUUBI #5944][Improvement] Introduce Prometheus and Grafana for Kyuubi Playground Lead-authored-by: zwangsheng <binjieyang@apache.org> Co-authored-by: Binjie Yang <binjieyang@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
109 lines
3.4 KiB
YAML
109 lines
3.4 KiB
YAML
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership.
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
# (the "License"); you may not use this file except in compliance with
|
|
# the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
services:
|
|
minio:
|
|
image: bitnami/minio:2023-debian-11
|
|
environment:
|
|
MINIO_ROOT_USER: minio
|
|
MINIO_ROOT_PASSWORD: minio_minio
|
|
MINIO_DEFAULT_BUCKETS: spark-bucket
|
|
container_name: minio
|
|
hostname: minio
|
|
ports:
|
|
- 9000
|
|
- 9001:9001
|
|
|
|
postgres:
|
|
image: postgres:${POSTGRES_VERSION}
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: metastore
|
|
container_name: postgres
|
|
hostname: postgres
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- ./script/hive-schema-2.3.0.postgres.sql:/docker-entrypoint-initdb.d/hive-schema-2.3.0.postgres.sql
|
|
- ./script/hive-txn-schema-2.3.0.postgres.sql:/docker-entrypoint-initdb.d/hive-txn-schema-2.3.0.postgres.sql
|
|
|
|
zookeeper:
|
|
image: zookeeper:${ZOOKEEPER_VERSION}
|
|
ports:
|
|
- 2181
|
|
container_name: zookeeper
|
|
hostname: zookeeper
|
|
|
|
metastore:
|
|
image: nekyuubi/kyuubi-playground-metastore:${KYUUBI_VERSION}
|
|
container_name: metastore
|
|
hostname: metastore
|
|
ports:
|
|
- 9083
|
|
volumes:
|
|
- ./conf/core-site.xml:/etc/hadoop/conf/core-site.xml
|
|
- ./conf/hive-site.xml:/etc/hive/conf/hive-site.xml
|
|
depends_on:
|
|
- postgres
|
|
|
|
kyuubi:
|
|
image: nekyuubi/kyuubi-playground-kyuubi:${KYUUBI_VERSION}
|
|
container_name: kyuubi
|
|
hostname: kyuubi
|
|
ports:
|
|
- 4040-4050:4040-4050
|
|
- 10009:10009
|
|
- 10099:10099
|
|
volumes:
|
|
- ./conf/core-site.xml:/etc/hadoop/conf/core-site.xml
|
|
- ./conf/hive-site.xml:/etc/hive/conf/hive-site.xml
|
|
- ./conf/spark-defaults.conf:/etc/spark/conf/spark-defaults.conf
|
|
- ./conf/kyuubi-defaults.conf:/etc/kyuubi/conf/kyuubi-defaults.conf
|
|
- ./conf/kyuubi-log4j2.xml:/etc/kyuubi/conf/log4j2.xml
|
|
- ./script/load-dataset-tpcds-tiny.sql:/opt/load_data/load-dataset-tpcds-tiny.sql
|
|
- ./script/load-dataset-tpch-tiny.sql:/opt/load_data/load-dataset-tpch-tiny.sql
|
|
depends_on:
|
|
- metastore
|
|
- minio
|
|
- zookeeper
|
|
|
|
prometheus:
|
|
# leave `v` here for match prometheus docker image tag
|
|
image: prom/prometheus:v${PROMETHEUS_VERSION}
|
|
container_name: prometheus
|
|
hostname: prometheus
|
|
ports:
|
|
- 9090:9090
|
|
- 8123:8123
|
|
volumes:
|
|
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
grafana:
|
|
image: grafana/grafana-oss:${GRAFANA_VERSION}
|
|
container_name: grafana
|
|
hostname: grafana
|
|
ports:
|
|
- 3000:3000
|
|
environment:
|
|
- GF_AUTH_ANONYMOUS_ENABLED=true
|
|
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
|
|
volumes:
|
|
- ./grafana/datasource/prometheus.yaml:/etc/grafana/provisioning/datasources/prometheus.yaml
|
|
depends_on:
|
|
- prometheus
|