DevOps Traning Document

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

DEVOPS TRAINING TIMELINE

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

Total Working Days: 33 (1.5 month)

NOTE: To learn all things deeply, official documentation is the best.

Junaid Ali Udemy credentials:


Email: jonnie36@yahoo.com
Password: Helloworld81@
1. Basic Linux commands
● Introduction to Linux and the command line interface. Overview of basic
commands such as ls, cd, mkdir, and rm.
● More advanced file and directory management commands such as cp, mv,
chmod, and chown.
● Introduction to text editor commands such as nano, vi, emacs, and sed.
● Basic system administration commands such as ps, top, free, df, and du.
● Basic networking commands such as ping, traceroute, nslookup, and netstat.
● Introduction to shell scripting and how to automate tasks.
● Advanced commands like grep, awk, sed, find, and xargs.
● Hands-on practice and review of all commands covered in training.

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

4. Docker Concepts and Implementation

● 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

Concepts of Docker to Cover

● What is an Image & Container & difference between Them?


● Docker basic commands
● Difference between docker run & docker pull
● Different options of docker ps || docker ps -a
● How to bind Host Ports with container Ports
● What is Docker Network
● Connecting Multiple Containers in Docker Network
● Mounting & Unmounting Volumes
○ Helpful link

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

Demo Project for Docker


● Pull Mongo & Mongo-express images from Docker Hub
● Run the Mongo image and run the mongo-express image and configure ports
within the same network
● Connect mongo-express on port 8080 with the host
● Create a YML file to automate the container environment.
● Communicate your node js app with running Mongo DB container
● Complete and build your own docker image and run it locally
● Create a Docker file for the project and build your image and deploy it to Docker
Hub.
5. GitHub Actions (CI / CD)
● What is CI / CD and why is it used in DevOps?
● What are GithubActions and what’s the difference between CI & CD?
● What are events & What are triggers for any action in a Github Repo?

Helpful links:
GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker

6. Jenkins

Jenkins ( Server for Pipelines & CD )


