I'm a technologist & entrepreneur helping companies see the endless possibilities provided by DevOps and cloud application delivery. I'm a Docker Captain and CEO & CO-founder at Nebulaworks.
When deciding what platform I was going ot use for my blog, I considered all of the “normal” choices, like Wordpress, Blogger, etc. For some blog sites, they work brilliantly…like our company pages. Easy to setup for multiple authors, WYSIWYG (for less technical folks) and social media is well integrated. But for me, I really wanted to use something that would be easy for me to write and very easy highlighting of terminal commands (for posts like this one. Since I spend a lot of time on the command line, working there would be great as well. After finding Jekyll, I was sold. Call it the hackers website/blogging tool if you will - but it looked to fit my requirements perfectly.
While you certainly can run a Jekyll site on GitHub, I really didn’t want to go through the process to host there. So, I was thinking of hosting the pages on my personal web host. But the more I looked into it, a better solution became apparent. Run it in OpenShift Online, for free. Once I found the OpenShift Jekyll cartridge, it was super easy to get the site up and running. In addition, since OpenShift is well integrated with the git tools, updating the site with new posts is dead easy. So, if you are thinking of using Jekyll for a simple website or blog, here is a quick how-to.
Before we start, you’ll need to have access to an OpenShift environment. In this case I am using OpenShift Online (openshift.redhat.com). I’ll leave creating an account up to you.
First, you’ll need the Red Hat Cloud (RHC) tools. They require Ruby, so that is the first thing that you’ll need to verify:
If you get the welcome message, great. If not, go get Ruby installed on your system :)
Next, install the RHC tools:
Now that they are installed, let’s setup the tools so we can access our OpenShift environment and deploy applications:
Boom. Our RHC tools are configured, and we are ready to create our Jekyll site. Let’s do so, and instantiate the Jekyll cartridge:
Alright! If you’ve got this far, OpenShift is now setup to host your site. Cool, eh? And if you head to the URL above, you’ll see that it is serving the basic page located in your local clone.
Next, if you haven’t installed Jekyll locally, let’s do so:
Depending on what your final result is (i.e., needing additional gems) you’ll need to add those too, but for simple sites you’re all set.
We’re almost done now…couple more steps and your site will be up and running. Let’s go ahead and fire up jekyll locally, make some changes, and push to OpenShift:
Now head over to your unique URL on OpenShift Online, and checkout your new blog! If you want to add a CNAME for a personalized domain, you can find the instructions under your application settings at the OpenShift Online website.