Understanding the Lifecycle of DevOps
DevOps: Development + Operations
DevOps is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery/deployment with high software quality. DevOps is complementary to Agile software development; several DevOps aspects came from the Agile methodology.
DevOps aims to shorten the systems development lifecycle while delivering features, fixes and updates frequently in close alignment with the business objectives. From the Image below, we can see the DevOps process and how they interoperate to further reduce the development lifecycle for the both developer and the users. The various phases of the DevOps lifecycle are:
• Continuous Development
• Continuous Testing
• Continuous Integration
• Continuous Deployment
• Continuous Monitoring
The first phase of the DevOps life cycle is continuous development. This is the phase that involves planning and coding the software applications' functionality. There are no tools for planning as such but there are several tools for maintaining the code. The vision of the project is decided during the planning phase and then the actual coding of the application begins the code can be written in any language but it is maintained using the version control tools such as Git. Also, tools such as maven can be used for building or packaging the code into an executable file so that it can be forwarded to the next phases.
The next phase in the DevOps process is continuous integration. This is the stage where the code supporting new functionality is integrated with the existing code. Since there is the continuous development of the software, the updated code needs to be integrated continuously as well as smoothly with the systems to reflect the changes to the end-users. The changed code should also ensure that there are no errors during the runtime which allows us to test the changes and check how it reacts to other changes. The most popular tool that is used in this phase is known as Jenkins.
The next phase of the DevOps lifecycle is continuous testing. This is the stage where the developed software is continuously tested for bugs. For continuous testing, automation testing tools such as Selenium are used. These tools allow for the testing of the codes thoroughly in parallel to ensure that there are no flaws in the functionality. In this phase, you can make use of docker containers for the simulating test. Selenium does the automation testing and the reports are generated by testing tools but to automate this entire testing phase you need a trigger and that trigger is provided by a continuous integration tool such as Jenkins. Automation testing saves a lot of time, effort and labor.
The next phase of the DevOps life cycle is continuous deployment. It is the stage where the code is deployed to the production environment. Here, we ensure that the code is correctly deployed on all the servers. DevOps will be incomplete without configuration management tools and containerization tools. Both sets of tools help us in achieving continuous deployment. Some of the popular tools that are used in this stage are Docker and Ansible etc.
The final stage in the DevOps process is the Continuous monitoring stage. This is a very crucial stage in the DevOps lifecycle which is aimed at improving the quality of the software by monitoring its performance. This practice involves the participation of the operations team which will monitor the user activity for any bugs or improper behavior of the system. This can also be achieved by making use of dedicated monitoring tools that will continuously monitor the application performance and highlight the issues. Some popular tools used are Nagios.
Difference between CI/CD and CI/CD?
CI CD stands for continuous integration and then continuous delivery or deployment.
Continuous Integration: Developers push the code to a code repository often it could be GitHub. As soon as the code is pushed, there will be a testing or a build server that checks the code to make sure that the code can be built and tested correctly. This is where the Version Control occurs. After this is done, the code is pushed to the Continuous Integration server which is mostly Jenkins. The developer doesn’t need to run the tests personally each time there is a change to the code as Jenkins automatically does this for the developer. The developer then gets feedback about the tests and checks that have passed or failed and so, therefore, we can improve our code and we can find bugs early and fix them as well so this way we can deliver code faster as it is tested continuously and then deployed continuously.
Continuous Delivery: When the tested code is pushed to the user end with manual efforts is known as the process of delivery. Every time a code is updated and tested will be delivered to the end user with the click of a button.
Continuous Deployment: When the tested code is pushed to the user end without any manual efforts is known as the process of deployment. Every time a code is updated and tested will be deployed automatically to the end user without doing anything. With the help of DevOps tools, automation takes place which is the need of the time.
Most commonly used DevOps tools:
❑ Continuous Development: Git (Source Code/ Version Control System) and Maven (Code Building) etc.
❑ Continuous Integration: Jenkins (Continuous Integration & Continuous Delivery)
❑ Continuous Deployment: ❖ For Containerization: Docker (Wraps Code + Software Dependencies) ❖ For Configuration Management: Ansible (Install Packages & Configure Servers)
❑ Continuous Testing: Selenium (Automated Testing on Servers)
❑ Continuous Monitoring: Nagios (Dashboard for all Running Services)
All done for the DevOps lifecycle and CI/CD pipeline. Thanks for reading the blog. Stay Tuned. Hope you find it interesting and informative. Will upload the next blog soon. Happy Learning :)- Neha Bhardwaj