Debian Codegraph @

doc/source/quickstart.rst

raw
1 .. _quick-start:
2
3 Quick Start
4 ===========
5
6 .. note:: **Abstract**
7
8 This document describes how to start working with {kiwi},
9 an OS appliance builder. This description applies to
10 version |version|.
11
12 Before you start
13 ----------------
14
15 1. Install {kiwi} first, either via your distributions' package manager (see
16 :ref:`kiwi-installation`) or via:
17
18 .. code:: bash
19
20 $ sudo pip install kiwi
21
22 2. Clone the {kiwi} repository containing example appliances (see
23 :ref:`example-descriptions`):
24
25 .. code:: bash
26
27 $ git clone https://github.com/OSInside/kiwi
28
29 .. note::
30
31 Please see the :ref:`troubleshooting` chapter and/or our
32 `Contact` info on the main page if the following procedure causes
33 any trouble.
34
35 Choose a First Image
36 --------------------
37
38 Find example appliance descriptions in the {kiwi} repository checkout
39 as follows:
40
41 .. code:: bash
42
43 $ tree -L 3 kiwi/build-tests
44
45 Take a look at which images are available in the example appliances repository
46 and select one that matches your desired image as closely as possible. Or
47 just use the one given in the examples below.
48
49 Build your First Image
50 ----------------------
51
52 Your first image will be a simple system disk image that can run
53 in any full virtualization system like QEMU. Invoke the following {kiwi}
54 command in order to build it:
55
56 .. code:: bash
57
58 $ sudo kiwi-ng system build \
59 --description kiwi/build-tests/{exc_description_disk} \
60 --set-repo {exc_repo_leap} \
61 --target-dir /tmp/myimage
62
63 The resulting image will be placed into the folder :file:`/tmp/myimage`
64 with the suffix :file:`.raw`.
65
66 If you don't wish to create a openSUSE Leap {exc_os_version} image,
67 substitute the folder following the ``--description`` option with another
68 folder that contains the image description which you selected.
69
70 Run your Image
71 --------------
72
73 Running an image actually means booting the operating system. To
74 do that, attach the disk image to a virtual system. In this example, we use
75 QEMU and boot it as follows:
76
77 .. code:: bash
78
79 $ sudo qemu -boot c \
80 -drive file={exc_image_base_name_disk}.x86_64-{exc_image_version}.raw,format=raw,if=virtio \
81 -m 4096 -serial stdio
82
83 Tweak and Customize your Image
84 ------------------------------
85
86 Now that you have successfully built and started your first image, you can
87 start tweaking it to match your needs.