● Resources to Learn Jenkins.
○ Jenkins Tutorial for Beginners
○ Run Jenkins in Docker Container - Jenkins Pipeline Tutorial for Begi…
○ In Urdu:
Jenkins Tutorial For Beginners In Hindi | DevOps For Beginners | De…
○ Official Documentation: Jenkins User Documentation
○ Articles to Go through Jenkins Pipeline Tutorial: Introduction To
Continuous Delivery
○ Getting started with Jenkins (CI/CD) Part 1 | by Tola Ore-Aruwaji
● What is a Jenkins server and how it is used to manage the multi-branch project?
● How to set up Jenkins using docker and how to set up it using the docker run
command?
● What is a Multi-branch pipeline?
● How to Install and remove plugins from a Jenkins Server?
● What are Different Levels of Credentials in a Jenkins Instance?
● What is a Master-Slave Architecture which Jenkins Follows?
● Types of Projects in Jenkins? Their Use cases and when to use which one?
● How to trigger build automatically on a Jenkins Server using WebHooks +
Periodic Trigger Build. ( Explore both )
● How to connect private Github Repo to Jenkins Server and that Jenkins Server is
running inside docker.
● Learn Groovy Syntax for Jenkins Pipeline
Groovy Beginner Tutorial 1 | What is Groovy
● Integrate Jenkins Build Notification to Slack Channel
Integrate with Slack (Get started with Jenkins, #12)

7. Docker Swarm & Kubernetes K8s

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…

Components of K8s which are needed to be understood.

● Pods ( The smallest unit of K8s)


● Nodes ( A single compute instance that can contain multiple pods)
● Services ( Which are used for the communication between pods & Load
balancing between different nodes)
● Configuration Map ( Which is used to provide the external configurations to pods
so we don’t have to rebuild a pod from the container again and again.
● Ingress is used as a firewall or to point custom hostnames to the node's IP
addresses.
● Deployments are used to specify the pods details along with the replicas which
are needed to be implemented; we can take them as blueprints for the pods.
● Secrets are used to manage credentials that cannot be exposed in simple textual
format.
● Volumes are used for data persistence in a Kubernetes cluster.

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)

Resources to learn helm and basics concepts


● What is Helm in Kubernetes? Helm and Helm Charts explained | Kubernet…
● What is HELM and HELM Chart-Hindi/Urdu | Lec-57 | Introduction to Helm |…
● Introduction to Kubernetes Helm Charts – BMC Software | Blogs.

Helm Basic Concepts


○ What is Helm and why is it important as compared to Kubernetes?
○ Helm all basic commands and understand their functionality.
○ Helm template vs --dry-run command, what is manifest in helm, and how
to get that?
○ How to create Helm chart, understand helm chart architecture and all
folders, files functionality
○ What are templates in Helm and how to use it
■ How to use templates things
● range, with
● if/else conditions
● Variables
● | pipeline character
● Functions
○ How to pass custom values to helm chart with values.json and argument
(--values)
○ Read values from child charts (e.g; dependent charts)
○ What are hooks and how to use it
○ What are tests in Helm
○ Pushing chart to Repositories
■ Locally
■ Github pages
■ OCI
○ How to secure charts using pgp keys
○ How to install dependencies charts and use them
○ What are starters?
○ What are plugins?
○ How to validate the values.yaml?
■ helm lint chart_name
○ Difference between Helm 2 and Helm 3
Test Project (K8s AND HELM)
Create docker-compose.yaml of any test app and convert it manually (not with any
tool like kompose) to Kubernetes and then in Helm Chart.
Push the running code to the Github private repository and get approvals on PR
then merge into the main/master

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?

Some important AWS concepts:


NOTE: You are required to have SOME hands-on experience of these services and
knowledge of their features
● AWS Identity and Access Management (IAM): IAM is a web service that helps
you securely control access to AWS resources. It allows you to create and
manage users and groups, and use permissions to allow and deny access to
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.

● Amazon Elastic Container Registry (ECR): ECR is a fully-managed Docker


container registry that makes it easy for developers to store, manage, and deploy
Docker container images.

● Amazon Elastic Container Service (ECS): ECS is a fully-managed container


orchestration service that makes it easy to run and scale containerized
applications. It allows you to launch and stop Docker-enabled applications and to
create and manage a cluster of EC2 instances.
● Amazon Elastic Kubernetes Service (EKS): EKS is a managed Kubernetes
service that makes it easy to deploy, scale, and operate containerized
applications using Kubernetes on AWS. It allows you to run Kubernetes clusters
without needing to stand up or maintain your own Kubernetes control plane.

A Simple task: (Practice for Docker, AWS EC2, Jenkins )

● Connect to your ec2 Instance using ssh and PEM key.


● Install Docker on Amazon Linux 2 OS which is a Centos-based OS.
● Note: YUM package manager is used in Amazon Linux 2.
● After Installing the docker pull the Jenkins latest image from the docker hub.
● Start the Jenkins container either using the docker run or the docker-compose
file.
● Configure Multi-branch pipeline which includes credentials management and
source code building.
● Configure webhooks with GitHub so that every push in any specific branch will
trigger a Jenkins build.

10. Istio for Helm/Kubernetes

Resources to learn istio:


● Istio Service Mesh Explained
● Istio & Service Mesh - simply explained in 15 mins
● What is Istio Service Mesh?

Istio Concepts to learn:


● What is Istio and their architecture ?
● Components of control plane and data plane
● What is sidecar/proxy/envoy ?
● How to enable sidecar/envoy/proxy injection
● What is meant by telemetry
● Features of telemetry in istio
○ Kiali
○ Jaeger
○ Grafana
● Traffic management in istio
○ Canary releases
○ What is Virtual service
○ What is destination rule
● Load balancing
○ Session stickiness and continuous hashing
● Gateways
○ What is an edge proxy?
○ What is ingress-gateway and how to configure it
○ Prefix based routing
○ Subdomain based routing
● Dark release
○ What is meant by Dark Release in istio
○ Header based routing
● What is Fault injection in istio
● What is circuit breaking in istio
○ Cascading failure
○ Outlier detection / circuit breaking
● What is meant by mTLS? Is it enabled ?
○ Strict vs Permissive mTLS
● Customizing and installing istio with istioctl
○ What is istioctl
○ Istio profiles
○ Istio addons
○ Tuning profiles
○ Default vs Demo profile
● Upgrading istio
○ In-place approach
○ Canary approach
○ Live switch-over cluster concept

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

You can try some free tools to practice.


13. Theory Evaluation:

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

You might also like