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

When do we employ which?

  • Employ a VM when thou hast need of a complete operating system, for instance, a Windows Server or a Linux server, with full dominion.
  • Employ a container when thou merely needest to run an application, such as a webserver, a database, or Grafana.

In practice, we oft employ both: VMs that serve 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

A simple manner to remember it

  • IaaS = Thou dost lease an empty machine. Thou shalt install and configure all things thyself.
  • PaaS = Thou dost lease a ready environment. Thou needest naught but to bestow thy code within.
  • SaaS = Thou dost lease a finished app. Thou needest only to log in and employ it.

Models of Delivery

Cloud services may be delivered in diverse manners:

Model Explanation Example
Public cloud Shared infrastructure, available unto all Azure, AWS, Google Cloud
Private cloud Dedicated infrastructure for a single enterprise Proxmox within the school’s server room
Hybrid cloud A combination of public and private Some services local, 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 demand coin, and it mayeth swiftly become costly shouldst thou not keep watch. A VM that runneth twenty-four hours of every day costeth more than one thou dost extinguish after use. Always assay the prices and set forth alarms for thy costs.

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 1 - Run a VM upon thine own machine

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

  • How much RAM and CPU dost thou choose to bestow upon the VM?
  • Dost thou perceive thy PC becoming more sluggish whilst the VM doth run?
  • What befalleth if thou seekest to grant the VM more RAM than thy machine doth possess?

This doth provide 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 3 - Which cloud services dost thou already employ?

Ponder upon those services thou dost use in thy daily life:

  • Microsoft 365 (Word, Teams, OneDrive) is SaaS
  • GitHub Pages for the hosting of a webpage is PaaS
  • If thou dost create a VM in Proxmox at thy school, ‘tis in practice IaaS (naught but local)

Art thou able to categorize other services thou dost use?

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.