Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions sessions/Tracks/DevOps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# ⚙️ DevOps

This repository contains the materials and resources for the **DevOps track**.

## 📚 Sessions

### Session 1 — Introduction to DevOps

* What is DevOps?
* Problems DevOps solves
* DevOps culture and practices
* DevOps roles and career paths
* Essential DevOps terminology
* DevOps workflow and lifecycle
* Containerization
* GitHub Actions & CI/CD
* Linux & DevOps
* Introduction to Kubernetes

📁 **[Session 1 Folder](./Tracks/DevOps/Session1/)**

---

### Session 2 — Docker Fundamentals

* Virtual Machines vs Containers
* Docker overview
* Docker Images & Containers
* Basic Docker commands
* `docker run`
* Image tags
* Container Management
* Interactive containers
* `docker exec`
* Hands-on practice

📁 **[Session 2 Folder](./Tracks/DevOps/Session2/)**

📝 **[Task](https://gist.github.com/221ee9b7f064f7ed4e4f0c132eec00eb.git)**

---

### Session 3 — Docker Advanced

* Dockerfile
* Building Docker images
* Dockerfile Instructions
* `CMD` vs `ENTRYPOINT`
* Image layers
* Docker Inspect
* Environment variables
* Port & volume mapping
* Docker Networking
* YAML basics
* Docker Compose
* Multi-container applications

📁 **[Session 3 Folder](./Tracks/DevOps/Session3/)**

📝 **[Task](https://gist.github.com/a42442c7d97233d8c0dfea0caba27dd5.git)**

---

### Session 4 — CI/CD & GitHub Actions

* CI/CD concepts
* Continuous Integration
* Continuous Delivery / Deployment
* GitHub Actions
* Workflows, Jobs, Steps & Runners
* Workflow triggers
* YAML workflow
* Environment variables
* Conditional execution
* Job dependencies
* Automated testing and deployment
* NGINX
* Reverse Proxy
* Load Balancing
* NGINX configuration
* Application deployment

📁 **[Session 4 Folder](./Tracks/DevOps/Session4/)**

---

## 🛠️ Technologies

* Linux
* Git & GitHub
* Docker
* Docker Compose
* GitHub Actions
* NGINX

Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions sessions/Tracks/DevOps/Session4/App/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:18-alpine

WORKDIR /usr/src/app

COPY package*.json ./
RUN npm install --production

COPY . .

EXPOSE 3000
CMD [ "npm", "start" ]
12 changes: 12 additions & 0 deletions sessions/Tracks/DevOps/Session4/App/backend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "demo-backend",
"version": "1.0.0",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.18.2",
"cors": "^2.8.5"
}
}
22 changes: 22 additions & 0 deletions sessions/Tracks/DevOps/Session4/App/backend/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const express = require('express');
const cors = require('cors');

const app = express();
const PORT = process.env.PORT || 3000;

app.use(cors());
app.use(express.json());

app.post('/api/greet', (req, res) => {
const name = req.body.name;
if (!name) {
return res.status(400).json({ error: 'Name is required' });
}

const greeting = `Hello, ${name}! Welcome to our CI/CD Demo.`;
res.json({ message: greeting });
});

app.listen(PORT, () => {
console.log(`Backend server running on port ${PORT}`);
});
20 changes: 20 additions & 0 deletions sessions/Tracks/DevOps/Session4/App/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
services:
backend:
build: ./backend
expose:
- "3000"

frontend:
build: ./frontend
expose:
- "80"

nginx:
image: nginx:alpine
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "8080:80"
depends_on:
- frontend
- backend
7 changes: 7 additions & 0 deletions sessions/Tracks/DevOps/Session4/App/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM nginx:alpine

# Copy static frontend files to Nginx default html directory
COPY index.html /usr/share/nginx/html/

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
95 changes: 95 additions & 0 deletions sessions/Tracks/DevOps/Session4/App/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CI/CD Demo App</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #f6f8fa;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
background-color: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
text-align: center;
max-width: 400px;
width: 100%;
}
h1 { color: #24292f; margin-top: 0; }
input {
width: 100%;
padding: 10px;
margin-top: 15px;
border: 1px solid #d0d7de;
border-radius: 6px;
box-sizing: border-box;
font-size: 16px;
}
button {
width: 100%;
padding: 10px;
margin-top: 15px;
background-color: #2da44e;
color: white;
border: none;
border-radius: 6px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
}
button:hover { background-color: #2c974b; }
#result {
margin-top: 20px;
font-size: 18px;
color: #0969da;
font-weight: 600;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome!</h1>
<p>Enter your name below to call the backend API.</p>
<input type="text" id="nameInput" placeholder="Your Name" />
<button onclick="greet()">Submit</button>
<div id="result"></div>
</div>

<script>
async function greet() {
const name = document.getElementById('nameInput').value;
const resultDiv = document.getElementById('result');

if (!name) {
resultDiv.textContent = "Please enter a name!";
resultDiv.style.color = "red";
return;
}

try {
// The edge Nginx proxy will route this to the backend container
const response = await fetch('/api/greet', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: name })
});

const data = await response.json();
resultDiv.textContent = data.message;
resultDiv.style.color = "#0969da";
} catch (error) {
resultDiv.textContent = "Error connecting to backend API!";
resultDiv.style.color = "red";
}
}
</script>
</body>
</html>
12 changes: 12 additions & 0 deletions sessions/Tracks/DevOps/Session4/App/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
server {
listen 80 default_server;
server_name localhost;

location / {
proxy_pass http://frontend:80;
}

location /api/ {
proxy_pass http://backend:3000;
}
}
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading