Adding ESX-support to koan
by Jasper Capel
Hi all,
Following up on a IRC-discussion, let's add ESX support to Koan. If we
manage to do this, I think we support all major x86(_64) virtualization
platforms. :)
I invited an ESX-savvy friend to the ML, so I'll briefly explain what
Koan does first:
Koan is a sister-utility to Cobbler, see it as a client side tool that
can access information stored in Cobbler to kick off installations (koan
stands for Kickstart-over-a-network). Using koan, we can deploy new
virtuals for xen/kvm (do we do vmware server/workstation yet?), or
reinstall a system from within that system.
If I wanted a new virtual on my EL5 xen-box, I'd type something like
koan --server=10.1.4.157 --virt --virt-type=xen --nogfx
--system=testvirtual.moo.local
So we'd want to add a new virt-type. I'm not sure if we're able to run
Koan on the ESX-machine (or if we even want to), so we might want to
invoke the operation remotely. VMware may have some tools to pull this
off, but I lack the technical knowledge on how this works.
So what I think it needs to do is:
1) Connect to the ESX-server or VirtualCenter-server using provided
credentials
2) Create a new VM according to specifications from Cobbler
3) Launch the VM, it will (hopefully) PXE-boot (we need to set the VM's
MAC address for this) and the installation will be initiated.
We also might need to teach Cobbler to generate MAC-addresses in the
ESX-range.
Thoughts?
Jasper
15 years, 3 months
bcfg2 integration -- any bcfg2 users have ideas?
by Michael DeHaan
I'd like to have better bcfg2 integration with Cobbler, sort of like we
added for Puppet (--mgmt-classes in Cobbler is intended to be
config-management-system agnostic), to give people options.
Any bcfg2 users have thoughts on how this might be done? (I'm not sure
how this would best work -- what the analogy of "external nodes" is yet,
but it sounds like an outstanding thing to do).
cfengine 2/3 also would be a good idea for those that are using those.
--Michael
15 years, 3 months
slightly OT - preserving ssh keys
by Tom Brown
Hi
We use cobbler to build a pretty stateless farm that can be rebuilt
pretty fluidly pretty much all the time as you'd expect. I have however
never really come up with a great way to preserve ssh keys so that the
id does not change when the box gets rebuilt.
Does anyone have any ideas on how to achieve this?
thanks
15 years, 3 months
Network setup snippet not great with VNC
by Jared Hodge
So the network setup snippet seems very useful, and I want to keep using
it since I like sticking with the standard way of doing things. I use a
listening VNC server with my setups so I can monitor the progress from
my computer. One thing that I have noticed though is that when I hacked
my own static IP settings together and put them in the kickstart
template the vnc command reported back "VNC: Fedora 10 installation on
host myhost-1" but now that I'm using the network setup snippet it is
reporting back "VNC: Fedora 10 installation on localhost.localdomain".
I'm guessing the VNC option for kickstart is not smart enough to parse
out the include file to determine what the actual hostname is. Is there
a simple way around this? I have 4 systems reinstalling right now and
it would be nice to know which vnc server corresponds to which system.
-Jared
15 years, 3 months
Re: PXE boot sub menu's
by Dale Reagan
Hi Glenn,
At 01:56 PM 1/28/2009, you wrote:
>Now I'm not sure if this is even possible, but I thought I'd throw it out
>there. Basically, having submenus within the PXE boot menu. An example
>would be the following:
>
>CentOS
> - CentOS 4
> - i386
> - Web build
> - App build
> - Dev build
> - x86_64
> - CentOS 5
> - i386
> - x86_64
> - etc
>
>My build process does not include MAC addresses, so we basically have to
>select the OS then I'll
>have some post scripts to pull the chassis serial # for configuration info
>from a config database.
Is the need simply for manual PXE boot options? If my brain cells are
working correctly (it's been several months since I worked with this) you
can build your own custom/template PXE menu (just don't let Cobbler tinker
with it...)
If I understand then:
- you build a generic OS install
- you fetch serial #s and then
- customize install during post-kickstart processing?
Is it faster to build your serial number list than to build a list of MAC
addresses?
Do you manually build your system list? or is everything auto-magic? (i.e.
everything is 'discovered' during PXE boot)
:)
Dale
15 years, 3 months
cobbler API
by Shuichi Ihara
Hi,
I'm attempting to create some python scripts with cobbler APIs.
Because, API based scripts are much faster than 'cobbler xxx' commands.
Now, I have a couple of questions about cobbler API.
1. Does API support everything that is supported in 'cobbler xxx' commands?
2. How can we set 'macaddress' and 'ipaddress' to system object via API?
What's object name? Is there any pointers or good source file to know all
cobbler object name for cobbler API?
3. When if I want to update the value in some objects, we always
have to use find() as first, is it right? I mean the following code (e.g. for
updating hostname) is simplest way and reasonable?
api = api.BootAPI()
s = api.systems().find(abc)
s.hostname = 'xyz'
api.systems().add(s,with_copy=True)
Thanks
-Ihara
15 years, 3 months
problems figuring out disks - and new cheetah-snippets
by Rainer Duffner
Hi,
I want to figure out (or rather: pass them to cobbler via ksmeta variables):
I have:
disk=cciss/c0d0,cciss/c0d1
in the ksmeta-string.
I've got a snippet, that is included in the template via
$SNIPPET('disk_double_big_opt_neutral')
It looks like this:
#set $disks=getVar('$disk', None)
#set $disk1=$disks.split(',')[0]
#set $disk2=$disks.split(',')[1]
clearpart --all --drives=$disks
part /boot --fstype ext3 --size=100 --ondisk=$disk1
part pv.2 --size=0 --grow --ondisk=$disk1
volgroup VolGroup00 --pesize=32768 pv.2
logvol swap --fstype swap --name=swapvol --vgname=VolGroup00 --size=512
--grow --maxsize=$ksmaxswap
logvol / --fstype ext3 --name=rootvol --vgname=VolGroup00
--size=$ksmaxslash --grow
logvol /tmp --fstype ext3 --name=tmpvol --vgname=VolGroup00 --size=$ksmaxtmp
part pv.3 --size=0 --grow --ondisk=$disk2
volgroup VolGroup01 --pesize=32768 pv.3
logvol $bigpart --fstype ext3 --name=bigvol --vgname=VolGroup01
--size=$ksmaxbig --grow
But all I get is a big error when I want to view the rendered result:
# *** ERROR ***
#
# There is a templating error preventing this file from rendering correctly.
#
# This is most likely not due to a bug in Cobbler and is something you can fix.
#
# Look at the message below to see what things are causing problems.
#
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
#
# Try fixing the problem and then investigate to see if this message goes
# away or changes.
#
#
# global name 'getVar' is not defined
# File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line 114, in render
# data_out = str(t)
#
# File "/usr/lib/python2.4/site-packages/Cheetah/Template.py", line 994, in __str__
# def __str__(self): return getattr(self, mainMethName)()
#
# File "cheetah_DynamicallyCompiledCheetahTemplate_1233079651_86_79472.py", line 290, in respond
#
# File "cheetah_DynamicallyCompiledCheetahTemplate_1233079651_86_79472.py", line 127, in __errorCatcher9
#
# File "<string>", line 0, in ?
#
# File "/usr/lib/python2.4/site-packages/cobbler/template_api.py", line 156, in SNIPPET
# result = BuiltinTemplate.SNIPPET(self, file)
#
# File "DynamicallyCompiledCheetahTemplate.py", line 89, in SNIPPET
#
# File "/usr/lib/python2.4/site-packages/Cheetah/Template.py", line 1536, in _handleCheetahInclude
# self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
#
# File "cheetah__var_lib_cobbler_snippets_disk_double_big_opt_neutral_1233079619_04_60080.py", line 148, in respond
#
<pre>
Mod_python error: "PythonHandler services"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)
File "/var/www/cobbler/svc/services.py", line 98, in handler
return apache.HTTP_ERROR
AttributeError: 'module' object has no attribute 'HTTP_ERROR'
</pre>
It does work when I remove the "set" directives (but then, it doesn't
replace anything).
How do I have to put it so that the replacement works correctly?
It seems the first line is already making it bomb-out - but I took that
from the example in the wiki.
Regards,
Rainer
15 years, 3 months
Exclude packages
by Baptiste AGASSE
Hello everybody,
I've two little questions for you.
Can I exclude packages from mirrored repositories to limit space used on
disk with cobbler ?
(for example, I don't use, OOo, gnome. and I don't want them on my local
repo)
Can I clean old packages in mirrored repositories to limit space used on
disk with cobbler ?
Thanks a lot for yours answers.
Regards.
Baptiste.
15 years, 3 months
Re: profile chaining...
by Dale Reagan
At 04:33 PM 1/27/2009, you wrote:
> > On Tue, Jan 27, 2009 at 8:48 PM, Michael DeHaan <mdehaan(a)redhat.com> wrote:
> >> Corey Kovacs wrote:
><big snip>
>I would also be looking to do something like this, though my need is
>to run an image against a system, then on reboot run a second image,
>then a third, fourth and possibly even a fifth.
>
>The task I have to undertake is to update the firmware on IBM 'System
>X' (read Intel architecture) server hardware, which usually consists
>of multiple bootable images. As the equipment is being prepared for a
>customer install, and often does not have local hard disk drive, an
>operating system (& koan) install is not possible (though I have
>considered booting a live distro and mounting the firmware from an nfs
>share).
Hmm, perhaps a bit outside of Cobbler but have you considered chaining via
GPXE? (enhanced PXE)
I used GPXE when I started working with Cobbler (for testing with older
hardware.) It may provide a simpler? one-pass chaining solution since you
can boot directly from images but, of course, you still need a method for
managing things (where Cobbler may still work.)
:)
Dale
15 years, 3 months
profile chaining...
by Corey Kovacs
I was working on setting up my cobbler server today when it occurred
to me that the ability to "chain" profiles might be useful. The
concept would basically allow you to assign a sequence of profiles to
run against a machine.
For example.
a system has profile1, profile2, profile3
profile1 boots to a firmware update image, then reboots and cobbler
uses profile2
profile2 boots to the HP scripting toolkit, goes through it's
gyrations, then reboots and cobbler uses profile3
profile3 boots into the standard kickstart mode and builds the machine
as normal.
Profile might not be the right word to describe this but I think the
idea is clear. Seems it wouldn't be too much trouble to do this using
the status mechanism.
Has anyone done this in another way?
Thanks for a great project by the way.
Corey
15 years, 3 months