├── 01-Virtualization ├── images │ ├── Hypervisor-01.png │ ├── Hypervisor.png │ └── VM.png └── virtualization.md ├── 02-Software-Development ├── Software-Development.md └── images │ ├── SDLC.png │ ├── sdlc_agile_model.jpg │ └── sdlc_waterfall_model.jpg ├── 03-Rise-Of-DevOps ├── Rise_Of_DevOps.md └── images │ ├── DevOps.png │ ├── DevSecOps.png │ └── Twitter.jpeg ├── 04-Continuous-Integration ├── continuous-integration.md └── images │ ├── CI.png │ └── Example.png ├── 05-Continuous-Delivery ├── continuous_integration.md └── images │ └── CI-CD.png └── README.MD /01-Virtualization/images/Hypervisor-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/01-Virtualization/images/Hypervisor-01.png -------------------------------------------------------------------------------- /01-Virtualization/images/Hypervisor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/01-Virtualization/images/Hypervisor.png -------------------------------------------------------------------------------- /01-Virtualization/images/VM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/01-Virtualization/images/VM.png -------------------------------------------------------------------------------- /01-Virtualization/virtualization.md: -------------------------------------------------------------------------------- 1 | At the beginning stage, you'd have a lot of questions out of which some are listed below: 2 | 3 | 1. What is DevOps? 4 | 2. What is the problem that DevOps is solving? 5 | 3. How did the term 'DevOps' rise? 6 | 7 | Before answering all these questions, we actually need to understand a very important concept in the Computer Science which is called as Virtualization. 8 | 9 | Again, before understanding the concept of Virtualization, we need to understand what used to happen before virtualization, why was there a need of virtualization at the first place and most important what exactly is virtualization? 10 | 11 | ## Before Virtualization 12 | 13 | Earlier before the concept of virtualization was introducted, the different services of an application used to run on different servers. This means that only one service can run on one server. For eg. Web service of an application can run only on one server whereas Database service of the same application would require to run on some different server. 14 | 15 | **Remember:** One Service, One Server, One Operating System. 16 | 17 | Now, as we know servers are costly. So if your application contains multiple services, you'd require multiple servers to run multiple services. 18 | 19 | Well in today's time, this is not the case on how you run serivces. In today's time, you can run multiple services on one server itself with the help of virtualization. 20 | 21 | Cost is not the only factor here. Imagine due to some reasons one server goes down. Not only the service of an application would go down but it would take additional cost to set up the server once again along with other setup to be implemented as well. 22 | 23 | ### Who solved this problem? 24 | 25 | VMware. 26 | 27 | VMware is a company which actually solved this problem by introducing the concept of virtualization. 28 | 29 | With the help of virtualization, you can run multiple services on one server itself. But how? 30 | 31 | Virtualisation is the concept in which multiple Virtual Machine/Multiple Operating system can run on single server/computer with the help of a software called as Hypervisor. Consider various OS like Windows & Linux. With virtualization, one can run both the OS on a single machine. This means that if you're using a machine with Windows OS as the host OS, you can also install Linux Kernel on the same windows machine. It is to be noted that both the OS would run in isolation. This furthre means that Windows OS would run acting like if it is the only OS on the machine whereas Linux would run acting like if it is the only OS in the machine. 32 | 33 | In other words, virtualization or virtualisation is the act of creating a virtual version of something at the same abstraction level, including virtual computer hardware platforms, storage devices, and computer network resources. 34 | 35 | You might have various questions like what is an Host OS, how does virtualization take place? 36 | 37 | Take a pause here and ask yourself - Did you understand why was there a need ot virtualization? 38 | 39 | **How do virtualization take place?** 40 | 41 | Hypervisor is the software which enables the process of virtualization. Look at the picture below: 42 | 43 | ![Virtual Machine!](/01-Virtualization/images/VM.png) 44 | 45 | It is to be noted that a VM takes the storage as well as networking resources from the underlying computer/Host OS. 46 | 47 | A Host OS is the OS/computer which is being virtualized. 48 | A Guest OS is the OS which results as a byproduct after the Host OS has been virtualized. 49 | 50 | Here's an interesting thing to know about. When you dual boot your machine, you're not making a virtual machine out of it. Dual booting is not creating a VM. In virtualisation, you can access both Operating System simulatenously. However in dual boot, you can't access/use both Operating System simultaneousy. 51 | 52 | Hypervisor partitions the hardware of host OS and assigns the required resources to the virtual machines you created. 53 | 54 | There are two types of Hypervisor: 55 | 1. Type-1 56 | 2. Type-2 57 | 58 | - **Type-2:** This type of hypervisor sits on the top of the Host OS and takes the resources from the Host OS. Type 2 is basically used by personal computers. For eg. Oracle VirtualBox. 59 | 60 | - **Type-1:** This type of hypervisor performs exactly the same way as Type 2 hypervisor just the major difference is that in Type 1 hypervisor, the hypervisor sits on the top of the Hardware and takes resources from the Hardware itself instead of any Host OS. Type 1 is mainly used in production. For eg. Microsoft HV. 61 | 62 | ![Hypervisor!](/01-Virtualization/images/Hypervisor-01.png) 63 | ![Hypervisor-!](/01-Virtualization/images/Hypervisor.png) 64 | 65 | Apart from reading this, it is highly recommend to go through the following [resource](https://youtu.be/mQP0wqNT_DI) to get a better understanding about virtualization. 66 | 67 | That's it about Virtualization. Did you have an answer to the following questions now: 68 | 69 | 1. What is Virtualization? 70 | 2. What is the need of virtualization? 71 | 3. How does virtualization take place? 72 | -------------------------------------------------------------------------------- /02-Software-Development/Software-Development.md: -------------------------------------------------------------------------------- 1 | Before understanding about DevOps, let's first understand what are the various steps included in order to build a software. This is also called as Software Development Life Cycle, or SDLC. 2 | 3 | SDLC refers to the various steps that are required to build a software or an application from the scratch. There are various phases involved in the SDLC that are mentioned below: 4 | 5 | **1. Requirement Analysis & Gathering:** This is the first step on building an application. All the requirements are framed in an document which is called as SRS document. This is the first step of the SDLC. The IT teams discusses on how to proceed with building the project, what is the estimation cost, language to be used and many more. 6 | 7 | **2. Design:** In this phase, the software architecture is designed in the document called as SRS document. SRS document serves as a contract between server and client. It is designed in such a way that client gets a basic overview on how the project would be built. 8 | 9 | **3. Coding:** Once the architecture of the software/appilcation has been designed, the coding phase generally begins by Developers. In this phase, coding is performed by the developers. 10 | 11 | **4. Testing:** In this phase, the testing is done in order to ensure that the code that has been written does not contain any bug or errors. If there are bugs found, these are resolved here. There are different types of testing performed depening upon the application. Testing of entire application is performed, testing of individual modules is performed as well. 12 | 13 | **5. Build:** After testing, the build phase occurs. Building is a process in which all the code that has been written and tested is converted into a single executable artifact which can be deployed on the servers by the Operation team. The written code is converted into executable code(Binary) here. 14 | 15 | **6. Deployment:** The artifact that has been produced is deployed onto servers by the Operations team. Remember, Development team writes the code whereas Operations team deploy that code onto servers such that users can start using the application. 16 | 17 | **7. Observability & Monitoring:** Once the code has been deployed on the servers using artifact, the end users can start using the application. Now, there might be new errors that users would generally come across. Similarly, there might be new features that development team would like to implement. Hence, in this phase new features to the application, Bug-fixes are generally done for the betterment of the application. 18 | 19 | All this process goes on and on representing an infinite cycle. DevOps in general try to reduce each barrier that leads to delay in the new release of the software. Hence, DevOps has a symbol of infinity! 20 | 21 | ![SDLC](https://user-images.githubusercontent.com/94682026/211336899-91e144d8-c6dd-4171-ad25-6ad709bd7106.png) 22 | 23 | 24 | All the steps mentioned above when executed in the sequence leads to the formation of a model called as **Waterfall model.** In Waterfall model, the next phase is only executed once the previous phase has completely been executed. 25 | 26 | 27 | ![waterfall_model](https://user-images.githubusercontent.com/94682026/211337231-9ecfb866-fe05-48f1-8562-6604ed8d3f20.jpg) 28 | 29 | 30 | The Waterfall model has a lot of disadvantages. For eg. You can't move to another phase unless and until the previous phase has been completed. Apart from that, It is very difficult here to go back and change something that was not well thought out in the planning. Working software is produced very late in the lifecycle. 31 | 32 | The Waterfall model also leads to delay in the release of the software whereas DevOps is focused on removing each barrier that delays the release process of a software. It is to be noted that Waterfall model is an hypothetical model. There are various other types of model which are used like protoyping model, agile model which are all based on Waterfall model. 33 | 34 | Let's take a look at what is an Agile model. 35 | 36 | In Agile model, the tasks are divided into various iterations such that the entire team focuses on the tasks present in a single iteration. New ideas can be injected in the next iterations. 37 | 38 | 39 | ![agile_model](https://user-images.githubusercontent.com/94682026/211337273-4af19d56-d76e-4730-a77a-d5efeee531e2.jpg) 40 | 41 | 42 | Do you think Agile model is a good fit of developing an software? Well probably No. There are various iterations that are involved here due to which frequent code changes occurs. Hence it can really become messy for the Operations team to deploy the code to servers if the code is being changed frequently. 43 | 44 | This leads to a state of confusion among Development team and Operations team. Let's take a look on how did the term DevOps rise? 45 | 46 | - In SDLC, we've two teams - Development Team & Operations Team. The Development Team focuses upon writing better code for the software whereas Operation Team focuses upon deploying the Tested code onto the servers such that users can start using the application/software. 47 | 48 | - It is an obvious step that code can only be deployed to the servers once the code has been written and tested well. But the problem doesn't end here. Sometimes the Operations team fails to deploy the code on the servers due to several reasons like new bugs introduced while deploying the code, code is not well documented ,etc. Hence Operations team sends the code back to the Development team to make some changes to the code whereas Development team which is already working on some new feature of the code goes through a hard time in order to find what went wrong with the code such that it can't be deployed to the servers. 49 | 50 | Hence all these conflicts among Development Team & Operations Team leads to the delay in the release of Software. Don't forget that DevOps tries to remove all the barriers which leads to delay in the release of software. 51 | 52 | **So who solved this big problem?** 53 | 54 | The answer is DevOps. 55 | 56 | In the next module, we'd look at what exactly is DevOps and how it is solving the main problem of conflict among Development & Operations Team. 57 | 58 | It is recommended to go through the following resources to get a better understanding of the above topic: 59 | 60 | 1. [Blog on SDLC - by Nitish Kumar](https://nitishblog.hashnode.dev/what-is-sdlc) 61 | 2. [What is SDLC - by tutorialspoint](https://www.tutorialspoint.com/sdlc/sdlc_overview.htm) 62 | 3. [What is DevOps - by Tech With Nana](https://youtu.be/0yWAtQ6wYNM) 63 | 64 | *Advice: Watch the video at 1.00X or 1.25X while learning about any concept for the first time. Don't be in hurry!* 65 | -------------------------------------------------------------------------------- /02-Software-Development/images/SDLC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/02-Software-Development/images/SDLC.png -------------------------------------------------------------------------------- /02-Software-Development/images/sdlc_agile_model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/02-Software-Development/images/sdlc_agile_model.jpg -------------------------------------------------------------------------------- /02-Software-Development/images/sdlc_waterfall_model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/02-Software-Development/images/sdlc_waterfall_model.jpg -------------------------------------------------------------------------------- /03-Rise-Of-DevOps/Rise_Of_DevOps.md: -------------------------------------------------------------------------------- 1 | At this stage, you would have got an idea on what was the problem occuring previously, such that there was a delay in the Software release. As previously mentioned, DevOps focuses on reducing each barrier that leads to delay in the new release of a Software. 2 | 3 | *But How? What is DevOps? How it is solving the problem of conflict between Development Team & Operation Team?* 4 | 5 | DevOps is a combination of Cultural Philosophies, Practices and tools combined together. Basically anything that creates the process of releasing the software fast with high quality. **The main part was that Devs and Ops Team should work together more often.** 6 | 7 | In Simple words, DevOps refers to the set of practices which focuses on reducing each barrier that leads to delay in the release of Software by automating the process. The Key part in DevOps is that 'Both Development & Operations Team works together to reduce any type of conflict.' 8 | 9 | ![DevOps!](images/DevOps.png) 10 | 11 | ## Challenges that DevOps tries to solve: 12 | 13 | **1. Lack of communication between Development & Operations Team:** Most of the time, it happens that developers have written the code & sent it to the operations team to deploy it on server. But Operations team fails to do so because of various reasons - Production servers crashed, new bugs being introduced while deploying etc. Hence Operations team send the code back to the Development team to improve it. Hence a delay happens for the next release. 14 | 15 | **2. Conflict of Interest:** Although the end goal of both Development & Operations team is to make the application available to the user yet the conflict of interest happens. Development team mostly focuses on writing quality code and improving, adding new features whereas Operations team mostly focuses on system reliability. 16 | 17 | **3.Security issues:** Although Security team focuses upon security issues yet Operations team also focuses on maintaining the system security. This process also leads to delay in the release process. 18 | 19 | DevOps try to remove all these processes that slows down the release of a software. Hence a new term called as *DevSecOps* is introduced just to remind that Security issues also needs to be automated as well so that the release can happen on time. 20 | 21 | ![DevSecOps!](/03-Rise-Of-DevOps/images/DevSecOps.png) 22 | 23 | **4. Manual work:** There are a lot of manual work that is done which can include manually configuring the server, manually deploying an application and so much more, which again leads to delay in the release process. The manual work that is done might lead to error in the infrastructue which would be difficult to resolve. Apart from that, knowledge sharing is difficult. 24 | 25 | Suppose a person did some manual work. In order to understand the manual work that person has done, he/she has to document it as well which still may not be a confirmed way of understanding how the work has been done. 26 | 27 | *One of the question that bothered me was How did this cultural practices lead to the creation of a new job called as 'DevOps Engineer'?* 28 | 29 | Think of it. 30 | 31 | Here's the answer: 32 | ![Twitter!](images/Twitter.jpeg) 33 | 34 | Who's the father of DevOps? 35 | Patrick Debois 36 | 37 | Let's try to get deep in the term DevOps from the next slide. But for now, Do you have an answer to the following questions now? 38 | 39 | 1. What is DevOps? 40 | 2. What is the problem that DevOps is solving? 41 | 42 | Apart from reading this, I'd highly recommend folks to go through [this](https://youtu.be/0yWAtQ6wYNM) amazing video by Tech with Nana. 43 | -------------------------------------------------------------------------------- /03-Rise-Of-DevOps/images/DevOps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/03-Rise-Of-DevOps/images/DevOps.png -------------------------------------------------------------------------------- /03-Rise-Of-DevOps/images/DevSecOps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/03-Rise-Of-DevOps/images/DevSecOps.png -------------------------------------------------------------------------------- /03-Rise-Of-DevOps/images/Twitter.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/03-Rise-Of-DevOps/images/Twitter.jpeg -------------------------------------------------------------------------------- /04-Continuous-Integration/continuous-integration.md: -------------------------------------------------------------------------------- 1 | Continuous Integration(CI) is a DevOps practice that is followed in order to avoid situations like Merge Conflicts and confusion while working in the team. However, CI is not as easy as it sounds like. Let's take a look at what used to happend before the concept of CI was introduced. 2 | 3 | Let's take two developers me and you who are writing some code in production. I'm working under my work environment whereas you're working under your work environment. You're unaware of what changes I'm doing whereas I'm unaware of what changes you make in the code base. Suppose, I modified the line number 6 in a file whereas you deleted the line number 6 in the same file in your environment. According to me, my changes are correct whereas according to you, your changes are correct. 4 | 5 | After the tes-cases are successful, I commit the code and push it to the central repository. Similarly you also do the same. This leads to a problem which is often referred as Merge Conflicts. Let's take the example of VCS such as Git. If you and I make changes on the same line, git will get confused on which changes to actually take. In brief, git will be like "Do you want me to take your changes or Nitish's changes?" In order to solve Merge conflicts, we'll have to manually edit the file with the changes we'd like to presist in the codebase. 6 | 7 | This is only a small scenariou between me and you. In production there large number of files with large number of people working on the codebase and pushing the code everyday. Imagine, getting a large number of such Merge Conflicts like that. Would you like it? No, right? 8 | 9 | Comes into action Continuous Integration(CI) that solves this problem. Whenever a developer pushes the code to the central repository after the Test-Cases have been successfully locally, an automated tool is used such as Jenkins, GitHub Actions which takes in the new code that has been pushed, performs various checks and various types of testing to ensure whether there are any errors or bug found or not. If there are any errors found in the overall codebase, the autmated system sends the message to the developer/team regarding error and to fix it immediately. Sometimes these checks are performed once the code has been merged. Often, the checks are performed at the time when new changes have been pushed. 10 | 11 | This automated system helps to avoid Merge Conflicts as well as delay in the Software release. 12 | 13 | ![CI](/04-Continuous-Integration/images/CI.png/) 14 | 15 | **But we do have code editors that checks the build of our code-base. Then why do we need continuous Integration?** 16 | 17 | Code editors can check syntax and simple errors in your code, but they do not provide a comprehensive evaluation of your code base. Continuous integration goes beyond just syntax and error checking, it includes various activities like automated building, testing, and deployment of code changes. This helps to catch issues early in the development cycle, identify and resolve conflicts between different code changes, and ensure that the code base remains stable and functional. Moreover, CI systems can provide a centralized platform for tracking and monitoring changes in the codebase and testing results, making it easier for teams to collaborate and improve the overall quality of the software. 18 | 19 | If you'd like to see this in practical, I'd highly recommend you to go through some of the PRs in the [Kubernetes](https://github.com/kubernetes/kubernetes/pulls) repository on GitHub. 20 | 21 | Look at the image below displaying the CI checks for one of the PR 22 | 23 | ![Example](images/Example.png) 24 | 25 | The contributor would have pushed the code only after the checks were successful in his/her local environment (via code editor build). However, as soon as the new changes were applied, the code changes were taken in by CI and overall build was run along with number of test cases due to which one of the check fails indicating that this code is not preferred to be mereged. All this information is visible to the developer/contributor who made these changes as well. Hence, the developer can make some changes to resolve the checks. -------------------------------------------------------------------------------- /04-Continuous-Integration/images/CI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/04-Continuous-Integration/images/CI.png -------------------------------------------------------------------------------- /04-Continuous-Integration/images/Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/04-Continuous-Integration/images/Example.png -------------------------------------------------------------------------------- /05-Continuous-Delivery/continuous_integration.md: -------------------------------------------------------------------------------- 1 | Now that you've come to know about what is Continous Integration(CI), learning about Continuous Delivery(CD) and Continuous Deployment(CD) won't be a challenging job. In Software Development, CI-CD goes side by side. 2 | 3 | **Continuous Integration(CI)**: It is a software development practice that involves integrating code changes from multiple developers into a shared repository frequently, typically several times a day. Each time a change is made, it is automatically built, tested, and verified by an automated build system to ensure that it integrates well with the existing codebase. 4 | 5 | **Continuous Delivery(CD)**: It is an extension of CI that focuses on automating the entire software delivery process, from code changes to production deployment. CD ensures that code changes are automatically built, tested, and deployed to a production-like environment for final user acceptance testing manually. This process is designed to provide feedback to developers quickly and efficiently, allowing them to make improvements before the software is released to production. 6 | 7 | **Continous Deployment(CD)**: This is almost same as Continuous Delivery. However, there's one additional step that is taken in consideration. In Continuous Delivery(CD), the code changes are deployed to the production manually. However, in Continous Deployment, code changes are deployed to the production in an automated way after the code passes user acceptance testing 8 | 9 | ![CD](/05-Continuous-Delivery/images/CI-CD.png) -------------------------------------------------------------------------------- /05-Continuous-Delivery/images/CI-CD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishfy/DevOps-by-Nitish/656c136b7547d3fb879bd4b6db7bc8de1e5fe760/05-Continuous-Delivery/images/CI-CD.png -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | Hey everyone, the fact that you are here probably shows that you're interested in learning about DevOps - What is DevOps, Why is there a need of DevOps, What is the problem that DevOps is actually trying to solve and much more like that. 2 | 3 | # Before you begin 4 | 5 | It is important to understand how the folders & files are structured here. 6 | 7 | Each folder name contains a number at the end which represents on how to navigate various folders present. 8 | 9 | For eg. The following folder **Virtualization-01** shows that a learner should start with the Virtualization folder as a starting of the learning phase since the number 01 represents the start. 10 | 11 | Anything more? 12 | 13 | Not really, Let's get started with the learning process now. --------------------------------------------------------------------------------