Hopp til innhold

Cloud services an' virtualization,

Skip to content

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

Cloud Services and Virtualization

Virtualization lets several machines or isolated environments share physical hardware. Cloud services provide resources as a service over the network, usually with self-service capabilities and the ability to scale. You can virtualize hardware you own yourself, and a virtualized environment isn’t automatically a cloud.

Herein ye shall explain what a VM and a container share with the host, an’ distinguish between IaaS, PaaS, an’ SaaS usin’ yer own examples. Ye don’t need t’ buy a cloud service. Use a VM y’all already got access ta, or just use thе examples provided in thе text.

Place in the Curriculum: This level explains virtualization within a production architecture. [[Operating System Level 3 - The Operating System Kernel|The OS Kernel]] explains what guest operating systems have their own version of. [[Production Architecture Level 0 - Operating Systems, VMs, and Containers|The Overview Map]] shows part-whole relationships, technical connections, an’ paths ta practical tasks.

What is virtualization?

Virtualization means runnin’ multiple “virtual” machines on the same physical rig. Instead of havin’ a separate physical server fer da web server, one fer da database, an’ another fer da file server, y’all can run all three as virtual machines on just one machine.

The software that makes this possible is called a hypervisor:

Type Explanation Example
Type 1 (bare-metal) Da virtualization platform gets installed straight onto da server Proxmox VE (KVM), VMware ESXi
Type 2 (hosted) Runs atop a regular operating system VirtualBox, VMware Workstation

Type 1 vs. Type 2

  • Type 1 is what we be usin’ in production and down in the server room. Proxmox runs right on top of the server.
  • Type 2 is what you be usin’ on your own PC for testin’. VirtualBox runs on top of Windows or macOS.

What is a virtual machine (VM)?

A VM is a virtual machine with a virtual CPU, memory, and disk. It runs a guest operating system with its own kernel, while the hypervisor provides access to the physical hardware. Proxmox VE uses Linux and KVM to run VMs; “directly on the server” doesn’t mean the platform lacks an OS kernel.

Benefits of VMs:

  • Isolation - A fault in one guest OS usually doesn’t need to bring down the other VMs. However, they still share the host, storage, and other resources and can be affected by common failures or resource shortages.
  • Flexibility - You can run different operating systems on the same machine (e.g., Ubuntu and Windows Server).
  • Snapshot/backup - You can take a snapshot of a VM and roll it back if something goes wrong.
  • Resource utilization - A physical machine with plenty of RAM and CPU can run many VMs.

What are containers?

A Linux container runs the application in an isolated environment and shares the kernel of the Linux system it’s running on. A VM has its own guest operating system with a separate kernel.

Containers and virtual machines owns the illustrated comparison and also shows how multiple containers can run inside one VM. Use that to explain what shares the kernel, and what happens if you shut down the VM. Docker Level 0 then introduces a concrete tool for application containers.

In practice, we often use both: virtual machines hostin’ up those Docker containers.

Cloud Services

In a public cloud, a provider owns and operates the infrastructure, and y’all order resources over the network. A private cloud is for one business and can be run by that same outfit or by a provider. Self-service, shared resource pools, scaling, and usage measurement are the key traits of the cloud.

Service Models

There are three main models for cloud services:

Model Full Name What You Get What You Manage Yourself Example
IaaS Infrastructure as a Service Virtual machines, networks and storage OS, applications, setup Azure VM, AWS EC2
PaaS Platform as a Service A ready-made platform to run your code on Only the application Azure App Service, Heroku
SaaS Software as a Service Finished applications you use via browser or app Users, access, data and available settings Microsoft 365, Google Docs

A simple way to remember it

  • IaaS = You’re rentin’ an empty machine. You gotta install and set up everythin’ yerself.
  • PaaS = You’re rentin’ a ready-made setup. All ya gotta do is plug in yer code.
  • SaaS = You’re rentin’ a finished app. All ya gotta do is log in and get to work.

Delivery Models

Cloud services can be delivered in different ways:

Model Description Example
Public cloud Shared infrastructure available to everyone Azure, AWS, Google Cloud
Private cloud Cloud environment for a single business An internal environment with self-service, resource sharing, and scaling
Hybrid cloud Combination of public and private Some services locally, some on 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 if you had your own server.

Typical use cases:

  • Running a web server
  • Setting up a VPN service
  • Hosting an application (e.g., Flask + database)
  • Testing things without risking your own hardware

Examples of providers offering virtual servers:

  • Akamai (Linode)
  • DigitalOcean
  • Hetzner
  • Microsoft Azure

Cloud Costs

Check prices and set up cost alerts before you order resources. A stopped VM can still rack up costs fer things like storage an’ reserved addresses. Look into what yer provider’s chargin’ fer, an’ delete any resources y’all ain’t usin’ no more.

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 - Investigate a VM

Use a virtual machine that you already got access to. If you run Proxmox, check out how to navigate in Proxmox VE where ya read the CPU, RAM, and disk specs. Want to spin up a new VM? Follow along with the installation guide. No need to saddle your own rig with an extra hypervisor just for this job.

  • How much CPU, RAM, and storage is allocated to said VM?
  • What’s shared with other VMs on that physical host?
  • What might happen if several VMs together demand more memory than the host has available? Explain it without messin’ with the resources.

If ya don’t have no VM handy, use the resource suggestions from the installation guide as a hypothetical example. Mark yer answer as a description of that example, not as a completed installation.

Easy Task 2 - Spin up a Docker container

Use that Nginx container from [[Containerbruk Level 1 - Kjor og undersog en container|Ride ‘Em Up and Check ‘Em Out]] if you’ve already run through the drill. If you busted it, build a fresh one just like the container exercise shows. Don’t got Docker? Kick things off with the setup. Tell me which kernel this container is riding on, and compare its startup to bootin’ up a virtual machine. If you ain’t got Docker handy, use them [[Containerisering Level 1 - Containere og virtuelt masikener|containerization diagrams]] to explain the difference without pretendin’ you ran a hands-on test.

Easy Task 3 - Which cloud services are y’all already usin’?

Think about what kind of services you use day to day:

  • Microsoft 365 (Word, Teams, OneDrive) is SaaS
  • GitHub Pages fer hostin’ a website is PaaS
  • A VM on Proxmox shows off virtualization. It ain’t automatically IaaS; it depends on how them resources get offered an’ managed as a service.

Can ya categorize any other services that you’re usin’?

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.

Checkin on yore explaination

Explain out loud or put it down on paper why a VM in Proxmex ain’t automatically a cloud service. Then pick one example of IaaS, PaaS, an’ SaaS, an’ describe what the customer an’ provider are tendin’ to in each case. If yer just rattlin’ off names, use that service model table to spell out how the responsibilities is divided up.

Summary

  • Virtualization lets you run multiple services on the same hardware, whether as VMs or containers
  • Cloud Services provide resources over the network with self-service and scaling among other things
  • IaaS, PaaS, and SaaS describe how much responsibility you have yourself
  • In practice, many use a hybrid solution with both local and cloud-based services
  • The choice between local and cloud is about control, cost, scalability, and privacy

Sources: NIST: definition of cloud services and Proxmox VE: KVM and virtual machines.