]>
Commit | Line | Data |
---|---|---|
1 | Building your own FreeRangeRouting Snap | |
2 | ======================================== | |
3 | (Tested on Ubuntu 16.04 with Snap Version 2, does not work on Ubuntu 15.x | |
4 | which uses earlier versions of snaps) | |
5 | ||
6 | 1. Install snapcraft: | |
7 | ||
8 | sudo apt-get install snapcraft | |
9 | ||
10 | 2. Checkout FreeRangeRouting under a **unpriviledged** user account | |
11 | ||
12 | git clone https://github.com/freerangerouting/frr.git | |
13 | cd frr | |
14 | ||
15 | 3. Run Bootstrap and make distribution tar.gz | |
16 | ||
17 | ./bootstrap.sh | |
18 | ./configure --with-pkg-extra-version=-MySnapVersion | |
19 | make dist | |
20 | ||
21 | Note: configure parameters are not important for the Snap building, | |
22 | except the `with-pkg-extra-version` if you want to give the Snap | |
23 | a specific name to mark your own unoffical build | |
24 | ||
25 | This will build `frr-something.tar.gz` - the distribution tar and | |
26 | the snapcraft/snapcraft.yaml with the matching version number | |
27 | ||
28 | 4. Create snap | |
29 | ||
30 | cd snapcraft | |
31 | snapcraft | |
32 | ||
33 | You should now end up with `frr_something.snap` | |
34 | ||
35 | Installing the snap | |
36 | =================== | |
37 | (This can be done on a different system) | |
38 | ||
39 | 1. Install snapd | |
40 | ||
41 | sudo apt-get install snapd | |
42 | ||
43 | 2. Install self-built frr snap. (`--force-dangerous` is required to | |
44 | install a unsigned self-built snap) | |
45 | ||
46 | snap install --force-dangerous ./frr*.snap | |
47 | ||
48 | Connect the priviledged `network-control` plug to the snap: | |
49 | ||
50 | snap connect frr:network-control ubuntu-core:network-control | |
51 | ||
52 | DONE. | |
53 | ||
54 | The Snap will be auto-started and running. | |
55 | ||
56 | Operations | |
57 | ========== | |
58 | ||
59 | ### FreeRangeRouting Daemons | |
60 | At this time, all FreeRangeRouting daemons are auto-started. | |
61 | ||
62 | A daemon can be stopped/started with (ie ospf6d) | |
63 | ||
64 | systemctl stop snap.frr.ospf6d.service | |
65 | systemctl start snap.frr.ospf6d.service | |
66 | ||
67 | or disabled/enabled with | |
68 | ||
69 | systemctl disable snap.frr.ospf6d.service | |
70 | systemctl enable snap.frr.ospf6d.service | |
71 | ||
72 | ### FreeRangeRouting Commands | |
73 | All the commands are prefixed with frr. | |
74 | ||
75 | frr.vtysh -> vtysh | |
76 | frr.version -> Just gives version output (zebra --version) | |
77 | frr.readme -> Returns simple README with hints on using FRR | |
78 | ||
79 | frr.bgpd-debug -> Directly start each daemon (without service) | |
80 | frr.isisd-debug | |
81 | frr.ospf6d-debug | |
82 | frr.ospfd-debug | |
83 | frr.pimd-debug | |
84 | frr.ripd-debug | |
85 | frr.ripngd-debug | |
86 | frr.ldp-debug | |
87 | frr.zebra-debug | |
88 | ||
89 | vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your | |
90 | path). If access as `vtysh` instead of `frr.vtysh` is needed, a symlink | |
91 | can be created: | |
92 | ||
93 | sudo ln -s /snap/bin/frr.vtysh /usr/local/bin/vtysh |