I recently read both Continuous Delivery and the Continuous Integration books. They were both very insistent that I automate tasks like provisioning environments and such. My question is what do I write my ‘automation scripts’ for lets say provisioning a linux instance with postgres and git.
I’ve seen some stuff suggesting bash, but for this particular usecase I was interested in StackOverflow’s opinions 🙂
I also saw something about perl and python
Thanks in advance
The short answer is that you can write them in any language you want, as long as it can be run from a command line environment (which is just about any).
That said, some are better choices than others, depending on your environment and what you’re familiar with.
The most basic is Bash for a Unix environment, because Bash is generally available in any *nix environment, which makes it easily portable. It’s also what you use directly in the command line, so it’s generally pretty easy to test.
Beyond that, it becomes a matter of choice. For example, my server has Ruby scripts for getting up Git repositories (written by my predecessor), PHP scripts for automating tasks for one of my (PHP/CodeIgniter) websites, and Perl scripts for my server monitoring software (written by the software provider).