rPath Makes Appliances Easy

Ken VanDine

Michael K. Johnson

Michigan!/usr/group

September 11, 2007

http://people.rpath.com/~johnsonm/mug2007/

rPath Makes Appliances Easy

What is an Appliance?

A software appliance is a software application combined with just enough operating system (JeOS) for it to run optimally on industry standard hardware (typically a server) or in a virtual machine. Software appliances simplify server applications by minimizing the tasks typically associated with installation, configuration and maintenance.

What does that mean?

The Appliance Experience


Let's take a tour!


Sample Mediawiki Appliance

Focus on application, not OS

Reliable, Predictable updates

Maintainable Development

Building Appliances

Products and Technologies

Expectations

Building Images in rBuilder

Images and Groups

Simple Group Code Example

class Dist(GroupRecipe):
    name = 'group-openfiler'
    version = '0.2'
    autoResolve = True
    def setup(r):
        r.setLabelPath('openfiler.rpath.org@rpl:devel',
                       'conary.rpath.com@rpl:1')
        r.add('aoe-cec')
        r.add('aoetools')
...
        # replace group-core troves with openfiler-patched troves. 
        r.replace('authconfig')
...
        # stuff we don't want in a default install
        r.remove('iptables')

Group Cooked: Versions

group-openfiler=0.2-19-1
  acl=2.2.28-2-0.1
  aoe-cec=4-1-1
...
  aoetools=10-1-1
...
  attr=2.4.20-3-0.1
  authconfig=4.6.12-8.2.2-1
...

Group Cooked: Labels

group-openfiler=openfiler.rpath.org@rpl:devel/0.2-19-1
  acl=conary.rpath.com@rpl:1/2.2.28-2-0.1
  aoe-cec=openfiler.rpath.org@rpl:devel/4-1-1
...
  aoetools=openfiler.rpath.org@rpl:devel/10-1-1
...
  attr=conary.rpath.com@rpl:1/2.4.20-3-0.1
  authconfig=openfiler.rpath.org@rpl:devel/4.6.12-8.2.2-1
...

Group Versions Are Slices

Groups To Images

Groups To Images

rBuilder Demo

Managing Updates

Appliance Agent

Creating Conary Packges

Build Environment

Contexts

$ cvc context jdoe
$ cat CONARY
context jdoe
$ cvc context
[jdoe]
buildFlavor
buildLabel          jdoe.rpath.org@rpl:1
...

Recipes

Recipes: Comparison

AutoPackageRecipe

AutoPackageRecipe: zile


$ cvc newpkg zile
$ cd zile
$ cat > zile.recipe <<EOF
class zile(AutoPackageRecipe):
    name = 'zile'
    version = '2.2.2'

    def unpack(r):
        r.addArchive('mirror://sourceforge/zile/')
EOF
$ cvc add zile.recipe
$ cvc commit

AutoPackageRecipe: zile


$ cvc cook zile.recipe
warning: Suggested buildRequires additions: [
    'install-info:runtime', 'libtermcap:devel',
    'texinfo:runtime' ]
This means: add to the recipe, after the version, the lines:
    buildRequires = [ 'install-info:runtime',
        'libtermcap:devel', 'texinfo:runtime',
    ]

$ cvc cook zile.recipe
...
This time, no complaints about missing buildRequires

Other Recipe Classes

Packages and Components

Changesets


$ conary scs --troves zile-2.2.2.ccs
zile=2.2.2-1-0.1
  zile:data=2.2.2-1-0.1
  zile:doc=2.2.2-1-0.1
  zile:runtime=2.2.2-1-0.1

These are the components that would be installed by default.

Build Directory Contents

Build Directory Contents

Restarting Builds

Dependencies

$ conary scs --deps zile-2.2.2.ccs
...
  zile:runtime=2.2.2-1-0.1
...
    Requires:
...
      soname: ELF32/libc.so.6(... GLIBC_2.3 SysV x86)
      soname: ELF32/libtermcap.so.2(SysV x86)

...
$ conary scs --deps --file-deps zile-2.2.2.ccs
...
    /usr/bin/zile
      Requires:
...
        soname: ELF32/libc.so.6(... GLIBC_2.3 SysV x86)
        soname: ELF32/libtermcap.so.2(SysV x86)
...

Dependency Scope

Flavors

Repository View: Component

Repository View: Files

Building into the Repository

$ cvc cook zile
+ Building zile
+ found zile-2.2.2.tar.gz in repository
...
Changeset committed to the repository.

$ conary rq --buildreqs zile
...
binutils:devellib=2.15.90.0.3-7.5-1
binutils:lib=2.15.90.0.3-7.5-1
binutils:runtime=2.15.90.0.3-7.5-1
bzip2:runtime=1.0.3-4-0.1
...
tar:runtime=1.15.1-7-0.1
texinfo:runtime=4.8-6-0.1

Repository View: Binaries

Source and Binary Components

Browsing the Repository

Browsing the Repository

Shadows

Maintenance

Maintenance

Maintenance

rMake

rMake

rMake

rMake

$ rmake build --poll lzo zebra zile
Added Job 1
  lzo:source=jdoe.rpath.org@rpl:1/2.02-1
  zebra:source=jdoe.rpath.org@rpl:1/0.95a-1
  zile:source=jdoe.rpath.org@rpl:1/2.2.2-1
...
[19:54:47] [1] - build job finished successfully
$ rmake q
1     Built                     0 minutes ago
      (3 troves) lzo, zebra, zile
$ rmake changeset 1 job1.ccs
$ conary scs --troves job1.ccs
zile=2.2.2-1-0.1
  zile:data=2.2.2-1-0.1
  zile:doc=2.2.2-1-0.1
  zile:runtime=2.2.2-1-0.1
lzo=2.02-1-0.1
  lzo:devel=2.02-1-0.1
  lzo:devellib=2.02-1-0.1
  lzo:doc=2.02-1-0.1
  lzo:lib=2.02-1-0.1
zebra=0.95a-1-0.1
  zebra:doc=0.95a-1-0.1
  zebra:runtime=0.95a-1-0.1
$ rmake commit 1
Committed:
    lzo=/jdoe.rpath.org@rpl:1/2.02-1-2[is: x86]
    zebra=/jdoe.rpath.org@rpl:1/0.95a-1-2[is: x86]
    zile=/jdoe.rpath.org@rpl:1/2.2.2-1-2[is: x86]

Release Management

Release Management: Promotion

Example Release Management Workflow

Join the Community