Understanding DevOps and DevOps pipeline
Before understanding the concepts of devops, let us understand the software development practices that was followed before devops.
Until before 2000, most software was developed using a “waterfall approach”, it is a linear approach where developers would spend months developing and writing large chunks of new code which impacted the whole application. Once developed these would further take time to integrate into the code base. Once the developers complete the job, next the quality assurance, testing, security and operations would further take time in testing the code and get back to the developers for bug fixes and feature implementation. The result of this approach was that it would take months or even years between software releases and to go to production.
Time to production costs money and thus we need an approach that would release small patches of high quality tested code/bugfixes into production, to achieve this we have the devops practice in software development.
DEVOPS — Development and Operations
DevOps is a software development practice that speeds up the development of high quality software by automating and integrating the efforts of development and operations thus providing continous delivery of software patches/releases.
Read below to understand the different stages in DEVOPS:
Plan (Continous Planning):
Product Managers and Project Managers play a key role in this, they are responsible to plan the complete road map for the project, understand the requirements from the stack holders and break the requirements into workable tasks.
Code (Continous Coding):
Now that the tasks are defined by the project managers/product owners, these tasks are continously developed by the developers usually in sprints (2 week timelines). In most cases, developers have to follow certain coding styles and standards to ensure a uniform coding pattern. This makes it easier for any team member to read and understand the code. When developers are ready to submit their code, they make a pull request to the shared source code repository. Team members can then manually review the newly submitted code and merge it with the master branch
Build (Continous Building):
In this stage every time a code is merged with the shared repository, a series of automated tests are run. Generally, the pull request initiates an automated process that compiles the code into a deployable package or an executable. If any of these automated tests fail, the initial pull request fails, the developer is notified of the error and the build fails. Thus, this ensures that an error free code moves to the next step in the pipeline.
Test (Continous Testing):
Once the build is completed, the developers run a series of manual and automated tests to have more confidence on the application developed. Generally user acceptance tests are performed here to identify if any further improvements need to be performed before moving to production.
Deploy (Continous Deployment):
Once the application is passed its tests, it can now be deployed to production, generally when theree are minor changes an automated deployment strategy is used. However, when the code has a lot of changes the application is deployed in an environment identical to production to monitor how the application behaves.
One can also use the blue-green deployment strategy where we use a load balancer to slowly direct more traffic into the green environment, understand the application behavior, slowly direct more traffic to the green environment, until u have no traffic in the blue environment.
Monitor (Continous Monitoring):
In this stage the operations team is continously monitoring the infrastructure, systems and applications to make sure everything runs smooth. They continously collect the data in the form of logs, analytics and feedback from the users. Based on this data the overall DevOps Pipeline and the behavior of the application is continously improved.
Thus the pipeline is cyclic which results in continous improvement of the application.
I hope having an understanding of the different steps in the DevOps pipeline gives you an understanding of the DevOps practices.
A few concepts more from DevOps.
Continous Integration (CI):
It is a method of continously integrating small chunks of code from multiple developers into a shared code repository with version control as often as possible. This helps the developers to automatically test their chunk of code without having to wait for other developers to contribute. It also smoothes the application integration process.
Continous Delivery (CD):
It is an extension of the continous intergration process. It encourages the developers to release their code to production in incremental chunks. In a typical DevOps scenario, developers first push their changes to a production-like environment to analyse the application behavior, once satisfied the developer can deploy the application to production with a push of a button.
It is always encouraged to deploy small chunks of codes to production thus making new improvements to the application in the form of updates/patches every month.
Continous Deployment (CD):
This is an extension of the Continous Delivery process, however continous deployment is an automated way of pushing the changes to production, where the user has no control (button to release changes) of releasing a given update to production. It is advisable to follow continous deployment to release minor updates, because in this way the application could be rolled back to its previous version if it malfunctions.
Other Articles:
A good reference to learn more about devops:
1 — https://spacelift.io/blog/devops-best-practices
If you are interested to learn about other aws services please look at my other articles:
2 — Amazon Web Services [AWS]: An Overview | by Shabarish PILKUN RAVI | Towards AWS
3 — Amazon Simple Storage Service S3, an Introduction | by Shabarish PILKUN RAVI | Towards AWS
If you are interested in deep learning and computer vision, refer below articles:
1 — OpenCV Background Subtraction and Music in Background of Video | by Shabarish PILKUN RAVI | Medium