Skip to content

Commit

Permalink
snapcraft: Add bfdd to snap package
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
  • Loading branch information
mwinter-osr committed Aug 14, 2018
1 parent 94cb1f6 commit 64a6fb0
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 6 deletions.
18 changes: 15 additions & 3 deletions snapcraft/README.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ie for `ospf6d` (OSPFv3):
systemctl enable snap.frr.ospf6d.service

The daemons are: `ripd`, `ripngd`, `ospfd`, `ospf6d`, `isisd`, `bgpd`,
`pimd`, `zebra`
`pimd`, `ldpd`, `eigrpd`, `babeld`, `nhrpd`, `bfdd`, `zebra`

Commands defined by this snap
-----------------------------
Expand Down Expand Up @@ -53,7 +53,19 @@ depend on them). These are mainly intended to debug the Snap
- `frr.pimd-debug`:
Starts pimd daemon in foreground
- `frr.ldpd-debug`:
Starts ldpd daemon in foreground
Starts ldpd daemon in foreground
- `frr.nhrpd-debug`:
Starts nhrpd daemon in foreground
- `frr.babeld-debug`:
Starts babeld daemon in foreground
- `frr.eigrpd-debug`:
Starts eigrpd daemon in foreground
- `frr.pbrd-debug`:
Starts pbrd daemon in foreground
- `frr.staticd-debug`:
Starts staticd daemon in foreground
- `frr.bfdd-debug`:
Starts bfdd daemon in foreground

MPLS (LDP)
----------
Expand Down Expand Up @@ -108,7 +120,7 @@ FAQ
- Define `VTYSH_PAGER` to `cat` (default is `more`). (Ie add
`export VTYSH_PAGER=cat` to the end of your `.profile`)

- ospfd / ospf6d are not running after installation
- bfdd / ospfd / ospf6d / nhrpd are not running after installation
- Installing a new snap starts the daemons, but at this time they
may not have the required privileged access. Make sure you
issue the `snap connect` command as given above (can be verified
Expand Down
Empty file.
1 change: 1 addition & 0 deletions snapcraft/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ install:
install -D -m 0755 eigrpd-service $(DESTDIR)/bin/
install -D -m 0755 pbrd-service $(DESTDIR)/bin/
install -D -m 0755 staticd-service $(DESTDIR)/bin/
install -D -m 0755 bfdd-service $(DESTDIR)/bin/
install -D -m 0755 set-options $(DESTDIR)/bin/
install -D -m 0755 show_version $(DESTDIR)/bin/

14 changes: 14 additions & 0 deletions snapcraft/scripts/bfdd-service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -e -x

if ! [ -e $SNAP_DATA/bfdd.conf ]; then
cp $SNAP/etc/frr/bfdd.conf.default $SNAP_DATA/bfdd.conf
fi
exec $SNAP/sbin/bfdd \
-f $SNAP_DATA/bfdd.conf \
--pid_file $SNAP_DATA/bfdd.pid \
--socket $SNAP_DATA/zsock \
--vty_socket $SNAP_DATA \
--bfdctl $SNAP_DATA/bfdd.sock

24 changes: 21 additions & 3 deletions snapcraft/snapcraft.yaml.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: frr
version: @VERSION@
summary: FRRouting BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP routing daemon
description: BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM routing daemon
summary: FRRouting BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP/EIGRP/BFD routing daemon
description: BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP/EIGRP/BFD routing daemon
FRRouting (FRR) is free software which manages TCP/IP based routing
protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2,
RIPng, PIM, LDP, Babel, EIGRP and PBR (Policy-based routing) as well as
RIPng, PIM, LDP, Babel, EIGRP, PBR (Policy-based routing) and BFD as well as
the IPv6 versions of these.
FRRouting (frr) is a fork of Quagga.
confinement: strict
Expand Down Expand Up @@ -120,6 +120,13 @@ apps:
- network
- network-bind
- network-control
bfdd:
command: bin/bfdd-service
daemon: simple
plugs:
- network
- network-bind
- network-control
set:
command: bin/set-options
zebra-debug:
Expand Down Expand Up @@ -202,6 +209,16 @@ apps:
- network-control
staticd-debug:
command: sbin/staticd -f $SNAP_DATA/staticd.conf --pid_file $SNAP_DATA/staticd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
plugs:
- network
- network-bind
- network-control
bfdd-debug:
command: sbin/bfdd -f $SNAP_DATA/bfdd.conf --pid_file $SNAP_DATA/bfdd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA --bfdctl $SNAP_DATA/bfdd.sock
plugs:
- network
- network-bind
- network-control

parts:
frr:
Expand Down Expand Up @@ -283,6 +300,7 @@ parts:
babeld.conf.default: etc/frr/babeld.conf.default
eigrpd.conf.default: etc/frr/eigrpd.conf.default
pbrd.conf.default: etc/frr/pbrd.conf.default
bfdd.conf.default: etc/frr/bfdd.conf.default
vtysh.conf.default: etc/frr/vtysh.conf.default
frr-scripts:
plugin: make
Expand Down

0 comments on commit 64a6fb0

Please sign in to comment.