User:Jebba/Espejo
Contents |
Overview
Espejo is a temporary virtual computer set up to mirror the Maemo 5 (Fremantle) repository.
- Hostname: espejo.freemoe.org
- Location: USA @ NetDepot
- Services:
- http://espejo.freemoe.org
- ftp://espejo.freemoe.org
- rsync://espejo.freemoe.org
Usage
If you would like to use this mirror, you can add any of these lines to your /etc/apt/sources.list or add them via tap tap tap with the Hildon Application Manager:
# Extras deb http://espejo.freemoe.org/repository.maemo.org/extras/ fremantle free # Extras source deb-src http://espejo.freemoe.org/repository.maemo.org/extras/ fremantle free # Extras Testing deb http://espejo.freemoe.org/repository.maemo.org/extras-testing/ fremantle free # Extras Testing source deb-src http://espejo.freemoe.org/repository.maemo.org/extras-testing/ fremantle free # Extras Development deb http://espejo.freemoe.org/repository.maemo.org/extras-devel/ fremantle free # Extras Development Source deb-src http://espejo.freemoe.org/repository.maemo.org/extras-devel/fremantle free # SDK deb http://espejo.freemoe.org/repository.maemo.org/ fremantle/sdk free # SDK Source deb-src http://espejo.freemoe.org/repository.maemo.org/ fremantle/sdk free # Tools deb http://espejo.freemoe.org/repository.maemo.org/ fremantle/tools free # Tools Source deb-src http://espejo.freemoe.org/repository.maemo.org/ fremantle/tools free
Server Details
The server is a Debian Lenny KVM (QEMU) within a Debian Squeeze/Sid host server.
Host Hardware
- (8) 2GHz Processors (E5405)
- 4 Gig RAM
- 750G SATA (ST3750330AS)
- (3) 30G SCSI RAID-0
Guest Hardware
Virtual, of course. :)
- 4 CPU
- 1 Gig RAM
- Disk:
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/vda1 4.0G 758M 3.0G 20% / /dev/vde1 50G 183M 50G 1% /var/www/repository.maemo.org /dev/vdb1 50G 951M 49G 2% /var/www/repository.maemo.org/extras /dev/vdc1 50G 2.5G 47G 5% /var/www/repository.maemo.org/extras-testing /dev/vdd1 99G 16G 84G 16% /var/www/repository.maemo.org /extras-devel /dev/vdf1 50G 2.3G 48G 5% /var/www/repository.maemo.org/pool
Daemons
apache2
No modperl, modphp, etc. installed. Other than that, total stock install.
rsync
Stock Debian Lenny.
$ cat /etc/rsyncd.conf [repository.maemo.org] path = /var/www/repository.maemo.org comment = Extras Repositories for Maemo 5 (Fremantle) read only = yes use chroot = yes max connections=256 list = yes uid = nobody gid = rsync dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz
cat /etc/default/rsync # relevent tidbit: RSYNC_ENABLE=true
- I added a user "rsync" as Debian doesn't come stock with a group nobody. Don't think it matters "too" much.
vsftpd
I'm not sure what the latest/greatest ftp server is nowadays, but this one should work.
Added these two lines to stock /etc/vsftpd.conf:
userlist_enable=NO anon_root=/var/www
Host Server
Initial setup
- Latest kernel with virtio etc. (Include relevant kernel .config).
- Create disk images:
Example:
qemu-img create -f qcow2 -o cluster_size=2097152,preallocation=metadata /HUGE/kvm/espejo/espejo-FOO.qcow2 50G
....
Daily Use
- Start kvm on boot via good ol' rc.local:
/usr/local/bin/kvm-start-espejo >/tmp/espejo-kvm-err 1>/tmp/espejo-kvm-log &
Startup script:
$ cat /usr/local/bin/kvm-start-espejo #!/bin/sh /usr/local/bin/qemu-system-x86_64 \ -drive \ file=/HUGE/kvm/espejo/espejo.qcow2,index=0,if=virtio,cache=writeback,boot=on \ -drive \ file=/HUGE/kvm/espejo/espejo-extras.qcow2,index=1,if=virtio,cache=writeback \ -drive \ file=/HUGE/kvm/espejo/espejo-extras-testing.qcow2,index=2,if=virtio,cache=writeback \ -drive \ file=/HUGE/kvm/espejo/espejo-extras-devel.qcow2,index=3,if=virtio,cache=writeback \ -drive \ file=/HUGE/kvm/espejo/espejo-pool.qcow2,index=4,if=virtio,cache=writeback \ -drive \ file=/HUGE/kvm/espejo/espejo-maemo.qcow2,index=5,if=virtio,cache=writeback \ -cpu kvm64 \ -m 1024 \ -vnc :6 \ -daemonize \ -enable-kvm \ -name espejo \ -net nic,vlan=0,model=virtio \ -net user,hostfwd=tcp:63.247.92.156:22-:22,hostfwd=tcp:63.247.92.156:80-:80,hostfwd=tcp:63.247.92.156:873-:873,hostfwd=tcp:63.247.92.156:20-:20,hostfwd=tcp:63.247.92.156:21-:21 \ -smp 4 \ -runas jebba &
TODO
- Could set up separate partitions for /tmp and such, but probably not worth it.
- Build latest/greatest kernel on guest to take advantage of latest virtio code to improve disk performance.
- Set up puppet for configs (worthwhile?).