Skip to content

Commit

Permalink
feat: start docker test env
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jan 18, 2024
1 parent 9f58202 commit e035e2e
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/suite/Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
down:
docker-compose down
sudo rm -rf *-run

up:
BIRD_VERSION=2.14 docker-compose up -d

birdc container:
sudo socat - UNIX-CONNECT:./{{ container }}-run/bird.ctl
19 changes: 19 additions & 0 deletions tests/suite/alpha.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
router id 172.16.97.2;

protocol device {}
protocol direct { ipv4; ipv6; }

protocol static {
ipv4;
route 172.16.98.0/24 reject;
}

protocol bgp bravo {
local 172.16.97.2 as 65002;
neighbor 172.16.97.3 as 65003;

ipv4 {
import all;
export where source = RTS_STATIC;
};
}
4 changes: 4 additions & 0 deletions tests/suite/bravo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
router id 172.16.97.3;

protocol device {}
protocol direct { ipv4; ipv6; }
28 changes: 28 additions & 0 deletions tests/suite/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3.8"
services:
alpha:
image: pierky/bird:${BIRD_VERSION}
container_name: alpha
volumes:
- ./alpha.conf:/etc/bird/bird.conf
- ./alpha-run/:/usr/local/var/run/
networks:
default:
ipv4_address: 172.16.97.2

bravo:
image: pierky/bird:${BIRD_VERSION}
container_name: bravo
volumes:
- ./bravo.conf:/etc/bird/bird.conf
- ./bravo-run/:/usr/local/var/run/
networks:
default:
ipv4_address: 172.16.97.3

networks:
default:
ipam:
driver: default
config:
- subnet: 172.16.97.0/24

0 comments on commit e035e2e

Please sign in to comment.