This site has been archived and will no longer be updated.
You can find my new profile at neilpahl.com. My new blog is at 808.ninja.
Thu, 03 May 2012:
If you are behind someone else's firewall, chances are you have a dynamic ip as well.
Usually to keep track of the external IP of a host with dynamic ip, I use a ddns service which is supported with my router. If my router doesn't support ddns, I use a simple script which will email me the external IP address of the host.
Behind a Firewall however, I have setup a reverse shh tunnel which can hold a persistent connection to an agent server. Then I can access the server which is behind the firewall by ssh'ing into the agent server at a specific port which will redirect me to the host behind the firewall. I will write a post on this when I get some time~
Similarly, there is a way to maintain an openVPN connection between two hosts. I will write about this in the coming future too.
Sorry for the short Log, but I just wanted to add a quick update to this topic.
Tue, 01 May 2012:
Since Ubuntu 10.04 has only maven2 in the apt-get repositories, maven 3 must be downloaded, extracted and added to the $PATH environment variable.
First, download the the binaries from the maven download page. I would give the download link, but they ask that you download from the nearest mirror (I'm in Hong Kong, and downloaded binaries for Maven 3.0.4) . So, copy the download link for your nearest mirror and then use:
wget http://link/to/download/maven_binaries.tar.gz
unzip them,
tar xzf maven_binaries.tar.gz
move the files to /usr/local (the recommended place to place non-package managed linux installs)
sudo cp maven_binaries /usr/local/apache-maven
then add some evirontment variables to /etc/environment:
JAVA_HOME="/usr/lib/jvm/java-6-openjdk" M3_HOME="/usr/local/apache-maven" MAVEN_HOME="/usr/local/apache-maven" M3="/usr/local/apache-maven/bin"
append the maven binaries to $PATH by changing your PATH from :
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
to:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/apache-maven/bin/"
afterwards, run the following to test:
mvn --version
you should get something like:
Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800) Maven home: /usr/local/apache-maven Java version: 1.6.0_20, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_HK, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-40-generic-pae", arch: "i386", family: "unix"
Tue, 10 Apr 2012:
There are lot of methods to add cool font to yoru page. For titles and headers, you can use images instead of text, or you can use a some scripts and modules which will change letters to their font image equivalent.
However, using images is not goot for CEO, so people usually recomment staying with the standard "font-family: Verdana Helvetica Ariel" combination. Those fonts are usually found across all browsers, but they can be a little boring for a good look.
I stumbled upon Google's Web Fonts which was very nice. A pleasant gui to choose your fonts, then after adding them to your collection you can hit "use" and they will give you a line of code to link the font in your <header>, the 'font-family' line to put into your CSS (put it in body{} if you wan't everything in that font), and they have a gauge which will tell you how linking the font will affect your page load times.
All nice and easy, I was glad to find it.
Sat, 31 Mar 2012:
There I was getting things started, when... It was just too tempting so...
I deleted my ubuntu 10.04 64 bit PV image of my server and decided to take a gander at what else this Xen Based Cloud Hosting had to offer.
FIrst of all, after my confirations to delete the virtual cloud server, I only had to wait seconds before I could deploy a new server. And now I could test any of their supports OSs.
This had me thinking back to all the time I spent reinstalling different distros back when I was first giving linux a shot. Having a virtual host like this would of been real nice. However, none of the servers run guis... and I guess I could of achieved a similar thing had I used just plain old virtual machines.
But, the way I can just pick and choose them, and have them deployed instantly (I can delete one, and deploy in less than a min) is quite convinient and efficient.
Unfortunatley, it takes a while to test out different distros and learn the real diffreences behind them. From what I've seen they are all capable of dishing out the services you need them too but things get a little painfull to setup if they are not desined for your distro. I always feel a slight disapointment when software does not list my distro specifically in the installation instructions. Also, I often use "The Linux Administrators HandBook" for reference which I like how they explain the cases specific to each distro. For now, I'm most comfortable with Ubuntu.
So, what I was really interested in Testing out within my cloud virtual server was teh large selection of turnkey linux distros. I think If I weren't so enthused about linux systems, then I'd just use a turnkey distro like the turnkey tomcat distro which would let me host java apps out of the box. I still beleive, however, that there still can be traps for someone who is generally unfamiliar with linux systems when using turnkey linux (or any linux or that matter). I can imagine the case where they do something silly like forget to change the default pw (i've seen it happen for someone reputable liek EA games), or mess up some file restricitons and ACL's. So I hope those turnkey linux's have good documentation for things like these.
I really think that if I had a client base large enough which wanted oen specific thing, then it would be so easy to just use those turnkey distros and not have to worry too much about it.
On the other hand, as a custom solutions maker, I will stick with ubuntu and install and configure what I need and on my own. for now~
Fri, 23 Mar 2012:
After tinkering around with my ubuntu home server for a while, I began thinking about getting a VPS with a dedicated IP. My Home server just used a free dyndns (I don't think you can add free dyndns sub-domain names to the free account anymore) account which, in cooperation with my router, kept my dynamic IP binded with the free sub-domain name.
Now, anyone who has gotten any sort of webspace knows that there is almost no use in searching for "hosting". The market is flooded with good, bad and terrible hosts and it takes some probing to feel confident about the perfect (best bang for buck) hosting package. There are the main conglomerates (which are expensive) and the el' cheapo companies who are probably just subleasing out space they got from the big company. Just, do your research.
I'm no ultra expert, so I wanted flexibility. I wanted a chance to play around and figure out if I made a mistake before I sign on to any sort of premium package.
Basic Requirements:
- Full Root Access with the ability to install anything I wanted.
- High Availability and low latency; I want to be able to log in and work without lag or disconnects.
- The flexibity to scale if needed (we all know our apps are going to be that successful, lol)
I am still undecided if I want to use it as my personal everywhere linux cloud. Since most of my focus is web-app based, and backend programming and scripting, I wouldn't need any fancy GUIs. A browser will work just fine Otherwise, the kind of things I want to eventually do with my server is the following:
- Using openVPN to vpn and see the staging sites though a browser.
- Create commerical web-app solutions which can only by seen by my client.
So maybe commercial and public apps, but then no personal projects. I will have to ensure secure practices before I put my valuables up in the cloud.
- Explore differnces between cloud VPS and normal VPS.
Lastly,
- dig into scala, with play and/or lift.. apache tomcat... JVM
- host my git repos
- create jails to allow other users to sftp(ssh) or scp wihtou giving too much access
- create restriced accounts for people I collab with
- Host
some web-based project management tools (I've tried project-pier,
redmine, phpcollab, and more... [will be seen in a future topic]
- and much more..
Wait, theres one more, and the most important:
- Uphold very tight security best practices. Sometimes things get going slower, but then I can sleep easy at night.
So, a big wishlist...
But
for starters, to solve my basic requirements, I opted to get a cloud
VPS. They are all the hype and I hope it will give me some exposure into
that world. For high availability, you kind of have to beleive the
reviews aboutthe company. For Low Latency, I need to get a server close
to home.
I'm in Hong Kong, so I narrowed my selection to a few which came up in my searches:
- rackspace - rackspace.com.hk
- Host Virtual - vr.org
- VPS Hosting - vpshosting.com.hk
I chose Host virtual because I liked how detailed they talked about their new data center in Hong Kong. They use Xen Virtuallization, which is something I wanted to, but never got around to testing out. And teh deciding factor is... Cancel anytime and package adjustment services. Being my first time, I am able to buy the minimal 256mb,10GB Disk, and 200GB transfer ram for ~$10USD. Unlmited ipv6 addresses (another topic I want to decifer), one ipv4 address and $2USD/ipv4 address. a control panel-like service with the 516mb ram package, and a plethera of other nice admin tools which will make the transiton into l33t linux sys admin easier.
Afterwards, I got a Top Level Domain from
namecheap.com which had a special on "whois guard" and ssl
certificates... so I'm going to get to use that slick https stuff.
Finally, I created an A record to use namecheaps DNS services and forward everything to my IP. I'm happy with my tld choice but i won;t disclose that just yet. Not until I feel its more secure.
Securing my cloud vps is the next step... I will have my hands full for a while :)