Cobbler 1.6.4 templating for dynamic partitions
by Eric Raymond
I have been trying to find the right way to store a dictionary for ksmeta
variable in Cobbler. I am not a Python guru, and I may be going about this
the wrong way, and thats why I am posting the question here. :-)
What I am trying to accomplish is a more dynamic partitioning method, using
input from ksmeta to create a dictionary, that I can cycle through to spit
out partition info. This is just a simple construct that I can't seem to get
to work. It will only take the data as a string or list. Does it need some
sort of eval() method?
I would post to the Cheetah-Template list, but it seems to be the way in
which Cobbler processes the POST data. Is there a way to create and save a
dictionary list for Cobbler processing?
For instance:
cobbler system add --name=bar --profile=foo --ksmeta="disk:{'boot': '100',
'root': '4096', 'var': '8192'}"
cat /var/lib/cobbler/snippets/dynamic_partition
#if $disk
# Dynamic disk allocation
#set parts = $disk
#for k, v in $parts
part /$k --fstype ext3 --size=$v --ondisk=\$d1 --asprimary
#end for
#end if
As always, any help is greatly appreciated. I have been using Cobbler to
successfully deploy RedHat, CentOS, Debian, Ubuntu and even Windows. Cobbler
has been the greatest tool that has been teaching me Python and to be a
better system admin. Thanks Michael!
Eric
14 years, 12 months
RHN Updates
by Christopher Dale
I have created a local mirror of the rhel53 updates. I do not have
Satellite of Space Walk installed. Is it possible to get updates working
through yum to my updates repo? I do have entitlements.
14 years, 12 months
daemon fails to start - 1.6.4
by Tom Brown
# /etc/init.d/cobblerd start
Starting cobbler daemon: [ OK ]
# /etc/init.d/cobblerd status
cobblerd dead but subsys locked
# tail cobblerd.log
# tail cobbler.log
2009-05-11 08:50:18,908 - api - generate_kickstart
2009-05-11 10:00:44,439 - api - generate_kickstart
2009-05-11 10:10:16,165 - api - check
2009-05-11 10:16:01,154 - api - generate_kickstart
# cobbler version
cobbler 1.6.4
build date : Fri May 8 19:41:42 2009
any way to debug why this is dying ?
14 years, 12 months
Problems with adding Yum Repos
by mad
Hi!
I tried to add yum repos to an existing profile and got the following message:
Error while saving profile :"repo [Field(\'repos\', \'f10\'), Field(\'repos\',
\'f10_updates\')] is not defined"
Removing works without problem.
This is a Fedora 10 cobbler 1.6.3-2.
Regards,
mad
14 years, 12 months
Re: standalone
by Joe G
Just as an update.
I think my problem has more to do with the anaconda then cobbler.
What I have been doing is listing all the rpms on the dvd individually in the kickstart file, including the rpms in the Workstation directory.
When I do a network install, it works fine because the repos are set up and it can get all the files.
When I try to do a standalone install, with all the rpms listed individually, it can not find any of the rpms in the Workstation directory. It looks like anaconda is hard coded to only look in the Client directory.
Thus far I have had trouble setting IP addresses and having the installs work, because the machine are to be set up in other offices using different network schemes.
Thanks for your help. I'll let you know my solution when I come up with one.
Joe
--- On Mon, 4/27/09, James Cammarata <jimi(a)sngx.net> wrote:
> From: James Cammarata <jimi(a)sngx.net>
> Subject: Re: standalone
> To: "Joe G" <jophey(a)yahoo.com>
> Cc: "cobbler mailing list" <cobbler(a)lists.fedorahosted.org>
> Date: Monday, April 27, 2009, 11:16 PM
>
> On Mon, 27 Apr 2009 19:19:10 -0700 (PDT), Joe G <jophey(a)yahoo.com>
> wrote:
> > James,
> >
> > Thanks for the reply.
> >
> > The command I use to make the iso is"cobbler buildiso
> > --distro=RH5.3client-x86_64 --standalone"
> >
> > I tried it with --source/path to iso with the same
> result.
> >
> > Thanks
> >
> > Joe
>
> Try specifying the --tempdir as well, and after the build
> is done look at
> the contents of that directory. Also make sure that
> you're using an
> official release ISO and not a custom made one. I
> know we've had issues
> with people using custom rolled CD's before.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
14 years, 12 months
adding repo - oddity
by Tom Brown
Am i being completely blind to an obvious mistake i have made here ...
# cobbler repo report RHEL-5.3-x86_64-base
repo : RHEL-5.3-x86_64-base
arch : x86_64
breed : yum
comment :
created : Fri May 8 15:31:50 2009
createrepo_flags : -c cache
environment : {}
keep updated : True
mirror : http://10.10.10.7/mirrors/redhat-es5_upd3_x86_64
mirror locally : False
modified : Fri May 8 15:31:50 2009
owners : [u'admin']
priority : 99
rpm list :
yum options : {}
# cobbler profile edit --name=RHEL-5.3-x86_64 --repos='RHEL-5.3-x86_64-base'
repo RHEL-5.3-x86_64-base, is not defined
thanks
14 years, 12 months
Unicode bug - easy profile fix after updating to 1.6.4
by Jasper Capel
Just a hint, if you suffered from the unicode bug (repositories appear
as ["uRepo1", "uRepo2"] in your profiles), you still need to fix the
JSON files. You can do so by running:
service cobblerd stop
sed -i -r 's/"u+([A-Za-z0-9_\-]+)"/"\1"/g'
/var/lib/cobbler/config/profiles.d/*.json
service cobblerd start
A small warning though: if your one of your repositories legitmately
starts with a 'u', this might screw things up.
-Jasper
14 years, 12 months
preserve directory between rebuilds
by Tom Brown
At the moment i use the keep_ssh_host_keys snippet to make sure the host
key does not change accross rebuilds to avoid fingerprint trouble, and
this works fine.
I have a situation where i have to preserve a certain directory /var/log
and this is NOT always on a seperate partition so i wonder would it be
possible to use a similar trick to preserve this directory? I am not
certain as this directory can be quite large.
any ideas ?
thanks
14 years, 12 months
Customising entries in pxelinux.cfg
by Tom Brown
So this question goes back to the fact that cobbler removes any machine
entries in pxelinux.cfg that it does not know about.
I am trying tho get this to work on a distro that is linux based but is
not standard 'kickstart' - I feed the following to cobbler
cobbler distro edit --name=Xen-Enterprise-5.0.0
--initrd=/var/www/cobbler/ks_mirror/xenserver/xen.gz
--kernel=/var/www/cobbler/ks_mirror/xenserver/mboot.c32
--kopts="watchdog com1=115200,8n1 console=com1,tty ---
Xen-Enterprise-5.0.0/vmlinuz console=tty0 console=ttyS0,115200n8
root=/dev/ram0 ramdisk_size=32758
answerfile=http://10.160.200.21/xenserver-5.0.0/10.160.201.116-answerfile
install --- Xen-Enterprise-5.0.0/install.img"
thing is the generated pxelinux.cfg entry looks like the below
default linux
prompt 0
timeout 1
label linux
kernel /images/Xen-Enterprise-5.0.0/mboot.c32
ipappend 2
append initrd=/images/Xen-Enterprise-5.0.0/xen.gz ksdevice=eth0
lang= console=com1,tty console=tty0 console=ttyS0,115200n8
com1=115200,8n1 text ---=None ---=None
answerfile=http://10.160.200.21/xenserver-5.0.0/10.160.201.116-answerfile
install watchdog ramdisk_size=32758 root=/dev/ram0
Xen-Enterprise-5.0.0/vmlinuz Xen-Enterprise-5.0.0/install.img
ks=http://192.168.11.1/cblr/svc/op/ks/system/testbox
in that the order of how the line is laid out is different and also
there are some options added by default such as the ks location and text.
Is there any way that we could get cobbler to only add what you
explicitly say to the append line if you specify it? Have an option that
is append= and if thats given then only add that and in the specified order?
If it is then that would be a breakthrough for me
thanks
14 years, 12 months
Ideas for automating desktop installs?
by Gino LV. Ledesma
Hi, all
I'm curious to know what other users have done for automating desktop
installs. I've been reading the wiki and got a number of ideas using
snippets. What I'm trying to do is do "self-installs", where a user
can provision his or her own desktop with customizations for that
user. It would be something like:
1. User PXE boots machine
2. User selects a profile
3. ???
4. Machine gets provisioned according to profile
5. Machine is ready for use with user's custom settings
The constraint here is that I'd like to move away from creating system
profiles prior to the install (which would normally require getting
the MAC address and registering it with cobbler). What I'd like to
tell cobbler (step 3) is that I'm provisioning this machine for a
specific user -- perhaps by passing something onto the kernel command
line as a parameter, and then having the post-install section do the
customization based on that. For example, I could pass in
username=$username and then a script/trigger could fire off and lookup
a DB for that user, and then create the
accounts/profiles/apps/configs/etc automatically.
I'm constrained to working with Windows managing DHCP, so I'm trying
to pass the hostname onto the kickstart parameters somehow so I can
get it register itself and update DDNS. As you can tell from the
above, we're trying to reuse a single "generic" profile (which is my
baseline) and simply customizing the install for a specific user (i.e.
by adding that user's account) without creating.
So my questions are:
1. Is supplying this last information via kernel command line the best option?
2. Can we somehow get a ksmeta variable set at profile-selection time
outside of cobbler (e.g. in the boot selection menu)? (I doubt it)
3. Short of implementing integration with LDAP/Kerberos/Active
Directory for authentication and using roaming user directories, are
there any recommendations for "user provisioning" via cobbler? My last
recourse is to have the account provisioning be done as a first-boot
option.
- gino
15 years