Introduction to

DevOps

Hello

"DevOps is the combination of cultural philosophies, practices, and tools that increases an organization's ability to deliver applications and services at high velocity"

- Azure

"A compound of development (Dev) and operations (Ops), DevOps is the union of people, process, and technology to continually provide value to customers."

- Azure

DevOps allows evolving and improving products at a faster pace than businesses using traditional software development and infrastructure management processes. This speed allows businesses to serve their customers better and compete effectively.

Agenda

  • 1
    Understanding DevOps - What? Why? How?
  • 2
    DevOps Practices
  • 3
    DevOps Tools and Technologies
  • 4
    Cloud vs On-Premises Infrastructure
  • 5
    Cloud Providers & Services
  • 6
    Infrastructure as Code (IaC)
  • 7
    Terraform Code Examples
  • 8
    Career as a DevOps Engineer
  • 9
    Day in the Life of a DevOps Engineer
  • 10
    Future Trends in DevOps
  • 11
    Hands-on Activity: Build & Deploy with Vercel

The Era Before DevOps

A look into the "destructive downward spiral in IT" described by Gene Kim.

How can we overcome these issues?

Act 01 - Operations Teams

Maintaining large fragile applications with no visibility on whether it's working as expected.

Act 02 - The Product Managers

Making larger, unrealistic commitments to clients/investors without understanding development and operations complexities.

Act 03 - The Developers

Taking shortcuts and putting more fragile code on top of existing ones, leading to the 'It worked on my machine' phenomenon.

Act 04 - Dev and Ops at War

A destructive downward spiral in IT, characterized by blame and inefficiency.

The Three Ways: Core DevOps Principles

These principles are the foundation for a successful DevOps transformation.

The First Way – Flow (Systems Thinking)

Goal:

Improve the flow of work from Development → Operations → Customer.

Focus:

Focus on end-to-end delivery, not silos (Dev vs. Ops). Shorten lead times, increase deployment frequency. Eliminate bottlenecks, reduce handoffs. Use automation (CI/CD pipelines) to improve flow.

Examples:

  • •Automating testing and deployments.
  • •Visualizing work using kanban boards or value stream maps.
  • •Reducing manual tasks in release cycles.
The Second Way – Feedback (Amplify Feedback Loops)

Goal:

Create fast and constant feedback loops to detect and fix issues early.

Focus:

Push feedback left (earlier in the process). Share operational and business feedback with dev teams. Monitor everything (logs, metrics, user behavior).

Examples:

  • •Developers getting immediate alerts on failed deployments.
  • •Adding monitoring and logging early in the development cycle.
  • •Performing peer reviews or automated code quality checks.
The Third Way – Continuous Learning and Experimentation

Goal:

Create a culture of experimentation, risk-taking, and learning.

Focus:

Encourage innovation, small experiments, and learning from failure. Use blameless postmortems and continuous improvement practices. Foster psychological safety so teams feel safe to speak up or fail fast.

Examples:

  • •Holding regular retrospectives.
  • •Running game days or chaos engineering drills.
  • •Encouraging team members to learn new tools or techniques.

Key Areas in DevOps

Core focus areas that drive a successful DevOps culture.

Reduce Organizational Silos

Everyone shares the ownership of production and information is shared among everyone.

Accept Failure as Normal

Promote blameless post-mortems/RCAs and a risk-taking mindset.

Implement Gradual Changes

Frequent, deterministic releases in small, reversible chunks.

Leverage Tooling and Automation

Automate and reduce manual work as much as possible across the SDLC.

Measure Everything

Utilize application and systems monitoring and metrics to gain insights.

DevOps Practices

Key practices that enable the DevOps lifecycle.

The DevOps Workflow Symbol

Visualizing the continuous and automated lifecycle of software development.

DevOps Infinity Loop
Plan

Define requirements, features, and release plans.

Code

Develop and review code with version control.

Build

Compile and package the code into build artifacts.

Test

Run automated tests to ensure quality.

Release

Stage the build for deployment.

Deploy

Push the release into the production environment.

Operate

Manage and maintain the application in production.

Monitor

Collect data and feedback on application performance.

The DevOps Toolkit

A glimpse into the ecosystem of tools that enable DevOps practices.

Jira logo

Jira

Confluence logo

