]> git.proxmox.com Git - mirror_frr.git/blob - snapcraft/README.snap_build.md
Merge remote-tracking branch 'origin/master' into mpls2
[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. 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 core:network-control
51
52 See README.usage.md for more details on setting up and using the snap
53
54 DONE.
55
56 The Snap will be auto-started and running.
57
58 Operations
59 ==========
60
61 ### FRRouting Daemons
62 At this time, all FRRouting daemons are auto-started.
63
64 A daemon can be stopped/started with (ie ospf6d)
65
66 systemctl stop snap.frr.ospf6d.service
67 systemctl start snap.frr.ospf6d.service
68
69 or disabled/enabled with
70
71 systemctl disable snap.frr.ospf6d.service
72 systemctl enable snap.frr.ospf6d.service
73
74 ### FRRouting Commands
75 All the commands are prefixed with frr.
76
77 frr.vtysh -> vtysh
78 frr.version -> Just gives version output (zebra --version)
79 frr.readme -> Returns simple README with hints on using FRR
80
81 frr.bgpd-debug -> Directly start each daemon (without service)
82 frr.isisd-debug
83 frr.ospf6d-debug
84 frr.ospfd-debug
85 frr.pimd-debug
86 frr.ripd-debug
87 frr.ripngd-debug
88 frr.ldp-debug
89 frr.zebra-debug
90
91 vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
92 path). If access as `vtysh` instead of `frr.vtysh` is needed, a symlink
93 can be created:
94
95 sudo ln -s /snap/bin/frr.vtysh /usr/local/bin/vtysh