]> git.proxmox.com Git - mirror_frr.git/blame - snapcraft/README.snap_build.md
Merge pull request #12357 from donaldsharp/watchfrr_receive_start_end
[mirror_frr.git] / snapcraft / README.snap_build.md
CommitLineData
447a8fe9 1Building your own FRRouting Snap
3ab11ecc 2========================================
0e18e9be 3(Tested on Ubuntu 18.04)
3ab11ecc
MW
4
51. Install snapcraft:
6
7 sudo apt-get install snapcraft
8
447a8fe9 92. Checkout FRRouting under a **unpriviledged** user account
3ab11ecc 10
d6180888 11 git clone https://github.com/frrouting/frr.git
3ab11ecc
MW
12 cd frr
13
8ccfe8f8
MW
143. (Optional) Add extra version information to
15 `snapcraft/extra_version_info.txt`. Information in this file will
16 be displayed with the frr.version command (simple `cat` after
17 the display of the `zebra --version` output)
18
194. Run Bootstrap and make distribution tar.gz
3ab11ecc
MW
20
21 ./bootstrap.sh
22 ./configure --with-pkg-extra-version=-MySnapVersion
23 make dist
24
25 Note: configure parameters are not important for the Snap building,
26 except the `with-pkg-extra-version` if you want to give the Snap
27 a specific name to mark your own unoffical build
28
29 This will build `frr-something.tar.gz` - the distribution tar and
30 the snapcraft/snapcraft.yaml with the matching version number
31
8ccfe8f8 325. Create snap
3ab11ecc
MW
33
34 cd snapcraft
35 snapcraft
36
37 You should now end up with `frr_something.snap`
38
39Installing the snap
40===================
41(This can be done on a different system)
42
431. Install snapd
44
45 sudo apt-get install snapd
46
472. Install self-built frr snap. (`--force-dangerous` is required to
48 install a unsigned self-built snap)
49
50 snap install --force-dangerous ./frr*.snap
51
52 Connect the priviledged `network-control` plug to the snap:
53
5ae4018e 54 snap connect frr:network-control core:network-control
3ab11ecc 55
5ae4018e
MW
56See README.usage.md for more details on setting up and using the snap
57
3ab11ecc
MW
58DONE.
59
60The Snap will be auto-started and running.
61
62Operations
63==========
64
447a8fe9
LB
65### FRRouting Daemons
66At this time, all FRRouting daemons are auto-started.
3ab11ecc
MW
67
68A daemon can be stopped/started with (ie ospf6d)
69
70 systemctl stop snap.frr.ospf6d.service
71 systemctl start snap.frr.ospf6d.service
72
73or disabled/enabled with
74
75 systemctl disable snap.frr.ospf6d.service
76 systemctl enable snap.frr.ospf6d.service
77
447a8fe9 78### FRRouting Commands
3ab11ecc
MW
79All the commands are prefixed with frr.
80
81 frr.vtysh -> vtysh
82 frr.version -> Just gives version output (zebra --version)
83 frr.readme -> Returns simple README with hints on using FRR
84
85 frr.bgpd-debug -> Directly start each daemon (without service)
86 frr.isisd-debug
87 frr.ospf6d-debug
88 frr.ospfd-debug
89 frr.pimd-debug
feeaf30f 90 frr.pim6d-debug
3ab11ecc
MW
91 frr.ripd-debug
92 frr.ripngd-debug
93 frr.ldp-debug
94 frr.zebra-debug
b60c4b2c
MW
95 frr.nhrpd-debug
96 frr.babeld-debug
97 frr.eigrpd-debug
98 frr.pbrd-debug
99 frr.staticd-debug
100 frr.bfdd-debug
101 frr.fabricd-debug
4baa3aeb 102 frr.pathd-debug
3ab11ecc
MW
103
104vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
7ce9737d
JAG
105path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it
106via a snap alias as follows:
3ab11ecc 107
7ce9737d
JAG
108 sudo snap alias frr vtysh
109
110This will add the vtysh command to your /snap/bin for direct access. The output of
111
112 sudo snap aliases
113
114should list vtysh command alias as enabled:
115
116App Alias Notes
117frr.vtysh vtysh enabled