Confluence

Git logo

Git

React logo

React

TypeScript logo

TypeScript

npm logo

npm

Webpack logo

Webpack

Jest logo

Jest

Cypress logo

Cypress

JMeter logo

JMeter

Selenium logo

Selenium

Jenkins logo

Jenkins

GitHub Actions logo

GitHub Actions

Chef logo

Chef

Ansible logo

Ansible

Docker logo

Docker

Kubernetes logo

Kubernetes

Azure logo

Azure

Career as a DevOps Engineer

Key responsibilities and roles of a DevOps Engineer.

CI/CD Management & Automation
Cloud Deployment and Management
Infrastructure Management
Performance Assessment & Monitoring
Writing Specifications and Documentation
Assisting with DevOps Culture Adoption

Day in the Life of a DevOps Engineer

A typical 9-5 workday filled with diverse responsibilities and challenges.

9:00 AM
meeting
30 min
Morning Standup & Coffee

Daily with the team, review yesterday's progress, plan today's priorities

9:30 AM
monitoring
45 min
System Health Check

Review monitoring dashboards, check for overnight alerts, verify all systems are running smoothly

10:15 AM
incident
1 hour
Incident Response

Address any critical alerts, investigate performance issues, coordinate with development teams

11:15 AM
automation
1.5 hours
CI/CD Pipeline Work

Review and optimize build pipelines, fix failed builds, update deployment scripts

12:45 PM
break
45 min
Lunch & Team Collaboration

Lunch break, discuss ongoing projects with colleagues, knowledge sharing

1:30 PM
infrastructure
1 hour
Infrastructure Management

Update infrastructure as code, review security patches, optimize resource allocation

2:30 PM
configuration
45 min
Configuration Management

Update configuration files, manage secrets, ensure compliance with security policies

3:15 PM
cloud
1 hour
Cloud Operations

Monitor cloud costs, optimize resource usage, plan capacity for upcoming releases

4:15 PM
deployment
45 min
Deployment Support

Support production deployments, monitor deployment health, rollback if necessary

5:00 PM
documentation
30 min
End-of-Day Review

Document today's work, update runbooks, plan tomorrow's priorities

Key Takeaways

Multi-disciplinary role requiring technical and soft skills

Constant monitoring and incident response

Balance between reactive and proactive work

Collaboration with development and operations teams

Continuous learning and adaptation to new technologies

Focus on automation and efficiency improvements

🚀 Activity: Build & Deploy a Next.js DevOps App with Vercel

Hands-on experience with modern DevOps practices using CI/CD pipelines

🧠 Objective

In this activity, you'll:

  • •Set up a local development environment for a Next.js project
  • •Run the project locally
  • •Deploy the app to Vercel using:
  • ✅GUI (manual method)
  • ✅GitHub Actions CI/CD workflow (automated method)
  • •Understand the key benefits of CI/CD pipelines
