Immutable Infrastructure with AWS and Ansible

Immutable infrastructure is a very powerful concept that brings stability, efficiency, and fidelity to your applications through automation and the use of successful patterns from programming.  The general idea is that you never make changes to running infrastructure.  Instead, you ensure that all infrastructure is created through automation, and to make a change, you simply create a new version of the infrastructure, and destroy the old one.

“Immutable Infrastructure with AWS and Ansible” is a, so far, three part article series (part 1, part 2, part 3), that shows how to use Ansible to achieve an immutable infrastructure on the Amazon Web Services cloud solution.

It covers everything starting from the basic setup of the workstation to execute Ansible playbooks and all the way to AWS security (users, roles, security groups), deployment of resources, and auto-scaling.

10 things to avoid in Docker containers

10 things to avoid in Docker containers provides a handy reminder of what NOT to do when building Docker containers.  Read the full article for details and explanations.  For a brief summary, here are the 10 things:

  1. Don’t store data in containers
  2. Don’t ship your application in two pieces
  3. Don’t create large images
  4. Don’t use a single layer image
  5. Don’t create images from running containers
  6. Don’t use only the “latest” tag
  7. Don’t run more than one process in a single container
  8. Don’t store credentials in the image. Use environment variables
  9. Don’t run processes as a root user
  10. Don’t rely on IP addresses

How to change your Twitter username

I’m not considering a change of my Twitter account, as I’m using my surname all over the place and the only person it ever conflicts with is my brother.  But I’ve heard of people trying to rename their accounts or re-brand their activity on Twitter, so I think is article – How to change your Twitter username – is useful.

Here’s a synopsis:

  • create a new Twitter account with a @JunkName handle you don’t care about
  • change your @OldName account to @NewName, keeping your followers and tweet history intact (releasing your @OldName into the wild)
  • use the new Twitter account you made to quickly grab @OldName before anyone else has a chance to take it

One thing to note: Because of the way Twitter handles conversations, changing your username won’t retroactively change @mentions directed toward you from other people. This means that people you’ve conversed with will seemingly be talking to a ghost at @OldName instead of you at @NewName. Considering the “in-the-now” nature of Twitter this isn’t really a showstopper, just a mild inconvenience that’ll lessen over time.

Parsing text printouts within Ansible playbooks

I’m sure this will come handy soon, and I’ll be spending too much time trying to figure it out without this article: Parsing text printouts within Ansible playbooks.

It’s not every day that you see regular expression examples in the Ansible playbooks…

BitBucket : tag from source

BitBucket has implemented one of the most frequently requested features, which was outstanding for more than three years now – creating tags from the source browser (as in BitBucket web interface, rather than from the local repository, using git and then pushing it to remote).

I didn’t see the announcement in the BitBucket Blog, so I thought I’d post it here.

In order to create a new tag, navigate to the Commits page of your repository, then click on the hash of the commit that you want to tag, and then create the new tag from the upper right corner interface as per this screenshot:

It’s not the most obvious place to have this functionality, and the other feature – the equivalent of the GitHub releases – is still missing, but it’s better than having to use the local repository.

Update (January 23, 2017): BitBucket Blog carries the post now.