4.3. Creating a blueprint by using the command line
You can create a new blueprint by using the command line (CLI). The blueprint describes the final image and its customizations, such as packages and kernel customizations.
Prerequisites
-
You are logged in as the root user or a user who is a member of the
weldrgroup
Procedure
Create a plain text file with the following contents:
name = "<blueprint_name>" description = "<long_form_description>" version = "<0.0.1>" modules = [] groups = []Replace
<blueprint_name>and<long_form_description>with a name and description for your blueprint.Replace
<0.0.1>with a version number according to the Semantic Versioning scheme.For every package that you want to be included in the blueprint, add the following lines to the file:
[[packages]] name = "<package_name>" version = "<package_version>"Replace
<package_name>with the name of the package, such ashttpd,gdb-doc, orcoreutils.Optionally, replace
<package_version>with the version to use. This field supportsdnfversion specifications:-
For a specific version, use the exact version number such as
9.6.0. -
For the latest available version, use the asterisk
* -
For the latest minor version, use formats such as
9.*.
-
For a specific version, use the exact version number such as
Customize your blueprints to suit your needs. For example, disable Simultaneous Multi Threading (SMT), add the following lines to the blueprint file:
[customizations.kernel] append = "nosmt=force"For additional customizations available, see Supported image customizations.
Note that
[]and[[]]are different data structures expressed in TOML.-
The
[customizations.kernel]header represents a single table that is defined by a collection of keys and their corresponding value pairs, for example:append = "nosmt=force". -
The
[[packages]]header represents an array of tables. The first instance defines the array and its first table element, for example,name = "package-name"andversion = "package-version", and each subsequent instance creates and defines a new table element in that array, in the order that you defined them.
-
The
-
Save the file, for example, as
<blueprint_name>.tomland close the text editor.