summaryrefslogtreecommitdiffstats
path: root/extras/snap/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'extras/snap/README.rst')
-rw-r--r--extras/snap/README.rst84
1 files changed, 84 insertions, 0 deletions
diff --git a/extras/snap/README.rst b/extras/snap/README.rst
new file mode 100644
index 00000000000..1a455565814
--- /dev/null
+++ b/extras/snap/README.rst
@@ -0,0 +1,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 \``\`