SUSE Conversations


Step by step guide to set up a Kiwi build environment on SLE



By: rjschwei

March 14, 2010 5:06 pm

Reads:1030

Comments:0

Rating:0

Introduction

Kiwi is an imaging system used to build system/appliance images and is the back end to SUSE Studio. For a quick high level introduction you may find A Closer Look at the KIWI Imaging System interesting.

This step by step guide leads you through the process of setting up a Kiwi build environment on SUSE Linux Enterprise.

  1. Installing the base system

    • 1.1) Install SLES or SLED on a machine
      ~ It is recommended that you use SLE 11
      ~ The recommended HW is x86-64 with Virtualization instruction support; this
      type of setup makes it easier to test the resulting images
      ~ You can build a VM following these instructions; however, for testing
      purposes of the resulting Kiwi images you will need to transfer the
      images to physical hardware. Kiwi images are most efficiently tested
      inside a virtual machine and it is not possible to run a virtual
      environment inside another virtual machine.
    • 1.2) Register the system with NCC (Novell Customer Center) or your local SMT (Subscription Management Tool) server
  2. Setting up the Kiwi build environment

    The Kiwi packages are distributed as part of the SDK DVD and you have various options in adding the SDK as a repository to the system. Additionally you may use repositories from the openSUSE build service. These options are described below.

    2.1) Adding the necessary repositories

    2.1.0) Common steps for options described below

    • 2.1.0.1) Start YaST
    • 2.1.0.2.) From the “Groups” list below the “Filter” on the left hand side in the YaST Control Center window select “Software”
    • 2.1.0.3) In the main part of the window select “Software Repositories”.
    • 2.1.0.4) Click the “Add” button in the new window being displayed.
  3. 2.1.1) Using the NCC repository of the SDK

    • 2.1.1.2) Visit the Novell Customer Center and login to your account
    • 2.1.1.3) From the “Products”menu on the left hand side select “Mirror Credentials”

      nccProductsMenu.png

    • 2.1.1.4) Complete steps 2.1.0.1 – 2.1.0.4
    • 2.1.1.5) Select “Specify URL…” (this is pre-selected as it is the default)
    • 2.1.1.6) Click the “Next” button in the lower right hand corner.
    • 2.1.1.7) Enter the name for the repository “SDK” (without the quotes)
    • 2.1.1.8) Enter the URL from your mirror credentials page that contains the name SLE11-SDK-Pool and add the architecture specific location to the end of the path, such that the URL you are entering ends in SLE11-SDK-Pool/sle-11-x86_64/
    • 2.1.1.9) Enter you credentials (User name and password) as displayed on the credentials page in your browser
    • 2.1.1.10) Click the “Continue” button

      * should you receive an error dialog click the “Abort” button, the repo will initialize properly afterwards if your credentials and address are correct.
    • 2.1.1.11) Click the “Next” button in the lower right hand corner
    • 2.1.1.12) Click the “OK” button in the lower right hand corner

    2.1.2) Using the DVD

    • 2.1.2.1) Insert the DVD into the drive
    • 2.1.2.2) Complete steps 2.1.0.1 – 2.1.0.4
    • 2.1.2.3) Click the “Add” button in the new window being displayed.
    • 2.1.2.4) Select “DVD”
    • 2.1.2.5) Click the “Next” button in the lower right hand corner.
    • 2.1.2.6) Agree to the license
    • 2.1.2.7) Click the “Next” button in the lower right hand corner.
    • 2.1.2.8) Click the “OK” button in the lower right hand corner

    2.1.3) Using a local ISO file

    • 2.1.3.1) Start a web browser
    • 2.1.3.2) Novell Download
    • 2.1.3.3) Click the “Proceed to download” button
    • 2.1.3.4) Click on the “Download” button next to “SLE-11-SDK-DVD-x86_64-GM-Media1.iso”
    • 2.1.3.5) Complete steps 2.1.0.1 – 2.1.0.4
    • 2.1.3.6) Select “Local ISO Image…”
    • 2.1.3.7) Click the “Next” button in the lower right hand corner.
    • 2.1.3.8) Use the “Browse” button to bring up a file manager dialog and browse to the downloaded .iso file.
    • 2.1.3.9) Click the “Next” button in the lower right hand corner.
    • 2.1.3.10) Agree to the license
    • 2.1.3.11) Click the “Next” button in the lower right hand corner.
    • 2.1.3.12) Click the “OK” button in the lower right hand corner

    2.1.4) Adding the SDK Updates repository

    If you used the Novell Customer Center repository (section 2.1.1 above), the SDK DVD (section 2.1.2 above), or the SDK ISO (section 2.1.3 above) you want to add the SDK-Updates repository to the system to ensure you get the latest updates and fixes..

    • 2.1.4.1) Start a web browser
    • 2.1.4.2) Visit the Novell Customer Center and login to your account
    • 2.1.4.3) From the “Products” menu on the left hand side select “Mirror Credentials”
    • 2.1.4.4) Complete steps 2.1.0.1 – 2.1.0.4
    • 2.1.4.5) Select “Specify URL…” (this is pre-selected as it is the default)
    • 2.1.4.6) Click the “Next” button in the lower right hand corner.
    • 2.1.4.7) Enter the name for the repository “SDK-Updates” (without the quotes)
    • 2.1.4.8) Enter the URL from your mirror credentials page that contains the name SLE11-SDK–Updates/ and add the architecture specific location to the end of the path, such that the URL you are entering ends in SLE11-SDK–Updates/sle-11-x86_64/
    • 2.1.4.9) Enter you credentials (User name and password) as displayed on the credentials page in your browser
    • 2.1.4.10) Click the “Continue” button
      * should you receive an error dialog click the “Abort” button, the repo will initialize properly afterwards if your credentials and address are correct.
    • 2.1.4.11) Click the “Next” button in the lower right hand corner
    • 2.1.4.12) Click the “OK” button in the lower right hand corner

    2.1.5) Using the openSUSE Buildservice

    When using the build service you are required to configure one development repository. Therefore, you are using leading edge packages.

    • 2.1.5.1) Complete steps 2.1.0.1 – 2.1.0.4
    • 2.1.5.2) Select “Specify URL…”
    • 2.1.5.3) Click the “Next” button in the lower right hand corner
    • 2.1.5.4) Enter a name for the repository, for example “Filesystems”
    • 2.1.5.5) Enter the following URL: http://download.opensuse.org/repositories/filesystems/SLE_11/
    • 2.1.5.6) Click the “Next” button in the lower right hand corner
    • 2.1.5.7) Click the “Add” button
    • 2.1.5.8) Select “Specify URL…”
    • 2.1.5.9) Click the “Next” button in the lower right hand corner
    • 2.1.5.10) Enter a name for the repository, “Tools” (without the quotes)
    • 2.1.5.11) Enter the following URL: http://download.opensuse.org/repositories/openSUSE:/Tools/SLE_11/
    • 2.1.5.12) Click the “Add” button
    • 2.1.5.13) Select “Specify URL…”
    • 2.1.5.14) Click the “Next” button in the lower right hand corner
    • 2.1.5.15) Enter a name for the repository, “Tools-Devel” (without the quotes)
    • 2.1.5.16) Enter the following URL: http://download.opensuse.org/repositories/openSUSE:/Tools:/Devel/SLE_11/
    • 2.1.5.17) Click the “OK” button in the lower right hand corner
    • 2.1.5.18) Click the “Import” button to trust the repository keys. (3x)

    2.2) Adding the necessary packages

    • 2.2.1) Start YaST
    • 2.2.2) From the “Groups” list below the “Filter” on the left hand side in the YaST Control Center window select “Software”
    • 2.2.3) In the YaST Control Center window select “Software Management”
    • 2.2.4) In the search box enter “kiwi”
    • 2.2.5) Click the “Search” button below the search entry field.
    • 2.2.6) Select all kiwi packages

      * If you are installing from the repositories on the openSUSE build service do not select the “kiwi-instsource-plugins-openSUSE-11-2″ and “kiwi-instsource-plugins-openSUSE-11-3″ packages.
    • 2.2.7) Click the “Accept” button in the lower right hand corner
    • 2.2.8) Click the “Continue” button to pull the dependent packages
  4. Using Kiwi

    Testing your Kiwi installation can be accomplished by building one of the examples provided with the kiwi-doc packages. Documentation about Kiwi can be found in /usr/share/doc/packages/kiwi/kiwi.pdf. Further to get started with Kiwi refer to the Kiwi Cookbook.

  5. Notable

    • If you decided to set up the Kiwi build environment in a VM you will need to copy the resulting images to a physical machine for testing.
    • If you are using the repositories from the openSUSE build service you are using packages on the leading edge of development, thus this may not be suitable if you are working in a production environment.
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags:
Categories: SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

Comment

RSS