Aye, Cloud Services and Virtualization,

Skip to content

Avast ye! This be a machine-translated text, an’ it may contain errors, aye!

Cloud services and virtualization be closely linked, aye: both be about usin’ data resources without ownin’ all the hardware yerself. But there be some important differences, savvy?

What be Virtualization, ye ask?

Virtualization means runnin’ multiple “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, ye can run all three as virtual machines on the very same machine.

The software that makes this possible be called a hypervisor:

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

Type 1 vs. Type 2

  • Type 1 be the way we sail in production and in the server hold. Proxmox runs directly on the vessel.
  • Type 2 be what ye use on yer own PC for testin’. VirtualBox runs atop Windows or macOS.

What be a Virtual Machine (VM)?

A VM be a whole operatin’ system runnin’ inside another. It has its own (virtual) memory, CPU, an’ disk, but shares the physical hardware with other VMs.

Benefits o’ VMs:

  • Isolation - Each VM be independent. If one VM crashes, the others ain’t affected.
  • Flexibility - Ye can run different operatin’ systems on the same machine (e.g. Ubuntu an’ Windows Server).
  • Snapshot/backup - Ye can take a snapshot o’ a VM an’ roll back if somethin’ goes awry.
  • Resource Utilization - A physical machine with plenty o’ RAM an’ CPU can run many VMs.

What Be Containers?

Containers be lighter than VMs, aye. They share the operating 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 ye need a whole separate OS Single applications and microservices
Example Proxmox VM, VirtualBox Docker, Podman

Når bruker vi hva?

  • Use a VM when ye need a full operatin’ system, like a Windows Server or a Linux server with complete control.
  • Use a container when ye only 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 mean that someone else owns and runs the hardware, and ye rent what ye need over the internet. Instead o’ buyin’ and maintainin’ a physical server, ye pay to use a virtual machine in the clouds.

Service Models

There be three main models for cloud services:

Model Full Name What ye get What ye control 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 platform to run yer code on Only the application Azure App Service, Heroku
SaaS Software as a Service Ready-made applications ye use through the browser Nothin’ technical Microsoft 365, Google Docs

A simple way to remember it

  • IaaS = Ye be rentin’ an empty vessel. Ye install and configure all yerself.
  • PaaS = Ye be rentin’ a ready-made port. Ye only need to load yer code.
  • SaaS = Ye be rentin’ a finished galleon. Ye only need to log in and use it.

Delivery Models

Cloud services can be delivered in various ways:

Model Explanation Example
Public cloud Shared infrastructure available to all Azure, AWS, Google Cloud
Private cloud Dedicated infrastructure for an organization Proxmox in the school server room
Hybrid cloud Combination of public and private Some services locally, some in Azure

VPS: A Common Cloud Solution

A VPS (Virtual Private Server) be one o’ the most common IaaS solutions, aye. Ye be rentin’ a virtual machine from a cloud provider an’ have full control o’ it, just as if ye had yer own server.

Typical uses be:

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

Popular VPS providers:

Provider Advantages
Linode (Akamai) Simple, well-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 coin, and it can quickly become expensive if ye don’t watch yer step. A VM runnin’ 24/7 costs more than one ye be turnin’ off after use. Always check the prices and set up alerts for costs.

Local vs. the Heavens

Many a crew uses a mix o’ local servers and cloud services. Here be some factors to weigh anchor on:

Factor Local (on-premises) The Heavens
Control Full command o’ the hardware and treasure Reliant on the provider
Cost A hefty investment at the start Runnin’ monthly costs
Scalability Limited by the physical ship’s hold Can be scaled up and down as needed
Maintenance Ye be fixin’ it all yerself The provider handles the hardware
Privacy Ye know where the treasure be The treasure may be stored in foreign lands

Easy Task 1 - Run a VM on Yer Own Vessel

Download VirtualBox (free as the wind!) and try installin’ a Linux distribution, such as Ubuntu Desktop or Linux Mint.

  • How much RAM and CPU do ye be assignin’ to the VM, aye?
  • Do ye notice yer ship slowin’ down while the VM be runnin’?
  • What happens if ye try to give the VM more RAM than yer vessel possesses?

This’ll give ye a good feelin’ for how VMs share the resources o’ the physical ship.

Easy Task 2 - Start a Container with Docker

If ye have Docker installed (or access to a VM with Docker), try runnin’:

docker run -d -p 8080:80 nginx
# Starter en nginx-container i bakgrunnen og mapper port 8080 på verten til port 80 i containeren.
# Start a nginx container in the background and map port 8080 on the host to port 80 in the container, aye!

Avast, then visit http://localhost:8080 in yer browser, ye scallywag! Ye be runnin’ a webserver in a container now! Compare how long this took to settin’ up a whole VM with Nginx, aye?

Easy Task 3 - Which Cloud Services Do Ye Already Use?

Give some thought to which services ye be usin’ in yer daily life:

  • Microsoft 365 (Word, Teams, OneDrive) be SaaS, aye
  • GitHub Pages for hostin’ a webpage be PaaS
  • If ye be creatin’ a VM in Proxmox at school, ‘tis IaaS in practice (just locally)

Can ye categorize other services ye be usin’?

Easy Task 4 - Where be yer data hid, matey?

Head to the Microsoft Privacy Dashboard and spy what Microsoft be keepin’ on ye. Also, check the terms o’ a cloud service ye be usin’:

  • Where in the world be the data stored, aye?
  • What happens to the data if ye be sendin’ yer account to Davy Jones’ locker?
  • Do ye own yer data, or does the provider, savvy?

These questions be especially important considerin’ GDPR and privacy, arr!

Summary

  • Virtualization allows ye to run multiple services on the same hardware, be it as VMs or containers
  • Cloud services mean someone else owns the hardware, and ye rent what ye need
  • IaaS, PaaS and SaaS describe how much responsibility ye have yerself
  • In practice, many use a hybrid solution with both on-premises and cloud-based services
  • The choice between on-premises and cloud be about control, cost, scalability and privacy