
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] Using EC2 for distcc/mounting local devices on EC2
- Date: Sun, 11 Jan 2009 13:46:25 +0900
- From: Edward Middleton <emiddleton@example.com>
- Subject: [tlug] Using EC2 for distcc/mounting local devices on EC2
- User-agent: Thunderbird 2.0.0.19 (X11/20090103)
During yesterdays technical meeting Mauro mentioned he was using EC2 for
distributed compiling of Gentoo packages for his laptop.
I also have an ancient laptop and I have been using a similar approach
to compile packages, however I found distcc to be a bit slow so instead
I simply mount the laptop over nfs on my desktop machine then chroot to it.
This approach effectively turns my laptop into a NAS. You need to be
careful with some packages that check folder the /proc. If you setup a
VPN with an EC2 instance you could do the same thing for a machine
behind a firewall.
/etc/fstab
laptop:/ /mnt/laptop nfs noauto,rw 0 0
laptop:/boot /mnt/laptop/boot nfs noauto,rw 0 0
# mount base filesystems over nfs
mount /mnt/laptop
mount /mnt/laptop/boot
# bind desktop static /dev folder
mount -o bind /dev /mnt/laptop/dev
mount -o bind /dev/pts /mnt/laptop/dev/pts
mount -o bind /dev/shm /mnt/laptop/dev/shm
# bind desktop /proc and /sys
mount -o bind /proc /mnt/laptop/proc
mount -o bind /proc/bus/usb /mnt/laptop/proc/bus/usb
mount -o bind /sys /mnt/laptop/sys
# use desktop portage tree
mount -o bind /usr/portage /mnt/laptop/usr/portage
# store generated packages on desktop machine
mount -o bind /root/laptop/packages /mnt/laptop/usr/portage/packages
# store kernel sources on desktop
mount -o bind /root/laptop/src /mnt/laptop/usr/src
# mount tmpfs on /tmp and /var/tmp/portage
mount -t tmpfs tmpfs /mnt/laptop/var/tmp/portage
mount -t tmpfs tmpfs /mnt/laptop/tmp
# chroot into environment to compile
linux32 chroot /mnt/laptop/
Edward
Home |
Main Index |
Thread Index