Talk:Build Service/KIWI/Cookbook

From openSUSE

Question: Is an ISO image always a LiveCD, or can I create an ISO image that is an install image, i.e. similar to the the openSUSE install DVD?

Answer: Yes and No.

Within the examples it's always a LiveCD. I think you must difference between ISO as image type and ISO as output format for an image e.g for the type OEM.
The type OEM is more what you are looking for.
For building a "Product" please have a look at http://en.opensuse.org/Build_Service/Product_Definition
--peter

Note: Changed the wording to imply that the image does not always have to be a LiveCD. If this is not correct we need to adjust the wording in the creation step again.

Answer: It's not correct and i changed back -- peter

05/11/09 2:30 P.M. EDT incorporated the answer into the wiki, as I am probably not the only one wondering and OEM does not necessarily mean anything to everyone. -- Robert



04/30/09 2:30 P.M. EDT

Q: Where does the unpacked image end up if one uses --build and no directory is specified on the command line?

Robert

A: a folder named "image_root" is created below you destination directory. -- peter


05/11/09 2:30 P.M. EDT

I think The source repository section can be improved by simplifying it and using it as an intro. Some of the current content can then be moved to the Repository Options section to ensure completeness of content. I propose the following:

[Start proposal]

The source repository

As mentioned previously KIWI creates an unpacked image prior to creating the final image by installing packages. These packages are extracted from an installation source or so called repository. A repository is a collection of packages for the image you want to create. (--peters: added italic text)

Specifying the installation source on the command line is accomplished using the --set-repo command line option as follows:

kiwi --build <ImageDescriptionPath> --destdir <DestinationPath> --set-repo <RepositoryPath>

--peters: that is ok

The kiwi tool chain also supports the use of multiple repositories with the --add-repo command line option. The --add-repo command line option may be repeated as often as necessary.

--peters: It is too complex and you need additional to every --add-repo an additional --add-repotype

kiwi --build <ImageDescriptionPath> --destdir <DestinationPath> --set-repo <RepositoryPath> --add-repo <RepositoryPath> --add-repo <RepositoryPath>

--peters: EXAMPLE IS WRONG, see above!


Repository Options

Kiwi supports local and Internet based repositories. The following examples show how to specify these various repositories on the command line.

  • Using and Internet based repository, such as the openSUSE 11.1 repository.
kiwi --build <ImageDescriptionPath> --destdir <DestinationPath> --set-repo http://download.opensuse.org/distribution/11.1/repo/oss/

The examples provided by KIWI with openSUSE use the openSUSE online repository and it is not necessary to use the --set-repo command line option to use the provided examples. How this is configured will be explained later in The image description section.

The openSUSE examples provided by KIWI use the openSUSE online repository and it is not necessary to use the --set-repo command line option. How this is configured will be explained later in The image description section.

--peters: Changed, because _only_ the openSUSE examples use a online repo, the SLE examples _need_ a local repo!!!!!! Both are provides by KIWI


  • If you have the openSUSE 11.1 installation DVD you may use it as a repository. Insert the DVD into your drive and if you are using openSUSE 11.1 it will be mounted as /media/SU1110.001. If the media is not mounted automatically you may use a regular mount command to mount the DVD.
mount -t iso9660 /dev/cdrom /media
Assuming the DVD got auto mounted the following command demonstrates how we can use the mounted DVD as the installation source repository.
kiwi --build <ImageDescriptionPath> --destdir <DestinationPath> --set-repo /media/SU1110.001
  • If you have the install DVD ISO image available, you may use it instead of burning it to a DVD. In order to use the image you first must loop mount it such that it becomes available as a block device. Then use the mount point as the repository path. These steps are shown below.
mount -o loop /path-to-the-iso-file/filename.iso /mnt
kiwi --build <ImageDescriptionPath> --destdir <DestinationPath> --set-repo /mnt

Before we move on to our first example, a few words about the speed at which the image can be created are in order.

Kiwi will access the specified repository to obtain the packages required for the image to be created. Thus if you are using an online repository the speed of creation will be dominated by the bandwidth of your Internet connection. Using a mounted DVD the speed will be dependent on the speed of your DVD drive, and using the mounted ISO image your hard drive access performance will have a strong influence on the image creation speed.

Generally the image creation will be fastest if you access a local repository, i.e. the installation DVD, a loop mounted ISO image or even a local mirror of the online repository on you LAN.

[End proposal]

With these changes the implications on performance are collected in one place, right before the first example. Therefore, the information is close in proximity to where it matters.

05/13/09 2:30 P.M. EDT Transferred the proposal, including changes/edits, to the article. -- Robert

05/14/09 12:30 P.M. EDT Should we add something about versioning to the repository discussion?

After the note about performance in the "Repository options" section we could add the following:

[Begin proposal] Kiwi does not support the cross version creation of images, i.e. it is not possible to create an image based on SLES 11 on a system running openSUSE 11.1. The version of the image created and the repository specified, must match the version of the OS running on the machine used to create the image. [End proposal]

--peters: this is wrong! You can do this, you only need all depended tools kiwi will use