-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.chaos-network.yaml
More file actions
47 lines (43 loc) · 2.38 KB
/
docker-compose.chaos-network.yaml
File metadata and controls
47 lines (43 loc) · 2.38 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
services:
node1:
cap_add:
- NET_ADMIN
entrypoint: >
/bin/bash -c "apt-get update && apt-get install -y --no-install-recommends iproute2 iptables && \
modprobe sch_netem 2>/dev/null || true && \
tc qdisc add dev eth0 root netem delay 200ms loss 10% 2>/dev/null || echo 'tc netem not available, continuing...' && \
exec /app/cli run --key-file-path /app/configs/node_1.json --config-file-path /app/configs/node_1.yaml --use-mock-oracle"
node2:
cap_add:
- NET_ADMIN
entrypoint: >
/bin/bash -c "apt-get update && apt-get install -y --no-install-recommends iproute2 iptables && \
modprobe sch_netem 2>/dev/null || true && \
tc qdisc add dev eth0 root netem delay 200ms loss 10% 2>/dev/null || echo 'tc netem not available, continuing...' && \
exec /app/cli run --key-file-path /app/configs/node_2.json --config-file-path /app/configs/node_2.yaml --use-mock-oracle"
node3:
cap_add:
- NET_ADMIN
entrypoint: >
/bin/bash -c "apt-get update && apt-get install -y --no-install-recommends iproute2 iptables && \
modprobe sch_netem 2>/dev/null || true && \
tc qdisc add dev eth0 root netem delay 200ms loss 10% 2>/dev/null || echo 'tc netem not available, continuing...' && \
iptables -A OUTPUT -d node4 -j DROP && \
exec /app/cli run --key-file-path /app/configs/node_3.json --config-file-path /app/configs/node_3.yaml --use-mock-oracle"
node4:
cap_add:
- NET_ADMIN
entrypoint: >
/bin/bash -c "apt-get update && apt-get install -y --no-install-recommends iproute2 iptables && \
modprobe sch_netem 2>/dev/null || true && \
tc qdisc add dev eth0 root netem delay 200ms loss 10% 2>/dev/null || echo 'tc netem not available, continuing...' && \
iptables -A OUTPUT -d node3 -j DROP && \
exec /app/cli run --key-file-path /app/configs/node_4.json --config-file-path /app/configs/node_4.yaml --use-mock-oracle"
node5:
cap_add:
- NET_ADMIN
entrypoint: >
/bin/bash -c "apt-get update && apt-get install -y --no-install-recommends iproute2 iptables && \
modprobe sch_netem 2>/dev/null || true && \
tc qdisc add dev eth0 root netem delay 200ms loss 10% 2>/dev/null || echo 'tc netem not available, continuing...' && \
exec /app/cli run --key-file-path /app/configs/node_5.json --config-file-path /app/configs/node_5.yaml --use-mock-oracle"