Merge lp:~noise/tanuki-agent/tutorial-first-boot-edits into lp:tanuki-agent

Proposed by Bret Barker on 2016-01-04
Status: Merged
Approved by: Bret Barker on 2016-01-04
Approved revision: 199
Merged at revision: 198
Proposed branch: lp:~noise/tanuki-agent/tutorial-first-boot-edits
Merge into: lp:tanuki-agent
Diff against target: 71 lines (+45/-7)
1 file modified
docs/ (+45/-7)
To merge this branch: bzr merge lp:~noise/tanuki-agent/tutorial-first-boot-edits
Reviewer Review Type Date Requested Status
Facundo Batista (community) 2016-01-04 Approve on 2016-01-04
Review via email:

Commit message

review/edit of the new first-boot tutorial section

To post a comment you must log in.
Facundo Batista (facundo) wrote :

Wonderful work

review: Approve
199. By Bret Barker on 2016-01-04

spaces and typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/'
--- docs/ 2015-12-22 20:06:06 +0000
+++ docs/ 2016-01-04 16:26:41 +0000
@@ -623,22 +623,60 @@
624## First-boot tests624## First-boot tests
626When you promote images, as said above, the system will generate new Gold Master candidate tests, creating Product Base Images that are the base for when testing Updates.626When you promote packages to a ```base_channel``` that you have
627627specified in a Test Spec, the system creates what is called a Product
628Update tests will be created always using the latest Product Base Image, but if you release images you'll need the Update tests to also be created using those released images. This is handled automatically by the system, all you need is to mark the Product Base Image as released, and the Update tests will be generated using not only the latest Product Base Image, but also all those that were ever released (until you deactivate them).628Base Image. This is a point-in-time snapshot of the revisions of all
629629of a Product's snaps from the given ```base_channel```. This set of
630This way you can list all the Product Base Images for a given product.630snap revisions is used to generate the initial image to provision a
631device prior to applying snap updates for testing.
633From a product lifecycle perspective, the latest Base Image
634represents what is currently in the field on customer devices that
635have been receiving regular updates. However, there is another
636scenario to consider - the "first boot" update that happens when a
637customer connects a new device to the internet for the first
638time. This device will have an older image that was flashed onto it during
639the factory install.
641As an example, let's say that have been doing GM testing and finally
642have an image ready to release that includes revision 5 of your
643snap. Some customers start using your shipped devices and over time
644update to revision 6, then 7, and then 8. Each of those just 1
645revision at a time. Then a new customer installs a device that is
646still at the factory revision 5 of your snap and when connected will
647receive an update from revision 5 to 8. This is the "first boot"
648scenario and we'll now explain how the Product Integration System
649accomodates that.
651First, you can query the system to list all Product Base Images for
652your Product:
632 ./ -X GET config.ini$PRODUCT_ID/baseimages654 ./ -X GET config.ini$PRODUCT_ID/baseimages
634To mark any of those as released, just do:656When you have a Gold Master that you release to manufacturing (or
657perhaps as a built image for download), you can mark that Base Image
658as "released" via the API:
636 ./ -X PUT config.ini$PRODUCT_ID/baseimages/<baseimage_id> --data '{660 ./ -X PUT config.ini$PRODUCT_ID/baseimages/<baseimage_id> --data '{
637 "released": true661 "released": true
638 }'662 }'
640After this step, that Product Base Image will be used in the Update tests. The moment you decide that any Product Base Image shouldn't be used for Update tests, you can deactivate it, by doing:664Now, when you publish new snap revisions to a Test Spec's
665```update_channel```, the system will create update tests for both the
666latest Base Image as well as _all_ prior Base Images that are marked
667as released (and not deactivated). This will ensure those extended
668revision deltas are adequately tested before promotion.
670If for whatever reason you no longer want update tests to be performed
671for an older releaded image, you can deactivate it by doing:
642 ./ -X PUT config.ini$PRODUCT_ID/baseimages/<baseimage_id> --data '{673 ./ -X PUT config.ini$PRODUCT_ID/baseimages/<baseimage_id> --data '{
643 "active": false674 "active": false
644 }'675 }'
677That's it! You now have automated testing setup for three different
678scenarios across the Product lifecycle. For further details you can
679consult the reference documentation:
681 - [Agent Reference](agent-reference-products.html)
682 - [API Reference](api-reference-products.html)


People subscribed via source and target branches

to all changes: