Custom image creation
Model-driven image creation
A custom Ubuntu Core image is built from a model specified in a signed configuration file called a model assertion. The declarative approach to image composition makes image building repeatable and easy to automate. Build recipes for custom images can be reused and shared.
Model assertions are json files in which OS components and additional metadata are specified following a simple declarative syntax. Since all OS components are packaged in snaps, model assertions list snaps for key components like the kernel, the bootloader, the root file system, services, and applications that live in the user space.
Model assertions are signed by a private key. This signature attests user or business (brand) ownership of an image. The signature links the model assertion, and therefore a custom image, to a single sign on (SSO) account. Private keys are generated and registered to an SSO account using Snapcraft, the tool for creating snaps.
Ubuntu-image is the build tool for creating Ubuntu Core images. It is freely available for download in the snapstore. Ubuntu-image takes a model assertion as input. The tool parses the metadata into model assertions, fetches the required snaps and assembles the output image.