Skip to content

Commit

Permalink
[manifests] docker-compose add grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-0314 authored and sharang committed Jan 16, 2024
1 parent 7cc99ea commit 57ab3ca
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
run: |
cd manifests
sed -i "s|latest|${{ env.IMAGE_TAG_PREFIX }}|g" deepflow-docker-compose/docker-compose.yaml
tar -czvf deepflow-docker-compose.tar deepflow-docker-compose
ossutil cp -rf deepflow-docker-compose.tar oss://deepflow-ce/pkg/docker-compose/stable/linux/deepflow-docker-compose.tar
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[analytics]
check_for_updates = true
[database]
host = deepflow-mysql:30130
name = grafana
password = deepflow
type = mysql
user = root
[grafana_net]
url = https://grafana.net
[log]
mode = console
[paths]
data = /var/lib/grafana/
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins
provisioning = /etc/grafana/provisioning
[plugins]
allow_loading_unsigned_plugins = deepflow-querier-datasource,deepflow-apptracing-panel,deepflow-topo-panel,deepflowio-tracing-panel,deepflowio-deepflow-datasource,deepflowio-topo-panel
64 changes: 64 additions & 0 deletions manifests/deepflow-docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,70 @@ services:
- deepflow
ports:
- 20418:20418
deepflow-grafana-init-worksdir:
image: registry.cn-hongkong.aliyuncs.com/deepflow-ce/deepflowio-init-grafana-ds-dh:latest
container_name: deepflow-grafana-init-worksdir
command: /bin/sh -c "rm -rf /tmp/dashboards/*; rm -rf /var/lib/grafana/plugins/*"
volumes:
- /opt/deepflow/grafana/dashboards:/tmp/dashboards:z
- /opt/deepflow/grafana/plugins:/var/lib/grafana/plugins:z
- /opt/deepflow/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:z
networks:
- deepflow
deepflow-grafana-init-grafana-ds-dh:
image: registry.cn-hongkong.aliyuncs.com/deepflow-ce/deepflowio-init-grafana-ds-dh:latest
container_name: deepflow-grafana-init-grafana-ds-dh
volumes:
- /opt/deepflow/grafana/dashboards:/tmp/dashboards:z
- /opt/deepflow/grafana/plugins:/var/lib/grafana/plugins:z
- /opt/deepflow/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:z
- /opt/deepflow/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:z
networks:
- deepflow
depends_on:
- deepflow-grafana-init-worksdir
deepflow-grafana-init-custom-plugins:
image: registry.cn-hongkong.aliyuncs.com/deepflow-ce/deepflowio-init-grafana:latest
container_name: deepflow-grafana-init-custom-plugins
volumes:
- /opt/deepflow/grafana/dashboards:/tmp/dashboards:z
- /opt/deepflow/grafana/plugins:/var/lib/grafana/plugins:z
networks:
- deepflow
depends_on:
- deepflow-grafana-init-worksdir
deepflow-grafana:
image: registry.cn-hongkong.aliyuncs.com/deepflow-ce/grafana:10.1.5
container_name: deepflow-grafana
environment:
TZ: "Asia/Shanghai"
GF_SECURITY_ADMIN_USER: "admin"
GF_SECURITY_ADMIN_PASSWORD: "deepflow"
DEEPFLOW_REQUEST_URL: 'http://deepflow-server:20416'
DEEPFLOW_TRACEURL: 'http://deepflow-app:20418'
MYSQL_URL: "deepflow-mysql:30130"
MYSQL_USER: "root"
MYSQL_PASSWORD: "deepflow"
CLICKHOUSE_SERVER: "deepflow-clickhouse"
CLICKHOUSE_USER: "default"
CLICKHOUSE_PASSWORD: ""
restart: always
volumes:
- type: bind
source: ./common/config/grafana/grafana.ini
target: /etc/grafana/grafana.ini
- /opt/deepflow/grafana/dashboards:/tmp/dashboards:z
- /opt/deepflow/grafana/plugins:/var/lib/grafana/plugins:z
- /opt/deepflow/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:z
- /opt/deepflow/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:z
networks:
- deepflow
ports:
- 3000:3000
depends_on:
- deepflow-grafana-init-grafana-ds-dh
- deepflow-grafana-init-custom-plugins

networks:
deepflow:
external: false

0 comments on commit 57ab3ca

Please sign in to comment.