📝 Prerequisites
  • •Node.js and npm installed
  • •Git installed
  • •A GitHub account
  • •A Vercel account (https://vercel.com)
🛠️ Part 1: Run the App Locally
1

Clone the repository:

git clone https://github.com/naasirosman-mhra/devops-compass cd devops-compass
2

Install dependencies:

npm install
3

Run the app locally:

npm run dev
4

Open your browser and go to:

http://localhost:3000

💡 You've probably already done this since you're likely seeing this activity now!

🌐 Part 2: Deploy via Vercel GUI
2

Connect your GitHub account and import this repository.

3

Configure project settings if needed:

  • • Framework: Next.js
  • • Output directory: .next
  • • Leave build command as default
4

Click Deploy and wait for it to complete.

5

Once deployed, you'll get a live site URL like:

https://devops-compass.vercel.app
🔁 Part 3: Deploy Using GitHub Actions CI/CD Workflow

1. Generate a Vercel Token

  • • Go to https://vercel.com/account/tokens
  • • Sign in to your Vercel account if not already logged in
  • • Click "Create Token" button
  • • Give your token a descriptive name (e.g., "GitHub Actions Deploy")
  • • Select the appropriate scope (Full Account or specific projects)
  • • Click "Create" and copy the generated token immediately
  • • Important: Store this token securely - you won't be able to see it again!

2. Add GitHub Secrets

In your GitHub repository:

  • • Go to your GitHub repository
  • • Click on Settings tab
  • • In the left sidebar, click Secrets and variables → Actions
  • • Click New repository secret button
  • • Add the following secret:
Secret NameValue
VERCEL_TOKENYour Vercel token

3. Create the Workflow File

Create a GitHub Actions workflow file:

mkdir -p .github/workflows touch .github/workflows/deploy.yml

4. Push to Main

Push your code to the main branch:

git add . git commit -m "Enable Vercel CI/CD workflow" git push origin main

Then visit your GitHub Actions tab to watch the build and deploy process.

📈 Why Use CI/CD? – Key Advantages

Automation = Speed + Consistency

Eliminates manual steps. Ensures consistent deployment pipelines.

Faster Feedback & Error Detection

Catch errors early with automated builds/tests. Prevent broken deployments.

Preview Deployments

Auto-preview every branch or PR. Share links with stakeholders for early feedback.

Reliable, Frequent Releases

Small commits = lower risk. Quick rollbacks if needed.

Secure and Measurable

Enforce quality gates with tests and linting. Trace who deployed what and when.

🔐 Why Use GitHub Secrets? – Security Best Practices

Secure Credential Storage

Keep sensitive tokens and IDs encrypted and separate from your codebase.

Team Collaboration Safety

Prevent accidental exposure of credentials when sharing code with team members.

Easy Credential Rotation

Update tokens without changing code - just update the secret value.

Audit Trail & Access Control

Track who has access to secrets and when they were last used.

Q & A

Any Questions?

Cloud vs On-Premises

Understanding the trade-offs between cloud and on-premises infrastructure is crucial for making informed decisions about your DevOps strategy.

Cloud Infrastructure

Scalability

Scale up or down instantly based on demand

Cost Efficiency

Pay only for what you use, no upfront hardware costs

Global Reach

Deploy applications closer to users worldwide

Managed Services

Focus on code, not infrastructure management

On-Premises Infrastructure

Full Control

Complete control over hardware and software

Data Sovereignty

Keep sensitive data within your own facilities

Predictable Costs

Fixed costs regardless of usage

Compliance

Meet strict regulatory requirements

When to Choose Cloud vs On-Premises

✅ Choose Cloud When:

  • • You need rapid scaling and flexibility
  • • You want to reduce upfront capital expenses
  • • Your application has variable or unpredictable traffic
  • • You need global distribution
  • • You want to focus on application development
  • • You need managed services (databases, monitoring, etc.)

🏢 Choose On-Premises When:

  • • You have strict data sovereignty requirements
  • • You need complete control over infrastructure
  • • You have predictable, consistent workloads
  • • You must comply with specific regulations
  • • You have existing investments in hardware
  • • You need to minimize latency for local users

Hybrid Approach

Many organizations adopt a hybrid approach, combining the best of both worlds:

Sensitive Data

Keep on-premises

Public Applications

Deploy to cloud

Development/Testing

Use cloud resources

Cloud Providers

Modern DevOps heavily relies on cloud platforms that provide scalable infrastructure, managed services, and global distribution capabilities.

AWS (Amazon Web Services)
Market Leader
Leading cloud platform with comprehensive services

Key Services

EC2
S3
Lambda
RDS
VPC
Microsoft Azure
Enterprise
Enterprise-focused cloud platform with strong integration

Key Services

Virtual Machines
Blob Storage
Functions
SQL Database
Virtual Network
Google Cloud Platform
AI/ML Focus
Innovative cloud services with strong AI/ML capabilities

Key Services

Compute Engine
Cloud Storage
Cloud Functions
Cloud SQL
VPC
DigitalOcean
Developer Friendly
Developer-friendly cloud with simple pricing

Key Services

Droplets
Spaces
Functions
Managed Databases
VPC

Why Cloud Matters for DevOps

  • • Scalability: Automatically scale resources based on demand
  • • Reliability: High availability with built-in redundancy
  • • Cost Efficiency: Pay only for what you use
  • • Global Reach: Deploy applications closer to users worldwide
  • • Managed Services: Focus on code, not infrastructure management

Infrastructure as Code (IaC)

Infrastructure as Code allows you to manage and provision infrastructure through machine-readable definition files, bringing software engineering practices to infrastructure management.

What is Infrastructure as Code?

Code-Based Management

Define infrastructure using code instead of manual configuration

Version Control

Track changes, review, and rollback infrastructure modifications

Reproducibility

Create identical environments across different stages

Automation

Automate infrastructure deployment and updates

Key Benefits

Version Control

Track infrastructure changes in Git

Consistency

Eliminate configuration drift

Automation

Deploy infrastructure automatically

Documentation

Self-documenting infrastructure

Popular IaC Tools

Terraform
Most Popular
Infrastructure as Code tool by HashiCorp

Key Features

Multi-cloud
Declarative
State Management
Modules
AWS CloudFormation
AWS Only
AWS native infrastructure provisioning

Key Features

AWS Native
JSON/YAML
Stacks
Change Sets
Azure ARM Templates
Azure Only
Microsoft Azure resource deployment

Key Features

Azure Native
JSON
Resource Groups
Deployments
Pulumi
Modern
Modern IaC using programming languages

Key Features

TypeScript
Python
Go
Multi-cloud

Traditional vs IaC Approach

❌ Traditional Manual Approach

  • • Manual server configuration
  • • Inconsistent environments
  • • Difficult to track changes
  • • Error-prone deployments
  • • Hard to scale

✅ Infrastructure as Code

  • • Automated provisioning
  • • Consistent environments
  • • Version-controlled changes
  • • Reliable deployments
  • • Easy to scale

Terraform Code Snippets

Real-world Terraform configurations for common infrastructure patterns. These snippets demonstrate best practices for infrastructure as code.

Ready to Learn Terraform?

Get hands-on experience with Terraform through our comprehensive workshop repository. Learn from basic concepts to advanced patterns with real-world examples.

Get Started with Terraform Workshop
main.tf - Simple Azure VM
Basic Terraform configuration for Azure Resource Group and VM
# Configure the Azure Provider
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~>3.0"
    }
  }
}

