Cloud& DevOps

From your laptop to the world.

Google Developer Groups On Campus, Faculty of Science Tunis Session 01
Amanullah☁️ Cloud
Amanullah
Class: Cloud Wizard
Coffee
Terminal tabs open
Patience for your questions
Special move: "Nix solves that"
Who's talking

Hi, I'm Amanullah.

  • Studying computer science
  • Building software full time, plus freelance work
  • Tinkering with anything in my spare time
Grab your phone

Join the live quiz

QR code for quiz.egg.tn

quiz.egg.tn

Didn't fill the form?

Get your lab account

QR code for the registration form
  • 1Scan the code and fill the form
  • 2I'll make you a server to log in to
  • 3You'll get your login before the hands‑on
Your turn

Raise your hand if you've…

Flippers up!
1written a program, in any language
2used a terminal (the black window with text)
3shown something you built to a friend on their device
4heard of Docker, AWS or Kubernetes
Today

By the end of today, you'll…

01know what Cloud & DevOps mean, and what these jobs do
02see where Docker, Kubernetes & co. fit
03know this semester's plan and the skills you'll gain
04put your own website on a server
The problem

Gunter built a website. Now what?

localhost:5000Gunter's cool website 🐧
Gunter's laptop
✕
localhost:5000This site can't be reached
Finn's laptop
Getting programs out to users.
That's what this department does. And it's this semester's story.
Before we build

How does the web actually work?

4 ideas. 5 minutes. Then it's your turn.

Wenk wenk!"Let's learn the web."
The web · 1 of 4

Your browser asks. A server answers.

Hello! 👋

Client

your browser

GET / · "send me the home page"
200 OK · "here it is!"
BMO

Server

like BMO: just a computer running a program

Every website you've ever opened works like this.

The web · 2 of 4

Every computer has an address.

10.0.0.42

Private IP

Only works inside this network. Like a room number in a building.

142.250.200.14

Public IP

Reachable from anywhere on the internet. Like a street address.

127.0.0.1

localhost

Always means "this machine". Like saying "me".

That's why your friend couldn't open localhost!
The web · 3 of 4

One computer, many programs. Ports are the doors.

Server 10.0.0.42
22SSH
80web (HTTP)
443secure web (HTTPS)
5000our Flask app
request
IP = which building.
Port = which door.
The web · 4 of 4

Nobody remembers numbers. DNS does.

google.com
→

DNS

the internet's contacts app

→
142.250.200.14

You tap a name, it dials the number. Today we'll type the number directly.

Put it together

Now you can read this:

http://
the languageprotocol
10.0.0.42
which computerIP address
:5000
which doorport
/
which pagepath
Quiz time

In http://10.0.0.42:5000, what is 5000?

AThe page number
BHow many visitors are allowed
CThe port: which program on that computer
DThe year the site was made

The IP picks the computer. The port picks the program on it.

21 answered
Hands-on · 30 minutes

Your turn: put a site online.

1
Connect to your server
ssh <username>@<your-ip>
2
Write a tiny Flask site
nano app.py
3
Run it
python3 app.py
4
Open it in your browser
http://<your-ip>:5000
Step 2 · app.py

Eight lines. That's a website.

from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello world from <your name>'s server!" app.run(host="0.0.0.0", port=5000)
← Put your name here
← The door: port 5000, open to everyone
Result

It works! 🎉

http://10.0.0.42:5000
Hello world from Amanullah's server!

✓ Anyone in this room can open it.

✕ It's a private IP: nobody outside this network can.

✕ It's one page. Real projects need much more.

WENK!
So let's grow it, one problem at a time →
Chapter 1 of 7

People want to sign up.

  • Need

    Save users' data. Serve many visitors at once.

  • Problem

    Flask's test server can't handle real traffic, and the app forgets everything when it restarts.

  • Tool

    A database to remember. nginx at the front door. All set up from the Linux terminal.

    Session 2 · Linux & your first real stack
Linux server
nginx
Flaskyour app
test server only
?
lost on restart
Database
$ apt install nginx postgresql
Quiz · 1 of 7

Why put nginx in front of our Flask app?

AIt makes Python code run faster
BIt handles lots of visitors, then passes requests to Flask
CFlask can't show web pages without it
DIt stores the users' data

nginx is built to face the internet. Flask's built-in server is only for testing.

8 answered
Chapter 2 of 7

It has to stay online 24/7.

  • Need

    Run the site on a machine that never sleeps, somewhere else.

  • Problem

    You can't touch that machine. And typing a password every time is slow and unsafe.

  • Tool

    SSH: control the server from your own terminal, with a key instead of a password.

    Session 3 · Remote servers & SSH
You
Server, far away
Password: ••••••••
Password: ••••••••
Password: ••••••••
…again, and again, and again
you@server:~$
Quiz · 2 of 7

Why log in with an SSH key instead of a password?

AKeys work without an internet connection
BLinux servers don't allow passwords
CKeys make the server run faster
DA key can't be guessed, and you never type it

Your private key stays on your laptop. The server only knows the matching public key.

10 answered
Chapter 3 of 7

Your friends want to help.

  • Need

    Three people working on the same code.

  • Problem

    Who changed what? Which file is the latest? How do we undo the change that broke it?

  • Tool

    Git records every change. GitHub is where the team shares it.

    Session 4 · Git & GitHub
A
B
C
app.py
app_final.py
app_final_v2.py
app_REAL_final.py
Which one is the latest?
main B's new feature
Every change saved · shared on GitHub
Quiz · 3 of 7

