Friday, 5 January 2018

New website, again

Over the course of the past few months I've been revamping my personal website, adjusting it from a central place to host examples of my work into a simple, portfolio style, explanation of who I am (professionally) and the tech I have experience with.

This blog post is a quick rundown of my progress.

Design

I think personal website design has become far too homogeneous with the advent of WordPress templates and the like. I miss the days when people wrote their websites from scratch with a very limited understanding of the HTML they were shamelessly stealing from other people (View Source, you beauty).

I've tried to capture some of that adolescent, angelfire aesthetic in the design of my site - with a stripped back design and a janky parallax CSS scrolling effect. I've also used a monospace font because that way you know I'm a very elite hacker.

Infrastructure

AWS. Two EC2 instances running Ubuntu 16.04, fronted by an Application Load Balancer with listeners on port 80 and 443. The instances are responsible for redirecting HTTP->HTTPS, more about that in the Docker section.

The SSL certificate on the load balancer is supplied and kept up-to-date by Amazon Certificate Manager.

Deployment Pipeline

The entire site is versioned on Github, check it out if you dare. When I push a commit to the master branch, a Docker image gets built on Docker Hub. Then, on my web nodes, I use watchtower to pull the new image and restart my containers.

Not a foolproof release process by any means but it requires very little work on my part in order to get new code live.

Monitoring

I've installed Monit on both instances because I think, for a small deployment like this, it's a lovely little monitoring agent with some powerful features. It pokes me, via email, when the website docker container is unreachable on either host. It also lets me know when the watchtower process is unresponsive or disk space is about to run out.

I also have an endpoint check against https://www.ribbybibby.me set up in Route53 which will prompt me when the site is down from the outside. 

Anything else is overkill for a site with a monthly viewership of about two (me and whichever recruitment consultant is selling me the DevOps dream that week).

Docker

Super simple Dockerfile:

FROM httpd:2.4
COPY ./public-html/ /usr/local/apache2/htdocs

RUN echo "LoadModule rewrite_module modules/mod_rewrite.so" >> /usr/local/apache2/conf/httpd.conf
RUN echo "RewriteEngine on" >> /usr/local/apache2/conf/httpd.conf
RUN echo "RewriteCond %{HTTP:X-Forwarded-Proto} !^$" >> /usr/local/apache2/conf/httpd.conf
RUN echo "RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]" >> /usr/local/apache2/conf/httpd.conf
RUN echo "RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]" >> /usr/local/apache2/conf/httpd.conf

EXPOSE 80


It uses the bog standard httpd image, copies the site into the htdocs directory and sets up the HTTPS redirect in httpd.conf.

Wednesday, 18 March 2015

Website update

After a day or so of self-study, I was able to cobble together enough knowledge to convert my personal site from purely html/css to php. This allows me to add pages and content much more easily and means I can work from one template with dynamic elements.

I've also removed external links to blogger and github from the navbar and replaced them with formatted info pulled from the respective RSS/Atom feeds. That means it's possible you could be reading this post on my website right now, rather than on the actual blogger page!

Sunday, 15 March 2015

Grimm Journey hiatus; home server

I've taken a month-long hiatus from Grimm Journey and other game projects while other Rob digs himself out of a mile-high pile of Uni work. So, to fill the empty time with productivity I've started turning my Raspberry Pi into a home-server. As I write this, I've managed to set up a static address (with the help of DNS forwarding), ssh, Apache2, SVN, git, OpenVPN, SSL, automated WhatsApp messages and a range of other useful features.

I've realised while doing this that my web host supports most of these features (and more), so I'm going to start pushing anything that I don't necessarily need to host on my Pi to my main domain. My next step after that will probably be to purchase a couple of hard drives and try to set up a home media server with disk mirroring etc.

Speaking of my web host, I've been slowly learning bits and pieces of php, so I'm going to look into incorporating that into my website design, to minimise the amount of copying and pasting I've had to do between raw html files.

I'm also intending to start ramping back up on GJ this week, crushing some bugs and looking at things in a fresh light.

Tuesday, 3 February 2015

Bonsoir


I just got back from Paris after a wonderful week away from work and personal projects. It was great to escape the regular world and decompress. Jayne always knows how to mellow my frantic focus on things and allows me to enjoy life.

Here's a quick update on what I'm working on.

Grimm Journey:
Before I left I managed to fix up most of the issues I had logged for myself in GJ. The game now has some UI cues, more satisfying jumping and attacking, cooldowns and better AI. I've still got to add some more UI stuff, build some levels and add polish, among other bugs that I can't recall as I write this, but the game is starting to take shape. We'll hopefully get word from the Leftfield guys soon on whether our submission was successful.

Pinfall:
My own personal game project, CBJ, has transformed somewhat since I first started writing about it here. It is no longer a puzzle platformer and is now a wrestling-themed, downwards scrolling platformer called Pinfall. The dramatic shift came after thinking long and hard about the mechanics I had in place and what I could do to apply them in a more fun way. I'll expound more on this later.

For now, you can try Pinfall here.

Perl:
I've started looking at Perl, as it seems like a scripting language with some similar elements to Bash but a bit more complexity and wider applications to it. As a learning exercise, I've started porting the scripts from my Bash repo on Github to a new Perl repo. Hopefully I'll start to gain some proficiency along the way.

Wednesday, 7 January 2015

Post-Crimbo Update

No real progress to report. I worked out a few of the more glaring issues with A Grimm Journey before Christmas but since then I've mostly logged bugs that I intend to fix. This weekend will be the time that I really hammer the project, although I'll be chipping away at it in the next few evenings too.

I've been thinking a lot about CBGJ as well, which I'll come back to after the 16th, and I feel like the game is boring in its current state. I like the idea of changing sizes/shapes to traverse puzzles but I think a lack of immediacy makes it kind of dull. I'm planning to add some sort of impending fail-state to inject some much-needed excitement.