Our today’s topic is implementation of CI and CD, continuous integration and continuous deployment, so when we will study this topic, you will feel that we have done this in automation and in deployment then why are we repeating it again, so first thing we are repeating this because it is very important and second thing till now we saw these both terms separately but when we do automation we mix everything. So mostly these terms CI and CD are used together now. Why have we used slash in between these two terms, so the difference is there will be two different persons handling CI And CD and its process will be totally different ,so it means two different people will handle continuous integration and continuous deployment okay.
So when all these things come together and when automation is formed we call it CI CD and it is a very important part of devops. So first thing, where do we use CI/CD and why? As I have explained earlier also if there is a company which is working on very big project in which already 15 to 20 developers are included, now here 15 to 20 people are working together means they are coding now these 15 people will change something in their code at some moment now what I have to do is, I have to check whether all the changes are merged properly and then working not? So this whole process which we have to do daily .You will notice that it is the same and continuous means we need to do it again and again, so in this we have some advantages and disadvantages of automating this because of which we will not be able to automate it.
First thing we need to be very careful of small things and we need to fulfil the requisites means the minimum requirements and after that only you can integrate it and deployment will come after that, now in this whole process. If you make even a small change in the source code then you need to change the whole process for both continuous integration and continuous deployment so first we will understand what we do in the whole process.
So when you change even a small part in source code then you need to build it first, and while building it we need to check whether it is perfect or not or we need to check it is syntactically right or not, and after building it when our code is building that time we will transfer our code from our local computer to repository through centralized version control system, and then on our main server and when we will put that on centralized lot of process will start, so our code will merge with the stored code and if any problem occurs in merging then it will show config and if no problem occurs while merging then a new version will be created in which our changes will be stored and our history will also be stored, and after that our code will be built as soon as it will be completed, we will test on that whether it is working according our expectations or not and if passes the test then after that we deploy it, deploying it means the code or software which we have built is stored in our repository so we need to sue it to build any software or application and then provide it to user so this whole process which we discussed here will come under continuous deployment okay.
So in deployment as we discussed last time also whenever we deploy, we have lots of tools available and now whenever you will deploy , you will need some server on which you will deploy you can either use server or you can use local which is known as on premises, so first you will need to make server and then you will deploy from your local computer and you have to deploy from version control system to user any tool or software so how will you do that? You need to use some tools like we have Jenkins which is a quite famous tool with the help of that you can do both continuous integration and continuous deployment, so how does it work? You need to set a trigger in that, triggers means if any person make any changes in the source code are sent to centralized version control system so as soon as these changes appear Jenkins will check it and as soon as it checks for change and if it locates then our trigger condition will activate and accordingly it will take some action which have been decide by us and we have written in that so through this we can add automation so as soon as there is any change in source code then the process which we discussed earlier so when someone adds changes in source code in centralized system it will build it and then it will check it whether it is working properly or not which is known as testing and after testing the process of deployment will also start and this whole process can be done easily in Jenkins.
Now similar to Jenkins another tool has to be launched that is gitlab and second github actions both are almost same, gitlab is also known as CI/CD and github is known as actions ,so gitlab works similarly like Jenkins but there is slight difference Jenkins has tried to made as user friendly ,so that you can easily use it but in gitlab and github you need to write workflow okay . so apart from this we also have other common technologies which are used nowadays like we have AWS cloud deploy, so in this what will happen? If you want to deploy your code on AWS then only you can use this AWS cloud deploy and the same thing happens in google cloud deployment now these can be used only when you are using their specific server for deployment purpose.
So all these tools which we discussed now were launched some time ago but that does not mean demand for devops also increased from some time ago earlier to that also many people used to automate the same things for devops so how was that possible? In linux we have a command available to us that is cron job or cron now what is this cron? In that you can write any setting like I have written at 3 pm this script should run and if you make some share script or python script and you keep that at specific time so cron job will run at that time so cron is a service which will run your service at any time or run any program at any time only if you have defined it in cron job so these are some tools which we use in CI/CD.
If you have any comments or questions regarding this course then click on the discussion button given below this video and post it there, and you will be able to discuss the course with learners.
Thank you.
Share a personalized message with your friends.