Setting up the new home for engineering.relateiq.com
Welcome to the new home for The Engineering Blog! When RelateIQ was younger, we managed a WordPress blog where we could push a lot of cool content. This worked well for us, and it enabled us to write about a bunch of cool things, from clojure and docker to how we launch features and how we turn ideas into reality.
However, as we grew it became clear that the customer-facing blog needed to become a top-level area of our website. After migrating over all of that content, the engineering team was presented with an opportunity to re-imagine the architecture of our engineering-specific content. This is the result of that work.
Inspired by the ease and simplicity of Github Pages, we migrated this blog to a static site driven by jekyll and octopress. Initially we deployed to github pages, but due to the lack of top-level https support for custom domains we switched to now deploy to S3 with CloudFront providing the necessary https support, using SNI.
We began by migrating all of our old engineering blog posts from WordPress to jekyll using their phenomenally well-documented import tool. After some post-processing and link munging to get old posts rendering using the new style, we had a statically generated site ready for deployment.
Setting it up
that is, permit everyone to read the files posted to this S3 bucket. We also need to enable static website hosting on this S3 bucket, as redirections to
/index.html outside of the root directory do not work. According to their documentation, subdirectory requests do not return the default root object, event if a copy of
index.html appears in the directory. Interestingly, this is the only reason to turn on static website hosting.
In order to make these files available to the general public, we then create a CloudFront web distribution with the correct origin domain name (which should point to your S3 bucket) and alternate domain names (in our case,
engineering.relateiq.com). In order to support
https to your custom domain, you need to modify the path of your certificate to start with
cloudfront — to verify, you can use the aws cli tool as follows:
At this point, we have everything but the actual assets! Make sure that
octopress is installed through your
Gemfile, and add the following to your
at which point you could deploy using octopress.
Being engineers of best practice, our blog is built and deployed without human intervention using our favorite CI solution. The overall work flow is wrapped in a pretty straight-forward Dockerfile:
And our automated build process boils down to:
docker build --rm -t relateiq/engineering_blog:latest .
docker run --rm relateiq/engineering_blog:latest
Where the second step needs to be executed from a machine (build agent) with permission to deploy to AWS.
Now that we have a good blog setup with continuous integration, deployment, and a sane content delivery mechanism, we can get back to work on products people love.
Don’t forget, we are always hiring!