The History of andkorn.org
I have hosted my site at a number of places over the years, and I think I finally found its final place: Amazon’s cloud. I first had part of my friend Dan’s site at transferplant.net (now defunct). He let me put up some source code in zip files, and make some posts, but it was very limited because he did not want me to have full access to everything on the site! He was also quite lazy in giving me more flexibility, and because he wrote all the PHP code himself this was all I was getting on this site.
I then signed up with Blogger and also had a Google Pages page. My blog was lame and had no content, and no one visited it unless I purposely made them. I got tired of this and wanted to do some hacking, so I hosted a “server” at my house on a dual Celeron @ 300Mhz with 512MB of RAM that I bought from my friend Mike second-hand. I had no RAID, no air conditioning, and a large electric bill due to the server’s lack of power management. Between the electric bill and the drives in the “server” starting to fail due to bad blocks from the high heat inside the case, I decided to call it quits. While that server was still alive I had a Wiki using Docuwiki, Torrentflux for remote torrent management, and I could stream my entire music collection from work using a custom-built web interface I made based on JWPlayer. I was also able to control my music playing through my stereo from my Nokia N800, via a web interface for MPD (Music Player Daemon).
I migrated the installation of dokuwiki from that server onto my then employer’s multi-tenant web server. I did have shell access on that server and could do some things, but it got boring. This was before virtualization began to gather steam in smaller corporations (circa 2006), so I could not have root access in my server.
I then left that company and as such my free hosting was gone too. I got a zip file of all my data from them and never really did anything with it. I tried out 1and1.com and bluehost.com but I didn’t like it for some reason or other. I then decided to revive my Blogger account and point andkorn.org at it. I have/had some good content there and will be importing it here shortly. I also had some good content in Dokuwiki which will eventually be coming over. The Blogger revival did next to nothing for me; I had maybe 2 hits at best. It never even made it into Google’s search results!
Then I got a hold of my friend Mike again, who is a bit of a pro at Amazon’s technologies. He is a very good engineer outside of Amazon technologies too, but I just wanted to pick his brain on how he hosted his site. He said he uses nanoc and hosts his site on Amazon S3 storage. I liked this idea very much, especially because hosting a static site at amazon is very cheap. I knew I didn’t really need a dynamic site, but I did want a flexible and good looking blog and website. I wanted to get some of my coding projects off the ground and have a webspace for them (this will come eventually), but also to publish some of the things I come across in the field of computer networking. Let’s break down the technologies on this site (and perhaps some of Mike’s).
I used to be over at Network Solutions, but then I found that I was paying for Private Registration and they had my home address, email, and cell phone number out there for the whole world to see! I discovered this while I was trying to put in Amazon’s name servers into Network Solutions which wasn’t working either and their support was no help at all in getting the DNS server issue fixed. I decided that between the two issues I would leave them after many years of being their customer. I have nothing against Network Solutions – I would still consider them if I had to pick a registrar, but I found easyDNS fills my needs perfectly. Plus they are a Canadian company and Canadians have good beer. That sealed the deal right there for me.
So now my registrar is easyDNS, and I have my name servers over at Amazon Route 53. Amazon has very nice directions on how to get all of this properly setup.
Mike on the other hand is over at DynDNS as he has a free lifetime membership with them. I beleive the story is that back when DynDNS was just starting up they needed some server memory (RAM), and Mike sent them a whole box of RAM.
Both Mike and I have static sites at Amazon S3. S3 is an excellent storage system, but can also publish contents via HTTP. In S3 each storage container is called a bucket. A bucket has file permissions and contain files and directories. Amazon has a document on how to setup a bucket to host a static site. Note that S3 is ONLY for static content. Mike says he also has an EC2 micro-instance that he uses for something. Those of you that need a dynamic site and/or your own host, take a look at Amazon EC2. Mike probably uses s3sync, I have not put in the effor on getting s3sync to work for me, but I will shortly. This is so I can have Octopress generate the static site, and then automatically sync the changes to the live S3 site. I should mention Dropbox uses S3 for all its data storage, as well as a number of websites.
Site Generators, etc.
Mike uses Nanoc with Sass/SCSS and Blueprint. This is what he recommended to me, but I just couldn’t do it. Nanoc, while being a very feature-rich static site generator, was not enough for me. I didn’t really care to setup my own CSS, templates, and write my own Ruby scripts just to setup a blog the way I want. I used nanoc and generated the example website, but could not figure out what the next steps were without a ton of work. Nanoc is very nice for what it does, but requires other libraries to bring it from being a static site generator to a static blog generator.
I tried writing my own templates and CSS. I tried using blueprint CSS. In the end it was too much. I want to get the site up and running fast, and haveing a non-flexible framework was something I can cope with if it means having easier day-to-day operations. I really like Ruby as a scripting language, but I am very new to it and it’s not worth learning it just to use nanoc and blueprint. I need this running soon; I still have a way to go learning Ruby. Nanoc is nice if you already know what you want your site to look like and need a template generator for it. I needed a replacement for Blogger.
Jekyll is another static-site generator. A bit better, but still not quite everything I want. I want a bit more rigidity, and less flexibility. I need more things pre-set for me because I am lazy.
Based on Jekyll, Octopress is a static-blog generator. It turned out to be exactly what I needed! Octopress is a canned blog with a pre-defined theme and everything. Their tutorial was short and sweet.
The steps below are the steps I took in getting it to work. If you are going to follow these steps please skip my blunders.
install Ruby and Git. I installed JRuby (jruby.org) and the official Git for Windows. The reasons for this are: a) I am running on Windows 8 (I need Windows for work reasons), and b) I want to learn JRuby for future projects. I like the idea of the power that you can have using Ruby with Java’s libraries. (BTW nanoc seems to work fine with JRuby)
Use Git to clone the Octopress distribution and put it into its own folder. Following this article (http://octopress.org/docs/setup/)
- gem install bundler as per the doc.
- Find out that you cannot install Octopress under JRuby due to Jekyll requiring C-extensions which are not available under JRuby. Specifically “gem install fast-stemmer -v ‘1.0.1’ ” fails.
- Install the regular Ruby (1.9.3) alongside JRuby.
- “c:\Ruby193\bin\gem install bundler”
- “echo %PATH%” reveals that Ruby is not in the path, but JRuby is. We are going to change this temporarily…
1 2 3 4
- CD to your octopress folder and “bundle install”
- Find out that you also need the Ruby DevKit, which you can get from here
- Extract DevKit into C:\Ruby193
- add the mingw build tools to the path…
- gem install fast-stemmer -v ‘1.0.1’
- CD again to your octopress folder and “bundle install”
- rake install
- If you need codeblock support you will also need Python, and it should be in the Path. See my path above.
- It’s installed now! Time to configure
Edit the file _config.yml to suit your site.
Blogging w Octopress
- to make a new blog post:
- to “Make” the site from the sources:
- to write a new post but not publish it place this in the header:
Once you make your first blog post you can then run rake generate and upload the contents of the public folder to your site.
Well, there you go. I hope this is useful to someone trying to get a site up on Amazon S3 and/or with Octopress.