Over the last few months, there are few things that I learnt the hard way. But one stands apart from all, in how it has come back to help me in immediate use/work.
Three years back, when we moved from using AWS to DigitalOcean, our focus was singular - costs. At a point when pinching pennies was very much a valid thing to do, it made a lot of sense. A savings of $2.5 when the base cost is $5 after all, translates to one more box provided for each two provisioned.
After a brief stint with Boto before the shift, a way to automate things at our own levels was on the cards. Alas! the focus swayed elsewhere, until I pushed myself to write a wrapper for Digital Ocean's REST API.
When I sat down to write my own library, Doto and a handful of other clients were available already. But, the decision to write another hinged on two thoughts - the ecosystem, our own dashboard.
The first major handy use for the library came up when we had to spawn about 10 instances for a new region. All these had the same base environment and metadata files for specific changes.
The DigitalOcean web is useful as such, but it does pose some pain points in such situations. For example, the restriction in the number of droplets that can one can spawn in one go - 10.
Information from the API interface, writing organised provisioning scripts ended up good. The entire provisioning which earlier took about an hour, this time took about 20 minutes. Add to that another 10 minutes of an onetime polishing and things are all good.
The second, most visible, was when we had to upgrade our boxes thanks to a DigitalOcean upgrade. That in another post soon.
What did I pick up from the exercises? Common sense, by most means but not projected as the most viable, somehow.
While AWS and the rest give you such a brilliant environment to work with, your best help, is to learn the hard way. Go spawn a bare virtual machine, try to understand its internals. Or, if you choose local, Vagrant/such.
Though a mere surface scratch, this exercise was invaluable in understanding the underlying. There are few changes that I haven't organised that would enable us to spawn even faster. Again, getting down to the basics, was the root.
Bash/shell will not appear as sexy as your Ansible/Puppet/Chef choices, but trust me, you learn more picking it up.
The previous, let me be clear, is no reason to say the others aren't good, but that they are not the point to start. The standard Python-Django, Ruby-Rails discussion, if you have known me.
Never, ever, pick things up because they are shiny or endorsed, without your homework. As always, the key is to throw the gamut of choices at a scaled down version of the problem you are solving. Look ahead as well, for your choice might cripple or delay you in unforeseen manners. Comes in handy when you build things in a breakneck pace.
Subscribe to As we go passing
Get the latest posts delivered right to your inbox