DevOps is a combination of two terms- first is the software development and the second is operation. It reduces the gap between the software developers, quality assurance engineers & system administration which brings harmony in work and faster the production in an automated way. DevOps helps organisation to serve their customer in a better way and maintain its position in an ever changing market environment.
DevOps is the best when you want quality and speed for quick development and deployment of application. It help organisations to change their strategy according to change in the market, business growth, escalates profits by decreasing transportations cost, improves customer experience and satisfaction.
In this DevOps course by Uplatz, you will be able to learn the basics and Introduction to Installation of DevOps Tools on cloud, Software Development Life Cycle, What is DevOps, DevOps Tools, SVN, Git Lifecycle, and Introduction to Docker, What are Docker Volumes, Need of Configuration Management and much more.
Module 01 - Infrastructure Setup
1.1 EC2 Walkthrough
1.2 Installation of DevOps Tools on cloud
Module 02 - Introduction to DevOps
2.1 What is Software Development
2.2 Software Development Life Cycle
2.3 Traditional Models for SDLC
2.4 Why DevOps?
2.5 What is DevOps?
2.6 DevOps Lifecycle
2.7 DevOps Tools
Module 03 - Software Version Control
3.1 What is Version Control
3.2 Types of Version Control System
3.3 Introduction to SVN
3.4 Introduction to Git
3.5 Git Lifecycle
3.6 Common Git Commands
3.7 Working with Branches in Git
3.8 Merging Branches
3.9 Resolving Merge Conflicts
3.10 Git Workflow
Hands-on Exercise –
1. Git Life cycle Commands
2. Pushing Code to Github
3. Stashing Code in git
4. Creating, Deleting Git Branches
5. Reverting a Push to GitHub
6. Merging branches using git merge
7. Merging branches using git rebase.
8. Resolving merge conflicts using git merge tool
Module 04 - Continuous Deployment: Containerization with Docker
4.1 Introduction to Docker
4.2 Understanding Docker Lifecycle
4.3 Components of Docker Ecosystem
4.4 Common Docker Operations
4.5 Creating a DockerHub Account
4.6 Committing changes in a Container
4.7 Pushing a Container Image to DockerHub
4.8 Creating Custom Docker Images using Dockerfile
Hands-on Exercise –
1. Common Docker Operations
2. Creating a DockerHub Account
3. Committing Changes to a Container
4. Pushing container to DockerHub
5. Creating Local Image Repository
6. Building an Image using Dockerfile
Module 05 - Containerization with Docker: Ecosystem and Networking
5.1 What are Docker Volumes
5.2 Deploying a Multi-Tier Application using Docker Network
5.3 Using Docker Compose to deploy containers
5.4 What is Container Orchestration
5.5 Container Orchestration Tools
5.6 Introduction to Docker Swarm
5.7 >Deploying a 2-Node Cluster using Docker Swarm
Hands-on Exercise –
1. Creating Docker Volumes
2. Using Docker Compose to deploy multiple containers
3. Deploying a Multi Node Cluster using Docker Swarm
4. Deploying a multi-service app on Docker Swarm
Module 06 - Configuration Management using Puppet
6.1 Need of Configuration Management
6.2 Configuration Management Tools
6.3 What is Puppet
6.4 Puppet Architecture
6.5 Setting up Master Slave using Puppet
6.6 Puppet Manifests
6.7 Puppet Modules
6.8 Applying configuration using Puppet
6.9 Puppet File Server
Hands-on Exercise –
1. Setting up Master Slave on AWS
2. Testing Connection of nodes with Puppet
3. Creating a Manifest
4. Deploying Manifest on Node
5. Creating a Module
6. Deploying sample software on nodes using Puppet Modules and Manifests
7. Implementing a File Server Module on Puppet
Module 07 - Configuration Management using Ansible
7.1 What is Ansible?
7.2 Ansible vs Puppet
7.3 Ansible Architecture
7.4 Setting up Master Slave using Ansible
7.5 Ansible Playbook
7.6 Ansible Roles
7.7 Applying configuration using Ansible
Hands-on Exercise –
1. Installing Ansible on AWS
2. Creating a Playbook using YAML
3. Creating an Ansible Role
4. Using Roles in Playbook
Module 08 - Continuous Testing using Selenium
8.1 What is Continuous Testing?
8.2 Introduction to Selenium
8.3 What is Maven?
8.4 Using Maven with Selenium>
8.5 Creating Test Cases with Selenium
8.6 Running Test Cases on Chromium Web Driver
8.7 What is Headless Mode?
Hands-on Exercise –
1. Using Maven to import dependencies in Eclipse
2. Create Sample Test Case for a website using Selenium
3. Implementing a headless test in selenium using Chrome WebDriver
Module 09 - Continuous Integration using Jenkins
9.1 Introduction to Continuous Integration
9.2 Jenkins Master Slave Architecture
9.3 Understanding CI/CD Pipelines
9.4 Creating an end to end automated CI/CD Pipeline
Hands-on Exercise –
1. Creating a Jenkins Master Slave on AWS
2. Installing Plug-ins in Jenkins
3. Creating Jenkins Builds
4. Creating Scheduled Builds
5. Triggering Jobs using Git Web Hooks
6. Using the Pipeline Plugin In Jenkins
Module 10 - Continuous Orchestration using Kubernetes
10.1 Introduction to Kubernetes
10.2 Docker Swarm vs Kubernetes
10.3 Kubernetes Architecture
10.4 Deploying Kubernetes using Kubeadms
10.5 Alternate ways of deploying Kubernetes
10.6 YAML Files
10.7 Creating a Deployment in Kubernetes using YAML
10.8 Services in Kubernetes
10.9 Ingress in Kubernetes
10.10 Case Study – Kubernetes Architecture
Hands-on Exercise –
1. Setting up Kubernetes using kubeadm
2. Installing Kubernetes using kops and GCK
3. Creating a Deployment
4. Creating Services
5. Creating an Ingress
6. Demonstrating the use of Ingress, services and deployments together
Module 11 - Continuous Monitoring using Nagios
11.1 What is Continuous Monitoring
11.2 Introduction to Nagios
11.3 Nagios Architecture
11.4 Monitoring Services in Nagios
11.5 What are NRPE Plugins
11.6 Monitoring System Info using NRPE plugins
Hands-on Exercise –
1. Installing Nagios
2. Monitoring of different servers using Nagios
DevOps Interview Questions
1. What is DevOps?
ANSWER: In the simplest term, DevOps is the grey area between development (Dev) and operations (Ops) teams in a product development process. DevOps is a culture in which communication, integration, and collaboration in the product development cycle are emphasized. Thus, it eliminates the silos between software development and operations teams, allowing them to enable rapid and continuous product deployment.
2. What is continuous integration?
Continuous integration (CI) is the process of automatically integrating code changes from multiple developers into a shared repository. Automated tests are utilized to verify and assert the additional codes generate no conflict with the existing codebase. Ideally, code changes should be merged multiple times a day, at every commit with the help of CI tools.
3. What is continuous delivery?
ANSWER: Continuous delivery, together with continuous integration makes a complete flow for deliverable code packages. In this phase, automated building tools are applied to compile artifacts and have them ready to be delivered to the end user. With that in mind, in a CD environment, new releases are just one click away from being published with fully functional features and minimal human intervention.
4. What is continuous deployment?
ANSWER: Continuous deployment takes continuous delivery to the next level by having new changes in code integrated and delivered automatically into the release branch. More specifically, as soon as the updates passed all stages of the production pipeline, they are deployed directly to the end user without human intervention. Thus, to successfully utilize continuous deployment, the software artifacts must go through rigorously established automated tests and tools before deployed into the production environment.
5. What is continuous testing and its benefits?
ANSWER: Continuous testing is the practice of applying automated tests early, gradually and adequately in the software delivery pipeline. In a typical CI/CD workflow, builds are released in small batches. Therefore, it is impractical to manually perform test cases for each delivery. Automated continuous testing eliminates the manual steps and turn them into automated routines, which reduces human effort. That’s why automated continuous testing is essential for the DevOps culture.
Benefits of continuous testing:
• Ensures the quality and speed of the builds.
• Enables faster software delivery and a continuous feedback mechanism.
• Detect errors as soon as they occur in the system.
• Reduce business risks. Evaluate potential problems before they become real problems.
6. What is version control and its uses?
ANSWER: Version control (or source control) is a respiratory in which all changes in the source code are stored and managed at all times. The version control provides an operating history of code development that allows developers to unwind if they made any mistakes, compare between versions and finalize with the best version of the code. All the code versions must be updated and checked into the version control, making it the single source of truth that is applicable for all environments.
7. What is Git?
ANSWER: Git is a distributed version control system that tracks changes in the code repository. Utilizing GitHub flow, Git revolves around a branch-based workflow that streamlines team collaboration as their projects progress over time.
8. Why does DevOps matter? How does DevOps benefit teams in software delivery?
ANSWER: In today’s digitized world, organizations must reinvent their product deployment systems to be more robust and flexible to keep up with the competition.
This is where the DevOps concept comes into the picture. DevOps plays a crucial part in generating mobility and agility to the entire software development pipeline, from idea to deployment and to the end users. DevOps is the solution to putting together a more streamlined and efficient process of continuously updating and improving products.
9. Explain how DevOps is helpful for developers
ANSWER: In a world without DevOps, the workflow of a developer would start by building up new codes, ship and integrate them, then it’s the operation team’s duty to package and deploy the codes. After that, they will have to wait for feedback. And if things go wrong, they’ll have to go back and do it all over again because of bugs. Along the line is countless manual communication between different teams involved in the project.
Applying DevOps reduces the developer‘s tasks down to building codes only, as the CI/CD practices have consolidated and automated the remaining tasks. Combining the engineering and operation teams helps create better communication and collaboration as processes become more transparent and accessible by all team members.
10. Why has DevOps gained popularity in software delivery recently?
ANSWER: DevOps has gained attention over the last few years primarily due to its ability to streamline the development, testing, and deployment processes for organizational operations and convert them into business values.
Technology is developing at a fast pace. Hence, organizations must adopt a new workflow – the DevOps and Agile approach – to streamline and stimulate their operations and not left behind the others. DevOps’ features are reflected clearly through Facebook and Netflix’s successes with the continuous deployment approach which successfully boosted their growth without disrupting the ongoing operations.
11. What are the benefits of CI/CD?
ANSWER: The combination of CI and CD unifies all code changes into one single repository and runs them through automated tests, thus fully develop the product throughout all phases and have it ready for deployment at all times.
CI/CD enables organizations to roll out product updates as quickly, efficiently, and automatically as their customers expect them to be.
In short, a well-planned and well-executed CI/CD pipeline accelerates the release rate and reliability while mitigating the code changes and defects of your product. This will eventually result in much higher customer satisfaction.
12. What are some benefits of continuous delivery?
ANSWER: By manually release the changes in codes, the team gains complete control of the product. In some cases, a new release of the product would align with a bigger picture: a promotion strategy with clear business purposes.
By automating repetitive and mundane tasks, IT professionals can have more mental capacity to focus on improving the product without worrying about the integration progress.
13. What are some benefits of continuous deployment?
ANSWER: With continuous deployment, developers can fully focus on the product because their final task in the pipeline is reviewing pull requests and merging them to the master branch. This method enables frictionless deployment and shortens the deployment duration by releasing new features and fixes right after they have passed the automated tests.
Customers will be the ones to evaluate the quality of each release. Bug fixes for new releases are easier to handle because now, each release is delivered in small batches.
14. Define a typical DevOps workflow
ANSWER: A typical DevOps workflow can be simplified into 4 stages:
• Version control: This is the stage in which the source code is stored and managed. The version control contains different versions of the code.
• Continuous Integration: In this step, developers start to build components and have them compiled, validated, then tested with code review, unit testing, and integration testing.
• Continuous Delivery: This is the next level of continuous integration, in which the release and testing processes are fully automated. CD ensures new releases are delivered quickly and sustainably to the end users.
• Continuous Deployment: After the application has successfully passed all testing requirements, it is automatically deployed on the production server for release without any human intervention.
15. What are the core operations of DevOps?
ANSWER: The core operations of DevOps in terms of development and infrastructure are:
• Software development:
o Code building
o Code coverage
o Unit testing
16. What are some precautions that teams need to consider before implementing DevOps?
ANSWER: There are a few misconceptions about DevOps practices that potentially lead to tragic failures when organizations try to apply this new approach:
• DevOps is more than simply applying new tools and/or forming a new “department” and expect it to work. In fact, DevOps is considered a culture in which the development and operation teams go hand in hand following a mutual framework.
• Organizations did not define a clear vision for their DevOps practices. Applying DevOps initiatives is a notable change to both development and operation teams. Therefore, having clear roadmap, goals and expectations of integrating DevOps in your organization will wipe out any confusion and provide clear guidelines from the early days.
• After the DevOps practices have been applied across the organization, the management team needs to establish a continuous learning and improvement culture. Failures and problems in the system should be treated as a valuable medium for teams to learn from mistakes and prevent those mistakes from recurring.
17. What role does the SCM team play in DevOps?
ANSWER: Software Configuration Management (SCM) is the practice of tracking and keeping records of the development environment, including all the changes and adjustments made in the operating system.
In DevOps, SCM is built as codes under the umbrella of Infrastructure as Code practice.
SCM simplifies tasks for developers as they no longer have to manually manage the configuration processes. This process is now constructed in a machine-readable form and is automatically duplicated and standardized.
18. What role does the Quality Assurance (QA) team play in DevOps?
ANSWER: As DevOps practices are becoming a more desired culture in innovative organizations, QA teams’ responsibilities and relevance have shown signs of decline in today’s automated world.
However, this can be considered a myth. The rise of DevOps is not equal to the end of QA roles. It only means that their working environment and required expertise are changing. Therefore, their main focus is to professionally evolve to keep up with this continuously changing trend.
In DevOps, the QA team plays a strategic role in ensuring the stability of continuous delivery practices as well as performing the exploratory testing task that automated and repetitive tests cannot fulfil. Their insights in assessing the test and detecting the most valuable tests still play a crucial role in mitigating bugs in the last steps of releasing.
19. What are some tools used for DevOps? Describe your experience working with any of these tools.
ANSWER: Throughout a typical DevOps lifecycle, there are different tools to support different phases of product development. Therefore, the most common tools for DevOps can be divided into 6 key phases:
• Continuous Development: Git, SVN, Mercurial, CVS, Jira
• Continuous Integration: Jenkins, Bamboo, Hudson
• Continuous Delivery: Nexus, Archiva, Tomcat
• Continuous Deployment: Puppet, Chef, Docker
• Continuous Monitoring: Splunk, ELK Stack, Nagios
• Continuous Testing: Selenium, Katalon Studio
20. How you do change management in DevOps practices?
ANSWER: The typical change management approaches need to be appropriately integrated with DevOps’s modern practices. The first step is to centralize changes into a single platform to streamline the change, problem and incident management processes.
Next, businesses should establish high-transparency standards to make sure everyone is on the same page and assure accuracy over internal information and communication.
Stratify the upcoming changes and establish robust policies will help minimize risks and shorten the changing period. Lastly, organizations should apply automation into their process and integrate with their DevOps software.
21. What are some core components of CI/CD?
ANSWER: A stable CI/CD pipeline requires a repository management tool that acts as a version control system; so that developers can keep track of changes in the software build.
In the version control system, developers can also collaborate on a project, compare between versions and undo any mistakes they make, thus mitigate disruption to all team members.
Continuous testing and automated testing are two of the most pivotal keys to successfully establish a seamless CI/CD pipeline. Automated testing must be integrated into all product development phases (including unit, integration, and system testing) to cover all functionalities such as performance, usability, performance, load, stress, and security.
22. What are some common practices of CI/CD?
ANSWER: Here are some best practices for establishing an efficient CI/CD pipeline:
• Develop a DevOps culture
• Implement and utilize continuous integration
• Deploy to every environment the same way
• Fail and restart your pipeline
• Apply version control
• Include the database in the pipeline
• Monitor your continuous delivery pipeline
• Get your CD pipeline flowing
23. When is the best time to implement CI/CD?
ANSWER: The transition to DevOps requires complete reshaping of their software development culture, including the workflow, organizational structure as well as the infrastructure. Therefore, organizations must prepare themselves for such major changes in implementing DevOps.
24. What are some common CI/CD servers?
ANSWER: Visual Studio
Visual Studio supports a fully developed DevOps system with Agile planning, source code control, package management, testing and release automation, and continuous monitoring.
TeamCity is an intelligent CI server that offers framework support and code coverage without any extra plugin install needed and no mods to build scripts.
A self-contained CI server, it supports collaboration between development and operation teams with shared pipeline and error tracking function. It can also be combined with hundreds of dashboard plugins.
GitLab’s users can customize the platform for efficient continuous integration and deployment. GitLab helps CI/CD teams to accelerate in code shipping, errors identify and recovering programs roll out.
Bamboo is a continuous integration server for product release management automation. Bamboo keeps track of all deployments on all tools and communicates errors in real-time.
25. Describe an efficient workflow for continuous integration
ANSWER: A successful workflow when implementing continuous integration encompasses the following practices:
• Implement and maintain a repository for the project’s source code
• Automate the build and integration
• Make the build self-testing
• Commit changes daily to the baseline
• Build all commits added to the baseline
• Keep the builds fast
• Run tests in a clone of the production environment
• Make it easy to get the latest deliverables
• Make build results easy to be monitored by everyone
• Automate deployment
26. What are some key differences between Agile and DevOps?
ANSWER: Basically, DevOps and Agile are complementary to each other. Agile focuses more on the values and principles of developing new software and managing a complex process in a more effective way. Meanwhile, DevOps is all about enhancing the communication, integration, and collaboration between different teams, which comprises of the developer and operation teams.
It takes both Agile and DevOps methods to form a product development life cycle that works seamlessly: Agile principles help shape and steer the development toward the right path and DevOps utilizes the tools to make sure the product is fully delivered to the customers.
27. What are some differences between continuous integration, continuous delivery, and continuous deployment?
ANSWER: Continuous integration (CI) is a practice in which code versions are continuously integrated into a shared repository. This practice ensures that new codes are automatedly tested and that errors are quickly detected and fixed.
Continuous delivery takes CI one step further by ensuring that after integration, the code base is ready to be released any time, within just a push of a button. Therefore, CI can be considered a prerequisite for continuous delivery, the other essential part of the CI/CD pipeline.
As for continuous deployment, no manual step is required. Once the codes have passed the tests, they are automatically pushed to the production environment.
All these three components: continuous integration, continuous delivery, and continuous deployment are essential phases of implementing DevOps.
On one hand, continuous delivery is more suitable for applications that are already existed with active users so that things can flow a bit slower and be more tuned. On the other hand, if you plan to release a brand new software and destined the whole process to be fully automated, continuous deployment is a more suitable choice for your product.
28. What are some fundamental differences between continuous delivery and continuous deployment?
ANSWER: Under continuous delivery, the codes in the main branch are always ready to be deployed manually. This practice allows the development team to decide when to release new changes or features to best benefit the organization.
Meanwhile, continuous deployment will have all updates and fixes in the code automatically deployed to the production environment immediately after the testing phase without any human intervention.
29. What are the differences between continuous integration and continuous delivery?
ANSWER: Continuous integration helps ensure that software components work closely together. Integration should be done frequently; preferably on an hourly or daily basis. Continuous integration helps increase the frequency of code commits and reduces the complexity of connecting code from multiple developers. Eventually, this process reduces the chances for non-compatible code and redundant efforts.
Continuous delivery is the next step in the CI/CD pipeline. As the code is integrated into the shared repository continuously, continuously testing that code is made possible. There are no gaps while waiting for code to be completed before testing can occur. This ensures as many bugs are found as possible to then continuously deliver code to production.
30. What are the differences between DevOps and continuous delivery?
ANSWER: DevOps is more of an organizational and cultural approach that promotes collaboration and communication between both the engineering and operation teams.
Meanwhile, continuous delivery is an essential factor that contributes to the success of implementing DevOps into the product development workflow. Continuous delivery practices help to make new releases more dull and reliable, and establish a more seamless and shorter process.
The key purposes of DevOps is to effectively combine the Dev and Ops roles, remove all silos and result in business goals independent to continuous delivery practices.
On the other hand, continuous delivery works best when there is already a DevOps process in place. Thus, it amplifies the collaboration and streamlines the unified product development cycle of the organization.
31. What are the differences between Agile, Lean IT, and DevOps?
ANSWER: Agile is a methodology that focuses solely on the development of software. Agile aims to iterate development, establish continuous delivery, shorten feedback loops, and improve team collaboration throughout the software development life cycle (SDLC).
Lean IT is a methodology that aims to streamline the value stream of the product development cycle. Lean focuses on eliminating unnecessary processes which do not add value and creating a flow to optimize the value streams.
DevOps focuses on both the development and deployment — the Dev and Ops of the product development process. Its goal is to effectively unite the roles between automation tools and IT professionals for a more streamlined and automated process.