forked from ZertoPublic/zroc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
111 lines (103 loc) · 3.02 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '3.7'
networks:
front-tier:
back-tier:
volumes:
prometheus_data: {}
grafana_data: {}
services:
# Exporter for ZVM/vCenter site 1
zertoexporter:
container_name: zvmexporter1
hostname: zvmexporter1 # this hostname will need to be set in the prometheus.yaml file as well
image: recklessop/zerto-exporter:stable
command: python python-node-exporter.py
ports:
- "9999:9999"
volumes:
- ./zvmexporter/:/usr/src/app/logs/
environment:
# Site 1 configuration settings
- VERIFY_SSL=False
- ZVM_HOST=192.168.50.60
- ZVM_PORT=443
- SCRAPE_SPEED=20 #how often should the exporter scrape the Zerto API
- CLIENT_ID=api-script
- CLIENT_SECRET=js51tDM8oappYUGRJBhF7bcsedNoHA5j
- LOGLEVEL=DEBUG
- VCENTER_HOST=vcenter.local
- VCENTER_USER=administrator@vsphere.local
- VCENTER_PASSWORD=password
networks:
- back-tier
restart: always
# This is used for a second ZVM / vCenter (maybe your DR site?)
#zertoexporter2:
# container_name: zvmexporter2
# hostname: zvmexporter2
# image: recklessop/zerto-exporter:stable
# command: python python-node-exporter.py
# ports:
# - "9998:9999" # if you add a third or more exporters change the port number before the :
# volumes:
# - ./zvmexporter/:/usr/src/app/logs/
# environment:
# # Site 2 configuration settings
# - VERIFY_SSL=False
# - ZVM_HOST=192.168.50.30
# - ZVM_PORT=443
# - SCRAPE_SPEED=20 #how often should the exporter scrape the Zerto API
# - CLIENT_ID=api-script
# - CLIENT_SECRET=x2aokKGPyS1O6LCW2uNqm2tbko2PLUSn
# - LOGLEVEL=DEBUG
# - VCENTER_HOST=192.168.50.20
# - VCENTER_USER=administrator@vsphere.local
# - VCENTER_PASSWORD=password
# networks:
# - back-tier
# restart: always
prometheus:
image: prom/prometheus:v2.40.6
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9090:9090
networks:
- back-tier
restart: always
depends_on:
- zertoexporter
grafana:
image: grafana/grafana
user: "472"
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- GF_SECURITY_ADMIN_PASSWORD=zertodata
- GF_USERS_ALLOW_SIGN_UP=false
- data-source-url=http://prometheus:9090
- name=Prometheus
- type=prometheus
- update-interval=10
networks:
- back-tier
- front-tier
restart: always
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_POLL_INTERVAL=360 # 1 hour
restart: always