MongoDB MMS via Hamachi VPN

Today, I stumbled across a great way to use 10gen's MMS system with my Macbook Pro today without any kind of router reconfigure, firewall rule changing or even opening up mongod to the outside world. I simply took advantage of my personal Hamachi network with spans across all of my laptops, desktops and deployed servers. This is actually a paid Hamachi Pro account with 32 clients, but you can get a free one that allows up to 5 machines. Since I had the agent running on a server with Hamachi installed, I was simply able to go to the MMS control panel and add the internal network IP of my Macbook Pro. Even though it's an internal network, the MMS python agent makes requests from your agent machine, then connects with MMS separately, so the connection to my Macbook goes entirely through Hamachi and bypasses the outside world. This also has the advantage of being totally encrypted, and follows my machine wherever I go without having to update the IP inside MMS. The advantages of this are amazing, as it allows you to monitor and profile your local development environment without any extra tools and accompanied by mongostat it's a great way to find out what's actually happening on your machine. However, one downside of this is you have to re-enable the host in MMS if you've had your machine turned off for a while, as it becomes deactivated, but that's simple enough just to login and click the re-enable link. I'm always trying to find out useful new ways to make development easier, feel free to share any of your own!

It's September already?

Where has the time gone! I've been working at my new job for almost a whole month now and it still feels like I've just started! For those of you that don't know I'm now a programmer at Performance Horizon which is pretty awesome; quite the change from flash gaming! It's also the main reason I've been neglecting my personal projects and blog updates to concentrate all the cool things I've been working on.

Recover from Interrupted Ubuntu Release Upgrade

Today I finally got around to upgrading my home media server to Ubuntu 12.04. I'd been putting it off for a while, mainly because I was busy and didn't have time to run extra backups. Anyways, everything ran smoothly until I forgot it was running and closed my Macbook lid, which resulted in no connection and a broken SSH pipe. This is the first time it's happened to me so I quickly did some googling and found the best solution. Luckily the creators of Ubuntu planned ahead for this kind of thing and run a separate SSH Deamon (mine was port 1022) so I could connect to that using ssh [email protected] -p 1022. Now gthat you're connected, you will notice everything is locked down. The entire file system will be locked down incluing apptitude, and you can't even resume using dpkg --configure -a or aptitude t -f dist-upgrade. There is a screen instance running as the root user on th machine, which you can easily reconnect to using screen -d -r. Once you are connected to this, you can easily resume wherever you were disconnected from. If you aren't logged in as root, which is good practice when you need to sudo su to get to the root user, or su root then enter the root password if you don't have sudo permissions. Thankfully that's all I needed to do to resume my upgrade.

Installing GeoIP on CentOS

I mainly write these blog posts for my own personal reference, so I don't forget how to install all of these various packages, but also because I learn a lot of my stuff from other people's posts and like to contribute back where I can. Below is my install script for GeoIP on CentOS 5.6+, and so far it has never failed. It should work on any Redhat based system with the yum package manager, but I haven't tested on any system below 5.6. I normally create scripts in a personal install directory and run as sh ~/install/geoip.sh.