System Imaging with KIWI Jan-Christoph Bornschlegel - - PowerPoint PPT Presentation

system imaging with kiwi
SMART_READER_LITE
LIVE PREVIEW

System Imaging with KIWI Jan-Christoph Bornschlegel - - PowerPoint PPT Presentation

Theory and History A Real Life Example Whats next? Questions and Answers Closing System Imaging with KIWI Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH Build Service Team 20th May 2008 Jan-Christoph


slide-1
SLIDE 1

Theory and History A Real Life Example What’s next? Questions and Answers Closing

System Imaging with KIWI

Jan-Christoph Bornschlegel <jcborn@suse.de>

SUSE Linux Products GmbH – Build Service Team

20th May 2008

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-2
SLIDE 2

Theory and History A Real Life Example What’s next? Questions and Answers Closing

System Imaging with kiwi – Overview

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-3
SLIDE 3

Theory and History A Real Life Example What’s next? Questions and Answers Closing Introduction

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-4
SLIDE 4

Theory and History A Real Life Example What’s next? Questions and Answers Closing Introduction

What kiwi is and what it’s not

KIWI is: A command line based toolkit Usable as part of a process chain Usable as base tool for a high level application KIWI is not: A product

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-5
SLIDE 5

Theory and History A Real Life Example What’s next? Questions and Answers Closing Introduction

kiwi history

  • riginated by Marcus Sch¨

afer

  • riginal purpose was creating “system on a stick”

James Willcox (snorp) joins active development for Thin Client (SLETC) Jigish Gohil (CyberOrg) joins active development for LTSP project I join active development for Autobuild extension

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-6
SLIDE 6

Theory and History A Real Life Example What’s next? Questions and Answers Closing Introduction

Current project status

Used for the following products: SLEPOS – SuSE Linux Point of Sale SLETC – SuSE Linux Thin Client Hardware vendors for preload images JeOS Community projects: Developers who deliver Live DVDs (KDE, openSUSE, . . . ) users who want to make images containing their application

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-7
SLIDE 7

Theory and History A Real Life Example What’s next? Questions and Answers Closing How does kiwi work?

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-8
SLIDE 8

Theory and History A Real Life Example What’s next? Questions and Answers Closing How does kiwi work?

Help Wanted!

Documentation is available throughout the web in various places http://www.suse.de/~jcborn/kiwi-links.html

  • fficial documentation delivered with kiwi package:

manpages and pdf

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-9
SLIDE 9

Theory and History A Real Life Example What’s next? Questions and Answers Closing How does kiwi work?

Setting up the buildhost

Install kiwi, kiwi-tools and kiwi-desc-* packages create an image description file config.xml, or get and modify an existing image description caveat: You must subscribe to the tools repository first!

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-10
SLIDE 10

Theory and History A Real Life Example What’s next? Questions and Answers Closing How does kiwi work?

Buildsystem overview

image Build host

config files

Repo 1 Repo 2 Repo n

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-11
SLIDE 11

Theory and History A Real Life Example What’s next? Questions and Answers Closing How does kiwi work?

Buildsystem overview II

Package repositories (local, network) Decent build host (esp. hdd) good network connection if using remote repositories Configuration file(s) caveat: pick the correct config.xml

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-12
SLIDE 12

Theory and History A Real Life Example What’s next? Questions and Answers Closing The Configuration Directory

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-13
SLIDE 13

Theory and History A Real Life Example What’s next? Questions and Answers Closing The Configuration Directory

Contents of the Configuration Directory

