Hi,

thanks for taking the time to help.

I could configure PXE in the way you describe, but then all the clients of
a given subnet will be associated to a specific profile (meaning a specific
distribution in my case)
What I want to achieve is a bit like a self-service portal.
You PXE boot the machine, and choose which distribution you want (rh5, rh6,
etc)

Then your location is automatically detected by Cobbler, and some
site-specific things happen (like using the mirror copy of the source tree,
setting the timezone, etc).
All this automatically happens in the kickstart file, with a call like
getvar('ip_address') followed by a couple of conditional statements.

The problem is I can't figure out a way to get this IP address, as there's
no "cobbler system" existing for each client machine

Guillaume


On Tue, Apr 9, 2013 at 8:11 AM, Andrew Hamilton <[email protected]>wrote:

> Hi,
>
> I'm guessing that you have distinct subnets for each of your locations.
> PXE is built to work off of subnets so you might be able to use that
> functionality. Check out
> http://docs.oracle.com/cd/E24628_01/em.121/e27046/appdx_pxeboot.htm for a
> discussion on PXE and it talks about how to deal with subnets. Basically
> what you do is you convert each octet of the subnet into hex and then place
> a file in the TFTPd directory with the that hex value as its name.
>
> What I'm not sure (due to it's a little late and don't feel like diving
> into the code) is whether or not cobbler will help with this at the moment.
> It looks like in the past there had been some discussion about adding this (
> https://lists.fedorahosted.org/pipermail/cobbler/2008-July/000277.html).
> This should be able to be done manually if needed at the moment. There is a
> location that you can use though I don't remember it off the top of my head
> where you can keep PXE files that are manually added and have them copied
> over each time a 'cobbler sync' is performed so that they aren't deleted.
>
> If this is what you're looking for and still need help let me know and I
> can do a little more digging if you can't figure it out.
>
> Andrew
>
>
> On Mon, Apr 8, 2013 at 5:28 AM, Guillaume R <[email protected]> wrote:
>
>> Hi,
>>
>> I'm stuck with a little problem I hope someone here can help me to solve
>>
>> We have a multi-site environment.
>> A central Cobbler server, used accross sites.
>> DHCP on each site is not managed by us (though we can PXE boot all the
>> machines and have them contact our central Cobbler server)
>>
>> What I want is to automatically set a "location" variable, based on the
>> machine's IP address (as seen by Cobbler)
>> I want to use profile based installs only.
>> I don't want to declare all my systems wit "cobbler system add ..."
>> commands
>> Besides being an extra burden, it would also require to assign a profile
>> to the system.
>> I don't want that, and want the client to select the OS it wants from the
>> boot menu
>>
>> Currently I generate a profile per site and per distribution, like
>> siteA-rh5
>> siteB-rh5
>> siteA-rh6
>> siteB-rh6
>> ...
>>
>> and I parse the $profile_name to get the location
>>
>> What I'd like instead is even more generic profiles,
>> distribution-specific only, like
>> rh5
>> rh6
>>
>> and have the location variable set to siteA or siteB accordingly, and use
>> that variable in my kickstart, mostly for
>> url --url http://repo-${location}/path/to/distro
>>
>> to use the local mirror copies of the repositories, as well as a couple
>> of other things, like setting the timezone
>>
>> To do that I need the client IP address.
>>
>> The problem I'm facing is that server_name or ip_address are blank, when
>> retrieved with getvar
>> My understanding is that it's because I don't have a system created for
>> each machine with "cobbler add system .."
>>
>> Cobbler necessarilly sees the IP address of the machine it's deploying at
>> some point.
>> I see it in my apache log files when the client makes a GET request to
>> get its kickstart file, but I can't use it from there.
>>
>>
>> I thought it's maybe possible to plug this logic in a pre install
>> trigger, but haven't figured out how to get the IP this way, and how to
>> pass it along)
>>
>> Is there a way to get the IP address of the client in a profile based
>> install, and to use it in the templating engine?
>>
>> Thanks
>>
>>
>> _______________________________________________
>> cobbler mailing list
>> [email protected]
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>>
>
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
>
_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to