I think so, I'll take a look at this tomorrow, thanks!
-C
On Tue, Jan 27, 2009 at 8:48 PM, Michael DeHaan <mdehaan(a)redhat.com> wrote:
> Corey Kovacs wrote:
>
>> 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.
>>
>>
> I used to have a crazy implementation of this, but I've since discarded it.
>
> Thankfully, it's already doable.
>
> All you need to do is install koan and use koan with --replace-self in
> %post, and then call /sbin/reboot.
>
> This lacks logging, however, but any failures earlier up on the post
> script should terminate the installation and not make it reboot,
> allowing you to do some debug.
>
> The trick though is that since the first profile is essentially generic,
> you would need to set a --ks-meta variable on the system itself to tell
> it what the name of profile2 is and profile3.
>
> Make sense?
>
>
>
>> Corey
>> _______________________________________________
>> cobbler mailing list
>> cobbler(a)lists.fedorahosted.org
>>
https://fedorahosted.org/mailman/listinfo/cobbler
>>
>>
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
>
>
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
Just to make it easier for others to understand what I was thinking of:
cobbler profile add --name=upgrader
--kickstart=/var/lib/cobbler/kickstarts/upgrader
This kickstart does what it needs to and ends with:
koan --replace-self --server=$server --profile=$second
cobbler profile add --name=toolkit
--kickstart=/var/lib/cobbler/kickstarts/toolkit
This kickstart does what it needs to and ends with:
koan --replace-self --server=$server --profile=$third
cobbler profile add --name=final_os
--kickstart=/var/lib/cobbler/kickstarts/final_os
This kickstart ends with:
nothing special
The command you then use to stage all three together and install them is:
cobbler system add --name=foo --mac=AA:BB:CC:DD:EE:FF
--ks-meta="second=toolkit third=final_os" --profile=upgrader
Each profile then launches koan in a chain, making the system map to
each profile in turn.
Technically only the very first operation is a PXE operation, so you'll
want to make sure that each kickstart installs koan (if neccessary, EL 4
will require a wget
since it can't attach to a yum repo). Make sure $kickstart_done is in
the first kickstart template to eliminate a possible PXE loop if PXE was
first in your BIOS order. If not, don't worry
about that.
--Michael