config.xml contains every necessary image information(packages, repositories, settings, . . . config.sh customise the image after the packages are installed (end of --prepare stage) image.sh customise image at the beginning of the --create stage root/ contains overlay files which are included in the image or needed in scripts

  • ther special YaST files and others

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-14
SLIDE 14

Theory and History A Real Life Example What’s next? Questions and Answers Closing Invoking kiwi

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-15
SLIDE 15

Theory and History A Real Life Example What’s next? Questions and Answers Closing Invoking kiwi

Running kiwi

Invoing kiwi is basically divided in two steps prepare Creating a changeroot tree and install system into that create Create an image from that prepared tree In case of USB image the deployment to the stick is third stage.

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-16
SLIDE 16

Theory and History A Real Life Example What’s next? Questions and Answers Closing Invoking kiwi

Commands

The basic kiwi invocation looks like this prepare kiwi -p <path-to-config.xml> -r <basedir> create kiwi -c <basedir> -t <type> -d <imagedir> deploy kiwi --bootstick <initrd>

  • -bootstick-system <systemimage>

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-17
SLIDE 17

Theory and History A Real Life Example What’s next? Questions and Answers Closing Invoking kiwi

Tweaking

The base tree can be modified in some ways to shorten test time remove/install packages using chroot add/remove files modify configuration files add users, groups, . . . Caveat: risk of inconsistent system

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-18
SLIDE 18

Theory and History A Real Life Example What’s next? Questions and Answers Closing Scenario

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-19
SLIDE 19

Theory and History A Real Life Example What’s next? Questions and Answers Closing Scenario

Requirements and Regressions

You want your own openSUSE based distribution You want own packages from your own BuildService repo

  • n it

You may want to include “evil” packages

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-20
SLIDE 20

Theory and History A Real Life Example What’s next? Questions and Answers Closing Solution

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-21
SLIDE 21

Theory and History A Real Life Example What’s next? Questions and Answers Closing Solution

Solution

Get the “evil” packages built in your BS instance set your BS’ repository as source add the packages’ names to the <packages> section Build your image

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-22
SLIDE 22

Theory and History A Real Life Example What’s next? Questions and Answers Closing Solution

Alternative Solution (wip)

Get the “evil” packages built in your BS instance Build your own installation source and release your own installable media This will soon be possible with the kiwi-instsource package (see later)

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-23
SLIDE 23

Theory and History A Real Life Example What’s next? Questions and Answers Closing Solution

Repository Configuration Example

mounted DVD (base repo)

your home project Build host

your own image

BS Repo

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-24
SLIDE 24

Theory and History A Real Life Example What’s next? Questions and Answers Closing Autobuild System

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-25
SLIDE 25

Theory and History A Real Life Example What’s next? Questions and Answers Closing Autobuild System

Purpose

Autobuild is current internal package and media factory

  • penSUSE BuildService will be the next generation

package factory kiwi will be able to create installation sources (WIP)

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-26
SLIDE 26

Theory and History A Real Life Example What’s next? Questions and Answers Closing Autobuild System

How it works

Autobuild is a distributed system Build clients build single RPMs based on a central scheduler and source base every employee’s machine can (and should) be a build host scheduler collects built rpm files to internal “full trees” for each codebase and architecture metadata is created

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-27
SLIDE 27

Theory and History A Real Life Example What’s next? Questions and Answers Closing Product Creation now and then

where are we

1

Theory and History Introduction How does kiwi work? The Configuration Directory Invoking kiwi

2

A Real Life Example Scenario Solution

3

What’s next? Autobuild System Product Creation now and then

4

Questions and Answers

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-28
SLIDE 28

Theory and History A Real Life Example What’s next? Questions and Answers Closing Product Creation now and then

Current Product Creation

full trees for target architectures are sync’d to dedicated machines rpm files are selected and collected to one repository metadata for this particular repository is created finally all sorts of media are made:

ftp repositories CD, DVD, torrent, . . .

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-29
SLIDE 29

Theory and History A Real Life Example What’s next? Questions and Answers Closing Product Creation now and then

Product Creation with kiwi

Collecting the target repository must be integrated into kiwi. Expansion of the config.xml syntax add module for repository creation allow priority value for repositories allow exceptions implement script hooks Autobuild knowledge is necessary to create package lists and scripts

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-30
SLIDE 30

Theory and History A Real Life Example What’s next? Questions and Answers Closing Product Creation now and then

Product Creation with kiwi cont.

Generation of YaST metadata package description based on PDB patterns (through metapackage) contents, media, product files checksums root tree (through metapackage) Creating the media itself uses m cd atm.

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-31
SLIDE 31

Theory and History A Real Life Example What’s next? Questions and Answers Closing Product Creation now and then

Product Creation with kiwi cont.

State of project project is public as kiwi-instsource uses instsourceutils extended syntax for kiwi config file (still wip) first CD is in progress: JeOS – SLES based minimal system

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-32
SLIDE 32

Theory and History A Real Life Example What’s next? Questions and Answers Closing Product Creation now and then

Product Creation with kiwi cont.

Next steps planned: LimeJeOS installation CDs Code cleanup and performance enhancement Tests with released products Integration into BuildService for automatic instsource creation

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-33
SLIDE 33

Theory and History A Real Life Example What’s next? Questions and Answers Closing

Questions?

  • QUESTIONS. . . ?

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI

slide-34
SLIDE 34

Theory and History A Real Life Example What’s next? Questions and Answers Closing

Yet another talk is over

Thank you for your attention! See you on irc.freenode.net #opensuse-kiwi for kiwi issues: <kiwi-users@lists.berlios.de> for packaging issues: <opensuse-packaging@opensuse.org> Bugzilla for kiwi: product “opensuse.org”, component “system imaging”

Jan-Christoph Bornschlegel <jcborn@suse.de> SUSE Linux Products GmbH – Build Service Team System Imaging with KIWI