why am i moving my blog away from wordpress.com?


WordPress is nice a platform, I liked everything except following

    I am planning to write about code/scripts and wordpress.com’s syntax highlighter is not that great

    No support for google analytics

    my DNS to wordpress blog mapping require $13/year

Yesterday, I migrated my blog to tumblr and it supports all of the above.

I had to purchase a theme for $18(one time) to give the new blog a minimalist look.

see you at http://hrahman.in


test ELB before the actual DNS cutover


Imagine you are moving your production setup from non ELB to ELB based architecture.

Once the ELB based setup is done, your QA/Ops team would want to test the ELB based setup before the actual DNS cutover.

Here are few testing methods

  • host file entry
  • curl with host header
  • curl with –resolve option

Before we take next step, please make sure you find the IP(s) of your ELB using dig or nslookup


dig +short testelb-test-594255028.us-west-2.elb.amazonaws.com

Now let me explain each method.

  • host file entry

add following to the /etc/hosts file

(Amazon gives you ELB CNAME but hosts file entry woud not work with CNAME mapping) <your production>.dns.entry.com

test <your production>.dns.entry.com via browser or curl

  • curl with host header
curl -H 'Host: <your production>.dns.entry.com'
  • curl with –resolve option
curl --resolve '<your production>.dns.entry.com:80:'  http://<your production>.dns.entry.com/something

Incase of https testing, curl –resolve works where as  curl -H will not.

Important point to remember: Do not hardcore ELB IP address for load testing as whenever ELB autoscales, IP may change.

Share below if you know a different/better way of testing this scenario.

a simpler backup method for your blog


I like my new blog, the theme is minimal, writing a new post is easy ( thanks to fine folks at Wordpress)

As an ops guy, the day I started blogging, I also thought about backup 😉

While Wordpress gives you import/export XML feature, I wanted a backup which is platform independent.

Here is the simplest ever command you can ever  to backup your complete blog ( of-course this is not limited to Wordpress)

wget -Nrkpl 0  <your blog>

eg: wget -Nrkpl 0  https://opstribe.wordpress.com/ (this will create a directory with name opstribe.wordpress.com and download all the contents under it)

The best part about this command is that it also gives you a local copy of the blog.

So basically the backup can also be used to locally view your blog (open index.html) or share your blog.

command explained:

-N Turn on time-stamping

-r Turn on recursive retrieving

-k After the download is complete, convert the links in the document to make them suitable for local viewing

-p This option causes Wget to download all the files that are necessary to properly display a given HTML page

-l 0 Specify recursion maximum depth level depth(0=infinite)

If want to further simplify, please replace  -Nrl 0 with -m(–mirror) (-m is equivalent to -r -N -l inf –no-remove-listing).

So, wget -mkp  https://opstribe.wordpress.com/ works too.

If you like to have a daily/weekly/monthly backup, you may use cron job (*nix systems) to schedule your backup.

What’s your backup method?

get on with git


We use git for version controlling our infrastructure codes(mainly puppet). Some of our team members especially new members wanted to learn git in bit more detail.  I was more than happy to share what I knew; only to realize later that I did not know enough 🙂

This video gave me lot of basics and I suggest everyone to watch it.

You can get on with git too and see if my presentation deck helps..


lean manifesto for infra ops automation

Experience is a dear teacher – Benjamin Franklin

Working for a startup teaches you a lot. It is great to be part of a team who code a lot for infrastructure tooling and automation.I have been following lean startup and lean manufacturing and thought we should have a lean manifesto for infra ops automation too.Here is what I have been adding to my Evernote…please add your thoughts.
  • Make sure the tool provides some value to the team
  • Do not reinvent the wheel: Is there any tool already available or can be built up on?
  • Follow Unix Philosophy
    • Small is beautiful.
    • Make each program do one thing well
    • Store data in flat text files (config files, easy to manag by config management tools)
  • First, build a minimal viable product – MVP ( prototype)
  • Ship it (MVP) – seek feedback – reiterate and reiterate
  • Store the code in a version control repository
  • Do comment inline the code
  • Document during and after
  • Peer Review: Any automation project having larger impact to the team/organization should be reviewed and planned
  • Build the tool as if you are planning to open source it (I read this idea somewhere in the web and made lot of sense to me)
  • Make sure you have a working manual process before you automate.