-
Notifications
You must be signed in to change notification settings - Fork 80
/
docker-compose.yml
66 lines (63 loc) · 1.99 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
---
# Provides a docker-compose configuration for local fast iteration when
# hacking on smee alone.
# TODO: figure out if NET_ADMIN capability is really necessary
version: "3.8"
# use a custom network configuration to enable macvlan mode and set explicit
# IPs and MACs as well as support mainstream DHCP clients for easier testing
# standalone-hardware.json references these IPs and MACs so we can write
# (simpler) assertions against behavior on the client side.
networks:
smee-test:
# enables a more realistic L2 network for the containers
driver: macvlan
ipam:
driver: default
config:
- subnet: 192.168.99.0/24
gateway: 192.168.99.1
services:
smee:
build: .
# entrypoint: ["/usr/bin/smee", "--dhcp-addr", "0.0.0.0:67"]
entrypoint: ["/start-smee.sh"]
networks:
smee-test:
ipv4_address: 192.168.99.42
mac_address: 02:00:00:00:00:01
environment:
SMEE_TINK_SERVER: tink-server:42113
SMEE_BACKEND_KUBE_ENABLED: false
SMEE_BACKEND_FILE_ENABLED: true
SMEE_BACKEND_FILE_PATH: /hardware.yaml
SMEE_OSIE_URL: "http://192.168.8.5/osie/artifacts/"
OTEL_EXPORTER_OTLP_ENDPOINT: otel-collector:4317
OTEL_EXPORTER_OTLP_INSECURE: "true"
volumes:
- ./test/hardware.yaml:/hardware.yaml
- ./test/start-smee.sh:/start-smee.sh
cap_add:
- NET_ADMIN
# eventually want to add more client containers, including one that smee will
# not recognize so we can validate it won't serve content to IPs it's not
# managing
client:
depends_on:
- smee
build: test
networks:
smee-test:
ipv4_address: 192.168.99.43
mac_address: 02:00:00:00:00:ff
cap_add:
- NET_ADMIN
otel-collector:
image: otel/opentelemetry-collector-contrib:0.38.0
networks:
smee-test:
ipv4_address: 192.168.99.44
volumes:
- ./test/otel-collector.yaml:/etc/otel-collector.yaml
command: --config /etc/otel-collector.yaml
ports:
- "4317:4317"