Cloud services and virtualization,

Skip to content

This here’s a machine-translated text that might contain errors!

Cloud services and virtualization go hand-in-hand: both are about usin’ data resources without ownin’ all the hardware yerself. But there’s a few important differences.

What in tarnation is Virtualization?

Virtualization means runnin’ a whole mess o’ “virtual” machines on the same physical machine. Instead o’ havin’ a separate physical server for the web server, one for the database, and one for the file server, ya can run all three as virtual machines on a single machine.

The software that makes this possible is called a hypervisor:

Type Explanation Example
Type 1 (bare-metal) Runs directly on the hardware, without a regular OS underneath Proxmox, VMware ESXi
Type 2 (hosted) Runs on top of a regular operating system VirtualBox, VMware Workstation

Type 1 vs. Type 2

  • Type 1 is what we use in production and in the server room. Proxmox runs directly on the server.
  • Type 2 is what you use on your own PC for testing. VirtualBox runs on top of Windows or macOS.

What in tarnation is a Virtual Machine (VM)?

A VM is a whole dang operating system runnin’ inside another one. It’s got its own (virtual) memory, CPU, and disk, but shares the physical hardware with other VMs.

Benefits of VMs:

  • Isolation - Each VM is independent. If one VM goes belly up, it don’t affect the others.
  • Flexibility - You can run different operating systems on the same machine (like Ubuntu and Windows Server).
  • Snapshot/backup - You can take a snapshot of a VM and roll back if somethin’ goes wrong.
  • Resource Utilization - A physical machine with a heap of RAM and CPU can run a whole mess of VMs.

What in tarnation are Containers?

Containers are lighter than VMs, see? They share the operatin’ system kernel with the host machine, but run in isolated environments.

Property VM Container
Size Large (whole OS) Small (just the application and dependencies)
Startup Time Minutes Seconds
Isolation Strong (own OS) Good, but shares OS kernel
Use Case When ya need a whole separate OS Single applications and microservices
Example Proxmox VM, VirtualBox Docker, Podman

Når bruker vi hva?

  • Use a VM when you need a whole operating system, like a Windows Server or a Linux server with full control.
  • Use a container when you just need to run an application, like a web server, a database, or Grafana.

In practice, we often use both: VMs as hosts for Docker containers.

Sky Services

Sky services means somebody else owns and runs the hardware, and you rent what you need over the internet. Instead of buyin’ and maintainin’ a physical server, you pay to use a virtual machine in the cloud.

Service Models

There’s three main models for cloud services:

Model Full Name What ya get What ya manage yerself Example
IaaS Infrastructure as a Service Virtual machines, networkin’, and storage OS, applications, setup Azure VM, AWS EC2
PaaS Platform as a Service A ready-made platform to run yer code on Just the application Azure App Service, Heroku
SaaS Software as a Service Finished applications ya use through yer web browser Nothin’ technical Microsoft 365, Google Docs

A simple way to remember it

  • IaaS = You rent an empty machine. You install and configure everything yourself.
  • PaaS = You rent a ready-made environment. You just need to put in your code.
  • SaaS = You rent a ready-made app. You just need to log in and use it.

Ways o’ Deliverin’

Cloud services can be delivered in a heap o’ different ways:

Model Explanation Example
Public Cloud Shared infrastructure available to everyone Azure, AWS, Google Cloud
Private Cloud Dedicated infrastructure for a business Proxmox in the server room at school
Hybrid Cloud A combination of public and private Some services local, some in Azure

VPS: A Common Cloud Solution

A VPS (Virtual Private Server) is one of the most common IaaS solutions. You rent a virtual machine from a cloud provider and have full control over it, just like you had your own server.

Typical use cases:

  • Runnin’ a web server
  • Settin’ up a VPN service
  • Hostin’ an application (e.g. Flask + database)
  • Testin’ things without riskin’ your own hardware

Popular VPS providers:

Provider Advantages
Linode (Akamai) Simple, good priced, good guides
DigitalOcean User-friendly, good documentation
Hetzner Affordable, European (GDPR-friendly)
Azure Integrated with the Microsoft ecosystem

Costs in the cloud

Cloud services cost money, and it can quickly become expensive if you’re not careful. A VM running 24/7 costs more than one you turn off after use. Always check the prices and set up cost alerts.

Local vs. the Cloud

Many outfits use a mix of local servers and cloud services. Here’s a few things to ponder:

Factor Local (on-premises) Cloud
Control Full control over hardware and data Dependin’ on the provider
Cost Big investment upfront Runnin’ monthly costs
Scalability Limited by physical hardware Can be scaled up and down as needed
Maintenance You gotta fix it all yerself The provider handles the hardware
Privacy You know where the data is Data might be stored in other countries

Easy Task 1 - Run a VM on Yer Own Machine

Download VirtualBox (free) and try installin’ a Linux distribution, like Ubuntu Desktop or Linux Mint.

  • How much RAM and CPU do ya reckon ya oughta give the VM?
  • Do ya notice yer PC gettin’ slower while the VM’s runnin’?
  • What happens if ya try givin’ the VM more RAM than yer machine’s got?

This’ll give ya a good feelin’ for how VMs share the resources of the physical machine.

Easy Task 2 - Start a Container with Docker

If ya got Docker installed (or access to a VM with Docker), give ‘er a whirl and run:

docker run -d -p 8080:80 nginx
# Kjører en nginx-container i bakgrunnen og mapper port 8080 på verten til port 80 i containeren.
# Runs an nginx container in the background and maps port 8080 on the host to port 80 in the container.

Now, mosey on over to http://localhost:8080 in yer browser. You’re runnin’ a web server in a container now! Compare how long that took to settin’ up a whole VM with Nginx.

Easy Task 3 - What Cloud Services Do Ya Already Use?

Give some thought to what services ya use in yer daily life:

  • Microsoft 365 (Word, Teams, OneDrive) is SaaS
  • GitHub Pages for hostin’ a website is PaaS
  • If ya create a VM in Proxmox at school, it’s practically IaaS (just local)

Can ya categorize other services ya use?

Easy Task 4 - Where’s Yer Data, Partner?

Head on over to Microsoft Privacy Dashboard and take a gander at what Microsoft’s keepin’ on ya. Also, check the terms o’ service for a cloud service ya use:

  • Where in the world is that data stored?
  • What happens to yer data if ya delete yer account?
  • Do ya own yer data, or does the provider?

These here questions are mighty important when it comes to GDPR and privacy, ya see.

Summin’ It Up

  • Virtualizin’ lets ya run a whole mess o’ services on the same hardware, either as VMs or containers
  • Cloud services means somebody else owns the hardware, and ya rent what ya need
  • IaaS, PaaS, and SaaS describe how much responsibility falls on yer shoulders
  • In practice, a lot o’ folks use a hybrid setup with both on-premise and cloud-based services
  • Choosin’ between on-premise and the cloud is all about control, cost, scalability, and privacy