provider "azurerm" {
  features {}
}

# Create a resource group
resource "azurerm_resource_group" "rg" {
  name     = var.resource_group_name
  location = var.location
}

# Create a virtual machine
resource "azurerm_linux_virtual_machine" "vm" {
  name                = var.vm_name
  resource_group_name = azurerm_resource_group.rg.name
  location            = azurerm_resource_group.rg.location
  size                = var.vm_size
  admin_username      = var.admin_username

  admin_ssh_key {
    username   = var.admin_username
    public_key = file("~/.ssh/id_rsa.pub")
  }

  os_disk {
    caching              = "ReadWrite"
    storage_account_type = "Standard_LRS"
  }

  source_image_reference {
    publisher = "Canonical"
    offer     = "UbuntuServer"
    sku       = "18.04-LTS"
    version   = "latest"
  }
}
variables.tf - Variable Definitions
Variable definitions for the Azure VM configuration
# Variable definitions
variable "resource_group_name" {
  description = "Name of the resource group"
  type        = string
  default     = "my-resource-group"
}

variable "location" {
  description = "Azure region for resources"
  type        = string
  default     = "East US"
}

variable "vm_name" {
  description = "Name of the virtual machine"
  type        = string
  default     = "my-vm"
}

variable "vm_size" {
  description = "Size of the virtual machine"
  type        = string
  default     = "Standard_B1s"
}

variable "admin_username" {
  description = "Admin username for the VM"
  type        = string
  default     = "azureuser"
}
terraform.tfvars - Variable Values
Example values for the variables
# Variable values (terraform.tfvars)
resource_group_name = "my-dev-rg"
location           = "West Europe"
vm_name            = "web-server-01"
vm_size            = "Standard_B2s"
admin_username     = "admin"
outputs.tf - Output Values
Output values to display after deployment
# Output values
output "resource_group_name" {
  description = "Name of the resource group"
  value       = azurerm_resource_group.rg.name
}

output "vm_name" {
  description = "Name of the virtual machine"
  value       = azurerm_linux_virtual_machine.vm.name
}

output "resource_group_location" {
  description = "Location of the resource group"
  value       = azurerm_resource_group.rg.location
}

Terraform Best Practices

State Management

Use remote state storage

Modular Design

Reusable modules

Resource Naming

Consistent naming convention

Environment Separation

Dev, staging, production