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