Hark, cloud services and virtualization,

Skip to content

This doth be a machine-wrought text which may contain errors!

Cloud services and virtualisation do closely hang together: both concern the wielding of data resources without possessing all the hardware oneself. Yet there be some notable differences.

What is Virtualisation?

Virtualisation doth signify the running of divers “virtual” machines upon one and the selfsame physical machine. Rather than possessing a separate physical server for the webserver, one for the database, and yet another for the fileserver, thou mayest run all three as virtual machines upon a single machine.

The software which maketh this possible is called a hypervisor:

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

Type 1 vs. Type 2

  • Type 1 is that which we employ in production and within the server chamber. Proxmox doth run directly upon the server.
  • Type 2 is that which thou dost use upon thine own personal computing device for assaying. VirtualBox doth run atop Windows or macOS.

What is a Virtual Machine (VM)?

A VM is a whole operating system that doth run within another. It hath its own (virtual) memory, CPU, and disk, yet doth share the physical hardware with other VMs.

Benefits of VMs:

  • Isolation - Each VM is independent. Should one VM fail, the others are not affected.
  • Flexibility - Thou canst run diverse operating systems on the same machine (e.g. Ubuntu and Windows Server).
  • Snapshot/backup - Thou canst take a snapshot of a VM and roll back should aught go amiss.
  • Resource Utilization - A physical machine with much RAM and CPU can run many VMs.

What Be Containers?

Containers be lighter of weight than VMs. They do share the kernel of the operating system with the host machine, yet run within sequestered environs.

Property VM Container
Size Large (the whole OS) Small (but the application and dependencies)
Startup Time Minutes Seconds
Isolation Strong (a proper OS of its own) Good, yet shares the OS kernel
Use Case When a wholly separate OS is required Single applications and microservices
Example Proxmox VM, VirtualBox Docker, Podman

Når bruker vi hva?

  • Employ a Virtual Machine when thou dost require a full operating system, perchance a Windows Server or a Linux server with complete dominion.
  • Make use of a container when thou hast need but to run an application, as a web server, a database, or Grafana.

In sooth, we oft employ both: Virtual Machines as hosts for Docker containers.

Cloud Services

Cloud services do signify that another doth own and maintain the hardware, and thou dost hire what needeth over the internet. Rather than to purchase and uphold a physical server, thou payest for the use of a virtual machine within the cloud.

Service Models

There be three principal models for cloud services:

Model Full Name That which thou dost receive That which thou dost govern thyself Example
IaaS Infrastructure as a Service Virtual machines, networks and storage OS, applications, configuration Azure VM, AWS EC2
PaaS Platform as a Service A finished platform whereon to run thy code Only the application Azure App Service, Heroku
SaaS Software as a Service Finished applications which thou dost use via the browser Naught of a technical nature Microsoft 365, Google Docs

En enkel måte å huske det på

  • IaaS = Thou dost hire a bare machine. All must thou install and configure thyself.
  • PaaS = Thou dost hire a ready environment. Thou needest but place within thy code.
  • SaaS = Thou dost hire an app complete. Thou needest but log in and make use of it.

Delivery Models

Cloud services may be delivered in diverse manners:

Model Explanation Example
Public Cloud Shared infrastructure available to all Azure, AWS, Google Cloud
Private Cloud Dedicated infrastructure for a company 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) doth be one of the most common IaaS solutions. Thou dost hire a virtual machine from a cloud provider and hast full control over it, even as if thou hadst thine own server.

Typical uses:

  • To run a web server
  • To set up a VPN service
  • To host an application (e.g. Flask + database)
  • To test things without risking thine 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

Kostnader i skyen

Cloud services do exact a price, and ‘tis a sum that may grow grievous shouldst thou not take heed. A virtual machine that doth run round the clock shall cost thee more than one which thou dost switch off when its labour is done. Ever check the prices, and set up warnings for costs, I pray thee.

Local vs. the Heavens

Many a company doth employ a mingling of local servers and cloud services. Here are some matters to ponder:

Factor Local (on-premises) The Heavens
Control Full command o’er hardware and data Dependent upon the provider
Cost A great investment at the outset Recurring monthly expenses
Scalability Constrained by physical hardware May be scaled up and down as need doth arise
Maintenance Thou must mend all thyself The provider doth manage the hardware
Privacy Thou knowest where the data doth reside The data may be stored in foreign lands

Easy Task the First - Run a VM upon Thine Own Machine

Download VirtualBox (gratis) and assay to install a Linux distribution, for example Ubuntu Desktop or Linux Mint.

  • How much RAM and CPU dost thou choose to grant unto the VM?
  • Dost thou mark that thy PC doth grow slower whilst the VM doth run?
  • What doth befall if thou attempt to grant the VM more RAM than thy machine doth possess?

This giveth a good sense of how VMs do share the resources of the physical machine.

Easy Task the Second – Begin a Vessel with Docker

An’ if thou hast Docker installed (or access unto a Virtual Machine where Docker doth reside), assay to run:

docker run -d -p 8080:80 nginx
# Kjør en nginx-container i bakgrunnen og mapp port 8080 på verten til port 80 i containeren.
# Prithee, run a nginx container in the background and map port 8080 on the host to port 80 within the container.

Visit then http://localhost:8080 within thy browser. Thou dost now run a webserver within a container! Compare how long this did take against the setting up of a whole VM with Nginx.

Easy Task the Third – Which Cloud Services Dost Thou Already Employ?

Ponder upon which services thou dost utilise in thy daily life:

  • Microsoft 365 (Word, Teams, OneDrive) doth be SaaS
  • GitHub Pages for to host a web-page is PaaS
  • Shouldst thou create a VM in Proxmox at school, ‘tis in practice IaaS (albeit locally)

Canst thou categorise other services which thou dost employ?

Easy Task the Fourth - Where Doth Thy Data Reside?

Go unto the Microsoft Privacy Dashboard and behold what Microsoft doth store concerning thee. Examine also the terms of a cloud service which thou dost employ:

  • Where in the world are the data stored?
  • What shall befall the data shouldst thou delete thine account?
  • Dost thou own thy data, or doth the provider so claim?

These questions are most especially vital with regard to GDPR and privacy.

Summary

  • Virtualisation doth permit thee to run divers services upon the selfsame hardware, be it as VMs or containers.
  • Cloud Services do signify that another doth own the hardware, and thou dost hire what thou requirest.
  • IaaS, PaaS and SaaS do describe how much responsibility thou dost bear thyself.
  • In sooth, many do employ a hybrid solution with both local and cloud-based services.
  • The choice ‘twixt local and cloud doth concern control, cost, scalability, and privacy.