DevOps is a set of practices that combines software development (Dev) and information-technology operations (Ops) which aims to shorten the systems development life cycle and provide continuous delivery with high software quality.As its name suggests, it seeks to bridge the gap between development and operation teams, which historically functioned in siloes. The concept of DevOps was founded on building a culture of collaboration between teams that historically functioned in siloes.
Why We Need DevOps:
Before DevOps, the development and operation team used to work in isolation. DevOps is more focused on collaboration between development and operations teams. DevOps is helping us to establish set of processes that bring development and operations teams together to complete software or product development. As a result, enterprises can create products at a faster pace than they can create with traditional software development approach like waterfall model. In today’s marketplace, need for rapid product development based on the customers feedback and requirement is almost essential and DevOps is helping us to achieve this.
Before we discuss other benefits of DevOps, we will discuss about DevOps life cycle.Complete understanding of DevOps is not possible without understanding DevOps life-cycle.
Here is a brief overview about the DevOps life-cycle:
1.Continuous Development: In this first phase of DevOps Life cycle,planning should be done to identify deliverable to customer and then code the application as per requirement.
Code can be written in many languages and using 'Source Code Management', developer can maintain their code. GIT, SVN, Mercurial,CVS and JIRA are some examples of popular source code control tool.Ant, Maven, Gradle are some examples of build/packaging tools, which can be used in continuous development phase.
2. Continuous Testing: Continuous testing is an automated end-to-end testing solution that can be integrated existing development processes so that Quality Assurance happens every step of the way to ensure risk is constantly measured and mitigated. In short, main goal of the continuous testing is to test early and test often. For continuous testing, automated testing tools like Selenium,TestNG,JUnit etc are used. SonarQube is a popular open-source tool for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities.Automation testing saves a lot of time, effort and labor for executing the tests rather than of doing manually.
Continuous Testing helps to improve code quality and accelerate software delivery.
3. Continuous Integration(CI): Continuous Integration is the process of automating the build of testing of the code after merging of all developer's working copies into a single software project. Developers merge or integrate their changes into centralized source code repository and the project source code is compiled and built into output referred as artifacts or packages. As a result of ongoing integration and testing of the code, defects can be identified early and development team can get feedback early.
CI is considered as a best practice because developers often work in isolation, and then they need to integrate their changes with the rest of the team’s code base. Waiting days or weeks to integrate code creates many merge conflicts and duplicated efforts. With the use of CI, code can be merged to source code repository to avoid such kind of problems.
Jenkins is a very popular tool used for CI. Whenever there is change in the Git repository, Jenkins fetches the updated code and it prepares a build of that code and generate Artifacts. This build is then pushed to test,pre-production and production servers.
Other popular CI Tools are TeamCity, Go-CD,Bamboo,Circle-CI,Gitlab etc.
Technical implementation of Continuous Integration (source: www.pepgotesting.com)
4. Continuous Delivery(CD): Continuous Delivery (CD) is the result of successful Continuous Integration, when updated software or product can be released to production at any time.
Using Continuous Delivery, we can automate our release process and can deploy application at any point of time by clicking on a button.Using Release pipelines,we can fully automate the testing and delivery of software in multiple stages all the way to production, or set up semi-automated processes with approvals and on-demand deployments.Continuous delivery improves velocity, productivity, and sustainability of software development teams.
Lower risk and faster feedback are some other reasons to adopt CD model.
Continuous Delivery is sometimes confused with Continuous Deployment.Continuous Deployment means that every change goes through the pipeline and automatically gets put into production. Using Continuous Delivery,we can able to do frequent deployments but may choose not to do it and there is manual approval associated with it.
In order to do Continuous Deployment we must be doing Continuous Delivery.
5. Continuous Monitoring(CM) & Feedback: This is the final capability of DevOps pipeline. CM ensures that the application is performing as intended and the environment is stable.
CM alerts the team of any application issues in any particular environment.This step provides the feedback necessary for the team to understand different aspects of the applications that need additional improvements.The operations teams have tools to monitor their environments and systems. Nagios ,Prometheus,Sensu,
Splunk etc are some examples of popular CM tools.