Introduction to DevOps Principles, AWS Cloud, Linux, virtualization and Docker
Key Takeaways
Introduces DevOps principles, AWS Cloud, Linux, virtualization, and Docker for beginners
Full Transcript
Okay. So, if there is someone from the Geeks for Geeks team, can you please uh give me the permission to start uh sharing my screen or make me the host? Okay. I I can see a couple of messages from you all. So, so I use this meeting will be uh for 3 hours from 7:00 p.m. to 10 p.m. and it will be for 3 days. I will give you the complete uh background regarding it. Just let me do my setup first. Okay, just give me a one more second. Let me connect my camera as well. So guys, uh please don't request for any kind of access. Okay, it is just popping up in my screen. Just give me one second. Okay. So, I hope you guys can see me as well, right? And now let me share my screen once again. Yeah. Okay. So, yeah, this is uh Okay. Again, I think there is some problem while sharing the screen. again uh someone from the gigs for geeks. Can you please give me the permission? I think please please make me the host. Yeah. Okay. Now I have the permission once again. Okay. I hope you guys can see my screen. So let me give you first of all a background agenda for this training. So today is a day one. This is a three days workshop on DevOps. Okay. So it is I hope you guys can uh see what exactly I'm uh writing over here. So this is a 3 days workshop on DevOps. In this 3 days we are going to create one project. The project would be a movie streaming application. So it would be similar to Netflix right? So we in in the day number three in the day number three we are going to create one Netflix kind of application. Okay, that would be again a full stack application. Fullstack application means it will have a front end, it will have a back end and it will also have a database. And we will see how can we deploy this kind of application via DevOps, via CI/CD pipeline, okay, in AWS cloud. So this will be our final goal. This will be our final practical which we will see in our day number three. Okay. So we are going to create some Netflix kind of application. Again uh please don't uh draw anything on my screen. I can see wait let me I I hope you guys can also see someone please don't draw anything or if someone is there from the geeks for geeks can you please uh remove that permission uh from the participants yeah so so our final goal for this particular training will be again guys please don't draw let me draw okay please don't draw anything in my screen otherwise how we are going to learn okay so if we have anyone from the geeks for geeks can you please remove this permission uh I think screen sharing permission from the participant then I think because some of you might be uh let's say join this uh particular workshop from mobile and in mobile if you just uh use your fingers then it will it will be uh it will be visible over here again uh anyone is there from geeks for geeks who can remove this permission please from the other participants Okay, just give me a second. So, this is the first day guys. Let's do let us do some setup over here. Let me check. Okay, let me sh let me stop sharing my screen for a minute once again and let me change some permission. Okay. Okay. So, okay. So, I hope uh this will not be a problem now. Okay. So, guys, let's come back to our agenda again. Those people who have just joined this workshop. So, I was explaining that we are currently in a 3 days workshop on DevOps. And the final goal or agenda of this particular training uh will be to create and to deploy a movie streaming application. Movie streaming application means application like Netflix where you can watch movies. So we are going to take a full stack application and then we are going to deploy that full stack application on AWS cloud via CI/CD pipeline. Okay. So if you are aware about genkins, you are aware about Docker, you are aware about Kubernetes. So all these components we are going to integrate together and we will see our final project in day number three. Okay. So today is the first day. Today we will learn about some basic things. Okay. What is DevOps? What is Docker? What is CI/CD pipeline? So we'll learn about it. We'll start with some basic practical today. So don't worry this is a beginner friendly uh training. If there is someone who is from class class 12th also it is completely fine for me. I will start all these topics from very basics. And guys, there's no prerequisite for this training. Basic knowledge of computers will be enough. I will say a basic knowledge of Linux if you have will be enough for now. Whatever will be required, whatever resources will be required. I will I will inform you accordingly. Okay. So, so don't worry. And guys, uh there are there are huge number of participants over here. So, I will not be able to uh check your chat uh in regular interval. So if you have something important we can discuss it uh at a later stage. Okay. Let me share my screen once again. Okay. Okay. So I have explained you my goal. My goal is by end of this training you should be available or you should be aware how exactly we can create an end toend CI/CD pipeline and how can we use the CI/CD pipeline to deploy an application. Okay. Here it will be a Netflix kind of application a replica of Netflix you can say. Okay. So we'll see about it in our upcoming classes. Right now let's focus on DevOps. Let's focus why exactly do we need DevOps and what kind of use cases this DevOps is solving for us and what is this term DevOps. Okay. So there are so many questions I know you it will be in your mind. So we are going to clear first of all these basic questions and then we will proceed ahead with our practical and I will also recommend one uh one thing for you all. It will be better if you create your own personal notes while watching uh this session. Please don't try to do the practicals with me for first day and second day because uh you may not be that much u aware about DevOps. You may be a beginner. So I will recommend you to focus on the session right now. You you may create your own personal notes and after the workshop will end you can practice it. If you're stuck somewhere you can ask me the questions in in the next class. Okay. In day number three when I will be showing you the final uh project implementation at that point of time you you may try doing the practical along with me. Okay. So we can do in day number three but in day number one or two please bear with me and please try to just uh understand the topics first. Okay. So let's take an example first of all. Okay. So if you take an example of any company okay there are so many companies which are offering different kind of services. Let's say you are aware about Amazon. So Amazon give you a shopping kind of service. We have Zumato. Zomemetto offers you a food delivery kind of service. We have Ola. Ola offer you uh the service where you can book a cab. You can travel somewhere. So there are so many companies. We are in a capitalist world. There are so many companies which are offering different kind of services. Okay. So I'm starting from the basics. Okay. First of all, let's understand what are companies and what kind of services they are offering. Okay. So, as we discussed what the main goal of companies are. Okay. Private companies I will say their main goal is to earn profit. Okay. And to earn profit what they are doing they are offering different kind of services. So different companies are offering different services. Some of the company is offering you cap service. Okay. Some of the company is offering you food service, food delivery service. Okay. Some of the company may be offering you uh let's say a social media kind of service where you can post your photos, your videos, you can share with other people's. Okay. So there could be some companies we have Instagram, we have Facebook. So these companies are is offering you some social media kind of service. Okay. Then there could be one service where you can do some shopping as well. Okay. So, so there are so many companies which are offering their different kind of services. Now, where exactly in which platform they are offering you this service? So, all these companies behind the scene will be running some of their servers. Okay. And then you are you are using their services via internet. Okay. So, what all these companies have done? They are providing their services via internet to you. Okay. they they have created some kind of web application, some kind of mobile application. So we are the consumers. We are the consumer for Zumato. We are the consumers for Ola, Uber, Flipkarts, this uh what we say all these companies. So we are the we are the users. How are we using their application? We are using their application via internet. So they would have deployed their application, their services somewhere in this world. We are the users. So we are the end users. Okay, we are the end users. We are utilizing their services via internet. So in between we have the internet, right? And because we are using their services, so we are also paying them. That's the basic agenda, right? So now we have so many companies who are offering their services on internet. So now in this particular training we will see how exactly these companies are deploying their application. Okay. What is the exact flow which these companies follow to develop their application and then further release that application to us? We are the consumers. So we are utilizing their application. So how exactly what is exact flow these companies are using behind the scene. We we need to learn it. Okay. And to show you this practical I'm going to take an example. Okay. You guys would have remember okay there was a one company okay let me change the color. So there was a company in 2015 around and that company was Tik Tok. So what this company did this company is also providing you some kind of social media kind of service. Uh and this company come up with a new idea. Okay. What was the idea of Tik Tok? The idea of the Tik Tok was that you can watch and you can create a short uh video content. Okay. Here it was around 15 seconds. And this is very important guys. So I'm explaining you a story over here. If you understood this story, you will be able to understood understand the entire DevOps flow just by this story. Okay. So around 2015 or 16, I don't remember the exact year. Tik Tok came up. At that point of time, Instagram was also there. Okay. Facebook was also there and YouTube was also there. Okay. So these are private companies who are offering some content kind of service, some social media kind of service and you can think they are competitors of each other. So Tik Tok is competitor of Instagram, Facebook and YouTube. Okay. So now this Tik Tok was like a new startup. They came up with a new idea because usually in Instagram we were sharing photos. In case of YouTube, people were creating a long format video but Tik Tok came up with a unique idea that let's give a chance to all the users to create a short video and then publish that video in their platform and when this idea came up in the market so whatever consumers who were using earlier Instagram or Facebook and because we are using Instagram or Facebook behind the scene we are paying for their services we are watching some advertisement on their platform and that is how they are earning it. So each of these company we discussed they have some business model behind the scene which has been uh let's say decided by their business team. So in case of shopping application like uh Amazon whenever you buy a particular product they got a commission. Social media they show you some advertisement and from the advertisement uh they earn. Food services they again they have some commission. Whenever you try to buy some food item they they have some commission behind the scene. Exactly. In the cap service also they have some commission behind the scene. Okay. So each one of them have some of their business model which we don't focus in this particular class. Our main focus would be on the servers on the application on the application deployment. Okay. So when this Tik Tok came up uh almost in 2015 there were a lot of consumers who were using Instagram and Facebook but when this new feature comes up uh in front of them they start switching to Tik Tok. They start switching over there. Okay, means it was a huge loss for Instagram, for Facebook, for these kind of companies, for Meta you can say because they were losing their consumers, they were losing their customers. And why were they losing? Because someone else, some competitor came up in the market with a new idea. Okay. So now how Instagram or YouTube have tackled this situation? Okay. So how Instagram or Facebook or YouTube have tackled this situation? So for for tackling the situation what the flow would have happened at that point of time. Okay. Uh we have the Instagram. So in Instagram there will be a marketing team. Okay. There will be a business team. Okay. What this business team will do? This business team will keep on looking into the market. We'll keep on analyzing the consumer preferences. This team will keep on checking uh the progress of uh competitors. And then this business team will come up with some kind of idea. So when Tik Tok was getting popularity, the business team of Instagram came up with an idea that we should also develop similar kind of feature in our platform otherwise it will be a huge loss for us. Okay. So here idea come came up. Okay. So whenever we talk about an application deployment, we will come to DevOps in a minute. The the origin is idea. Okay. So an idea will come up the once we have the idea then we will see how that for how we can develop that idea mean how can we create the code and once we have the code ready how can we deploy that code in our servers so we are right now at the first stage how the idea will originate you may be a startup guy you may come up with a new startup idea or or in this case let's say Instagram business team came up with a new idea and the idea was let's develop similar kind of feature short video kind of feature in our platform otherwise we will lose so many consumers from our platform and that will be a huge business loss for them and we know all of these companies don't want uh any kind of losses all of them are working behind the scene for profits so they will come up with this idea and whenever in a company an idea come came up okay so what this business team will do this business team will create one requirement means now business team have a new requirement to be developed Okay. And here the development team responsibility will come up in the picture. So business team will communicate with the development team of Instagram or meta you can say development team. Development team means the team for developers. These are the developers who are going to write the code for it. That is the beginning guys. In DevOps we mainly discuss about deployment and all but right now we discussing about the beginning. The beginning is first of all first of all there would be an idea and from that idea we will create a requirement document. In that document we will mention everything what exactly is required for this particular idea. Okay. Maybe in this document we will mention that my user must have an an option to like a real. They must have an option to comment on a real. They must have an option to post a real. So everything will be documented in a requirement file. And now this requirement file is going to be shared with your development team. And development team is the one who will understand the requirement. And after understanding the requirement, they will start writing the code. And before writing the code, they will also decide text that programming languages which should be used for developing this kind of idea. So if you guys are working in a company, if you are working in a development role or developer role or if you are working in a management role whatever. So you will see you will see this is the flow which is present in all the companies. First of all there will be an idea from the business team. That idea will be properly documented and then that idea will be communicated to the development team. development team will understand that idea or you can say requirement and then development team is going to decide the text stack which needs to be used. Okay, text stack means what kind of programming languages they should use, what kind of frameworks they should use, what kind of packages they should use to develop this particular feature and for everything there will be a budgeting behind the scene. Again, your managers will take care of the budgeting and other stuffs. We will not go to that direction. So let's say my development team for making it very simple for now. Let's say they have decided to write a code in Python. Python is one of the easiest programming language. So your development team have decided that we are going to write our code in Python. Okay. Then your development team will take some time. They may take some months. They may take some uh some weeks for developing this particular feature. So now your development team, there will be a front-end developer, there will be a back-end developer. They all will be working together. Some of them will be developing some APIs. Some of them will be creating the entire interface for you. And once once the entire code is being created by the development team, let's say they took few weeks and then the code is now now ready. They are good with the requirement. They are saying that whatever was mentioned in the requirement from the business team, we have written the code for it. And now once this code is ready once this code is ready now we will we will think of deploying this code because once this code will be deployed on servers what are servers we'll discuss about it once the code will be deployed on servers then only our end consumers will be you able to use my services okay so I will create a fresh diagram okay once again and I will show you the entire flow right now okay how it will work uh in DevOps. So as we discussed there will be a business team. Okay. This business team will come up with some kind of idea. Okay. This idea will be communicated to your development team. Okay. Let me write it like this. Development team. Development team will write the code for you. Okay. So they will write uh the entire code for you. And once the codes are created, usually development team put their code in some kind of centralized repository because there will be so many developers who are going to work together. So in the development team, let's say we have a me a team of 20 members. Okay, some of them are front end, back end and different kind of engineers. Some of them are good. Some of them will be developing a particular feature of this idea. Some of them will be developing some other feature of the idea. So they will distribute the work between them between this team and then once they will they will keep on carrying out their development they will also create one repository okay repo and in that repo they will keep on pushing their code okay that is the initial flow guys okay we haven't come up to devops yet we are still in the initial flow where we are just coming up with an idea and we are converting that idea into a code that's what is happening right now okay and now you we need to understand what is this repository okay and why this repository is important over here okay so here there could be multiple developers and each each of the developers will be doing their uh programming their coding in their local system okay so let's say this develop developer is working on some some part of the code okay let's say in case of Instagram uh in Instagram Instagram came up with a new idea and this idea is nothing this is your Instagram res okay this Instagram res was uh created to to tackle Tik Tok basically. Okay. So for this real let's say this is a developer who has worked on a feature where the reals can be uploaded or where the real uh likes and comment can be managed. Let's say so this is a developer who is writing the entire code. Let's say they are writing the code in the Python over here. They may use Java. They may use Go. They may use C++. They may use React. They may use any programming language. Okay. So it it is completely on the developers. So let's say for making it very easy they have written the some of the code in Python programming language. Okay. And once the code is written by this developer he is working on one of the component of the requirement. This second developer is working on some other component of the requirement. Now if they have to share their code with each other okay whatever code he has written he want to share his code to his friend. Okay his colleague. Okay. So how can he do? Okay. So for that because right now they they they are having their code in their local system. Okay. If they want this code to be shared by or shared with uh their other developers they are they will have to push this code or they will have to put this code in a centralized location. Okay guys again please don't draw anything over here. If we have anyone from geeks for geeks please uh take care of this. Please uh remove this permission. Okay. So if they wanted to work in a collaborative environment where we have multiple people all of these uh people or developers are working together we will need a repository and one of the very uh let's say easy example of a repository is a GitHub repository. So usually what we do we create a GitHub account. Let's say this is my GitHub account. In this GitHub account I have so many repositories created over here. I will take an example of let's say this repository. In this repository let's say I am keep on putting my code. I am the first developer. I will keep on putting my code over here. I will share this particular link with my other developers. I can copy this. I can share this link with my other developers and my other developers will also be able to see my they will also be able to contribute my code. Like in this particular repository which I have created here, I have two contributor. I am one of the contributor and then there is some Abishek who is the second contributor. So we both we are the let's say two developers. We are working in the same same code base. So we will have one centralized code base. In this case this code is going to be present in a repository. How to create a repository? We will see after some time in our practical when we will do in today's class I will show you how to create a repository, how to connect our repository with our local system and how to push our code from local system to a repository. So we will see that practically but for now to understand the entire flow just see that here we are going to have one repository. Let's say this is going to be your GitHub repository. GitHub repository. This will be a centralized location where you will have the entire final code which will be developed by your developers. So these developers will keep on working together and then the entire code will keep on getting stored in this particular repository. Now let's say my repository is created. Okay. And in repository I have the final code which has been developed by my developers. So what will be the next step? Okay. So should I now go and deploy this code to my production system? So there will be a production system. Production system means basically you will have some server here. Server means you will have some kind of operating system over here. I hope you guys are aware about operating system like Windows is one of the operating system. Similarly, we have different kind of operating system available. We will see a comparison and the discussion of operating system as well in this particular training. Okay. So here let's say we have an operating system. In this operating system, we are going to deploy this application. Deploy means we are going to run this application. So whatever application my developers have created, this application is going to be running in an open system. Okay. So if you want to run any kind of application in this world, the basic requirement is you should have an operating system. So operating system is the basic requirement to run any kind of application. Like in my laptop, I am running a zoom application. I'm running this kind of chrome application. I'm running let's say Spotify or Netflix or let's say paint application. So these are different kind of application. How I am able to run it? Because I have a windows operating system in front of me. Similarly here also you will have to set up a particular operating system and this operating system will be using some kind of hardware behind the scene. Okay. Hardware means it will use your RAM, it will use your CPU, it will use your network drivers. Okay. So you will have to set up a hardware then in top of that hardware you will have to install an operating system or setup operating system and in top of the operating system you can have your application which will be running over here okay and let's say this is my final system and here is my consumer okay this is my client okay in in in in case of Instagram we are the consumers right we are the one who is using Instagram services so we will connect with this particular application and we will start using these services how we will connect we will just go to the our browser and the browser we will will just hit let's say Instagram Instagram and then Instagram website will be open and from here we will be able to see Instagram similarly you have Amazon website for example so you can just go to amazon.com and the entire website will be running for you and you will be able to uh let's say do some kind of shopping over here so behind the scene this Amazon this Instagram or this Netflix or this Zumato okay they will be running in case of behind the scenes in top of an operating system. Okay, in the top of an operating system, the entire application would be running which we are using. Okay, so the flow is my business team gave the idea, development team have worked on that idea, converted that idea into a code and then normally we have the operation team. So in companies we have the operation team. This operation team is responsible for creating your operating system. This operation team is responsible for launching or for running your application. This operation team is responsible for the infrastructure part you can say. Okay. So here we have two kinds of team. We have one development team who is just focusing on the development part. They are not aware how exactly the deployment of the application takes place. They are not aware how the oper system works. Okay. So all these this uh information is with the operation team. So here both the development team and the operation team are doing their respective job. Okay. But here is a catch. The catch is whatever code my developers have created that code may have some bug. That code may have some let's say uh security vulnerability. Okay. That code may have some errors. We don't know. Okay. And we can't rely on developers directly. Okay. So whatever code is been developed by my developers over here. Okay. We are not sure whether that code is properly working or not. Okay. And that is a reason that is the reason. Okay. We will have to guys again please don't request for any kind of access. I will not be able to provide you that. Okay. So here we will have to do a proper testing of the code because if we don't do a proper testing of the code it may happen that you have created your application and you have deployed your application on the on the servers and when your client was trying to use your services your client got some error your client got some bug okay your client got some latency in your application and if this kind of scenario will happen then your client it will be a very bad user experience it will be a very bad user experience and what will happen user experience your user will say that your services are not reliable I can't rely on your services which you are offering and your your user or your client or your consumer is going to switch to your competitor and that will be a huge business loss loss for your company so let's say this is a website uh this is let's say Instagram they were trying to work on a code and they have deployed that code without doing a proper testing on the production system okay so usually This is called as production system where your consumer directly connect and your your client got some error. Let's say when you are using Instagram application it's not loading properly. Okay. Sometime you are able to see your data. Sometime you are not able to see your data. Sometime your application is getting crashed. So if you will see or you will notice this kind of issues then you will never go back to Instagram. You will go to a competitor of Instagram which is Tik Tok which may be YouTube or which may be some other tools. Okay. So it is very important for all the companies who are offering their services on internet to be very much reliable. Reliable means that those companies those servers those application those services where consumer can blindly rely for example we can rely on YouTube because in YouTube we have seen we we never see any kind of errors or any kind of bug in YouTube and YouTube servers are always running. Whenever you go to youtube.com you will always see the content over there. It's not like YouTube is down. Okay, it's very rare situation. So we can say that Google is very very reliable company. Okay, YouTube is reliable. Similarly, Instagram is also reliable. You can say okay and then Amazon is also reliable. Netflix is also reliable. So these are very reliable companies and consumer will only go to go to reliable companies and if they don't get a reliability they will go to go to a consumer. Okay. So we have to make sure whatever application we are developing that application must be reliable and this is a very important concept and important component. We'll discuss about reliability once again after some time. Okay. And you can consider you you may think of any uh nonreliable company let's say IRCTC. So IRCTC is usually very slow. Okay. Whenever you try to connect sometime there's lot of buffering over there. You are not able to book your tickets properly. So you can say IRCTC is not that much reliable in comparison to Google or Instagram or Amazon. Okay. But because IRCTC is a government website, so you don't have any choice. You will have to use it. But if I talk about a private companies, so your uh Zumato, your Swiggy, Ola, these are private companies. If if they are not reliable, people will directly switch to a competitor until you are a government website because for government website, they don't have any choice, right? So it's very important uh for us for the operation team and for the company to make their application reliable and how this can be done. So for this we will now involve we will now add some of the steps over here. Some steps we are going to add over here and these steps will help us to properly test our code without okay before deploying it to production system. Okay. So who will help us guys? Again I'm not seeing uh right now your uh chats. If you are asking any question just wait for some time. I will give you some time. So let me just complete this topic. If you have any question just note it down in your uh notepad or somewhere. Once I will ask you to share your question you can share with me. I will I would like uh to address it. Okay. So so here the first thing what we should do we do we should do a proper testing of the code because we can't rely on developers. Developers may make mistake. So how this testing will happen? So usually we do or we perform some unit testing. So if you are developer you you must be aware of unit testing otherwise I will give you a quick uh example of unit testing. So let's consider let's consider that my developers have created the code and in the code basically they write a algorithm and this is also called as your business logic. Okay. So your developers are going to create your algorithm over here. Okay. Now that algorithm what the developers have created you have also have to properly test it. How can you test? Let's say we your developer have created a very simple algorithm. Let's say that algorithm is addition algorithm which is going to do some addition of two variables you can say. So we have two variables X and Y. Okay. We have two variables X and Y. And now they might have created one function. So what is function? Again it is about programming. If anyone of you is aware about programming, you may know. Otherwise, don't worry about it. It is completely the job of your developers. If you are a DevOps engineer, it's not your responsibility to focus on these things. But still, I will give you a quick example. So, whenever we create a any kind of business logic, any kind of algorithm, we always put it in a function. In case of Python, we use def keyword def keyword to create a function. Okay. So, here we are going to create a function def. And then we'll give a function name. And then in this function we are going to write our logic. What will be the logic logic for doing the addition. So for doing addition the logic is very simple. You're going to do x + y and then you are going to return the value of zed. This is a very simple example. But in real world your developers are going to create some very uh core business logic. That business logic will have multiple if conditions. It will have some loop as well. So lot of things will be there. It's your developer's responsibility. But let's say your developer have created a very simple function add function and where they are doing some kind of addition. Now how can you test whether this this particular logic is working fine or not. So here your developer must also create some test cases. These test cases are going to help you to test your business logic whether your business logic is working properly or not or whether it has some issues. So these test cases will be required. So one of the test case in this case could be in this situation could be that I will say because I I'm the business person I I know the expected value. Okay. So whatever logic my developers are going to create I know what should be the expected value. So let's say I will say that I am going to call this function add function and I am going to give a pass two parameters let's say two uh and two and then I know because this is a very basic mathematics. So I I know that expected value for me expected expected value for me will be four. Okay. Then what I will do I will also call this function and I will check what is the exact value what is exact response I have got it from my function. Okay. And then I will do a do a condition. I will check whether my response is equivalent to my expected value or not. If my response is equivalent to my expected value then I will consider my this particular function is working properly. There's no issue in this function. And this is this is an example of one function. But you can imagine your developers will create thousand lines of code. Okay. Hundreds of files they are going to have. In real world whatever code we create it is very dense. Thousand lines of code we have thousand number of 100 number of files we have. So in that case you will have to create multiple test cases. hundreds of test cases you will you will be creating to test each functionality of your application. Okay. So in this case we got to know that our response is equivalent to expected value. So I will say my test case is passed. I am good. But let's say while doing a development my developer did a mistake. He is a human being. He he may make mistake. So let's say while doing a development instead of using a plus operator over here he use multiply operator. Okay, this is a bug. You can say this is a bug. Now, if you don't identify this bug before deploying to your production system, then this will be a disaster for your company because when your clients will try to use it, some of the features of your application will fail for your client and that will be a problem. Okay. And this is a bug. How can we identify this bug via our test cases? So, what you will do? You will again call this function and this time we have again let's say passed 2 and 2 and in this case 2 into 2 and 2 + 2 is again same value then that in this case your test case will pass but ideally what you should do you you should call your function via multiple values by multiple parameter means I should call my add function one more time with a different values three and two in this case my expected value will be five my expected value will be five But what I got from my function, what I got from my algorithm is something else. It is something like six and five is not equivalent to six. It means my test case has failed. It means there's a there's a issue. There's a bug in my code. And then it means that I will not let this code deploy to my production system because this code have a problem. Okay. So you will say your test cases have failed. So I will mark that my test cases have failed. And when your test case will fail, you will not proceed with uh the next steps. You will go back to the first step and you will ask your developer to fix this. Your developer will go back to the code. Your developer will identify the bug and he will then fix the bug. Let's say he will again make it close. This is a very lame example but this is how we create test cases. We are going to see how the test cases and how the Python applications can be working. We will see an example for that as well in our uh next class maybe. Okay. So this is a fin main thing. Okay. So here you can see we have so many steps. The first step is idea. Second step is development team creating the code. The third step is they will upload the code to a repository. So I will just mark it first step. Second step. Third step and the fourth step is I will perform a testing of the code. Okay. After performing the testing let's consider a scenario. My test cases have passed. Okay. Let's take a best case scenario. my test case have passed then again I will be going to do some further kind of testing of my code I will not directly deploy it to my production system because I have to make sure whatever services I'm offering that services are reliable if they are not reliable my consumer will not use my services and they will switch to my competitor and eventually this will be a business loss for us okay so here the next step will be that we can also do a analysis of our code so we have lot of static code analysis tool available in the market. One of them very popular tool is sonar cube. So what sonar cube can do for you? Sonar cube can go to your code and from your code sonar cube can identify all the potential bugs. Sonar cube can also identify let's say in your code somewhere you have uh let's say pass your password. Let's say here you have created a value password value and here you have hardcoded your password hardcoded your password. Now this issue will not be not be identified while running your test cases but hard coding a password in the code is not a good thing as per security of your application. So sonar cube is very intelligent tool. Sonar cq will do analysis of your code. It will go to each and every file and line of your code and sonar cube will identify that in this particular file in this particular line number there's a there's a password which has been hardcoded which is a problem problematic situation. So sonar cube will raise a issue over here. Sonar will raise a issue over here that you have a security vulnerability in your code. Similarly sonar cube can also identify some of the potential bugs. There could be some bugs which you will not be able to identify while running your test cases but sonar cube will be able to identify it. Okay, it may happen let me just create a fresh diagram. It may happen that you are creating a code. Okay, again it's a example from the Python only. So if you're creating a code okay let's say you have created this add function. Okay, you have written the entire logic of the add function and let's say you have created this function two times. Okay. Or let's say in this function I have written a logic x + y. Okay. And I will say I'm doing x + y over here. Let me just change it a little bit. Okay. Let's say zed is equal to x + y. Let's say I have created one more function. Let's say some other function test function. And here also I'm doing something similar. So let's say here I have x and y as two of the parameter. Here let's say I have a and b as two of the parameter. And here I'm doing a plus b. Now although the function name is changed the variable name is also changed but sonar is so intelligent sonar is saying that you have a duplicacy in your code. Okay you are writing the same code two times which is not good as for uh as per good code you can say sonar will help you to write a write a clean code need and clean code secure code okay and code with a better performance. So if you are creating the same function because the functionality is addition over here. If you're writing same functionality two times so it is called as duplicacy over here and your developer may make some duplicacy. Sonar will be able to highlight this kind of duplicacy and sonar will ask you to fix it. Similarly it may happen you are creating your code you may have created some variable like x= to 10 y= 20 z= to 100. You have created these variables. You have initialized these variables but you are not using these variables anywhere in your code. So again this is also not a good way of writing the code. So this is sonar will highlight you that there are some of the variables which you have created which you have initialized but you are not using them. So they are occupying your memory for no use. So sonar will recommend you to remove these unwanted lines. Okay. So sonar cube is one of the tool. If you just go back to the internet and search over here sonarq very powerful tool it okay so it's a opensource platform used for continuous inspection of and of your code quality so it will do inspection of your code and will tell you whether your code is written it with a proper quality high quality code it is or not if your code is not not a high quality it will give you some suggestions to make it a high quality code and it is very important to create a high quality code because this code is now going to be deployed into production system. If it is not good in quality, then it may cause some performance issues, some bugs, some some uh runtime issues it may cause. So, Sonar Cube will be able to identify these issues at a very early step and Sonar Cube will help you to fix them so that before you deploy it, you are able to fix it. Okay, that's what we are going to do over here. Okay. So if I go back over here, so this is the second step which we have done that is static code analysis. Now guys tell me till here it is clear to all of you or not what exactly we are going to achieve. Is it clear to you or not? The agenda is clear or not. Okay. And now if you have any queries uh you can ask me in the chat. I'm just looking into the zoom s chat right now. If you are joining this session from YouTube uh then I may not be able to see your chat right now. I will check it uh in the latest stage. Clear? Right? Okay. That's good guys. So now let me create a fresh diagram. Okay. So our my final goal is to create a high quality software to release highquality software for my consumers so that my consumer will keep on using my services otherwise they will switch to my competitor. That is a very big pain for all the companies. They are fighting with their consu their competitors basically. Okay, that is the reason. Okay, that is the reason your companies keep on doing some market research. They keep on looking into the market. They keep on analyzing their competitors to keep on coming up with a new idea and to integrate new idea into their application so that they can retain their consumer. Okay. So again in MBA class you will learn these concepts about business. But in today's class we will discuss more about DevOps. Okay. So if I again create the diagram, the diagram was simple. My business team did some research and they identified let's say I'm talking in in case of Instagram they have identified that there's a tool called as um Tik Tok it is getting a lot of popularity and this is causing a loss. So they came up with the idea to create a similar feature in their platform that feature is called as real Instagram res. I think I I hope most of you are addicted with res right now. So it's a cool feature I will say and then in this re this idea will come up. This idea will be communicated to your developers. Your developers are going to write the code for this and then we we are going to discuss now how this code can reach to my end consumer. Let's say here is my end consumer who is waiting for this particular feature and here I have set up one operating system which is called a server right now and here I'm going to deploy my application. Okay application. So we will not directly deploy our code over here because there could be some mistakes as we discussed. So here we will follow a follow a pro procedure. The procedure would be that whatever code my developer have created I am going to first do a testing of the code. After doing the testing of the code, I'm going to check the quality of the code. Quality of code. Okay. Why quality guys? Because it has been said in the market that anyone can write the code but only few people can write a clean code, a readable code. Okay, a quality code, a high quality code. Okay, so it is very important for you in your company, you are following the standard which has been set by the community. Okay, similarly we have like in case of Python or if you use a node as well, we have a concept of linting as well. So what happen is uh something like whenever you are creating a code you have to make sure that code is readable. Okay. Okay. Readable means that code must be easily understood by any other developers as well. Okay. Because you your code may work but that code may not be uh readable. Okay. So your code must be readable as well. Readable means whenever you are creating a function that you have to give a proper name to your function. It is not like just give a ABC as a name. Give a proper name. What exactly that function does? Okay. And whenever you create a function, you also have to give the exact information about this function. What this function does, what this function return, what kind of argument this function takes. So again, this is not compulsory. We can still create the code without using these steps. But it is said that we should follow these steps. These are the community standards. These are the coding standard. You can say coding standard which your developers must follow for writing the code otherwise your code may have some bug and other developers will not be able to debug it easily. That's why it is said whenever you are writing a code you must give a proper name to your code sorry name to your function. You must add proper comments over there. You must create some variable name which will make some sense. Instead of instead of creating a variable with name x, you can give a name which will be more uh easy to understand. Let's say you you are storing here some user data. Create a variable called as user data. And here u will be small case, d will be in cap cap case. Okay. So this is some of the standard which we have to follow while writing our code. So we can also perform linting of the code. This linting will help us whether our code is written in a as per the coding standard or not. If it is not written as per the coding standard, we can again ask our developer to go back and to fix it. So we will not deploy that code until this is fixed. Okay. Let's take a scenario. Linting is also been completed by my developer. My developer is very active. Whenever we report any kind of issue, my developer is acknowledging that particular issue and then he's working on to fix it. Okay. Then the next step would be that now I wanted to let's say deploy this code. So I will create a bundle of this code. Okay. bundle of this fold. So if anyone of you are aware about Java, in Java you usually we create jar file. We compile our code and we create a jar file and that jar file we run it in later stages. Python is a interpreted language. So you may create a bundle file. Okay, let's say your code was written in in a file called as app. py in your app. py is your entry point for your python code. Let's say you have written multiple code over here. If you want to run this code, you just have to use python space app. py just run this command your python python code will be started your python application will be started it's so simple okay so I will give you an example okay of the python code I may have in one of my repository so if I go back here let me just open any of the sample uh repository okay for python and same thing is applicable for any other language as well if you are aware so python is one of the common language that's why we are bringing it up so you can see in app py file over here we have created some python code over here that Python code is returning some value over here. Okay. So now if you want to run this code what all you need to do you just need to use python space app.py your code will be running your application will be running that's it. Okay that's what we are doing. Similarly here also we'll run our code. So you want you can bund
Original Description
Flat discount active on all GeeksforGeeks Courses. Avail before the limited time offers end: https://www.geeksforgeeks.org/courses
Register for free to attend more workshops on Full Stack development, Data science, AWS, Devops & DSA: https://gfgcdn.com/tu/UJ6/
🚀 Kickstart your DevOps journey with this beginner-friendly introduction to DevOps principles, CI/CD pipelines, and Jenkins for continuous integration! Learn how to streamline software development and delivery using one of the most popular DevOps tools in the industry.
✅ What You’ll Learn:
Core DevOps principles and why they matter
What CI/CD means and how it fits into modern development
Step-by-step Jenkins setup for building a CI pipeline
Creating jobs, configuring build triggers, and integrating source control
How Jenkins automates code integration, testing, and deployment
🎓 Level: Beginner to Intermediate
Perfect for: Developers, testers, DevOps enthusiasts, and students looking to break into the world of continuous integration and automation.
👍 If this video helps you, don’t forget to like, subscribe, and drop a comment to let us know what DevOps tools you’d like to learn next!
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from GeeksforGeeks · GeeksforGeeks · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
How I got into Walmart | Shailesh Sharma
GeeksforGeeks
Upgrade yourself In 29 Days | GeeksforGeeks
GeeksforGeeks
Learn AWS Fundamentals For Free
GeeksforGeeks
Conversation With Young Achievers | Meet the winners of Bi-Wizard Coding Contest | GeeksforGeeks
GeeksforGeeks
Meet The Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
GeeksforGeeks
Interview Prep Strategies | PayPal
GeeksforGeeks
OLX Interview Preparation Strategies | Hukam Singh
GeeksforGeeks
Meet Some More Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
GeeksforGeeks
Live Mock DSA
GeeksforGeeks
Microsoft Azure For Absolute Beginners
GeeksforGeeks
Python for Data Science | Data Science Master Bootcamp | Arpit Jain
GeeksforGeeks
Getting Started with Data Analysis | Data Science Master Bootcamp | Ashish Jangra
GeeksforGeeks
How to prepare theory subjects for SDE interviews | Geeks Summer Carnival 2022
GeeksforGeeks
Get Your Tickets To The Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
TED Talk Data Analysis Project | Data Science Master Bootcamp | Ashish Jangra
GeeksforGeeks
How I Secured AIR 9 in GATE'22 | Tushar
GeeksforGeeks
Learn Java Backend Development | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
How to Recognize which Data Structure to use in a question | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
Learn Data Structures and Algorithms | GeeksforGeeks
GeeksforGeeks
Interview experience at Flipkart | GeeksforGeeks
GeeksforGeeks
Lets Prepare for GATE'23 the Right Way | Sakshi Singhal | GeekSummerCarnival
GeeksforGeeks
Highest Paying Jobs in 2022 | Ishan Sharma | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
Geeks Summer Carnival 2022 | 5th April- 11th April | GeeksforGeeks
GeeksforGeeks
Preparing for SDE interviews | Soham Mukherjee | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
Full Stack Development with React & Node | Utkarsh Malik | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
Introduction to Open Source and Roadmap to GSOC 2022 | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
Web Scraping in Action | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
Getting Hired at BITCS via GfG Job Portal | Get Hired With GeeksforGeeks
GeeksforGeeks
How to build a faster landing Page | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
Geeks Summer Carnival | 5th To 11th April, 2022 | GeeksforGeeks
GeeksforGeeks
How to get ideas for Startup | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
Journey from Tier 3 to JusPay | GeeksforGeeks
GeeksforGeeks
Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
Dispelling Myths and Pre conceptions of Programming Languages
GeeksforGeeks
Must Do System Design Questions
GeeksforGeeks
Understanding Sorting Techniques in an hour | Keerti Purswani | Geeks Summer Carnival
GeeksforGeeks
Get Hired at NEC | Job-A-Thon 8
GeeksforGeeks
Journey from Tier 3 college to Microsoft | GeeksforGeeks
GeeksforGeeks
Get Hired with GeeksforGeeks at SuperK | Job A Thon 8
GeeksforGeeks
GeeksforGeeks: Redesigned
GeeksforGeeks
From Tier 3 to cracking multiple interviews | GeeksforGeeks
GeeksforGeeks
Live Mock DSA
GeeksforGeeks
Youtube Data Analysis | Ashish Jangra | GeeksforGeeks
GeeksforGeeks
DSA Self-Paced Course Preview | Sandeep Jain | GeeksforGeeks
GeeksforGeeks
GATE Live Classes | Prepare for GATE CS 2023 | GeeksforGeeks
GeeksforGeeks
Journey from JIIT to Adobe
GeeksforGeeks
Life Is Unfair Ft. Shonty badmash | LIVE Discord Session | A GeeksforGeeks Exclusive
GeeksforGeeks
Interview Experience at Google | Tech Dose
GeeksforGeeks
Live Mock DSA
GeeksforGeeks
Interview Experience @ Amazon | GeeksforGeeks
GeeksforGeeks
My journey through the tech world from India to US | Vidushi | GeeksforGeeks
GeeksforGeeks
Complete Interview Preparation Course | GeeksforGeeks
GeeksforGeeks
Live Mock DSA
GeeksforGeeks
Getting Hired at FiftyFive Technologies | Job-a-thon 9.0
GeeksforGeeks
GFG Karlo, Ho Jayega | GeeksforGeeks ft. Khaleel Ahmed
GeeksforGeeks
How I got job offers from 2 big companies : Arcesium & Microsoft | GeeksforGeeks
GeeksforGeeks
LINUX for Beginners | GFG x Itversity
GeeksforGeeks
My interview experience at Walmart | GeeksforGeeks
GeeksforGeeks
Get Hired at Speckyfox
GeeksforGeeks
Live Mock DSA
GeeksforGeeks
More on: Systems Design Basics
View skill →Related Reads
📰
📰
📰
📰
Scarab Diagnostic Field Test #038 - pnpm GitHub Actions Setup State Boundary
Dev.to · Scarab Systems
Claude Code for Runbook Automation: How I Turned My Dusty Wiki Pages Into Steps That Actually Run
Dev.to AI
Docker images and containers: understanding the relationship
Dev.to · Javi Palacios
I Got Tired of SSH-ing Into Servers Just to Restart a Container, So I Built a Visual Control Plane
Dev.to · ByteStrix
🎓
Tutor Explanation
DeepCamp AI