DevOps Traning Document
DevOps Traning Document
DevOps Traning Document
Topics to Cover:
1. Linux Basic Commands - 2 Days
2. Introduction to Cloud - 1 Day
3. DevOps Introduction - 1 Day
4. Docker Including Dockerfile & Docker Compose - 3 Days
5. GitHub Actions - 2 Days
6. Jenkins Basics & Jenkins Deployment on AWS - 3 Days
7. Docker Swarm & Kubernetes - 4 Days
8. Helm Charts - 2 Days
9. AWS - 5 Days
10. Istio - 3 Days
11. Terraform - 4 Days
12. Logging and Monitoring - 2 Days
13. Evaluation - 1 Day
Helpful links:
https://www.hostinger.com/tutorials/linux-commands
https://www.digitalocean.com/community/tutorials/linux-commands
2. Introduction to Cloud
Cloud Distributed Architecture: Cloud Distributed Architecture
3. DevOps Introduction
DevOps is a software development approach that combines software development
(Dev) and IT operations (Ops) to shorten the system development life cycle and
provide continuous delivery with high software quality.
Headings:
● Introduction to DevOps
● Importance of DevOps
● DevOps principles
● DevOps tools
● DevOps practices
● Continuous Integration and Continuous Deployment (CI/CD)
● Benefits of DevOps
● Future of DevOps.
Helpful links:
https://medium.com/taptuit/what-is-devops-fb3d044ef659
● What is Docker?
○ What exactly is Docker?
○ Introduction to Docker
● Docker Playlist to Get Started with:
○ Docker Tutorial for Beginners [FULL COURSE in 3 Hours]
● Anyone who’s comfortable with Urdu can use this Docker Tutorial in Hindi
Dockerfile
1. What is a Docker File? Useful link
2. Dockerfile Command:
a. From [base name]
b. ENV variables
c. RUN to run any Linux command
d. Copy the project content to the virtual directory system
e. CMD to give an entry point to the DOCKER
Docker Compose
3. What is docker-compose?
4. Why is it needed?
5. Configurations in YAML files.
a. Version no
b. Services (contains all images to run)
c. Images details
i. Name of image
ii. Container name optional
iii. Ports Configuration
iv. Restart always
v. env_file
Docker Volumes
● What are docker volumes?
● How do they work with the host machine?
● What are the types of Docker Volumes?
● What is the preferred type of Docker Volumes?
● How are they configured in the docker run command?
● How to add volumes in Docker Compose Files (YML).
Creating a Docker Image
1. Run the docker build command with the tag -t parameter giving the image name
with the version along with the location of the docker file.
2. Upload docker image or push docker image to the ECR instance of AWS
Helpful links:
GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker
6. Jenkins
Docker Swarm
● What is container orchestration and why is it important?
● Overview of Docker Swarm architecture and its key components (managers, workers,
overlay networks, services)
● How to manage and deploy services in Docker Swarm
● Scaling and load balancing services in Docker Swarm
● Security considerations for Docker Swarm, including securing nodes, images, and
networks
● High availability and fault tolerance in Docker Swarm, including the role of managers and
workers in ensuring availability
● Disaster recovery strategies in Docker Swarm, including backing up and restoring
services and nodes
● Comparison of Docker Swarm and Kubernetes, including their key differences in terms
of architecture, features, and use cases
● Advantages and disadvantages of Docker Swarm, including its simplicity and ease of
use
● Advantages and disadvantages of Kubernetes, including its scalability and flexibility
● When to use Docker Swarm vs Kubernetes, based on your organization's needs and
priorities
● Understanding the role of managers and workers in Docker Swarm, and how they work
together to manage services
● Service discovery in Docker Swarm, including how services can discover and
communicate with each other
● Rolling updates and blue-green deployments with Docker Swarm, including how to
update services without downtime
● Monitoring and logging in Docker Swarm, including how to monitor the health and
performance of services and nodes.
Kubernetes
Resources to learn Kubernetes & its basic concepts:
● Kubernetes 101: Pods, Nodes, Containers, and Clusters | by Daniel Sanche |
Google Cloud - Community | Medium
● What are POD, Node, Cluster, Microservices, & Containers?
● Levels of Abstraction which is provisioned by which.
● Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours]
● Kubernetes Services explained | ClusterIP vs NodePort vs LoadBalancer v…
Kubernetes Architecture
We have two main concepts in Kubernetes Architecture.
● Worker Node
● Master Node
Worker Node:
● The worker node is responsible for all the main working with pods and a single
node can have multiple pods.
● Worker Node does the actual work.
● Three (3) processes must be always installed on every node.
● Kubelet is used for the interaction between the pod and the node such as
assigning resources from the node to that particular pod such as CPU & RAM
resources.
● Communication between multiple nodes in a cluster is done via communication
services which will manage requests within a cluster.
● Kube Proxy is used for intelligent request forwarding to manage load over
heading within the cluster.
● Container runtime such as Docker containers in our case.
Master Node:
● The master node is responsible for managing other nodes and performing the
following operations:
● The master node is scheduled creation or replication of other pods.
● It is used for the monitoring of other nodes what is their health and other checks.
● It is also used for rescheduling and re-starting a node in case of any updated
info.
● Master Node completes all managing processes.
There are four main components of the Master Node or Master Process which perform
all different provisioning tasks.
1. API Server
2. Scheduler
3. Controller Manager
4. ETCD
API Server
It is used to interact with the cluster either using any kind of UI or any other client. It’s a
gateway to the cluster and it’s used to get initial requests in the cluster or any other
queries. It also manages authentication into the cluster. Any request for deployment of
the cluster or any nodes is required by the request. It only decides the upcoming
request will be given to which worker node while the actual task is performed by
Kubelet.
Scheduler
The Kubernetes scheduler is a control plane process that assigns Pods to Nodes. The
scheduler determines which Nodes are valid placements for each Pod in the scheduling
queue according to constraints and available resources. The scheduler then ranks each
valid Node and binds the Pod to a suitable Node.
Controller Manager
Controller Manager detects the state change in any of the pods within the cluster. For
example, if a pod dies the controller manager checks the pods and tries to maintain the
state of the cluster by sending a request to the scheduler, and then again the cycle
repeats as the scheduler again checks which nodes have the capacity now to deploy
those pods.
ETCD
It’s a cluster brain and it stores a key-value pair for the cluster state and all other
components of the master processes like controller manager and scheduler work with
ETCD data. For example how the scheduler will know how many resources are left on
which node and all other master processes data like controller manager and API server
also takes data from ETCD and operate accordingly. Although, no application data is
stored in ETCD.
Normally Kubernetes Cluster has more than one Master node and there is distributed
storage between all the master nodes.
Helpful link:
https://www.clickittech.com/devops/kubernetes-architecture-diagram/
K8’s Components
● Deployments – Pods
● Services – Internal & External ( LoadBalancer)
● Ingress Controller
● Config Map
● Secrets
Demo Project:
We are required to make the following:
● 2 Deployments / Pods
● 2 Services ( Internal & External )
● 1 Config Map
● 1 Secret
This project is also explained in the TechWithNana video.
8. Helm Charts (for Templating and Packaging)
9. AWS
Introduction and some basic concepts of AWS
● What is Infrastructure & product as a service IAAS & PAAS?
● AWS is used for what purposes?
● What is VPC
○ Subnets
○ CIDR blocks
○ Regions
○ Availability Zones
● What is an EC2 Instance and how to create a new instance of EC2 with what
configurations?
● How to launch an instance after running & How to connect it via PEM file.
● What are security groups for an EC2 Instance and how to create them?
● What is NACL’s?
● How to edit inbound & outbound security rules and add custom TCP ports for
access remotely.
● What are Instance Types and which to choose under what conditions?
○ Instance types 3 types
■ On-demand
● on the go never returning highest costly
■ Reserve
● Already Lifespan knows
■ Spot instances
● On the go
● 70% less than the on-demand limit defined
● Types of storages in Aws and their use cases, benefits, when to use what?
● What steps do you take if you want to clean up aws resources?
● AWS Security Groups (SG): SGs act as a virtual firewall for your EC2 instances
to control inbound and outbound traffic. You can create rules to allow traffic from
specific IP ranges, ports, and protocols.
● AWS Application Load Balancer (ALB): An ALB is a type of load balancer that
automatically routes incoming web traffic to the optimal resources in your
application. It improves the availability and scalability of your application.
● AWS Auto Scaling Group (ASG): ASGs automatically scale the number of EC2
instances in response to changes in demand for your application. This ensures
that you have the right number of instances available to handle the load on your
application.
● AWS Elastic Compute Cloud (EC2): EC2 is a web service that provides resizable
compute capacity in the cloud. It allows you to launch virtual machines (VMs) and
configure them to your needs.
● Amazon Simple Storage Service (S3): S3 is an object storage service that offers
industry-leading scalability, data availability, security, and performance. It is used
to store and retrieve any amount of data from anywhere on the web.
● Amazon Relational Database Service (RDS): RDS is a web service that makes it
easy to set up, operate, and scale a relational database in the cloud. It supports
multiple database engines, including MySQL, PostgreSQL, and Oracle.
11. Terraform
● Introduction to Terraform, its features, and use cases. Overview of important
concepts such as
○ infrastructure as code
○ declarative syntax
○ state management.
○ History of Terraform, its architecture, and how it works.
● Terraform Important Concepts: This section could cover topics such as
Terraform
○ variables
○ resources
○ data sources
○ provisioners
○ modules
○ outputs
● Hands-on practice creating and managing Terraform resources, such as
○ virtual machines
○ databases
○ networks.
This could include exercises that cover topics such as
○ creating and updating infrastructure, using Terraform modules
○ working with input variables.
● Introduction to Terraform state, lock file and how to manage state files.
● Hands-on practice with
○ terraform init
○ terraform plan
○ terraform apply
○ terraform validate
○ terraform show commands.
This could include a detailed explanation of the state file, how it works and its
importance, and how to use the state file to manage resources in a collaborative
environment.
● Modular approach in Terraform, how to create and use modules for better
organization and reuse of code. This could include an explanation of how to
create, use and share modules, how to use the module registry, how to version
modules, and how to test modules.
● Hands-on practice and review of all concepts covered in the training. This
could include exercises and lab sessions that allow the trainees to apply their
knowledge and skills in a practical way. This could include exercises such as
creating a complete infrastructure using Terraform, deploying a real-world
application using Terraform, and troubleshooting common issues that may arise
during the use of Terraform.
12. Logging and Monitoring
● Logging:
Keeping a record of what's happening in a system or application.
● Metrics:
Measuring how well a system or application is working.
● Alerting:
Notifying someone if something goes wrong.
● Visualization:
Showing data in graphs or charts to make it easier to understand.
● Aggregation:
Combining data from different sources to get a bigger picture.
● Correlation:
Finding out how different things are related to each other.
● Anomaly detection:
Identifying when something unusual is happening.
● Distributed tracing:
Seeing how data moves through different parts of a system.
● Log analysis:
Looking at logs to find out what happened when something went wrong.
● Performance monitoring:
Checking how fast a system or application is working.
● Security monitoring:
Checking for suspicious activity or breaches.
● Incident response:
Fixing problems as quickly as possible.
● Application Performance Monitoring (APM):
Monitoring the performance and availability of applications, including end-user
experience and transaction tracing.
● Real User Monitoring (RUM)
● Dashoboads
Advantages of logging and monitoring:
● Troubleshooting
● Performance Optimization
● Compliance and Auditing
● Cost Reduction
● Proactive Problem Solving
For the project assignment, you are required to clear the DevOps Theory Evaluation.
Contact the Training Coordinator if you don’t know how to have your evaluation
scheduled. Once the Theory Evaluation is clear, the Training team will assign you a Test
Project via Email.
14. Evaluation