]> git.proxmox.com Git - mirror_frr.git/blame - snapcraft/README.snap_build.md
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / snapcraft / README.snap_build.md
CommitLineData
447a8fe9 1Building your own FRRouting Snap
3ab11ecc
MW
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
447a8fe9 102. Checkout FRRouting under a **unpriviledged** user account
3ab11ecc 11
d6180888 12 git clone https://github.com/frrouting/frr.git
3ab11ecc
MW
13 cd frr
14
8ccfe8f8
MW
153. (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
204. Run Bootstrap and make distribution tar.gz
3ab11ecc
MW
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
8ccfe8f8 335. Create snap
3ab11ecc
MW
34
35 cd snapcraft
36 snapcraft
37
38 You should now end up with `frr_something.snap`
39
40Installing the snap
41===================
42(This can be done on a different system)
43
441. Install snapd
45
46 sudo apt-get install snapd
47
482. 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
5ae4018e 55 snap connect frr:network-control core:network-control
3ab11ecc 56
5ae4018e
MW
57See README.usage.md for more details on setting up and using the snap
58
3ab11ecc
MW
59DONE.
60
61The Snap will be auto-started and running.
62
63Operations
64==========
65
447a8fe9
LB
66### FRRouting Daemons
67At this time, all FRRouting daemons are auto-started.
3ab11ecc
MW
68
69A daemon can be stopped/started with (ie ospf6d)
70
71 systemctl stop snap.frr.ospf6d.service
72 systemctl start snap.frr.ospf6d.service
73
74or disabled/enabled with
75
76 systemctl disable snap.frr.ospf6d.service
77 systemctl enable snap.frr.ospf6d.service
78
447a8fe9 79### FRRouting Commands
3ab11ecc
MW
80All 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
96vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
7ce9737d
JAG
97path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it
98via a snap alias as follows:
3ab11ecc 99
7ce9737d
JAG
100 sudo snap alias frr vtysh
101
102This will add the vtysh command to your /snap/bin for direct access. The output of
103
104 sudo snap aliases
105
106should list vtysh command alias as enabled:
107
108App Alias Notes
109frr.vtysh vtysh enabled