A teammate's change broke the site. With Git, you can…

Asee what changed, and go back to the version that worked
Bmake Git fix the bug for you
Cstop teammates from editing the code
Dpublish the site to users

Git keeps a history of every change: who made it, when, and why.

11 answered
Chapter 4 of 7

"It works on my machine…"

  • Need

    Run the same app on a new server.

  • Problem

    The server has a different Python version and different libraries. The app crashes there.

  • Tool

    A container packs the app with everything it needs. It runs the same everywhere.

    Session 5 · Containers & Docker

Your laptop

Python 3.12
app
appPython 3.12libraries
✓ works

New server

Python 3.8
app
appPython 3.12libraries
✕ crashes ✓ works
Same box, same result, on any machine.
Quiz · 4 of 7

What goes inside a container?

AOnly your code
BA whole physical server
CYour code plus everything it needs to run
DYour GitHub account

Code, language version, libraries and settings travel together. Nothing is missing on the other side.

11 answered
Chapter 5 of 7

Every update, the same steps.

  • Need

    Ship new versions every week.

  • Problem

    Testing and building by hand is slow, and someone always forgets a step.

  • Tool

    GitHub Actions runs every step for you, each time you push code.

    Session 6 · GitHub Actions
  • ✓Pull the latest code
  • ✓Run the tests
  • ✓Build the image
  • ✓Publish it
forgot!
By hand. Every. Single. Time.
→ the bug reaches your users
GitHub Actions · on every push
push
test
build
publish
✓ Every step, every time, in about a minute
Quiz · 5 of 7

What's the big win of automating your build?

AYour code gets shorter
BThe same steps run every time, so nobody forgets one
CYou never need to write tests again
DThe site stops needing a server

Automation turns a checklist people forget into steps a machine never skips.

12 answered
Chapter 6 of 7

Your site goes viral.

  • Need

    Handle 100× the visitors, maybe for just one day.

  • Problem

    Buying servers takes weeks, costs a lot, and they sit idle after the rush.

  • Tool

    Rent what you need from a cloud provider and pay for what you use. Or go serverless.

    Session 7 · Cloud & serverless
visitors
100% · site down
λ serverless
AWS · Google Cloud · Azure · …
Quiz · 6 of 7

100× the visitors for one day. With the cloud, you…

Abuy 100 servers and keep them forever
Bask visitors to come back tomorrow
Cmove your laptop closer to the router
Drent extra capacity for that day, then give it back

Pay for what you use. Grow in minutes, shrink when the rush is over.

10 answered
Chapter 7 of 7

Now there are hundreds of containers.

  • Need

    Run lots of containers across many servers.

  • Problem

    One crashes at 3 a.m. Who restarts it? Who decides where new ones go?

  • Tool

    Kubernetes watches every container and fixes problems on its own.

    Session 8 · Kubernetes & what's next
Kubernetes wanted: 16 · running: 16 ✓

server 1

server 2

✕

server 3

3:07 a.m. · crashed
replaced automatically
Quiz · 7 of 7

A container crashes at 3 a.m. What does Kubernetes do?

AStarts a new copy, on its own
BEmails you so you can restart it
CShuts down every server to be safe
DNothing until the morning

You tell Kubernetes what you want running. It keeps making it true.

12 answered
The big picture

Look at what we just built.

You
your laptop
GitHub
shared code
Actions
test · build
Image
a container
The cloud
KubernetesnginxappDB
Users
Sessions 2 & 3
Session 4
Session 6
Session 5
Sessions 7 & 8
One git push → live for everyone.
So, what are they?

This has a name. Two, actually.

Cloud

Renting computers and services over the internet, instead of buying and running your own.

Servers, databases, storage, by the minute.

DevOps

The habits and tools that get code from a developer's laptop to users, quickly and safely, again and again.

Developers + Operations, one team.
Careers

Who does this for a living?

Cloud engineer

Designs and builds systems on AWS, Google Cloud or Azure.

DevOps engineer

Builds the pipelines that test and ship code automatically.

Site reliability engineer

Keeps services fast and online, and brings them back when they break.

Platform engineer

Builds the tools other developers use to ship on their own.

The quest

Your semester, in 8 adventures.

1

Cloud & DevOps introtoday

Explain what these fields are and where each tool fits.

2

Linux & your first stack

Use the terminal. Run a site with a database and nginx.

3

Remote servers & SSH

Connect to a server and log in with keys, no passwords.

4

Git & GitHub

Track your code and build it with a team.

5

Containers & Docker

Package an app so it runs the same everywhere.

6

GitHub Actions

Build your image automatically on every push.

7

Cloud & serverless

Deploy on AWS, Google Cloud, Azure, Vercel or Cloudflare.

8

Kubernetes & what's next

See how big systems run many containers, and where to go next.

Is this for you?

You'll love this if you…

  • ✓like knowing how things work behind the screen
  • ✓enjoy automating boring, repetitive tasks
  • ✓want real people to use what you build
  • ✓like figuring out why something broke
No experience needed. Just curiosity and a laptop.
Next session

Linux & your first real stack.

We'll add a database and nginx to today's site, all from the terminal.

💻 Bring your laptop
⏳ Date: TBA
The results are in

Quiz champions

  1. 🥇May5307
  2. 🥈Ahmed ben hassine4889
  3. 🥉Sarra4706
  4. 4Ghaith4511
  5. 5Miro4467

Questions?

Thank you for coming. See you on the next adventure!

Ice King
Wenk!"Bye bye!"
GDG on Campus · FST · Cloud & DevOps