When I decided to start blogging I was faced with some choices. The first choice to be made was which blogging software to use. I have had some experience using Wordpress and have never been too happy with it. I have also used Joomla, which I don't think is too well suited to blogging. I figured I would give Drupal a try. It was ok, but ultimately left me with the same feeling as Wordpress.
Then I discovered something that made me say “Yes, this is it”. That something was Octopress. As a developer, I am comfortable doing things on the command line, performing builds and deploys. This is exactly the type of user Octopress targets. In fact, here is a quote from the Octopress documentation:
First, I want to stress that Octopress is a blogging framework for hackers. You should be comfortable running shell commands and familiar with the basics of Git. If that sounds daunting, Octopress probably isn't for you.
Now that I had decided on using Octopress, I next needed to figure out where to host it. One of the services I have been hearing a lot about that I have been wanting to play with is Engine Yard, so I thought it would be a good opportunity to try them out as a potential home for my blog. In checking the Octopress documentation, they list several deployment options but none of them are Engine Yard. So, here's how I managed to deploy my Octopress blog to Engine Yard's Orchestra PHP Cloud.
Step 1: Setup a Github account if you don't already have one
The documentation is your friend here. https://help.github.com/articles/signing-up-for-a-new-github-account
Step 2: Setup a new Github repository
Step 3: Setup Octopress
Simply follow the steps at the Octopress website to get setup. You can ignore the “Next Steps” section at the bottom as that is basically what I am going to go through.
Step 4: Add Github as a remote repository
Step 5: Create a new blog post
Step 6: Generate the static pages
Step 7: Remove the public directory from the .gitignore file
Step 8: Commit your generated blog
Step 9: Push your blog up to Github
Step 10: Sign up for Engine Yard's Orchestra PHP Cloud
Step 11: Deploy an App
Click the button to Deploy an Orchestra PHP Application. The free one is sufficient for now, but if you decide you like the service or need to use some of the advanced features, you should consider signing up for their paid service.
When setting up the App, you will be asked for your app name (this will become the subdomain if using the Free account), your Github public repo url, the branch name and the index file. Make sure the index file is public/index.html then click Launch App.
After a minute or two of waiting, Engine Yard should have pulled down your blog from Github and launched it on their servers for you to enjoy. The Orchestra control panel will give you a link to the website, which is labelled “Public Hostname”. You can click on it to view your newly created blog.
To make any changes to your blog you simply make changes to the appropriate page under source/_posts, run
rake generate, commit your changes then
git push github master. After a few minutes, Engine Yard will sense the updates, and automatically apply the changes.
The nice thing about hosting your blog on Engine Yard is that if you write a popular blog post that gets “Slashdotted” or makes it to the front page of Hacker News, Engine Yard will automatically scale up to meet the demand (note this feature is not available on free apps) and your blog won't take down your server. When the traffic dies down, it will automatically scale back down again.