Implementing DevOps starts with optimizing your existing Software Development LifeCycle to bring Dev and Ops closer together. If you can develop and deploy software better and quicker, you can focus more on what's important, and less on infrastructure problems or bugs that arise from promoting software to production. A lot of software is available to make your dev and ops teams leaner, and better in working together.
Are you already applying the principles of Agile? Agile and DevOps go hand in hand. First of all, make sure you have a platform that you can use for issue tracking, project management, and is also linked with your version control software. A popular platform is Jira for issue management, Confluence for documentation, git for version control, and Bitbucket as code repository. It's not coincidence that this software all comes from the same vendor, Atlassian. By choosing the same vendor, you ensure that all software is tightly integrated with each other.
Now that we have a development platform in place, we want to make sure that when we deliver software, it works as intended. That's why you need to write tests. You can write Unit tests, integration tests, regression tests, smoke tests, and a lot more tests if you really start looking into it. Make a plan to implement tests, because it's not easy to go from zero unit tests to having a unit test for every feature. You can also use tools like Sonar to analyze your code and show you what needs to be remediated.
Once you have unit tests, let's make sure you run the tests on a periodic basis. Some people want to run it after every commit, other projects run it overnight. A popular tool is Jenkins, but you'll have to install it and maintain it yourself. An easier option is to go with Bamboo, which is also provided by Atlassian. Another popular service is codeship.
Now that we do automated tests, it's time to automate our deployment process. Jenkins, Bamboo and codeship (and a lot of other ones) can also automate the deployment process for you. First you package the code as a .war, .jar, .rpm, or just as a .zip, then you deploye the archive. Bamboo and codeship integrate Cloud providers like Amazon so after the build has been completed, the package can be automatically deployed to dev/test/prod. If it is an rpm, you can also submit it to an artifact agent. System administrators or an automated tool can then install and upgrade the software, just like any other piece of software from the web.
On the System Administrator side, you don't want to have a lot of time wasted in maintaining all the instances where the code is deployed on. There are lots of options available to minimize maintenance. System Administrators can use Puppet, SaltStack, Chef, or Ansible to automate provisioning and maintenance of all the instances code will be deployed on. The golden rule is, if you have to log in to a server and make a change to a config file manually, you're doing something wrong. Everything needs to be written as code in the provisioning tools.
Another option is to go for Platform as a Service (PaaS) solutions. Code will be packaged and deployed on generic instances that support a certain programming language. Popular languages like .net, java, ruby, php, nodejs are all supported. The developer will need to follow the 12factor.net principles, to make sure instances can be easily shut down and swapped for newer instances. Upgrading an instance on a PaaS solution is now making sure that your base image is up-to-date. Switching base image is just another redeployment of the code base to a newer instance. Instances become very flexible, and can be thrown away if they're not acting as it supposed to be. Using a PaaS solution will dramatically reduce the effort needed by system administrators to keep their environment up to date and security compliant. Today, this is definitely the way to go.
Edward Viaene is co-founder of in4it.io. Interesting article? Contact us if you are ready to embrace the DevOps principles.