Enterprise Hosting At Home

OK that title is a not serious.

At my current gig we need servers; and I’ve been waiting for the bosses to make the deals to get some real server services.  It’s finally happening, but, its real slow — the handshakes, board room stuff all that.  I didn’t want to strap myself to a kluge solution, but since I see the light at the end of the tunnel I went ahead and pulled a solution out.

Here’s the need:  we need a QA server to allow the product owners/business to look at and test the websites we are developing before we deploy them.  Our current solution involves a week on a staging server before production and we do not control the deployments or data or anything.

Our sites are Java/Spring/Hibernate running on Tomcat with Afresco/MySQL.  Services for Java can be pretty expensive and time consuming to set up correctly, and I wasn’t about to pay for it myself.

First Solution spike: Amazon EC2.  It seems like a good solution but the business wouldn’t give me a credit card and some of the “free tier” services run out after a year — and then they start charging.  Plus the 10 gig limit is of no use to us for storage we have a ton of data and media. (Honestly, its expensive to do this for real we spiked our needs and were quite surprised.)

Second Solution spike: Google App Engine.  Nope — waaaaay to limited, good for proof of concept/RAD apps and that’s it (or Python).

Third Solution spike: VMWare.  Easy enough to set up an image but, would have to have business users install VMware and then obtain my 1 gig+ images.   Too complicated.

Fourth Solution spike: Portable Linux.  In the old days you could run a version of Linux in Windows — Damn Small Linux still does this.   But them as you know, you descend into distro hell trying to get everything configured on some weird Linux deployment.  Finally I tried QEMU with and Ubuntu iso — is worked but was sooooooooooo heavy and slow, and again the file izes were massive over a gig easy.

The Solution

I went home and saw a dusty old server tower sitting in the corner and decided that was it — serve it up from home.  I used to do this in the old days with another domain I have, before it became cost effective to have PHP sites hosted (like WordPress).  I used Zone Edit, which maps a static ip/domain name to the  dynamic IP you get from your DSL service provider (or whomever) and had a little daemon software you install on your local home machine (that has no static IP) that syncs the IP addresses should the service change it.

Setup:

  • Set up my server with my apps.  I set them on port 80 — even though Tomcat runs on 8080.  Just easier.
  • Made sure the server’s firewall wasn’t blocking anything.
  • Gave my server an internal static IP (although — could use the DNS server).
  • Opened port 80 on my DSL modem/router for the server’s IP.
  • Created an account at a site called No IP.  You can also still use Zone Edit but No IP has a better daemon software to run. This account maps the dynamic IP my DSL service gives me to a static IP and domain name for free — like “mysite.no-ip.net” or something.  So you have to create that domain, or you can also map an existing name to the static IP they give you (for a fee I think).
  • Installed and configured the No IP daemon on my server (Win/Mac or Linux!!!!)

Testing:

You can’t test inside your network for some modems because they do not allow loopback mapping — for me, if I went to “mysite.no-ip.net” I got the login for my modem on 192.168.0.1.  You need an outside line AND you can put the mapping in your lmhosts file.   In the old days with Zone Edit I used a dial-up Juno account to make sure it was running for real.  But in my case, I just used my Android phone and surfed on the 4g network (make sure you turn off local networking) to make sure the sites were up.

Also I installed TeamViewer on the server, my work machine and the app for my android phone.  TeamViewer (to me) is the next generation of VNC for remote machine access and management.  You have to pay if its for commercial — I’ll be taking the work site proof of concept offline soon — but its free for home/personal use such as the open source Grails things I have been looking to publish.

That’s it, you’re serving up from home, enterprise style.

 

Comments are closed.