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