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