[katello-devel] How to export TDL template from Katello

Lukas Zapletal lzap at redhat.com
Wed Nov 9 13:59:32 UTC 2011


Hello all,

exporting landed in the master last week, now it's the time to check it
out.

I will be showing how to work with the CLI client. Most of the TDL
features are also in the UI, but some bits are not there yet (adding a
distribution), so I would recommend to stick with the CLI for now.

The concept is simple - to get a TDL you need to create a template in
Katello, add a custom product, add a repo and synchronize it. Then you
add packages, packages groups and distribution - all of those are sucked
by Pulp and available after repo sync in Katello. Then one needs to
create ueber/debug certificate which will allow IF/OZ to access the
repository. And that's it.

That was a theory, now let's do some stuff. Ssh to a katello-enabled
server (www.katello.org -> Install guide) and do this:

# yum -y install katello-cli
# katello -u admin -p admin shell

The following commands are executed in the katello shell (to make them
shorter). Few long lines was wrapped tho:

client remember --option org --value ACME_Corporation
provider create --type custom --name muni --url http://ftp.linux.cz/pub/
product create --provider muni --name f15 --url
http://ftp.linux.cz/pub/linux/fedora/linux/releases/15/Fedora/x86_64/
--nodisc
repo create --product f15 --name f15_64 --url
http://ftp.linux.cz/pub/linux/fedora/linux/releases/15/Fedora/x86_64/os/
repo synchronize --product f15 --name f15_64

template create --name t
template update --name t --add_product f15
template update --name t --add_package zsh
template update --name t --add_package_group "Administration Tools"
template update --name t --add_package_group_category "Desktop
Environments"
distribution list --product f15 --repo f15_64
template update --name t --add_distribution
ks-ACME_Corporation-f15-f15_64-noarch

org generate_uebercert --name ACME_Corporation

template export --name t --format tdl --file /tmp/tdl.xml

We are done with the shell, ctrl+d now and show your template:

xmllint --format --recover /tmp/tdl.xml

You can download it via the UI as well. You can check the TDL export has
a <os> section, a repository and a certificate. Please note package
group category is ignored right now - I suppose IF/OZ does not support
package group categories, so we need to "expand" them into package
groups in Katello.

Questions? Comments? Ask here, or better on the katello-list.

-- 
Later,

 Lukas Zapletal | E32E400A
 RHN Satellite Engineering
 Red Hat Czech s.r.o. Brno




More information about the katello-devel mailing list