summaryrefslogtreecommitdiffstats
path: root/cobbler.pod
blob: 7a8bf205eb99c0da9acfdc4a65fbaba770c7aa64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
=head1 NAME

cobbler is a command line tool for configuring a provisioning server.  It supports provisioning via PXE, Xen, and re-provisioning an existing Linux system ("auto-kickstarting").  The latter two features are enabled by usage of 'koan' (a client side provisioning application) on the remote system.

=head1 SYNOPSIS

cobbler command [subcommand] [--arg1=] [--arg2=]

=head1 DESCRIPTION

Cobbler manages provisioning using a tiered concept of Distributions, Profiles, and Systems.

Distributions contain information about what kernel and initrd are used, along with various other information, such as required kernel parameters.  

Profiles associate a Distribution with a kickstart file and optionally customize it further.  

Systems associate a hostname, IP, or MAC with a distribution and optionally customize the Profile further.

=head1 ACTIONS

=head2 SETUP

Running "cobbler check" after installation will verify that the prerequisites are installed and configured correctly.

Any problems detected should be corrected, with the potential exception of DHCP related warnings.  

It is especially important that the server name be accurate in cobbler.conf

For PXE, if DHCP is run from the cobbler server, the dhcp configuration file should be changed as suggested.  If DHCP is not run locally, the "next-server" field on the DHCP server should point to the cobbler server's IP and the filename should be set to "pxelinux.0".   

=head2 ADDING A DISTRIBUTION

B<cobbler distro add --name=<string> --kernel=<path> --initrd=<path> [--kopts=<string>] [--ksmeta=<string>]>

=over

=over

=item name

a string identifying the distribution

=item kernel

an absolute filesystem path to a kernel image

=item initrd

an absolute filesystem path to a initrd image

=item kopts

(optional) sets kernel arguments, ex: --ksmeta="foo=bar baz=3 asdf"

=item ksmeta

(optional) sets kickstart variables to substitute, ex: --ksmeta="foo=bar baz=3 asdf"

=back

=back

=head2 ADDING A PROFILE

B<cobbler profile add --name=<string> --distro=<string> [--kickstart=<url>] [--kopts=<string>] [--ksmeta=<string>] [--xen-name=<string>] [--xen-file-size=<gigabytes>] [--xen-ram=<megabytes>]

=over

=over

Arguments are as listed for distributions, with the follwing additions...

=item distro

the name of a previously defined cobbler distribution

=item kickstart

(optional) an HTTP URL, NFS URL, or local filesystem path to a kickstart file

=item xen-name

(optional) (Xen-only) what the Xen domU name should start with

=item xen-file-size

(optional) (Xen-only) how large the disk image should be in gigabytes

=item xen-ram

(optional) (Xen-only) how many megabytes of RAM to consume

=back

=back


=head2 ADDING A SYSTEM

B<cobbler system add --name=<ip|mac|hostname> --profile=<string> [--kopts=<string>] [--pxe_arch=<standard|ia64>] [--ksmeta=<string>]

=over

=over

Adds a cobbler System to the configuration.  Arguments are specified as per "profile add" with
the following changes:

=item name

The system name must be either a currently-resolvable hostname, an IP address, or a MAC address.

When defining Xen systems, using a MAC address causes the Xen MAC address to be used for creation,
so that is the preferred usage.

=item pxe-arch

The PXE architecture is (obviously) only relevant to PXE booting.  Setting
the arch to "ia64" will use elilo.efi as the boot loader instead of 
"pxelinux.0".  The default, "standard", uses "pxelinux.0".

If no Itanium machines are present, this can be ignored entirely.

=back

=back

=back

=head2 DISPLAYING CONFIGURATION ENTRIES

B<cobbler list>

Prints the current cobbler configuration for systems, profiles, and groups.  

=head2 DELETING CONFIGURATION ENTRIES

B<cobbler distro remove --name=<string>>

B<cobbler profile remove --name=<string>>

B<cobbler system remove --name=<string>>

=head2 APPLYING CONFIGURATIONS

B<cobbler sync [--dryrun]>

Configurations are saved in /var/lib/cobbler.  Changes made with any commands are not
applied until 'cobbler sync' is run.   Any errors in the configuration will be reported 
during the sync process.

=head1 EXAMPLES

=head2 BASIC WORKFLOW

B<cobbler check>

B<cobbler distro add --name=rhel4u3 --kernel=/dir1/vmlinuz --initrd=/dir1/initrd.img>

B<cobbler distro add --name=fc5 --kernel=/dir2/vmlinuz --initrd=/dir2/initrd.img>

B<cobbler profile add --name=fc5webservers --distro=fc5-i386 --kickstart=/dir4/kick.ks --kopts="something_to_make_my_gfx_card_work=42,some_other_parameter=foo">

B<cobbler profile add --name=rhel4u3dbservers --distro=rhel4u3 --kickstart=/dir5/kick.ks>

B<cobbler system add --name=AA:BB:CC:DD:EE:FF --profile=fc5-webservers>

B<cobbler system add --name=AA:BB:CC:DD:EE:FE --profile=rhel4u3-dbservers>

B<cobbler list>

B<cobbler sync>

=head2 XEN

For Xen, be sure the distro uses a Xen kernel and initrd:

B<cobbler distro add --name=fc5xen --kernel=/dir3/vmlinuz --initrd=/dir6/initrd.img>

Specify reasonable values for the Xen image size (in GB) and RAM requirements:

B<cobbler profile add --name=xenwebservers --distro=fc5xen --kickstart=/dir7/kick.ks --xen-file-size=10 --xen-ram=512>

And define systems (if desired) using MAC addresses, not IP's or hostnames:

B<cobbler system add --name=AA:BB:CC:DD:EE:FE --profile=xenwebservers>

=head1 ADVANCED TOPICS

=head2 KICKSTART TEMPLATING

The --ksmeta options above require more explanation.

If and only if --kickstart options reference filesystem URLs, --ksmeta allows for templating of the kickstart files
to achieve advanced functions.  If the --ksmeta option for a profile read --ksmeta="foo=7 bar=llama", anywhere
in the kickstart file where the string "TEMPLATE::bar" appeared would be replaced with the string "llama".

To apply these changes, "cobbler sync" must be run to generate custom kickstarts for each profile/system.

For NFS and HTTP URLs, the "--ksmeta" options will have no effect. This is a good reason to let
cobbler manage your kickstart files, though the URL functionality is provided for integration with
legacy infrastructure, possibly including web apps that already generate kickstarts. 

=head2 TWEAKING

Enterprising users can edit the files in /var/lib/cobbler directly versus using the command line.  The repair
mechanism for user error here is to delete the files in /var/lib/cobbler.  There are also a few configuration
variables in /etc/cobbler.conf

=head2 API

Cobbler also makes itself available as a Python API for use by higher level management software.

=head1 EXIT_STATUS

cobbler's command line returns a zero for success and non-zero for failure.

=head1 AUTHOR

Michael DeHaan <mdehaan@redhat.com>