Continuous deployment best practices, methods and tools. Software Testing and Configuration Management Continuous deployment best practices, methods and tools. Giorgos Mitropoulos
Definition Continuous Deployment (CD) is an emerging software development process that aims to immediately deploy software to customers as soon as new code is developed.
Objective CD is used by big organisations such as Facebook, Microsoft, and IBM which successfully implement and use the process, and can result in a number of benefits for organisations, such as: new business opportunities, reduced risk for each release, and prevent development of wasted software.
Schematically The schema illustrates a logical flow diagram for an example software project scenario involving a continuous deployment system.
How we do it?
Development workflow Continuous deployment implies a clearer development process. We need to know what is going out when we release, not a dump of the current state. Release by feature.
Development workflow 1 - Track requests 2 - Branch 3 - Continuously test 4 - Pull request 5 - Deploy (staging) 6 - Promote
Track requests The team decides what needs to change in the system, or what new feature should be included.
Branch They start work on the new feature as an isolated branch. At the same time the master branch stays stable and untouchable.
Continuously test After and while developing the code, the new branch gets continuously tested.
Pull request When the new part is ready, human judgement is needed to evaluate it and decide if it should be updated to the master branch or not.
Deploy and promote If the pull request gets accepted, the procedure starts for the new feature to be updated to the system. Final step is the “Last mile” which is the time for the uploading of the new part.
Tools
Tools There are many tools that help us with continuous deployment and do a lot of work for us. Which tools to use as part of the continuous deployment flow depends on individual preference and the specifics of a project. Some of the most famous are Bamboo, Jenkins, and Docker.
Bamboo Bamboo is a continuous integration server from Atlassian. It is used to build, test and deploy applications automatically as per requirements. It supports builds in a number of programming languages using various build tools and can also integrate with a large number of software for a variety of purposes. Bamboo is free for open-source projects. Commercial organizations are charged based on the number of build agents needed.
Jenkins Jenkins is an open source automation server written in Java. It helps to automate the non-human part of the whole software development process, with now common things like continuous integration, but by further empowering teams to implement the technical part of a Continuous Delivery. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. Jenkins is free software.
Docker Docker is an open-source project that automates the deployment of Linux applications inside software containers. Docker provides an additional layer of abstraction and automation of operating-system-level virtualization on Linux. Docker uses the resource isolation features of the Linux kernel such as cgroups and kernel namespaces, and a union-capable file system such as OverlayFS and others to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines.
In conclusion... Continuous deployment is a modern process of deploying software anytime, used by some of the most important companies. In order to be done succesfully, there must be clear motivation according to its usage, branching and affective workflow, and cooperative tools and people.
Thank you!