mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Transitioning fig to docker-compose v3
This commit is contained in:
parent
1be476b5f5
commit
38ec8ddefc
11
docker/blocks/collectd/docker-compose.yaml
Normal file
11
docker/blocks/collectd/docker-compose.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
collectd:
|
||||||
|
build: blocks/collectd
|
||||||
|
environment:
|
||||||
|
HOST_NAME: myserver
|
||||||
|
GRAPHITE_HOST: graphite
|
||||||
|
GRAPHITE_PORT: 2003
|
||||||
|
GRAPHITE_PREFIX: collectd.
|
||||||
|
REPORT_BY_CPU: 'false'
|
||||||
|
COLLECT_INTERVAL: 10
|
||||||
|
links:
|
||||||
|
- graphite
|
@ -1,11 +0,0 @@
|
|||||||
collectd:
|
|
||||||
build: blocks/collectd
|
|
||||||
environment:
|
|
||||||
HOST_NAME: myserver
|
|
||||||
GRAPHITE_HOST: graphite
|
|
||||||
GRAPHITE_PORT: 2003
|
|
||||||
GRAPHITE_PREFIX: collectd.
|
|
||||||
REPORT_BY_CPU: 'false'
|
|
||||||
COLLECT_INTERVAL: 10
|
|
||||||
links:
|
|
||||||
- graphite
|
|
8
docker/blocks/elastic/docker-compose.yaml
Normal file
8
docker/blocks/elastic/docker-compose.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
elasticsearch:
|
||||||
|
image: elasticsearch:2.4.1
|
||||||
|
command: elasticsearch -Des.network.host=0.0.0.0
|
||||||
|
ports:
|
||||||
|
- "9200:9200"
|
||||||
|
- "9300:9300"
|
||||||
|
volumes:
|
||||||
|
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
@ -1,8 +0,0 @@
|
|||||||
elasticsearch:
|
|
||||||
image: elasticsearch:2.4.1
|
|
||||||
command: elasticsearch -Des.network.host=0.0.0.0
|
|
||||||
ports:
|
|
||||||
- "9200:9200"
|
|
||||||
- "9300:9300"
|
|
||||||
volumes:
|
|
||||||
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
|
8
docker/blocks/elastic1/docker-compose.yaml
Normal file
8
docker/blocks/elastic1/docker-compose.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
elasticsearch1:
|
||||||
|
image: elasticsearch:1.7.6
|
||||||
|
command: elasticsearch -Des.network.host=0.0.0.0
|
||||||
|
ports:
|
||||||
|
- "11200:9200"
|
||||||
|
- "11300:9300"
|
||||||
|
volumes:
|
||||||
|
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
@ -1,8 +0,0 @@
|
|||||||
elasticsearch1:
|
|
||||||
image: elasticsearch:1.7.6
|
|
||||||
command: elasticsearch -Des.network.host=0.0.0.0
|
|
||||||
ports:
|
|
||||||
- "11200:9200"
|
|
||||||
- "11300:9300"
|
|
||||||
volumes:
|
|
||||||
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
|
8
docker/blocks/elastic5/docker-compose.yaml
Normal file
8
docker/blocks/elastic5/docker-compose.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
||||||
|
|
||||||
|
elasticsearch5:
|
||||||
|
image: elasticsearch:5
|
||||||
|
command: elasticsearch
|
||||||
|
ports:
|
||||||
|
- "10200:9200"
|
||||||
|
- "10300:9300"
|
@ -1,8 +0,0 @@
|
|||||||
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
|
||||||
|
|
||||||
elasticsearch5:
|
|
||||||
image: elasticsearch:5
|
|
||||||
command: elasticsearch
|
|
||||||
ports:
|
|
||||||
- "10200:9200"
|
|
||||||
- "10300:9300"
|
|
16
docker/blocks/graphite/docker-compose.yaml
Normal file
16
docker/blocks/graphite/docker-compose.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
graphite:
|
||||||
|
build: blocks/graphite
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
- "2003:2003"
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
|
||||||
|
fake-graphite-data:
|
||||||
|
image: grafana/fake-data-gen
|
||||||
|
network_mode: bridge
|
||||||
|
environment:
|
||||||
|
FD_DATASOURCE: graphite
|
||||||
|
FD_PORT: 2003
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
graphite:
|
|
||||||
build: blocks/graphite
|
|
||||||
ports:
|
|
||||||
- "8080:80"
|
|
||||||
- "2003:2003"
|
|
||||||
volumes:
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
- /etc/timezone:/etc/timezone:ro
|
|
||||||
|
|
||||||
fake-graphite-data:
|
|
||||||
image: grafana/fake-data-gen
|
|
||||||
net: bridge
|
|
||||||
environment:
|
|
||||||
FD_DATASOURCE: graphite
|
|
||||||
FD_PORT: 2003
|
|
||||||
|
|
16
docker/blocks/graphite1/docker-compose.yaml
Normal file
16
docker/blocks/graphite1/docker-compose.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
graphite:
|
||||||
|
build: blocks/graphite1
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
- "2003:2003"
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
|
||||||
|
fake-graphite-data:
|
||||||
|
image: grafana/fake-data-gen
|
||||||
|
network_mode: bridge
|
||||||
|
environment:
|
||||||
|
FD_DATASOURCE: graphite
|
||||||
|
FD_PORT: 2003
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
graphite:
|
|
||||||
build: blocks/graphite1
|
|
||||||
ports:
|
|
||||||
- "8080:80"
|
|
||||||
- "2003:2003"
|
|
||||||
volumes:
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
- /etc/timezone:/etc/timezone:ro
|
|
||||||
|
|
||||||
fake-graphite-data:
|
|
||||||
image: grafana/fake-data-gen
|
|
||||||
net: bridge
|
|
||||||
environment:
|
|
||||||
FD_DATASOURCE: graphite
|
|
||||||
FD_PORT: 2003
|
|
||||||
|
|
17
docker/blocks/influxdb/docker-compose.yaml
Normal file
17
docker/blocks/influxdb/docker-compose.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
influxdb:
|
||||||
|
image: influxdb:latest
|
||||||
|
container_name: influxdb
|
||||||
|
ports:
|
||||||
|
- "2004:2004"
|
||||||
|
- "8083:8083"
|
||||||
|
- "8086:8086"
|
||||||
|
volumes:
|
||||||
|
- ./blocks/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
|
||||||
|
|
||||||
|
fake-influxdb-data:
|
||||||
|
image: grafana/fake-data-gen
|
||||||
|
network_mode: bridge
|
||||||
|
environment:
|
||||||
|
FD_DATASOURCE: influxdb
|
||||||
|
FD_PORT: 8086
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
influxdb:
|
|
||||||
image: influxdb:latest
|
|
||||||
container_name: influxdb
|
|
||||||
ports:
|
|
||||||
- "2004:2004"
|
|
||||||
- "8083:8083"
|
|
||||||
- "8086:8086"
|
|
||||||
volumes:
|
|
||||||
- ./blocks/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
|
|
||||||
|
|
||||||
fake-influxdb-data:
|
|
||||||
image: grafana/fake-data-gen
|
|
||||||
net: bridge
|
|
||||||
environment:
|
|
||||||
FD_DATASOURCE: influxdb
|
|
||||||
FD_PORT: 8086
|
|
||||||
|
|
6
docker/blocks/jaeger/docker-compose.yaml
Normal file
6
docker/blocks/jaeger/docker-compose.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
jaeger:
|
||||||
|
image: jaegertracing/all-in-one:latest
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:6831:6831/udp"
|
||||||
|
- "16686:16686"
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
jaeger:
|
|
||||||
image: jaegertracing/all-in-one:latest
|
|
||||||
ports:
|
|
||||||
- "localhost:6831:6831/udp"
|
|
||||||
- "16686:16686"
|
|
||||||
|
|
5
docker/blocks/memcached/docker-compose.yaml
Normal file
5
docker/blocks/memcached/docker-compose.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
memcached:
|
||||||
|
image: memcached:latest
|
||||||
|
ports:
|
||||||
|
- "11211:11211"
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
memcached:
|
|
||||||
image: memcached:latest
|
|
||||||
ports:
|
|
||||||
- "11211:11211"
|
|
||||||
|
|
14
docker/blocks/mysql/docker-compose.yaml
Normal file
14
docker/blocks/mysql/docker-compose.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: rootpass
|
||||||
|
MYSQL_DATABASE: grafana
|
||||||
|
MYSQL_USER: grafana
|
||||||
|
MYSQL_PASSWORD: password
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all]
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
mysql:
|
|
||||||
image: mysql:latest
|
|
||||||
environment:
|
|
||||||
MYSQL_ROOT_PASSWORD: rootpass
|
|
||||||
MYSQL_DATABASE: grafana
|
|
||||||
MYSQL_USER: grafana
|
|
||||||
MYSQL_PASSWORD: password
|
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
||||||
volumes:
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
- /etc/timezone:/etc/timezone:ro
|
|
||||||
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all]
|
|
||||||
|
|
9
docker/blocks/mysql_opendata/docker-compose.yaml
Normal file
9
docker/blocks/mysql_opendata/docker-compose.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
mysql_opendata:
|
||||||
|
build: blocks/mysql_opendata
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: rootpass
|
||||||
|
MYSQL_DATABASE: testdata
|
||||||
|
MYSQL_USER: grafana
|
||||||
|
MYSQL_PASSWORD: password
|
||||||
|
ports:
|
||||||
|
- "3307:3306"
|
@ -1,9 +0,0 @@
|
|||||||
mysql_opendata:
|
|
||||||
build: blocks/mysql_opendata
|
|
||||||
environment:
|
|
||||||
MYSQL_ROOT_PASSWORD: rootpass
|
|
||||||
MYSQL_DATABASE: testdata
|
|
||||||
MYSQL_USER: grafana
|
|
||||||
MYSQL_PASSWORD: password
|
|
||||||
ports:
|
|
||||||
- "3307:3306"
|
|
9
docker/blocks/mysql_tests/docker-compose.yaml
Normal file
9
docker/blocks/mysql_tests/docker-compose.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
mysqltests:
|
||||||
|
image: mysql:latest
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: rootpass
|
||||||
|
MYSQL_DATABASE: grafana_tests
|
||||||
|
MYSQL_USER: grafana
|
||||||
|
MYSQL_PASSWORD: password
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
@ -1,9 +0,0 @@
|
|||||||
mysqltests:
|
|
||||||
image: mysql:latest
|
|
||||||
environment:
|
|
||||||
MYSQL_ROOT_PASSWORD: rootpass
|
|
||||||
MYSQL_DATABASE: grafana_tests
|
|
||||||
MYSQL_USER: grafana
|
|
||||||
MYSQL_PASSWORD: password
|
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
10
docker/blocks/openldap/docker-compose.yaml
Normal file
10
docker/blocks/openldap/docker-compose.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
openldap:
|
||||||
|
build: blocks/openldap
|
||||||
|
environment:
|
||||||
|
SLAPD_PASSWORD: grafana
|
||||||
|
SLAPD_DOMAIN: grafana.org
|
||||||
|
SLAPD_ADDITIONAL_MODULES: memberof
|
||||||
|
ports:
|
||||||
|
- "389:389"
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
openldap:
|
|
||||||
build: blocks/openldap
|
|
||||||
environment:
|
|
||||||
SLAPD_PASSWORD: grafana
|
|
||||||
SLAPD_DOMAIN: grafana.org
|
|
||||||
SLAPD_ADDITIONAL_MODULES: memberof
|
|
||||||
ports:
|
|
||||||
- "389:389"
|
|
||||||
|
|
||||||
|
|
11
docker/blocks/opentsdb/docker-compose.yaml
Normal file
11
docker/blocks/opentsdb/docker-compose.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
opentsdb:
|
||||||
|
image: opower/opentsdb:latest
|
||||||
|
ports:
|
||||||
|
- "4242:4242"
|
||||||
|
|
||||||
|
fake-opentsdb-data:
|
||||||
|
image: grafana/fake-data-gen
|
||||||
|
network_mode: bridge
|
||||||
|
environment:
|
||||||
|
FD_DATASOURCE: opentsdb
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
opentsdb:
|
|
||||||
image: opower/opentsdb:latest
|
|
||||||
ports:
|
|
||||||
- "4242:4242"
|
|
||||||
|
|
||||||
fake-opentsdb-data:
|
|
||||||
image: grafana/fake-data-gen
|
|
||||||
net: bridge
|
|
||||||
environment:
|
|
||||||
FD_DATASOURCE: opentsdb
|
|
||||||
|
|
9
docker/blocks/postgres/docker-compose.yaml
Normal file
9
docker/blocks/postgres/docker-compose.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
postgrestest:
|
||||||
|
image: postgres:latest
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: grafana
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
POSTGRES_DATABASE: grafana
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
|
@ -1,9 +0,0 @@
|
|||||||
postgrestest:
|
|
||||||
image: postgres:latest
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: grafana
|
|
||||||
POSTGRES_PASSWORD: password
|
|
||||||
POSTGRES_DATABASE: grafana
|
|
||||||
ports:
|
|
||||||
- "5432:5432"
|
|
||||||
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
|
|
7
docker/blocks/postgres_tests/docker-compose.yaml
Normal file
7
docker/blocks/postgres_tests/docker-compose.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
postgrestest:
|
||||||
|
image: postgres:latest
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: grafanatest
|
||||||
|
POSTGRES_PASSWORD: grafanatest
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
@ -1,7 +0,0 @@
|
|||||||
postgrestest:
|
|
||||||
image: postgres:latest
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: grafanatest
|
|
||||||
POSTGRES_PASSWORD: grafanatest
|
|
||||||
ports:
|
|
||||||
- "5432:5432"
|
|
25
docker/blocks/prometheus/docker-compose.yaml
Normal file
25
docker/blocks/prometheus/docker-compose.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
prometheus:
|
||||||
|
build: blocks/prometheus
|
||||||
|
network_mode: host
|
||||||
|
ports:
|
||||||
|
- "9090:9090"
|
||||||
|
|
||||||
|
node_exporter:
|
||||||
|
image: prom/node-exporter
|
||||||
|
network_mode: host
|
||||||
|
ports:
|
||||||
|
- "9100:9100"
|
||||||
|
|
||||||
|
fake-prometheus-data:
|
||||||
|
image: grafana/fake-data-gen
|
||||||
|
network_mode: host
|
||||||
|
ports:
|
||||||
|
- "9091:9091"
|
||||||
|
environment:
|
||||||
|
FD_DATASOURCE: prom
|
||||||
|
|
||||||
|
alertmanager:
|
||||||
|
image: quay.io/prometheus/alertmanager
|
||||||
|
network_mode: host
|
||||||
|
ports:
|
||||||
|
- "9093:9093"
|
@ -1,25 +0,0 @@
|
|||||||
prometheus:
|
|
||||||
build: blocks/prometheus
|
|
||||||
net: host
|
|
||||||
ports:
|
|
||||||
- "9090:9090"
|
|
||||||
|
|
||||||
node_exporter:
|
|
||||||
image: prom/node-exporter
|
|
||||||
net: host
|
|
||||||
ports:
|
|
||||||
- "9100:9100"
|
|
||||||
|
|
||||||
fake-prometheus-data:
|
|
||||||
image: grafana/fake-data-gen
|
|
||||||
net: host
|
|
||||||
ports:
|
|
||||||
- "9091:9091"
|
|
||||||
environment:
|
|
||||||
FD_DATASOURCE: prom
|
|
||||||
|
|
||||||
alertmanager:
|
|
||||||
image: quay.io/prometheus/alertmanager
|
|
||||||
net: host
|
|
||||||
ports:
|
|
||||||
- "9093:9093"
|
|
4
docker/blocks/smtp/docker-compose.yaml
Normal file
4
docker/blocks/smtp/docker-compose.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
snmpd:
|
||||||
|
image: namshi/smtp
|
||||||
|
ports:
|
||||||
|
- "25:25"
|
@ -1,4 +0,0 @@
|
|||||||
snmpd:
|
|
||||||
image: namshi/smtp
|
|
||||||
ports:
|
|
||||||
- "25:25"
|
|
2
docker/compose_header.yml
Normal file
2
docker/compose_header.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
@ -7,8 +7,9 @@ template_dir=templates
|
|||||||
grafana_config_file=conf.tmp
|
grafana_config_file=conf.tmp
|
||||||
grafana_config=config
|
grafana_config=config
|
||||||
|
|
||||||
fig_file=docker-compose.yml
|
compose_header_file=compose_header.yml
|
||||||
fig_config=fig
|
fig_file=docker-compose.yaml
|
||||||
|
fig_config=docker-compose.yaml
|
||||||
|
|
||||||
if [ "$#" == 0 ]; then
|
if [ "$#" == 0 ]; then
|
||||||
blocks=`ls $blocks_dir`
|
blocks=`ls $blocks_dir`
|
||||||
@ -23,13 +24,16 @@ if [ "$#" == 0 ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in $gogs_config_file $fig_file; do
|
for file in $grafana_config_file $fig_file; do
|
||||||
if [ -e $file ]; then
|
if [ -e $file ]; then
|
||||||
echo "Deleting $file"
|
echo "Deleting $file"
|
||||||
rm $file
|
rm $file
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Adding Compose header to $fig_file"
|
||||||
|
cat $compose_header_file >> $fig_file
|
||||||
|
|
||||||
for dir in $@; do
|
for dir in $@; do
|
||||||
current_dir=$blocks_dir/$dir
|
current_dir=$blocks_dir/$dir
|
||||||
if [ ! -d "$current_dir" ]; then
|
if [ ! -d "$current_dir" ]; then
|
||||||
@ -45,7 +49,7 @@ for dir in $@; do
|
|||||||
|
|
||||||
if [ -e $current_dir/$fig_config ]; then
|
if [ -e $current_dir/$fig_config ]; then
|
||||||
echo "Adding $current_dir/$fig_config to $fig_file"
|
echo "Adding $current_dir/$fig_config to $fig_file"
|
||||||
cat $current_dir/fig >> $fig_file
|
cat $current_dir/$fig_config >> $fig_file
|
||||||
echo "" >> $fig_file
|
echo "" >> $fig_file
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user