]> git.proxmox.com Git - mirror_frr.git/blob - snapcraft/README.snap_build.md
Merge pull request #12357 from donaldsharp/watchfrr_receive_start_end
[mirror_frr.git] / snapcraft / README.snap_build.md
1 Building your own FRRouting Snap
2 ========================================
3 (Tested on Ubuntu 18.04)
4
5 1. Install snapcraft:
6
7 sudo apt-get install snapcraft
8
9 2. Checkout FRRouting under a **unpriviledged** user account
10
11 git clone https://github.com/frrouting/frr.git
12 cd frr
13
14 3. (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
19 4. Run Bootstrap and make distribution tar.gz
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
32 5. Create snap
33
34 cd snapcraft
35 snapcraft
36
37 You should now end up with `frr_something.snap`
38
39 Installing the snap
40 ===================
41 (This can be done on a different system)
42
43 1. Install snapd
44
45 sudo apt-get install snapd
46
47 2. 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
54 snap connect frr:network-control core:network-control
55
56 See README.usage.md for more details on setting up and using the snap
57
58 DONE.
59
60 The Snap will be auto-started and running.
61
62 Operations
63 ==========
64
65 ### FRRouting Daemons
66 At this time, all FRRouting daemons are auto-started.
67
68 A daemon can be stopped/started with (ie ospf6d)
69
70 systemctl stop snap.frr.ospf6d.service
71 systemctl start snap.frr.ospf6d.service
72
73 or disabled/enabled with
74
75 systemctl disable snap.frr.ospf6d.service
76 systemctl enable snap.frr.ospf6d.service
77
78 ### FRRouting Commands
79 All 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
90 frr.pim6d-debug
91 frr.ripd-debug
92 frr.ripngd-debug
93 frr.ldp-debug
94 frr.zebra-debug
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
102 frr.pathd-debug
103
104 vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
105 path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it
106 via a snap alias as follows:
107
108 sudo snap alias frr vtysh
109
110 This will add the vtysh command to your /snap/bin for direct access. The output of
111
112 sudo snap aliases
113
114 should list vtysh command alias as enabled:
115
116 App Alias Notes
117 frr.vtysh vtysh enabled