aboutsummaryrefslogtreecommitdiffstats
path: root/extras/snap/README.rst
blob: 1a455565814f7789733d05579081a7f800bf4b98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.. _snap_doc:

VPP Snap Build
==============

The external dependency package will not build in the snapcraft vm. The
path of least resistance is to copy it to the root of the (original)
workspace before running the prep script.

Snapcraft has mount issues except under /home. Run the prep script and
copy the entire directory (including the .tgz file) under
/home/yourself.

Run the prep script
-------------------

::

     $ cd <vpp-workspace>/extras/snap
     $ ./prep

Copy data to /home (if necessary)

::

     $ mkdir /home/xxx
     $ cd <vpp-workspace>/extras/snap
     $ cp * /home/xxx

   Set snapcraft environment variables
   -----------------------------------

   Minimum requirements:

SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=16G
SNAPCRAFT_BUILD_ENVIRONMENT_DISK=32G

::


   Optional:

SNAPCRAFT_BUILD_ENVIRONMENT_CPU=8 SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=yes

::


   Run snapcraft
   -------------

   With luck, simply running snapcraft will produce the snap

$ snapcraft [–debug]

::


   Rerunning snapcraft phases
   --------------------------

   Here's how to (re)run individual phases, to avoid starting from
   scratch N times in case of errors:

snapcraft pull [] snapcraft build [] snapcraft stage [] snapcraft prime
[] snapcraft snap or snapcraft

::


   Restart without rebuilding VM
   -----------------------------

   To restart from scratch without rebuilding the VM:

snapcraft clean vpp

::


   Delete (all) snapcraft VMs
   --------------------------

for vm in $(multipass list \| awk ‘{print $1}’ \| grep ^snapcraft-); do
multipass delete $vm –purge done \``\`