| 1 |
kiwi-ng |
| 2 |
======= |
| 3 |
|
| 4 |
.. _db_commands_kiwi_synopsis: |
| 5 |
|
| 6 |
SYNOPSIS |
| 7 |
-------- |
| 8 |
|
| 9 |
.. code:: bash |
| 10 |
|
| 11 |
kiwi-ng [global options] service <command> [<args>] |
| 12 |
|
| 13 |
kiwi-ng -h | --help |
| 14 |
kiwi-ng [--profile=<name>...] |
| 15 |
[--setenv=<variable=value>...] |
| 16 |
[--temp-dir=<directory>] |
| 17 |
[--target-arch=<name>] |
| 18 |
[--type=<build_type>] |
| 19 |
[--logfile=<filename>] |
| 20 |
[--logsocket=<socketfile>] |
| 21 |
[--loglevel=<number>] |
| 22 |
[--debug] |
| 23 |
[--debug-run-scripts-in-screen] |
| 24 |
[--color-output] |
| 25 |
[--config=<configfile>] |
| 26 |
[--kiwi-file=<kiwifile>] |
| 27 |
image <command> [<args>...] |
| 28 |
kiwi-ng [--logfile=<filename>] |
| 29 |
[--logsocket=<socketfile>] |
| 30 |
[--loglevel=<number>] |
| 31 |
[--debug] |
| 32 |
[--debug-run-scripts-in-screen] |
| 33 |
[--color-output] |
| 34 |
[--config=<configfile>] |
| 35 |
result <command> [<args>...] |
| 36 |
kiwi-ng [--profile=<name>...] |
| 37 |
[--setenv=<variable=value>...] |
| 38 |
[--shared-cache-dir=<directory>] |
| 39 |
[--temp-dir=<directory>] |
| 40 |
[--target-arch=<name>] |
| 41 |
[--type=<build_type>] |
| 42 |
[--logfile=<filename>] |
| 43 |
[--logsocket=<socketfile>] |
| 44 |
[--loglevel=<number>] |
| 45 |
[--debug] |
| 46 |
[--debug-run-scripts-in-screen] |
| 47 |
[--color-output] |
| 48 |
[--config=<configfile>] |
| 49 |
[--kiwi-file=<kiwifile>] |
| 50 |
system <command> [<args>...] |
| 51 |
kiwi-ng -v | --version |
| 52 |
kiwi-ng help |
| 53 |
|
| 54 |
.. _db_commands_kiwi_desc: |
| 55 |
|
| 56 |
DESCRIPTION |
| 57 |
----------- |
| 58 |
|
| 59 |
{kiwi} is an imaging solution that is based on an image XML description. A |
| 60 |
description can consist of a single :file:`config.xml` or :file:`.kiwi` file. It |
| 61 |
may also include additional files, such as scripts or configuration data. |
| 62 |
|
| 63 |
A collection of example image descriptions can be found in the following GitHub |
| 64 |
repository: https://github.com/OSInside/kiwi-descriptions. Most of the |
| 65 |
descriptions provide a so-called appliance image. An appliance is a |
| 66 |
small, text-based image, including a predefined remote source setup to allow the |
| 67 |
installation of missing software components. |
| 68 |
|
| 69 |
Although {kiwi} operates in two steps, the system build command combines both |
| 70 |
steps into one to make it easier to start with {kiwi}. |
| 71 |
|
| 72 |
The first step is to prepare a directory that includes the contents of a new |
| 73 |
filesystem based on one or more software package sources. The second step uses |
| 74 |
the prepared contents of the new image root tree to create an output image. |
| 75 |
|
| 76 |
{kiwi} supports the creation of the following image types: |
| 77 |
|
| 78 |
- ISO Live Systems |
| 79 |
- virtual disk for, e.g., cloud frameworks |
| 80 |
- OEM expandable disk for system deployment from ISO or the network |
| 81 |
- filesystem images for deployment in a PXE boot environment |
| 82 |
|
| 83 |
Depending on the image type, different disk formats and |
| 84 |
architectures are supported. |
| 85 |
|
| 86 |
.. _db_commands_kiwi_opts: |
| 87 |
|
| 88 |
GLOBAL OPTIONS |
| 89 |
-------------- |
| 90 |
|
| 91 |
--color-output |
| 92 |
|
| 93 |
Uses escape sequences to print different types of information in colored |
| 94 |
output. for this option to work, the underlying terminal must support those |
| 95 |
escape characters. Error messages appear in red, warning messages in yellow, |
| 96 |
and debugging information is printed in light grey. |
| 97 |
|
| 98 |
--config=<configfile> |
| 99 |
|
| 100 |
Use the specified runtime configuration file. This does not replace the |
| 101 |
standard lookup: the file's settings take the highest precedence. A path that |
| 102 |
does not exist is an error. |
| 103 |
|
| 104 |
Independent of `--config`, {kiwi} always reads and merges every one of the |
| 105 |
following files that exist, with later entries overriding earlier ones: |
| 106 |
:file:`/usr/share/kiwi/kiwi.yml`, every :file:`*.yml` in |
| 107 |
:file:`/usr/share/kiwi/kiwi.yml.d/` (alphabetically), :file:`/etc/kiwi.yml`, |
| 108 |
every :file:`*.yml` in :file:`/etc/kiwi.yml.d/` (alphabetically), and |
| 109 |
:file:`~/.config/kiwi/config.yml`. Both drop-in directories are scanned |
| 110 |
whether or not the corresponding main file exists. |
| 111 |
|
| 112 |
Merging happens at the top level only: a file that defines a section replaces |
| 113 |
that whole section from earlier files, rather than merging the keys inside it. |
| 114 |
See :ref:`runtime_config` for further details. |
| 115 |
|
| 116 |
--debug |
| 117 |
|
| 118 |
Prints debug information on the command line. Same as: `--loglevel 10`. |
| 119 |
|
| 120 |
--debug-run-scripts-in-screen |
| 121 |
|
| 122 |
Runs scripts called by {kiwi} in a screen session. |
| 123 |
|
| 124 |
--logfile=<filename> |
| 125 |
|
| 126 |
Specifies the log file. The logfile contains detailed information about |
| 127 |
the process. The special call `--logfile stdout` sends all |
| 128 |
information to standard out instead of writing to a file. |
| 129 |
|
| 130 |
--logsocket=<socketfile> |
| 131 |
|
| 132 |
Sends log data to the specified Unix Domain socket in the same |
| 133 |
format as with `--logfile`. |
| 134 |
|
| 135 |
--loglevel=<number> |
| 136 |
|
| 137 |
Specifies the logging level as a number. Further info about the |
| 138 |
available log levels can be found at: |
| 139 |
https://docs.python.org/3/library/logging.html#logging-levels. |
| 140 |
Setting a log level displays all messages above the specified level. |
| 141 |
|
| 142 |
.. code:: bash |
| 143 |
|
| 144 |
---------------------------- |
| 145 |
| Level | Numeric value | |
| 146 |
---------------------------- |
| 147 |
| CRITICAL | 50 | |
| 148 |
| ERROR | 40 | |
| 149 |
| WARNING | 30 | |
| 150 |
| INFO | 20 | |
| 151 |
| DEBUG | 10 | |
| 152 |
| NOTSET | 0 | |
| 153 |
---------------------------- |
| 154 |
|
| 155 |
--profile=<name> |
| 156 |
|
| 157 |
Selects a profile to use. The specified profile must be part of the |
| 158 |
XML description. The option can be specified multiple times to |
| 159 |
allow a combination of profiles. |
| 160 |
|
| 161 |
--setenv=<variable=value> |
| 162 |
|
| 163 |
exports an environment variable and its value into the caller's |
| 164 |
environment. This option can be specified multiple times. |
| 165 |
|
| 166 |
--shared-cache-dir=<directory> |
| 167 |
|
| 168 |
Specifies an alternative shared cache directory. The directory |
| 169 |
is shared via bind mount between the build host and image |
| 170 |
root system, and it contains information about package repositories |
| 171 |
and their cache and metadata. The default location is `/var/cache/kiwi`. |
| 172 |
This option is only accepted for the `system` service. |
| 173 |
|
| 174 |
--temp-dir=<directory> |
| 175 |
|
| 176 |
Specifies an alternative base temporary directory. The |
| 177 |
provided path is used as a base directory to store temporary |
| 178 |
files and directories. The default is `/var/tmp`. |
| 179 |
|
| 180 |
--target-arch=<name> |
| 181 |
|
| 182 |
Specifies an image architecture. By default, the host architecture is used as |
| 183 |
the image architecture. If the specified architecture name does not match the |
| 184 |
host architecture (thus requesting a cross-architecture image build), you must |
| 185 |
configure the support for the image architecture and binary format on the |
| 186 |
building host. This must be done during the preparation stage, and it is |
| 187 |
beyond the scope of {kiwi}. |
| 188 |
|
| 189 |
--type=<build_type> |
| 190 |
|
| 191 |
Selects an image build type. The specified build type must be configured |
| 192 |
as part of the XML description. |
| 193 |
|
| 194 |
--kiwi-file=<kiwifile> |
| 195 |
|
| 196 |
The basename of the kiwi file that contains the main image |
| 197 |
configuration elements. If not specified, kiwi uses |
| 198 |
a file named `config.xml` or a file matching `*.kiwi`. |
| 199 |
|
| 200 |
-v, --version |
| 201 |
|
| 202 |
Show the program version. |
| 203 |
|
| 204 |
help |
| 205 |
|
| 206 |
Show the manual page for the given service and command. |
| 207 |
|
| 208 |
.. _db_commands_kiwi_example: |
| 209 |
|
| 210 |
EXAMPLE |
| 211 |
------- |
| 212 |
|
| 213 |
.. code:: bash |
| 214 |
|
| 215 |
$ git clone https://github.com/OSInside/kiwi |
| 216 |
|
| 217 |
$ sudo kiwi-ng system build \ |
| 218 |
--description kiwi/build-tests/{exc_description_disk} \ |
| 219 |
--set-repo {exc_repo_leap} \ |
| 220 |
--target-dir /tmp/myimage |