Mailing List Archive

Server distributing full Gentoo installation(s) to clients?
What is the best way to set up an environment where complete Gentoo
distributions for clients can be built on a server and then transferred via
network to the clients (enriched, of course, with client-specific
configuration files)?

Note that the server and the clients may well have different architectures.
While I am aware of distcc and cross-compiling, I found no info on basically
setting up "sub-portages" on the server that can manage different sets of USE
flags as well as different packages (and possibly versions) isolated from the
server installation.

While this could probably be faked with judicious use of chroot, I am hoping
for a more elegant solution possibly already supported by existing tools.

Any hints are appreciated!
Andreas

--
gentoo-user@gentoo.org mailing list
Re: Server distributing full Gentoo installation(s) to clients? [ In reply to ]
Since I am developing firewall distributions based on Gentoo for
different target systems I am rather familiar with your situation.
Here's what I do:

I use one development system that carries all client enviroments. To
create a specific client environment I just create a folder
"/client-env" and untar a fitting Gentoo stage file into that one.

Then I

mount -o bind /usr/portage /client-env/usr/portage
cp -L /etc/resolv.conf /client-env/etc/resolv.conf
mount -t proc none /client-env/proc
chroot /client-env /bin/bash
env-update
source /etc/profile

So far, so good. Now I have to adjust Portage to that client environment
in /etc/make.conf. Aside the usual compiler flags (be aware of the
target systems architecture!) I have to adjust the following variables:

PORTAGE_TMPDIR=/client-specific/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PKGDIR=/client-specific/packages
PORT_LOGDIR=/client-specific/log/

where client-specifc should not be part of /usr/portage! The result of
this is that from now on Portage will use the hosts original
/usr/portage tree but will store all packages and cache files into the
local environment (you even could perform emerge syncs within that
environment but I wouldn't recommend it - let only the host do that).

Ok, now I am able to continue the Gentoo installation following the
handbook (except for installing the boot loader!)

One last hint: don't forget to reflect the actual target systems disk
layout in /etc/fstab.



Andreas Koch schrieb:
> What is the best way to set up an environment where complete Gentoo
> distributions for clients can be built on a server and then transferred via
> network to the clients (enriched, of course, with client-specific
> configuration files)?
>
> Note that the server and the clients may well have different architectures.
> While I am aware of distcc and cross-compiling, I found no info on basically
> setting up "sub-portages" on the server that can manage different sets of USE
> flags as well as different packages (and possibly versions) isolated from the
> server installation.
>
> While this could probably be faked with judicious use of chroot, I am hoping
> for a more elegant solution possibly already supported by existing tools.
>
> Any hints are appreciated!
> Andreas
>
> --
> gentoo-user@gentoo.org mailing list
>
>
>

--
Mit freundlichen Grüßen

Heinz Sporn

SPORN it-freelancing

Mobile: ++43 (0)699 / 127 827 07
Email: heinz.sporn@sporn-it.com
heinz.sporn@utanet.at
Snail: Steyrer Str. 20
A-4540 Bad Hall
Austria / Europe

--
gentoo-user@gentoo.org mailing list
Re: Server distributing full Gentoo installation(s) to clients? [ In reply to ]
I am currenlty doing something like this over here on a dual Xeon box
with loads of space. I have one directory for each install type, in our
case, one for Pentium III desktops, one for Athlon desktops and one for
Pentium III servers. AFAIK, you have to use completely separate setups
for each. Use same flags for PIII and P4.

I basically just installed Gentoo in each of the directories, like
described in the Gentoo Guide, except for creating partitions and file
systems and installing Grub of course.

For each install type, I build a kernel with modules for all devices I
expect to use on all destination boxes, and use hotplug to autoload the
modules.

To transfer, I just boot a "client" from the live cd, make partitions
and file systems, mount everything under /mnt/gentoo and rsync over ssh
form server directory to client /mnt/gentoo. Be sure to unmount proc
unmounted on the server directory before transfer.

I use the same partition setup for each box of the same type, so grub
and fstab already configured before transfer. After transfer, I just
have to setup grub, tweak xorg.conf if needed, and reboot.

Works fine for me, I keep the Gentoo's on the server updated for new
installs.



On Thu, 2004-10-07 at 02:46, Andreas Koch wrote:
> What is the best way to set up an environment where complete Gentoo
> distributions for clients can be built on a server and then transferred via
> network to the clients (enriched, of course, with client-specific
> configuration files)?
>
> Note that the server and the clients may well have different architectures.
> While I am aware of distcc and cross-compiling, I found no info on basically
> setting up "sub-portages" on the server that can manage different sets of USE
> flags as well as different packages (and possibly versions) isolated from the
> server installation.
>
> While this could probably be faked with judicious use of chroot, I am hoping
> for a more elegant solution possibly already supported by existing tools.
>
> Any hints are appreciated!
> Andreas
>
> --
> gentoo-user@gentoo.org mailing list
Karl Huysmans
IT & Engineering
ACE Digital House
Schiphollaan 2 - 1140 Brussels - Belgium
T: +32 2 735 60 20
F: +32 2 734 09 63

E: karl@ace-postproduction.com
http://www.ace-postproduction.com

This e-mail and any attachments thereto, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of this
e-mail, you are hereby notified that any dissemination, distribution or
copying of this email and any attachments thereto, is strictly
prohibited. If you receive this email in error please immediately notify
me at (32)2 735 60 20 and permanently delete the original copy and any
copy of any e-mail, and any printout thereof.



--
gentoo-user@gentoo.org mailing list
Re: Server distributing full Gentoo installation(s) to clients? [ In reply to ]
Many thanks for the info, that helped quite a bit!

Andreas

--
gentoo-user@gentoo.org mailing list