Resizing ext3 or ext4 partition for virtual image

        

Note: please backup and make sure that you have a copy of your data and virtual images, this can go wrong and I won’t be held responsible. This worked for me, and might not work for you. For ext4 please use the latest GParted. As I migrated from raw or qcow images, some of the partition sizes that I have to work with are not as big as they could be.


Virtual host QCow convert to LVM

        

Sometimes its better to have your virtual images running directly of LVM instead of using raw or QCow formatted files. So how do we convert? Basically you have to make sure that you have a volume group, of the right size or bigger and then dd the file into a LV on that volume group: This should in the directory where you have the image: [cc lang=“bash”] # Get the filesize of the raw image in Kilobytes.


My Jenkins nginx proxy script

         ·

Here is a very simple configuration for nginx to proxy Jenkins (the new name for the un-Oracle’d Hudson) [cc lang=“bash”] server { listen 80 default; server_name bld-master localhost; root /var/lib/jenkins; access_log /var/log/nginx/jenkins.access.log; location / { proxy_pass http://127.0.0.1:8080/; proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } [/cc]


Setting MAC Addresses on Debian and Ubuntu

        

I recently had a problem with having duplicate MAC addresses on my network for a couple of machines that I was using in a Linux KVM cluster. Flashing the firmware on the motherboards seem to have reset the MAC address to a default (thanks ASUS) that was the same on each board. Changing the MAC address back seems like quite a hard job and looking around on the internet it seems that many people are doing this the hard way with shell scripts and so forth.


Time saving tips for linux

        

Really nice little round up on Quora: http://www.quora.com/Linux/What-are-some-time-saving-tips-that-every-Linux-user-should-know With a follow up on hacker news: http://news.ycombinator.com/item?id=2361978 Probably going to be more of these.


Compiling RabbitMQ on Ubuntu 10.04

         ·     

As part of my on going effort for realtime web updates on one of our applications I needed to install RabbitMQ HEAD (That is the development head) with the RabbitMQ STOMP adaptor. Talking on IRC channel it was recommended to me to install from source, but unfortunately the documentation is out of date. So the following will do it cleanly: [cc lang=“bash”] sudo apt-get install erlang-crypto erlang-snmp erlang-syntax-tools libsctp1 lksctp-tools erlang-runtime-tools erlang-mnesia erlang-public-key erlang-os-mon erlang-ssl erlang-base erlang-parsetools mercurial git-core build-essential erlang-dev zip erlang-tools erlang-src python-simplejson erlang-edoc


Wake On Lan with Ubuntu

        

Wake-on-lan is incredibly useful for those scenarios where you have more than one machine on a network, but you don’t always want to have them running but they are needed sometimes. To setup, make sure that the Motherboard and NIC support is there from your manufacturer. Sometimes it has to be enabled, such as making sure that it uses S3 for shutdown, and that PCI wake is supported. Next you need to check support from the operating system, I am using Ubuntu 10.


VMWare Ubuntu IP address change

              ·

I always have this problem when moving VMWare images of Ubuntu, the most recent of a 10.04 LTS Server. Whenever you move or copy a VMWare image it assigns a new Mac address and Ubuntu starts without properly bringing up the interface. Really annoying when you are using VMWare server without a console. To make it grab the IP Address again, simply remove the rule: [cc lang=“bash”] sudo rm /etc/udev/rules.d/70-persistent-net.rules


Django on RedHat or CentOS

         · ·      · · ·

I am normally using Debian, Ubuntu or even Suse for deploying Django, but a recent customer needed to deploy on Red Hat Enterprise Server 5. We decided beforehand to test deployment on RHEL5 and also on CentOS 5.4 and so these instructions should work for both environments. NginX will be used as the webserver. The first thing I like to do is to upgrade the repository and add EPEL. This wasn’t needed I found on the RedHat box I was using, but was needed on CentOS but your mileage might vary.


Postfix and Gmail

         · ·

I have been using Hudson as a continuous integration server for a short while now and I am super impressed. I have it running on Debian and is really quite feature-full. One thing that I did have a problem with was with the standard Debian 5 Java environment there was a problem using TLS for mail it seemed, and I didn’t just want to send stuff to gmail’s SMTP server all the time so I configured a local Postfix SMTP relay on another server.