]> git.proxmox.com Git - mirror_frr.git/blame - snapcraft/README.snap_build.md
Merge pull request #299 from opensourcerouting/test-ref-out
[mirror_frr.git] / snapcraft / README.snap_build.md
CommitLineData
3ab11ecc
MW
1Building your own FreeRangeRouting Snap
2========================================
3(Tested on Ubuntu 16.04 with Snap Version 2, does not work on Ubuntu 15.x
4which uses earlier versions of snaps)
5
61. Install snapcraft:
7
8 sudo apt-get install snapcraft
9
102. Checkout FreeRangeRouting under a **unpriviledged** user account
11
12 git clone https://github.com/freerangerouting/frr.git
13 cd frr
14
153. 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
284. Create snap
29
30 cd snapcraft
31 snapcraft
32
33 You should now end up with `frr_something.snap`
34
35Installing the snap
36===================
37(This can be done on a different system)
38
391. Install snapd
40
41 sudo apt-get install snapd
42
432. 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
52DONE.
53
54The Snap will be auto-started and running.
55
56Operations
57==========
58
59### FreeRangeRouting Daemons
60At this time, all FreeRangeRouting daemons are auto-started.
61
62A daemon can be stopped/started with (ie ospf6d)
63
64 systemctl stop snap.frr.ospf6d.service
65 systemctl start snap.frr.ospf6d.service
66
67or disabled/enabled with
68
69 systemctl disable snap.frr.ospf6d.service
70 systemctl enable snap.frr.ospf6d.service
71
72### FreeRangeRouting Commands
73All 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
89vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
90path). If access as `vtysh` instead of `frr.vtysh` is needed, a symlink
91can be created:
92
93 sudo ln -s /snap/bin/frr.vtysh /usr/local/bin/vtysh