summaryrefslogtreecommitdiffstats
path: root/snapcraft/README.snap_build.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:16:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:16:35 +0000
commite2bbf175a2184bd76f6c54ccf8456babeb1a46fc (patch)
treef0b76550d6e6f500ada964a3a4ee933a45e5a6f1 /snapcraft/README.snap_build.md
parentInitial commit. (diff)
downloadfrr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.tar.xz
frr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.zip
Adding upstream version 9.1.upstream/9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'snapcraft/README.snap_build.md')
-rw-r--r--snapcraft/README.snap_build.md117
1 files changed, 117 insertions, 0 deletions
diff --git a/snapcraft/README.snap_build.md b/snapcraft/README.snap_build.md
new file mode 100644
index 0000000..9d83a52
--- /dev/null
+++ b/snapcraft/README.snap_build.md
@@ -0,0 +1,117 @@
+Building your own FRRouting Snap
+========================================
+(Tested on Ubuntu 18.04)
+
+1. Install snapcraft:
+
+ sudo apt-get install snapcraft
+
+2. Checkout FRRouting under a **unpriviledged** user account
+
+ git clone https://github.com/frrouting/frr.git
+ cd frr
+
+3. (Optional) Add extra version information to
+ `snapcraft/extra_version_info.txt`. Information in this file will
+ be displayed with the frr.version command (simple `cat` after
+ the display of the `zebra --version` output)
+
+4. Run Bootstrap and make distribution tar.gz
+
+ ./bootstrap.sh
+ ./configure --with-pkg-extra-version=-MySnapVersion
+ make dist
+
+ Note: configure parameters are not important for the Snap building,
+ except the `with-pkg-extra-version` if you want to give the Snap
+ a specific name to mark your own unoffical build
+
+ This will build `frr-something.tar.gz` - the distribution tar and
+ the snapcraft/snapcraft.yaml with the matching version number
+
+5. Create snap
+
+ cd snapcraft
+ snapcraft
+
+ You should now end up with `frr_something.snap`
+
+Installing the snap
+===================
+(This can be done on a different system)
+
+1. Install snapd
+
+ sudo apt-get install snapd
+
+2. Install self-built frr snap. (`--force-dangerous` is required to
+ install a unsigned self-built snap)
+
+ snap install --force-dangerous ./frr*.snap
+
+ Connect the priviledged `network-control` plug to the snap:
+
+ snap connect frr:network-control core:network-control
+
+See README.usage.md for more details on setting up and using the snap
+
+DONE.
+
+The Snap will be auto-started and running.
+
+Operations
+==========
+
+### FRRouting Daemons
+At this time, all FRRouting daemons are auto-started.
+
+A daemon can be stopped/started with (ie ospf6d)
+
+ systemctl stop snap.frr.ospf6d.service
+ systemctl start snap.frr.ospf6d.service
+
+or disabled/enabled with
+
+ systemctl disable snap.frr.ospf6d.service
+ systemctl enable snap.frr.ospf6d.service
+
+### FRRouting Commands
+All the commands are prefixed with frr.
+
+ frr.vtysh -> vtysh
+ frr.version -> Just gives version output (zebra --version)
+ frr.readme -> Returns simple README with hints on using FRR
+
+ frr.bgpd-debug -> Directly start each daemon (without service)
+ frr.isisd-debug
+ frr.ospf6d-debug
+ frr.ospfd-debug
+ frr.pimd-debug
+ frr.pim6d-debug
+ frr.ripd-debug
+ frr.ripngd-debug
+ frr.ldp-debug
+ frr.zebra-debug
+ frr.nhrpd-debug
+ frr.babeld-debug
+ frr.eigrpd-debug
+ frr.pbrd-debug
+ frr.staticd-debug
+ frr.bfdd-debug
+ frr.fabricd-debug
+ frr.pathd-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
+via a snap alias as follows:
+
+ sudo snap alias frr vtysh
+
+This will add the vtysh command to your /snap/bin for direct access. The output of
+
+ sudo snap aliases
+
+should list vtysh command alias as enabled:
+
+App Alias Notes
+frr.vtysh vtysh enabled