Hi Everyone,
Let's try to understand DevOps
Suppose we are not using DevOps ?
Before DevOps-
Let's consider we have 2 teams, a development team and operations team, now suppose the development team has created an application, now in order to run this application we need some infrastructure like servers, database, but this infrastructure is not setup yet, and now the question is who is going to create and setup this infrastructure right ? is it going to be our development team only, or do we need to take help from some other team ?
so in order to solve this problem, we will take help from operations team, who is going to create and setup this infrastructure.
Now there is a roadblock, operation team is waiting for development team to create the application first.
But you must be thinking where are the developers creating this application, I mean since their is no infrastructure has been setup yet right ?
so the developers are creating the application in there local system only as of now.
SO once the application is working properly in their local environment, they’ll reach out to the operations team and request the necessary infrastructure for the testing environment.
for example - two servers and one database.
After the testing environment is ready, the developers can deploy their application there. This allows all developers to test and run the application together in a shared setup.
only problem is operation team has to wait for the development team to create the application first.
Now, suppose we also need a Production Environment as well. In this case, the operations team will again have to wait — not only for the development team to complete the application, but also for the QA team to finish their testing successfully in the testing environment.
Now this is one approach, here setting up of the infrastructure is done manually only.
Now Let's see an another way of working which will help us in solving the above problem of doing things manually, which is DevOps.
DevOps-
In DevOps, we use Infrastructure as Code and CI/CD pipelines.
Infrastructure as Code -
It means we are writing code and creating scripts or config files to set up and manage servers, networks, databases, and environments instead of doing it manually.
Let's try to understand this using below examples -
Suppose we don't use Infrastructure as Code ?
In this case an operations engineer has to create servers, setup infrastructure manually.
Now suppose we will use Infrastructure as Code ?
Here we will write code as scripts (in YAML, JSON, or a tool’s language like Terraform or Ansible) that describes the infrastructure.
and now when we run a command or execute our script, then our infrastructure is created and configured automatically.
CI/CD pipelines -
As of now we have the infrastructure only, but our application is not deployed yet, so to deploy the application in a particular environment like a Testing or a Production environment, we will use CI/CD pipelines.
Now lets try to understand the CI/CD pipelines ?
so as of now in the case of infrastructure as code, we are creating and setting up infrastructure using scripts only and not doing anything manually and similarly in order to deploy an application in that infrastructure, we will use scripts only or we can say we will build CI/CD Pipelines which will deploy our application automatically in the infrastructure.
CI - Continuous Integration
suppose we have created an application, for now lets consider the code of this application exist in our local system only.
Now let's suppose we have pushed the code to our remote repository or Github.
now comes CI, It will be build the code and runs test cases, these test cases are part of the code itself.
CD -
In CD, we are trying to deploy the code in a particular environment like Testing or Production etc.
now in order to deploy the code or we can say build, we will use two strategies -
1. Continuous Delivery
2. Continuous Deployment
now let's try to understand both of them
1. Continuous Delivery -
In Continuous Delivery, we will deploy the code in a Testing environment only, then QA team will check how the app is working, before we deploy the same app in the production environment.
Now in this case of Continuous Delivery, the deployment to a production environment will be done manually only.
2. Continuous Deployment -
In Continuous Delivery, Everything is done automatically, first to Testing environment and then to production as well.
Top comments (0)