Sunday, March 19, 2023

CI/CD pipelines explained.

Some challenges which DevOps Engineers are facing on their day-to-day job with the Scrum team. Which are.. 

🔹How full cycle of DevOps works starting from development till production deployment? 

🔹What are Pipelines? 

🔹What is build? 

🔹Which tools we use for CI/CD? 

I won't ask you to assume anything while reading this flow. Keep your actual applications in mind where your team implements these CI/CD pipelines and try to relate it. It will help you to understand better.

Okay, Let's implement pipeline step by step - 

But wait! What is a pipeline first?

 Pipeline is the logical step or series of steps defined for, how software development lifecycle works starting from development till moving in production.

------------------------------------------------------------------------------------------------------------------

 Let's start now -

Step 1- Developer writes the code and commit code in central repository called GitHub

 How do we know who commits the code and when any error comes and requires the fix. So, we need a versioning tool which helps to tag each code commit.

 ðŸ”¹Here "Git tool" comes into the picture who does this job.

---------------------------------------------------------------------------------------------------------------------

Step 2 –All the code is merged into GitHub but who pulls all these codes and starts the build. 

🔹Here “Jenkins” comes into the picture which is a CI server who pulls the source code from GitHub.

 What is "Build"? 

 Build is a series of steps which includes downloading dependencies, installing tools, code compiling, validation, unit test and many more. 

🔹Here a tool like "Maven" comes into the picture of who does the build. 

--------------------------------------------------------------------------------------------------------------------

Step 3 - During the build phase

🔹 Maven tool will compile and validate the code. 

🔹 Tools like SonarQube will report duplicate code, code coverage, unit testing, code complexity historical.

------------------------------------------------------------------------------------------------------------------

Step 4 - Then we perform Integration testing where we integrate all functionality and test the complete application. 

And finally build is ready in WAR/JAR files.

 What are WAR/JAR files?

 JAR (stand-alone Java applications) and WAR (for web applications) are zip files that contain the various images, XML files, property files and pieces of Java code. 

 The above steps (1-4) are nothing but a "Continuous Integration".

----------------------------------------------------------------------------------------------------------------------

Let's move further.

Step 5 - Once the build is ready it will deploy in test servers to perform ST then UAT with the help of tools like -

 ðŸ”¹ Selenium framework with Java/Python for UI testing

 ðŸ”¹ For API testing tools like Postman or Soap UI

 ðŸ”¹ For performance testing tools like J-Meter 

 ðŸ”¹ For Security testing tools like Burp suite and Sanity, regression testing.

--------------------------------------------------------------------------------------------------------------------

Step 6 - Now our build is tested in ST(Staging) then UAT (User Acceptance Testing) server, it’s time to deploy in production servers for release.

 But how will we deploy to the production server? 

 Where are all-build files contained? 

🔹 Here "Docker" comes into the picture.

Docker contain all files and enables us to separate your applications from your infrastructure so you can deliver software quickly. 

 The above steps are nothing but a "Continuous Delivery and Deployment."


-----------------------------------------------------------------------------------------------------------------------

 








 

No comments:

Post a Comment