Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (92 loc) · 3.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
105 lines (92 loc) · 3.11 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
# ==============================================================================
# SHADOW-Net — SWaP Emulation (Docker Compose)
# ==============================================================================
# Paper §V-A Microbenchmark Environment
#
# Emulates Raspberry Pi 4 hardware constraints:
# - Broadcom BCM2711, Quad-core Cortex-A72 @ 1.5GHz
# - 1 GB LPDDR4 RAM (worst-case variant)
#
# Three services simulate drones at different SOC tiers to demonstrate the
# dynamic cryptographic step-down (§IV-A):
#
# shadow-drone-alpha → SOC 85% (HIGH-POWER, 64-bit SecInt)
# shadow-drone-bravo → SOC 50% (MEDIUM-POWER, 48-bit SecInt)
# shadow-drone-charlie→ SOC 20% (CRITICAL-POWER, 40-bit SecInt)
#
# Run all three:
# docker-compose up --build
#
# Run a single tier:
# docker-compose up --build shadow-drone-bravo
# ==============================================================================
services:
# ── Drone Alpha — HIGH-POWER State (SOC > 70%) ─────────────────────────
shadow-drone-alpha:
build:
context: .
dockerfile: Dockerfile
container_name: shadow-drone-alpha
command: ["--soc", "85", "--rows", "4", "--cols", "4"]
# SWaP constraints — Raspberry Pi 4 emulation
deploy:
resources:
limits:
cpus: "0.50" # ≈ single-core equivalent of Pi 4
memory: 1g # 1 GB LPDDR4 (worst-case Pi 4 variant)
pids: 100 # Prevent fork-bomb / runaway threads
reservations:
memory: 256m # Guaranteed minimum allocation
environment:
- PYTHONUNBUFFERED=1
- SHADOW_DRONE_ID=ALPHA
- SHADOW_SOC=85
networks:
- shadow-fanet
# ── Drone Bravo — MEDIUM-POWER State (30% < SOC ≤ 70%) ────────────────
shadow-drone-bravo:
build:
context: .
dockerfile: Dockerfile
container_name: shadow-drone-bravo
command: ["--soc", "50", "--rows", "4", "--cols", "4"]
deploy:
resources:
limits:
cpus: "0.50"
memory: 1g
pids: 100
reservations:
memory: 256m
environment:
- PYTHONUNBUFFERED=1
- SHADOW_DRONE_ID=BRAVO
- SHADOW_SOC=50
networks:
- shadow-fanet
# ── Drone Charlie — CRITICAL-POWER State (SOC ≤ 30%) ──────────────────
shadow-drone-charlie:
build:
context: .
dockerfile: Dockerfile
container_name: shadow-drone-charlie
command: ["--soc", "20", "--rows", "4", "--cols", "4"]
deploy:
resources:
limits:
cpus: "0.50"
memory: 1g
pids: 100
reservations:
memory: 256m
environment:
- PYTHONUNBUFFERED=1
- SHADOW_DRONE_ID=CHARLIE
- SHADOW_SOC=20
networks:
- shadow-fanet
# ── Internal FANET bridge network ────────────────────────────────────────────
networks:
shadow-fanet:
driver: bridge
name: shadow-fanet