vm-builder based Ubuntu TorentFlux Appliance
Today we will build a TorrentFlux appliance. This appliance is one of my early works.
Sometime ago I decided build a download machine. I don’t like to run a torent client on my laptop. I thought it would be nice to have thin KVM appliance which I can use for my downloads.
A friend of mine recommended the TorrentFlux . It is quite a nice solution, you can use it as multi-user download server. It is web application so you can manage your downloads from your web browser. You don’t need to have be behind your download server.
By definition a download server needs a lot of space. But it doesn’t make sense to keep store the download in on my appliance. For that reason I am using a NFS share. Appliance will store the downloaded files on NSF share.
If you followed my previous articles you don’t need to do much.You just need to download and extract the torrent.tar.gz bundle.
Lets get started.
wget http://www.digitalpains.net/wp-content/uploads/2009/08/reposerver_1.0.zip unzip reposerver_1.0.zip alis@advance-17:~$ cd ~/provision wget http://www.digitalpains.net/wp-content/uploads/2009/08/torrent_1.0.tar.gz tar -xzvf torrent_1.0.tar.gz alis@advance-17:~/provision$ ls -l total 16 drwxr-xr-x 2 alis alis 4096 2009-08-19 16:19 libvirt -rw-r--r-- 1 alis alis 1233 2009-08-19 16:24 libvirt_1.0.zip drwxr-xr-x 2 alis alis 4096 2009-08-19 16:19 reposerver -rw-r--r-- 1 alis alis 2589 2009-08-19 16:24 reposerver_1.0.zip drwxr-xr-x 3 alis alis 4096 2009-08-26 13:28 torrent -rw-r--r-- 1 alis alis 2109 2009-08-26 15:55 torrent_1.0.tar.gz alis@advance-17:~/provision$ cd torrent
alis@advance-17:~/provision/torrent$ sudo vmbuilder kvm ubuntu --ip 192.168.5.94 -c torrent.cfg
If you already installed a repository server you can add –mirror http://<REPO_SERVER>:3142/ubuntu to the command above.
2009-08-19 23:40:41,993 INFO Copying to disk images 2009-08-19 23:40:46,894 INFO Installing bootloader 2009-08-19 23:40:57,179 INFO Unmounting target filesystem 2009-08-19 23:41:03,507 INFO Converting /tmp/vmbuilderZOvMI2/disk0.img to qcow2, format /var/VMs/torrent/disk0.qcow2 2009-08-19 23:41:11,017 INFO Converting /tmp/vmbuilderZOvMI2/disk1.img to qcow2, format /var/VMs/torrent/disk1.qcow2 2009-08-19 23:41:21,485 INFO Cleaning up
Now we can start our server. Let’s connect to our hypervisor and check if we can see our new machine and then we will start it up.
kok@fhome:~$ virsh -c qemu:///system
Connecting to uri: qemu:///system
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # start torrent
Domain torrent started
Let’s connect to our newly installed download server.
virt-viewer -c qemu+ssh://kok@192.168.5.94/system torrent
Our admin user and it’s password is kok(Literal Turkish translation of English word root). Once you login you will be requested to change your password and configure your terminal after couple of clicks you will see the prompt.
Now we will execute the /home/kok/setup.sh script. You will be requested with the mysql root user password. After running this script we are ready to go.
If you visit the server you will see the login screen. Actually this is user definition screen for admin user. We need choose a user name and password. I will user test:test combination.

After logging in. You will see the configuration screen. Only thing you need to change is download location. In my case My NFS mount is /mnt/download. You need to modify the boot.sh file to meet your own configuration.

And we are done. Happy downloads
alis@advance-17:~$ cd ~/provision
Related posts:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
