[Thincrust-devel] patterns in appliance building

Bryan Kearney bkearney at redhat.com
Mon Aug 11 17:06:46 UTC 2008


I have "mostly" completed a first cut of an ovirt appliance recipe. You 
can see the recipe and files at [1]. I think this is a good example of 
what a typical application owner would face. They have existing scripts, 
but would like to bundle the application as an appliance. In moving the 
old kickstart file [2] to the new appliance recipe, a couple of patterns 
emerged which I would like to get folks feedback on. Please feel free to 
jump in with "this is good" or "this sucks".

Config files
============
Some of the config files were being laid down in the kickstart file by doing

cat > foo << EOF
some data
EOF

This was replaced by adding the file into the appliance rpm, and copying 
it into place. Alternatives to this approach include (1) delivering the 
file in the product rpm, (2) Using augeas to construct the file 
dynamically.


Repo Files
==========
Same pattern as above, but yum repo files. I dont know if this makes 
them any different or not.


Config Files with slight changes
================================
The pattern which existed was the same as above but with ENV variables 
included. in the recipe, these are implemented as ERB templates since 
that is the common puppet languages.


Install Scripts
===============
Ovirt came with 2 main install scripts which were modeled as services 
which were chkconfig'ed on in the kickstart file. The service file then 
checkconfig'ed itself off. These were replaced in the recipe by 
single_exec commands to run them once.

I believe this approach will be considered "bad" by puppet purists, 
since it is not defining the end configuration. However, it does make it 
"easier" for conversion since the supported scripts do not need to be 
re-written.

Not Moved Over
==============
There were 3 blocks which were not moved over and still live in the 
kickstart file [3]. This is primarily becuase they involved iterations 
and there is no clean way to do that in puppet. Any ideas on cool ways 
to implement that would be appreciated.

-- bk

[1] http://git.et.redhat.com/?p=acex.git;a=tree;f=ovirt/appliances/ovirt
[2] http://git.et.redhat.com/?p=ovirt.git;a=tree;f=wui-appliance;b=next
[3] 
http://git.et.redhat.com/?p=acex.git;a=blob;f=ovirt/resources/wui-devel.ks




More information about the Thincrust-devel mailing list