-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess-compose.yml
More file actions
158 lines (152 loc) · 4.12 KB
/
process-compose.yml
File metadata and controls
158 lines (152 loc) · 4.12 KB
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
version: "0.5"
processes:
etcd:
command: |
etcd \
--name silo-dev \
--data-dir ./tmp/etcd-data \
--listen-client-urls http://127.0.0.1:2379 \
--advertise-client-urls http://127.0.0.1:2379 \
--listen-peer-urls http://127.0.0.1:2380 \
--initial-advertise-peer-urls http://127.0.0.1:2380 \
--initial-cluster silo-dev=http://127.0.0.1:2380 \
--initial-cluster-token silo-dev-token \
--initial-cluster-state new
readiness_probe:
http_get:
host: 127.0.0.1
port: 2379
path: /health
initial_delay_seconds: 1
period_seconds: 2
shutdown:
timeout_seconds: 2
availability:
restart: always
backoff_seconds: 2
gubernator:
command: gubernator
environment:
- GUBER_GRPC_ADDRESS=127.0.0.1:9992
- GUBER_HTTP_ADDRESS=127.0.0.1:9982
- GUBER_MEMBERLIST_ADDRESS=127.0.0.1:7947
- GUBER_MEMBERLIST_BIND_ADDRESS=127.0.0.1:7947
- GUBER_MEMBERLIST_KNOWN_NODES=127.0.0.1:7947
readiness_probe:
http_get:
host: 127.0.0.1
port: 9982
path: /v1/HealthCheck
initial_delay_seconds: 1
period_seconds: 2
shutdown:
timeout_seconds: 1
availability:
restart: always
backoff_seconds: 1
# Toxiproxy server for network fault injection testing
toxiproxy:
command: toxiproxy-server -host 127.0.0.1 -port 8474 -config $TOXIPROXY_CONFIG
readiness_probe:
http_get:
host: 127.0.0.1
port: 8474
path: /version
initial_delay_seconds: 1
period_seconds: 2
shutdown:
timeout_seconds: 1
availability:
restart: always
backoff_seconds: 1
# Silo instance 1 - watchexec restarts cargo run on source changes
silo-1:
command: |
watchexec \
--restart \
--stop-signal SIGTERM \
--stop-timeout 1 \
--watch src \
--watch proto \
--watch Cargo.toml \
--ignore target \
--ignore tmp \
--ignore '*.lock' \
-- cargo run --bin silo -- -c example_configs/dev-node1.toml
depends_on:
etcd:
condition: process_healthy
gubernator:
condition: process_healthy
shutdown:
timeout_seconds: 1
availability:
restart: always
backoff_seconds: 1
log_location: ./tmp/silo-1.log
log_configuration:
rotation:
max_size_mb: 5
max_age_days: 3
max_backups: 1
# Silo instance 2 - watchexec restarts cargo run on source changes
silo-2:
command: |
watchexec \
--restart \
--stop-signal SIGTERM \
--stop-timeout 1 \
--watch src \
--watch proto \
--watch Cargo.toml \
--ignore target \
--ignore tmp \
--ignore '*.lock' \
-- cargo run --bin silo -- -c example_configs/dev-node2.toml
depends_on:
etcd:
condition: process_healthy
gubernator:
condition: process_healthy
shutdown:
timeout_seconds: 1
availability:
restart: always
backoff_seconds: 1
log_location: ./tmp/silo-2.log
log_configuration:
rotation:
max_size_mb: 5
max_age_days: 3
max_backups: 1
# Silo standalone compactor - watchexec restarts cargo run on source changes.
# Depends on silo-1 because silo bootstraps the shard map in etcd; the
# compactor reads it from there.
silo-compactor:
command: |
watchexec \
--restart \
--stop-signal SIGTERM \
--stop-timeout 5 \
--watch silo-compactor/src \
--watch silo-compactor/Cargo.toml \
--ignore target \
--ignore tmp \
--ignore '*.lock' \
-- cargo run --package silo-compactor -- -c example_configs/compactor-dev.toml
depends_on:
etcd:
condition: process_healthy
silo-1:
condition: process_started
shutdown:
timeout_seconds: 5
availability:
restart: always
backoff_seconds: 2
log_location: ./tmp/silo-compactor.log
log_configuration:
rotation:
max_size_mb: 5
max_age_days: 3
max_backups: 1