This repository has been archived by the owner on Oct 7, 2023. It is now read-only.
forked from ObolNetwork/charon-distributed-validator-cluster
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
172 lines (158 loc) · 6.36 KB
/
docker-compose.yml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: "3.8"
x-node-base: &node-base
image: obolnetwork/charon:${CHARON_VERSION:-v0.15.0}
restart: unless-stopped
networks: [cluster]
depends_on: [relay]
volumes:
- ./.charon:/opt/charon/.charon/
x-node-env: &node-env
CHARON_BEACON_NODE_ENDPOINTS: ${CHARON_BEACON_NODE_ENDPOINTS}
CHARON_LOG_LEVEL: ${CHARON_LOG_LEVEL:-info}
CHARON_LOG_FORMAT: ${CHARON_LOG_FORMAT:-console}
CHARON_VALIDATOR_API_ADDRESS: 0.0.0.0:3600
CHARON_MONITORING_ADDRESS: 0.0.0.0:3620
CHARON_JAEGER_ADDRESS: 0.0.0.0:6831
services:
# _ _ _ _
# ___| |__ __ _ _ __ ___ _ __ ___| (_) ___ _ __ | |_ ___
# / __| '_ \ / _` | '__/ _ \| '_ \ / __| | |/ _ \ '_ \| __/ __|
# | (__| | | | (_| | | | (_) | | | | | (__| | | __/ | | | |_\__ \
# \___|_| |_|\__,_|_| \___/|_| |_| \___|_|_|\___|_| |_|\__|___/
node-lighthouse:
<<: *node-base
environment:
<<: *node-env
CHARON_PRIVATE_KEY_FILE: /opt/charon/.charon/cluster/node${FIRST_NODE_NUMBER}/charon-enr-private-key
CHARON_LOCK_FILE: /opt/charon/.charon/cluster/node${FIRST_NODE_NUMBER}/cluster-lock.json
CHARON_JAEGER_SERVICE: node-lighthouse
CHARON_P2P_EXTERNAL_HOSTNAME: node-lighthouse
CHARON_P2P_RELAYS: ${CHARON_P2P_RELAYS}
CHARON_P2P_TCP_ADDRESS: 0.0.0.0:${CHARON_LIGHTHOUSE_P2P_TCP_ADDRESS_PORT}
ports:
- ${CHARON_LIGHTHOUSE_P2P_TCP_ADDRESS_PORT}:${CHARON_LIGHTHOUSE_P2P_TCP_ADDRESS_PORT}/tcp
node-teku:
<<: *node-base
environment:
<<: *node-env
CHARON_PRIVATE_KEY_FILE: /opt/charon/.charon/cluster/node${SECOND_NODE_NUMBER}/charon-enr-private-key
CHARON_LOCK_FILE: /opt/charon/.charon/cluster/node${SECOND_NODE_NUMBER}/cluster-lock.json
CHARON_JAEGER_SERVICE: node-teku
CHARON_P2P_EXTERNAL_HOSTNAME: node-teku
CHARON_P2P_RELAYS: ${CHARON_P2P_RELAYS}
CHARON_P2P_TCP_ADDRESS: 0.0.0.0:${CHARON_TEKU_P2P_TCP_ADDRESS_PORT}
ports:
- ${CHARON_TEKU_P2P_TCP_ADDRESS_PORT}:${CHARON_TEKU_P2P_TCP_ADDRESS_PORT}/tcp
node-nimbus:
<<: *node-base
environment:
<<: *node-env
CHARON_PRIVATE_KEY_FILE: /opt/charon/.charon/cluster/node${THIRD_NODE_NUMBER}/charon-enr-private-key
CHARON_LOCK_FILE: /opt/charon/.charon/cluster/node${THIRD_NODE_NUMBER}/cluster-lock.json
CHARON_JAEGER_SERVICE: node-nimbus
CHARON_P2P_EXTERNAL_HOSTNAME: node-nimbus
CHARON_P2P_RELAYS: ${CHARON_P2P_RELAYS}
CHARON_P2P_TCP_ADDRESS: 0.0.0.0:${CHARON_NIMBUS_P2P_TCP_ADDRESS_PORT}
ports:
- ${CHARON_NIMBUS_P2P_TCP_ADDRESS_PORT}:${CHARON_NIMBUS_P2P_TCP_ADDRESS_PORT}/tcp
relay:
<<: *node-base
command: relay
depends_on: []
environment:
<<: *node-env
CHARON_HTTP_ADDRESS: 0.0.0.0:${CHARON_RELAY_PORT}
CHARON_DATA_DIR: /opt/charon/relay
CHARON_P2P_EXTERNAL_HOSTNAME: ${CHARON_P2P_EXTERNAL_HOSTNAME}
CHARON_P2P_TCP_ADDRESS: 0.0.0.0:${CHARON_RELAY_P2P_TCP_ADDRESS_PORT}
volumes:
- ./relay:/opt/charon/relay:rw
ports:
- ${CHARON_RELAY_P2P_TCP_ADDRESS_PORT}:${CHARON_RELAY_P2P_TCP_ADDRESS_PORT}/tcp
- ${CHARON_RELAY_PORT}:${CHARON_RELAY_PORT}/tcp
# _ _ _ _
# __ ____ _| (_) __| | __ _| |_ ___ _ __ ___
# \ \ / / _` | | |/ _` |/ _` | __/ _ \| '__/ __|
# \ V / (_| | | | (_| | (_| | || (_) | | \__ \
# \_/ \__,_|_|_|\__,_|\__,_|\__\___/|_| |___/
vc-lighthouse:
image: sigp/lighthouse:${LIGHTHOUSE_VERSION:-v4.1.0}
entrypoint: /opt/lighthouse/run.sh
networks: [cluster]
depends_on: [node-lighthouse]
restart: unless-stopped
environment:
LIGHTHOUSE_BEACON_NODE_ADDRESS: http://node-lighthouse:3600
NETWORK: ${NETWORK}
FEE_RECIPIENT: ${FEE_RECIPIENT}
GRAFFITI: ${GRAFFITI}
volumes:
- .charon/cluster/node${FIRST_NODE_NUMBER}/validator_keys:/opt/charon/keys
- ./vc-clients/lighthouse/run.sh:/opt/lighthouse/run.sh
- ./vc-clients/lighthouse:/var/lib/lighthouse
vc-teku:
image: consensys/teku:${TEKU_VERSION:-23.5.0}
networks: [cluster]
depends_on: [node-teku]
restart: unless-stopped
command: |
validator-client
--data-base-path="/opt/data"
--beacon-node-api-endpoint="http://node-teku:3600"
--metrics-enabled=true
--metrics-host-allowlist="*"
--metrics-interface="0.0.0.0"
--metrics-port="8008"
--validators-keystore-locking-enabled=false
--network="${NETWORK}"
--validator-keys="/opt/charon/validator_keys:/opt/charon/validator_keys"
--validators-proposer-default-fee-recipient="${FEE_RECIPIENT}"
--validators-graffiti="${GRAFFITI}"
volumes:
- .charon/cluster/node${SECOND_NODE_NUMBER}/validator_keys:/opt/charon/validator_keys
- ./vc-clients/teku:/opt/data
vc-nimbus:
build:
context: ./vc-clients/nimbus
args:
NIMBUS_VERSION: ${NIMBUS_VERSION:-v23.5.0}
networks: [cluster]
depends_on: [node-nimbus]
restart: unless-stopped
environment:
NODE: node-nimbus
FEE_RECIPIENT: ${FEE_RECIPIENT}
GRAFFITI: ${GRAFFITI}
volumes:
- .charon/cluster/node${THIRD_NODE_NUMBER}/validator_keys:/home/validator_keys
- ./vc-clients/nimbus:/home/user/data
# _ _ _
# _ __ ___ ___ _ __ (_) |_ ___ _ __(_)_ __ __ _
# | '_ ` _ \ / _ \| '_ \| | __/ _ \| '__| | '_ \ / _` |
# | | | | | | (_) | | | | | || (_) | | | | | | | (_| |
# |_| |_| |_|\___/|_| |_|_|\__\___/|_| |_|_| |_|\__, |
# |___/
prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION:-v2.41.0}
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
networks: [cluster]
grafana:
image: grafana/grafana:${GRAFANA_VERSION:-9.3.2}
depends_on: [prometheus]
volumes:
- ./monitoring/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./monitoring/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/datasource.yml
- ./monitoring/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./monitoring/grafana/dashboards:/etc/dashboards
networks: [cluster]
ports:
- "${MONITORING_PORT_GRAFANA}:3000"
node-exporter:
image: prom/node-exporter:${NODE_EXPORTER_VERSION:-v1.5.0}
networks: [cluster]
jaeger:
image: jaegertracing/all-in-one:${JAEGAR_VERSION:-1.41.0}
networks: [cluster]
networks:
cluster: