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