Chapter 11. Cobbler
202
Kickstart snippets are sections of kickstart code that can be called by a
$SNIPPET()
function that will
be parsed by Cobbler and substitute that function call with the contents of the snippet.
For example, if you had a common hard drive partition configuration for all servers, such as:
clearpart --all
part /boot --fstype ext3 --size=150 --asprimary
part / --fstype ext3 --size=40000 --asprimary
part swap --recommended
part pv.00 --size=1 --grow
volgroup vg00 pv.00
logvol /var --name=var vgname=vg00 --fstype ext3 --size=5000
You could take that snippet, save it to a file (such as
my_partition
), and place the file in
/var/
lib/cobbler/snippets/
so that Cobbler can access them.
You can then use the snippet by using the
$SNIPPET()
function in your kickstart templates. For
example:
$SNIPPET('my_partition')
Wherever you invoke that function, the Cheetah parser will substitute the function with the snippet of
code contained in the
my_partition
file.
For more information about kickstart snippets, refer to the Cobbler project page at the following URL:
https://fedorahosted.org/cobbler/wiki/KickstartSnippets
11.6. Using Koan
Whether you are provisioning guests on a virtual machine or reinstalling a new distribution on a
running system, koan works in conjunction with Cobbler to provision systems on the fly.
11.6.1. Using Koan to Provision Virtual Systems
If you have created a virtual machine profile as documented in
Section 11.3, “Adding a Profile to
Cobbler”
, you can use
koan
to initiate the installation of a virtual guest on a system.
For example, say you've created a Cobbler profile such as the following:
cobbler add profile --name=virtualfileserver --distro=rhel-i386-server-5 --
virt-file-size=20 --virt-ram=1000
This profile is for a fileserver running Red Hat Enterprise Linux 5.3 with a 20GB guest image size and
alloted 1GB of system RAM.
To find the name of the virtual guest system profile, run the following with
koan
:
Содержание NETWORK SATELLITE 5.3.0 - CHANNEL MANAGEMENT
Страница 1: ...Red Hat Network Satellite 5 3 0 Reference Guide Red Hat Network Satellite ...
Страница 32: ...20 ...
Страница 44: ...Chapter 4 Red Hat Update Agent 32 Figure 4 11 Available Package Updates ...
Страница 168: ...156 ...
Страница 180: ...168 ...
Страница 216: ...204 ...
Страница 232: ...220 ...
Страница 248: ...236 ...
Страница 260: ...248 ...
Страница 309: ...297 Appendix E Revision History Revision 1 0 Fri Feb 27 2009 ...
Страница 310: ...298 ...
Страница 318: ...306 ...