Skip to content

Commit

Permalink
snapcraft: Add FabricD 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 May 28, 2019
1 parent cf00bad commit b60c4b2
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
8 changes: 8 additions & 0 deletions snapcraft/README.snap_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ All the commands are prefixed with frr.
frr.ripngd-debug
frr.ldp-debug
frr.zebra-debug
frr.pimd-debug
frr.nhrpd-debug
frr.babeld-debug
frr.eigrpd-debug
frr.pbrd-debug
frr.staticd-debug
frr.bfdd-debug
frr.fabricd-debug

vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it
Expand Down
2 changes: 2 additions & 0 deletions snapcraft/README.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ depend on them). These are mainly intended to debug the Snap
Starts staticd daemon in foreground
- `frr.bfdd-debug`:
Starts bfdd daemon in foreground
- `frr.fabricd-debug`:
Starts fabricd daemon in foreground

MPLS (LDP)
----------
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 @@ -17,6 +17,7 @@ install:
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 fabricd-service $(DESTDIR)/bin/
install -D -m 0755 set-options $(DESTDIR)/bin/
install -D -m 0755 show_version $(DESTDIR)/bin/

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

set -e -x

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

18 changes: 16 additions & 2 deletions snapcraft/snapcraft.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ summary: FRRouting BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP/EIGRP/BFD routing da
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, PBR (Policy-based routing) and BFD as well as
the IPv6 versions of these.
RIPng, PIM, LDP, Babel, EIGRP, PBR (Policy-based routing), BFD and OpenFabric
as well as the IPv6 versions of these.
FRRouting (frr) is a fork of Quagga.
confinement: strict
grade: devel
Expand Down Expand Up @@ -127,6 +127,13 @@ apps:
- network
- network-bind
- network-control
fabricd:
command: bin/fabricd-service
daemon: simple
plugs:
- network
- network-bind
- network-control
set:
command: bin/set-options
zebra-debug:
Expand Down Expand Up @@ -219,6 +226,12 @@ apps:
- network
- network-bind
- network-control
fabricd-debug:
command: sbin/fabricd -f $SNAP_DATA/fabricd.conf --pid_file $SNAP_DATA/fabricd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
plugs:
- network
- network-bind
- network-control

parts:
rtrlib:
Expand Down Expand Up @@ -337,6 +350,7 @@ parts:
eigrpd.conf.default: etc/frr/eigrpd.conf.default
pbrd.conf.default: etc/frr/pbrd.conf.default
bfdd.conf.default: etc/frr/bfdd.conf.default
fabricd.conf.default: etc/frr/fabricd.conf.default
vtysh.conf.default: etc/frr/vtysh.conf.default
staticd.conf.default: etc/frr/staticd.conf.default
frr-scripts:
Expand Down

0 comments on commit b60c4b2

Please sign in to comment.