You might have seen these stickers (above – by Chris Watterson) poking fun at the Cloud, but really “it’s just someone else’s computer” is one of the Cloud’s greatest assets. Unless you’re a hardware company you probably don’t want to be messing about with machines. Machines are what you use to get your job done – they’re a necessary requirement for you to build and deploy software. Leave all of that to other people and focus on what adds value to your business – namely, what you create.
Single, dual or quad core? 4gb, 8gb or 16? 256gb SSD or 1tb HDD? Whilst vital to your product, these things aren’t your product. They’re bit part players, things you used to have to buy then throw away a few years later when you’ve either outgrown them or they’ve catastrophically failed you.
Uptime, resilience, auto-scaling, self-healing – all things that should just happen, and things you shouldn’t really be worrying about. Do you really want to hire a team just to setup and maintain your hardware, guarantee uptime, have them on call 24-7 in case a server crashes or a hard drive dies?
This is why the Cloud is great – it detaches what you run from what you run it on, giving your product the base it needs to grow, freeing you from the constraints of traditional infrastructure.
Infrastructure-as-Code (Or as I prefer – Everything-as-Code)
We’ve all spent time, too long probably, setting up infrastructure – building the hardware, plugging in machines, messing around with network cables, installing “the right” versions of prerequisite software from a folder on someone’s USB key, following the poorly worded crib notes from a colleague who left 6 months ago, wondering what to enter at the prompt that isn’t mentioned in the guide. It’s hard work, with a tonne of room for mistakes to be made. It’s also completely unnecessary.
Automating as much as is possible is great – it means the next time we have to do something that’s already been automated – boom, it’s done, and it’s done exactly the same as last time.
Automation is one of the ideals behind the DevOps movement, it’s one of the ways productivity can be improved, it’s one of the ways we can make the efficiency gains Paul has mentioned in his blogs.
By codifying as much as possible we build in automation, which gives us confidence in our setup. We know that the test environment is the same as the production environment because the code is the same.
We reduce defects – code can be reviewed and automatically tested, allowing issues to be caught at a very early stage. This is great when it comes to traditionally difficult-to-test-stuff like server configuration.
Good code is also, mostly, self documenting – add in a few comments here and there and you save an awful lot of time trying to write notes or full blown docs for the next person.
And finally we eliminate configuration drift – where one machine is ever-so-slightly different from another, usually resulting in a reinstall of everything on the machine.
Pulling It All Together
Now, you could manually setup and maintain your cloud infrastructure – you’ll still get all the benefits of the Cloud.
You could also just codify your setup on your own machines and private servers – you’ll get the benefits of IaC patterns.
But really it’s the Cloud together with Infrastructure-As-Code that provide a powerful toolkit that massively modernises the product delivery lifecycle.