There has been a lot of discussion with colleagues and clients about automation, I’ve been talking about a process I commonly use and I believe should be part of the DevOps process. When it comes to DevOps Automation, your starting point should be the environment used by the developer and finish in production, let me explain…
Vagrant has became very popular for managing local development environments via virtual machines. It has a functionality called “provisioning” that uses existing automation tools to install and configure all of the software inside the Virtual Machine. You can use any of your preferred tools, including Scripting, Chef, Puppet, Ansible, and SaltStack, which is my preferred tool these days.
This gives us the opportunity to create an environment for the developer similar to test, QA, staging and production servers. There will be some differences obviously, as the database in the developer desktop will be in the virtual machine itself, but it could be in different servers in the other environments. There’s a possibility that some security settings will be different too.
One of the most important parts of this scenario is that the developer will use the same software, the same versions, and the same configuration that we will use in all the stages up to production. I have a habit of starting to code the automation in Vagrant on my local machine, then giving the results to the developers as the first beta testers. If that works for them, then I start to create all of the servers that will run the application.
DevOps culture involves (among other things) two main processes: communication and automation. The last one is clear – we are doing it using these tools – but the first one (the most important one) begins when the developers define the requirements, test their local environment, and provide feedback. We provide an environment with our infrastructure standards and, in exchange, we receive information about issues where the application is being created. If the developer changes something inside the virtual machine, the change should be reported to us so we can adjust our automation recipes. This would get the feedback loop working from the very beginning. And lastly, before I forget to mention the collaboration element of this process: It is currently impossible to implement this process successfully without it.
This process provides positive results in my experience, reaching production environments with a few issues. All of the issues are discovered within the first few stages of all this process. I hope it helps you as much as it has helped me.