Posts

Showing posts with the label fun

OpenClock and Gentoo

Image
OpenClonk is an open source game that has been in development for some time. Its fun and free. I downloaded a binary some time ago and started using it, but the latest release just doesn't work on my Gentoo machine in binary form. After some digging I didn't found an ebuild for this release, just for the live version. So I wrote my own and added to Gentoo's bug database . I learned a few things along the way but didn't get it as clean as I wanted. If someone knows how to convince cmake to install to a different directory than the prefix used it would be great. I ended up doing a patch for the generated cmake_install.cmake . If anyone knows how to avoid that patch I would appreciate the help. Here is a preview of the game:

Howto make your private VM Cluster, Part III

Continuing with my saga , next up is DRBD . I'm using DRBD because I also want to test it as a viable alternative for network raid . To use DRBD I first created a LVM volume to use: lvcreate -n drbd-demo -L 100M internal-hd Then I configured DRBD on both nodes, fortunately gentoo simplifies a great part of the process (you have to do this on both nodes): cd /etc cp /usr/share/doc/drbd-*/drbd.conf.bz2 . bunzip2 drbd.conf.bz2 Then I created a wwwdata resource by first configuring it (again on both nodes). This is done by creating a file /etc/drbd.d/wwwdata.res with the contents: resource wwwdata { meta-disk internal; device /dev/drbd1; syncer { verify-alg sha1; } net { allow-two-primaries; } on node1 { disk /dev/mapper/internalhd-drbd--demo; address 192.168.100.10:7789; } on node2 { disk /dev/mapper/internalhd-drbd--demo; address 192.168.100.11:7789; } } I added the drbd module ...

Howto make your private VM Cluster, Part II

In the previous entry I showed how to build the basic structure for your own private VM Cluster. Today I'm going to show you how to create a cluster with two VMs that provides High-Availability for a WebServer using DRBD to replicate the Web Site. First you need to create a virtual machine. I decided to create a VM with Gentoo . I will use LVM to keep the partition to use for drbd small since this is a simple test. I created a qemu-img for a base gentoo installation (my goal is to install gentoo on the VM and then reuse it as base for the other VMs). To create the image just run: qemu-img create -f qcow2 gentoo.qcow2 10G I started the VM using that image and followed Gentoo's installation guide . My partition scheme was 100Mb (boot), 512Mb (swap), 5Gb (root), rest for lvm. I used the gentoo-sources, configuring all virtio devices, drbd and the device-mapper. I configured genkernel to use lvm so it detects the lvm volumes at boot. I used grub and added all the genkern...

Howto make your private VM Cluster, Part I

I wanted to make some experiments with DRBD , pacemaker and others. The goal is to test a few configurations for an high availability scenario. Since I don't want to make changes to my machine the solution is to use Virtual Machines. I decided to go all open source and use KVM . Since I want more that a single VM I decided to setup a private bridge to which all the VMs would connect. The bridge would provide DHCP and DNS services and NAT + Firewall to the internet. I use Gentoo . If you use another distribution or firewall tool you should adapt these instructions and scripts to fit your needs. First I created a script that sets up my bridge. The script is as follows (I called it setupBridge): # !/bin/ bash set -x # Setup the bridge sudo brctl addbr br0 sudo ifconfig br0 192.168.100.1 netmask 255.255.255.0 up # Launch DNS and DHCP Server on br0 sudo dnsmasq -q -a 192.168.100.1 --dhcp-range=192.168.100.50,192.168.100.150,forever --pid-file=/tmp/br0-dnsmasq.pid # Launch updated fire...

When hackers have fun!

Today I was building the RRDTool from source and I noticed the output of the configuration part was ordering a CD. config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: executing default commands checking in... and out again ordering CD from http://tobi.oetiker.ch/wish .... just kidding ;-) ---------------------------------------------------------------- Config is DONE! This shows that hackers love to play ;-)

Gentoo with LUKS and LVM

My company has security policy that forces us to encrypt the hard drive of the computer and any other media. Well, not the whole hard drive, but 99% of it: the 1% is what is required for the PC to boot and ask for a password to decrypt the rest of the drive. The good news is that I'm allowed to use Linux. The bad news is that they have red hat enterprise linux and I like Gentoo. For a long time I've been using kubuntu. It is not bad, but it is too easy to use that it borks some time and I like the control Gentoo gives. Since I only installed Gentoo 2 times, one in 2003 and another in 2007 I decided to write all the steps for a bare minimum Gentoo installation. I have tested these steps on a Virtual Machine using KVM. Next step is to make it on the real laptop. It should take something like 35 minutes to do this on a Core 2 Duo at 2.2ghz. Notice: This works for me. Use it at your own risk and remember that these commands wipe your hard drive so, if you want something special ...

LOL - "Server Too Busy"

Image
This just happened to me today. What is more interesting is that this is an unhandled exception. So, the server being to busy is not something that they should predict and allow the application to handle, they just make you wait and then throw this at you. Don't you just love these products.

The Plan

It has been some time since I last posted here but I cam across this gem that I had to share. The tile is " The Plan ": In the beginning was The Plan. And then came The Assumptions. And The Assumptions were without form. And The Plan was without substance. And a terrible darkness fell upon the face of the Workers. And they spoke among themselves, saying "It is a crock of shit, and it stinks." And the Workers went unto their Supervisors and said loudly "It is a bucket of dung, and we cannot live with the smell." Whereupon the Supervisors went unto their Managers and didst say "It is a container of excrement, and it is very strong, such that none may abide by it." The Managers went quickly up into the temple and seeing there the Directors of the company, went unto them, saying in pious voices "It is a vessel of fertiliser, and none may abide its strength." After much feasting and lewd revellry, the Directors spoke among themselves, saying...