On 08/25/11 - 10:07:49AM, Lukas Zapletal wrote:
Hello,
I have started designing katello interface that will return katello
templates in CDL format and would like to ask for more information about
CDL.
To start with, we have to clarify some terminology. CDL is an old term that
we used to throw around without anything concrete behind it. It variously
meant the format for disk images, for what was in the image, for configuration,
and for launching. Because it meant too many things, we have abandoned it.
What we have now are 3 different pieces of XML:
1) The TDL - this is the Template Description Language, and seems to be what
you are talking about in the rest of the email. This is the XML that describes
how to build an image; the operating system, the version, the packages, etc
that you want in a disk image.
2) The ICICLE - this is a representation of what actually got done to build
an image. The input to imagefactory is a TDL, and the output from
imagefactory is a bag of bits (disk image) that contains what you want and
an ICICLE that describes what was actually put in the image. To make this
clearer, assume you put "httpd" in the TDL as a package to install. What
you will actually get in the image is "httpd-2.3.2-1.fc15", and that will
also be reflected in the ICICLE
3) The deployment - this is the XML that is used to actually launch instances
(or groups of instances) into a backend cloud. It specifies the image UUID
(which is part of the output of imagefactory), the size of instances you want
(small, medium, large, etc), and any post-boot configuration data you want
(this gets into the realm of Audrey).
I hope that is somewhat clear. Now that we have some of the terminology
down...
I am particularly interested in all the tags that can appear in the XML
document. Also all possible values that are currently accepted is a must
for me - e.g. os tag (which operating system and version combinations
are supported atm).
I already found few exampled which gave me pretty nice overview how it
looks like:
<template>
<name>f13 jeos</name>
<os name="fedora" version="13"/>
<description>Fedora 13</description>
<repos>
<
repo>http://repo.oddthesis.org/cirras/packages/fedora/13/RPMS/noarch/&...
</repos>
<packages>
<packagegroup>core</packagegroup>
<package><name>bash</name></package>
<package><name>kernel</name></package>
<package><name>grub</name></package>
</packages>
</template>
Where did you get this TDL? It is not valid, and will not work with the
current imagefactory. I just want to know so that we can rectify whatever
documentation you are looking at.
That being said, the *concept* is much the same, so what you say below is
still valid.
Let me describe current template in Katello. We associate template with
environment first, then users are able to add content to it (only using
CLI atm - no support in the UI):
- products (= 1 or more repositories)
- package (no package group support yet)
- erratum
- parameter
- foreman host group (not done yet - puppet classes definitions)
- parameters (for puppet classes)
Looking on the example above I have a nice match here:
CDL vs Katello
name = template name
description = description
os = product info
repos = products
packages = packages
package group = n/a
I guess we have all required information to build image template from
Katello, skipping package groups (we can add them later).
Right, so this is a pretty good match. We have discussed adding package
groups in the past. So far I've resisted adding it because it is necessarily a
Linux-centric concept, and we want the TDL to be useful for Windows as well.
You could argue that it would be optional and Windows would just not use it,
and I might agree with you, but nobody has convinced me yet.
Also note that the TDL supports additional things above and beyond what you
have above. In particular, the TDL allows you to inject arbitrary files into
the image (a <files> section of the XML), and allows you to execute arbitrary
commands at the end of the install process (similar to %post in kickstart,
but done slightly differently). I'm not sure if either of those concepts map
onto Katello concepts, but it is food for thought.
--
Chris Lalancette