-
Notifications
You must be signed in to change notification settings - Fork 10
reference: snap lifecycle documentation #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,150 @@ | ||||||||||||||||||||||||||||||||||||||
| ************** | ||||||||||||||||||||||||||||||||||||||
| Snap Lifecycle | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Ubuntu style guide recommends we use sentence case headings. Same comment for the rest of the doc. Thanks. |
||||||||||||||||||||||||||||||||||||||
| ************** | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Ubuntu style guide also advises against stacked headings, e.g. headings need to be followed by content. |
||||||||||||||||||||||||||||||||||||||
| Snap Build Lifecycle | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| ==================== | ||||||||||||||||||||||||||||||||||||||
| This document aims to document the lifecycle of the various kernel snap | ||||||||||||||||||||||||||||||||||||||
| forms. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Background | ||||||||||||||||||||||||||||||||||||||
| ---------- | ||||||||||||||||||||||||||||||||||||||
| The majority of kernels with snaps are consumed both as Debian packages and | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+7
to
+12
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can remove the intro here. The 'background' covers it sufficiently. |
||||||||||||||||||||||||||||||||||||||
| those snaps. To reduce testing requirements and streamline production the same | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| binaries are used for both forms. Due to the Ubuntu requirement for source to | ||||||||||||||||||||||||||||||||||||||
| be included with the binaries it is simplest to generate the binaries as part | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| of generating the Debian binary packages and repackage those into snaps where | ||||||||||||||||||||||||||||||||||||||
| needed. Where a kernel is to be signed this is performed during the packaging | ||||||||||||||||||||||||||||||||||||||
| process in those Debian package builds. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Workflow Support | ||||||||||||||||||||||||||||||||||||||
| ---------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+20
to
+21
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Kernel snaps are represented as a separate phase in the kernel workflow. There | ||||||||||||||||||||||||||||||||||||||
| will be a Workflow Tracker for each Debian kernel build, and a separate | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+22
to
+23
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think the current tense can be used here since this is the situation right now. |
||||||||||||||||||||||||||||||||||||||
| subordinate tracker for the snap kernel build. The snap tracker will have the | ||||||||||||||||||||||||||||||||||||||
| Debian trackers as its parent and will proceed once that Debian tracker is | ||||||||||||||||||||||||||||||||||||||
| complete. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+25
to
+26
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Debian Pocket Usage | ||||||||||||||||||||||||||||||||||||||
| ------------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+28
to
+29
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| The Debian package builds flow through their own life-cycle proceeding from the | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
For consistency. |
||||||||||||||||||||||||||||||||||||||
| ``build`` location, to ``proposed``, and onwards to ``updates`` and ``security`` as | ||||||||||||||||||||||||||||||||||||||
| testing allows. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+31
to
+32
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
US spelling :D |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Kernels in the ``build`` location are unsigned and intended for simple boot | ||||||||||||||||||||||||||||||||||||||
| testing or for testing for signing compliance. Kernels in ``proposed`` are | ||||||||||||||||||||||||||||||||||||||
| signed (if applicable) and formal candidates for regression and certification | ||||||||||||||||||||||||||||||||||||||
| testing. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Snap Risk Usage | ||||||||||||||||||||||||||||||||||||||
| --------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+39
to
+40
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Snaps on the ``edge`` channel are unsigned and intended for simple boot testing. | ||||||||||||||||||||||||||||||||||||||
| Snaps on the ``beta`` channel are signed and intended for certification testing. | ||||||||||||||||||||||||||||||||||||||
| The ``edge`` kernels are built using the Debian binaries in the ``build`` | ||||||||||||||||||||||||||||||||||||||
| location. The ``beta`` kernels are built using the Debian binaries in the | ||||||||||||||||||||||||||||||||||||||
| ``proposed`` locations. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+41
to
+45
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a nitpick. But I think the content would be clearer if structured as a list or table. List Table Example of rendered screenshot with a table and list.
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Track Usage | ||||||||||||||||||||||||||||||||||||||
| ----------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+47
to
+48
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| We make heavy use of store tracks to separate series specific snaps from each | ||||||||||||||||||||||||||||||||||||||
| other. For Ubuntu LTS releases which align with Ubuntu Core releases those | ||||||||||||||||||||||||||||||||||||||
| tracks are typically the Ubuntu Core release years (for example ``24``). For | ||||||||||||||||||||||||||||||||||||||
| interim Ubuntu releases these are the full release name (for example | ||||||||||||||||||||||||||||||||||||||
| ``24.10``). | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Where a series has a hardware enablement kernel (:ref hwe-kernels) those are | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| placed on the HWE specific tracks (for example ``24-hwe``). | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Unsigned Kernels | ||||||||||||||||||||||||||||||||||||||
| ---------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+58
to
+59
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Unsigned kernels such as the ``pi-kernel`` will be directly generated in the | ||||||||||||||||||||||||||||||||||||||
| Debian ``main`` package. The ``linux-image`` packages are consumed and | ||||||||||||||||||||||||||||||||||||||
| ``ubuntu-core-initramfs`` used to generate an initramfs to accompany it. These | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| are packaged up along with any required firmware. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Signed Kernels | ||||||||||||||||||||||||||||||||||||||
| -------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+65
to
+66
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Signed kernel such as the ``pc-kernel`` will be generated in the Debian | ||||||||||||||||||||||||||||||||||||||
| ``main`` package, and passed through the signing pipeline as part of the Debian | ||||||||||||||||||||||||||||||||||||||
| ``signed`` package. The ``linux-image`` packages (now generated by the | ||||||||||||||||||||||||||||||||||||||
| ``signed`` package) are consumed and ``ubuntu-core-initramfs`` used to generate | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| an initramfs to accompany it. These are packaged up along with any required | ||||||||||||||||||||||||||||||||||||||
| firmware. ``ubuntu-cre-initramfs`` is installed and envoked as part of the | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| kernel postinst.d handling to convert the existing ``vmlinux-<verflav>`` image | ||||||||||||||||||||||||||||||||||||||
| into a ``kernel.efi-<verflav>`` image. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+73
to
+74
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
To avoid the CI flagging the spelling error. |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Kernel UKIs | ||||||||||||||||||||||||||||||||||||||
| ----------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+76
to
+77
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| For kernels use cases which require measurement we also produce Unified Kernel | ||||||||||||||||||||||||||||||||||||||
| Images. That is a bootable PE executable which contains the kernel binary, an | ||||||||||||||||||||||||||||||||||||||
| initramfs, and the kernel command line. This UKI is generated in the | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+78
to
+80
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| ``linux-signed`` package through use of an additional mode of the | ||||||||||||||||||||||||||||||||||||||
| ``ubuntu-core-initramfs`` tooling. This process produces a single binary and | ||||||||||||||||||||||||||||||||||||||
| is signed after it is combined via the signing pipeline. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Stubble Kernels | ||||||||||||||||||||||||||||||||||||||
| --------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+85
to
+86
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| On arm64 we have an additional problem. For a number of platforms the ``dtb`` | ||||||||||||||||||||||||||||||||||||||
| is not correctly supplied by the firmware. To handle these cases a ``stubble`` | ||||||||||||||||||||||||||||||||||||||
| wrapper is used to detect those platforms and to inject the appropriate ``dtb`` | ||||||||||||||||||||||||||||||||||||||
| as appropriate, then handing off control to the wrapped kernel image. The | ||||||||||||||||||||||||||||||||||||||
| kernel image is taken from the Debian ``linux-image`` package in the normal | ||||||||||||||||||||||||||||||||||||||
| way. The ``stubble-kernel`` package is installed and envoked as part of the | ||||||||||||||||||||||||||||||||||||||
| kernel postinst.d handling to convert the existing ``vmlinuz-<verflav>`` image | ||||||||||||||||||||||||||||||||||||||
| into a ``stubble.efi-<verflav>`` image. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+87
to
+94
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Snap Workflow Lifecycle | ||||||||||||||||||||||||||||||||||||||
| ======================= | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+96
to
+97
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| The snap workflow lifecycle runs in parallel to and interlocked with the Debian | ||||||||||||||||||||||||||||||||||||||
| Workflow lifecycle. This ensures that the snap workflow waits for the | ||||||||||||||||||||||||||||||||||||||
| prerequisite binaries. It also ensures that testing of both Debian packages | ||||||||||||||||||||||||||||||||||||||
| and snap must be complete before they can progress further. Finally ensuring | ||||||||||||||||||||||||||||||||||||||
| that the Debian packages and Snaps release together. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Unsigned Build | ||||||||||||||||||||||||||||||||||||||
| -------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+104
to
+105
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| When a Debian kernel build completes in the ``build`` location the ``edge`` | ||||||||||||||||||||||||||||||||||||||
| build of the Snap is triggered. This causes an auto-crank of the snap which | ||||||||||||||||||||||||||||||||||||||
| parameterises the snapcraft.yaml configuration, and kicks off builds against | ||||||||||||||||||||||||||||||||||||||
| the appropriate snap build recipe. This causes the kernel to be processed into | ||||||||||||||||||||||||||||||||||||||
| a snap and uploaded to the snap-store. The store will automatically publish this | ||||||||||||||||||||||||||||||||||||||
| onto the ``edge`` channel for testing. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+106
to
+111
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there are test failures for the snap in "edge", does that gate the progress of the Debian package to "proposed"? |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Early Testing | ||||||||||||||||||||||||||||||||||||||
| ------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+113
to
+114
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Once published we trigger any available early testing. This includes ``boot-testing``, | ||||||||||||||||||||||||||||||||||||||
| ``abi-testing`` and ``signing-signoff``. Once each of these is successfully completed | ||||||||||||||||||||||||||||||||||||||
| the Debian package may progress into the signing pipeline and on into its ``proposed`` location. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+115
to
+117
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Proposed Build | ||||||||||||||||||||||||||||||||||||||
| -------------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+119
to
+120
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Once the Debian kernel is in its ``proposed`` location a second auto-crank is | ||||||||||||||||||||||||||||||||||||||
| triggered to process the kernel into a snap via a second snap recipe. This | ||||||||||||||||||||||||||||||||||||||
| causes the kernel to be uploaded to the ``beta`` channel ready for wider formal | ||||||||||||||||||||||||||||||||||||||
| testing. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| For signed kernels this ensures the snap on the ``beta`` channel has a signed | ||||||||||||||||||||||||||||||||||||||
| payload. We also regenerate the snap for unsigned kernel, while this may seem | ||||||||||||||||||||||||||||||||||||||
| redundant it allows us to perform experimental builds only to ``edge`` without | ||||||||||||||||||||||||||||||||||||||
| disrupting the workflow once the build has progressed to ``beta``. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+121
to
+129
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Testing | ||||||||||||||||||||||||||||||||||||||
| ------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+131
to
+132
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Once we have a snap on the ``beta`` channel formal testing is triggered. This | ||||||||||||||||||||||||||||||||||||||
| includes ``certification-testing`` for the snap. Once this testing is complete | ||||||||||||||||||||||||||||||||||||||
| the snap will be promoted to the ``candidate`` channel. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| QA Testing | ||||||||||||||||||||||||||||||||||||||
| ---------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+137
to
+138
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Once we have a formal canidate snap this may be sent for further acceptance | ||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| testing in QA. Testing for the Debian package and snap are combined and gate | ||||||||||||||||||||||||||||||||||||||
| the further promotion of both. Promotion is further gated by any applicable | ||||||||||||||||||||||||||||||||||||||
| signoff tasks. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Release | ||||||||||||||||||||||||||||||||||||||
| ------- | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+144
to
+145
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Once all gating factors, testing, signoff, and cycle boundaries are satisfied | ||||||||||||||||||||||||||||||||||||||
| the snap will be promoted to the ``stable`` channel, this occurs in lock-step | ||||||||||||||||||||||||||||||||||||||
| with the promotion of the Debian package to ``updates``. The Debian package my | ||||||||||||||||||||||||||||||||||||||
| then promote further to ``security`` but there is no equivalent channel for | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+148
to
+149
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| snaps. | ||||||||||||||||||||||||||||||||||||||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @awhitcroft , was there a reason for setting
:maxdepth: 2here?For landing pages I would suggest keeping it clean and just having the title displayed.