Debian Codegraph @

doc/source/overview/workflow.rst

raw
1 Basic Workflow
2 ==============
3
4 .. note:: **Abstract**
5
6 The installation of a Linux system generally occurs by booting the target
7 system from an installation source such as an installation CD/DVD, a live
8 CD/DVD, or a network boot environment (PXE). The installation process is
9 often driven by an installer that interacts with the user to collect
10 information about the installation. This information generally includes the
11 *software to be installed*, the *timezone*, system *user* data, and
12 other information. Once all the information is collected, the installer
13 installs the software onto the target system using packages from the
14 available software sources (repositories). After the installation is
15 complete, the system usually reboots and enters a configuration procedure
16 upon startup. The configuration may be fully automatic, or it may include
17 user interaction.
18
19 This description applies for version |version|.
20
21 A system image (usually called an "image") is a *complete installation* of a Linux
22 system within a file. The image represents an operational system and,
23 optionally, contains the "final" configuration.
24
25 The behavior of the image upon deployment varies depending on the image type
26 and the image configuration since {kiwi} allows you to completely customize
27 the initial startup behavior of the image. Among others, this includes
28 images that:
29
30 * can be deployed inside an existing virtual environment without requiring
31 configuration at startup.
32 * automatically configure themselves in a known target environment.
33 * prompt the user for an interactive system configuration.
34
35 The image creation process with {kiwi} is automated and does not require any
36 user interaction. The information required for the image creation process is
37 provided by the primary configuration file named :file:`config.xml`.
38 This file is validated against the schema documented in:
39 :ref:`image-description`.
40
41 In addition, the image can optionally be customized
42 using the :file:`config.sh` and :file:`images.sh` scripts
43 and by using an *overlay tree (directory)* called :file:`root`.
44 See the :ref:`description_components` section for further details.
45
46 .. note:: Previous Knowledge
47
48 This documentation assumes that you are familiar with the general
49 concepts of Linux, including the boot process and distribution concepts
50 such as package management.
51
52 .. _description_components:
53
54 Components of an Image Description
55 ----------------------------------
56
57 A {kiwi} image description can be composed of several parts. The main part is
58 the {kiwi} description file itself (named :file:`config.xml` or an arbitrary
59 name plus the :file:`*.kiwi` extension). The configuration XML is the
60 only required component; others are optional.
61
62 These are the optional components of an image description:
63
64 #. ``config.sh`` shell script
65
66 This is the configuration shell script that runs at the end of the
67 :ref:`prepare step <prepare-step>` if present. It can be used to
68 fine-tune the unpacked image.
69
70 Note that the script is directly invoked by the operating system if its
71 executable bit is set. Otherwise, it is called by :file:`bash` instead.
72
73 #. ``images.sh`` shell script
74
75 This is the configuration shell script that runs at the beginning of the
76 create step. So, it is expected to be used to handle image-type-specific
77 tasks. It is called in a similar fashion as `config.sh`.
78
79 #. Overlay tree directory
80
81 The *overlay tree* is a folder (called :file:`root`)
82 or a tarball file (called :file:`root.tar.gz`) that contains
83 files and directories that will be copied to the target image build tree
84 during the :ref:`prepare step <prepare-step>`. It is executed
85 after all the packages included in the :file:`config.xml` file
86 have been installed. Any already present file is overwritten.
87
88 #. CD root user data
89
90 For live ISO images and install ISO images, an optional cdroot archive
91 is supported. This is a tar archive matching the name
92 :file:`config-cdroot.tar[.compression_postfix]`. If present, it will
93 be unpacked as user data on the ISO image. This is mostly useful to
94 add, e.g., license files or user documentation on the CD/DVD, which
95 can be read directly without booting from the media.
96
97 #. Archives included in the :file:`config.xml` file.
98
99 The archives that are included in the `<packages>` using the `<archive>`
100 subsection:
101
102 .. code:: xml
103
104 <packages type="image">
105 <archive name="custom-archive.tgz"/>
106 </packages>