Cloud Deployment

"With the cloud, individuals and small businesses can snap their fingers and instantly set up enterprise-class services." -- Roy Stephan

Lesson 1: Types of Cloud Services

There are three main types of cloud services:

  • Infrastructure-as-a-Service (IaaS)
    Examples: Amazon EC2 instance, Google Compute Engine, Digital Ocean
  • Platform-as-a-Service (PaaS)
    Examples: AWS Elastic Beanstalk, Heroku, PythonAnywhere
  • Software-as-a-Service (SaaS)
    Examples: Google Docs, Travis, Slack, GitHub

The key difference between IaaS, PaaS, and SaaS is how many responsibilities the cloud provider takes on, versus how many the customer is responsible for. Here is a nice diagram illustrating the differences (in SaaS, the provider takes over the whole stack!):

(Diagram courtesy of John Ronfrano, IBM.)
Lesson 2: Why the Cloud?

Cloud services generally provide:

  • On demand self-service
    You don't have to wait for IT to get you a new server "real soon."
  • Ubiquituous network access
    Not just from inside the corporate firewall.
  • Location transparent resource pooling
    You know where your servers live.
  • Rapid elasticity
    You can scale your service up or down in a matter of seconds.
  • Consumption-based pricing
    You can save money by scaling back when need is low, but scale up (and pay more) when you need the computing power.
The Microsoft Azure Cloud:
(The above material was largely drawn from this video.)
Lesson 3: Heroku

Heroku provides "platform-as-a-service" (PaaS). A PaaS provides not just a virtual machine, but the full infrastructure typically needed to run a modern web app, such as a database, a load balancer, a data cache, and connections to other popular platforms.

Introduction to Heroku
Deploying a Flask app to Heroku
Lesson 4: Kubernetes and Docker

Docker is useful for containerizing an application and deploying it to the cloud. But, as noted in the section above, a modern web app typically consists of a fair number of independent services. With a microservice architecture, even the basic business logic may be split among several servers. What if we want to deploy these different services in multiple containers? How do we make sure we have the right number of each? How do we make sure some vital service hasn't gone down?

The most common answer today is Kubernetes. Kubernetes acts as an orchestrator of a number of inter-related Docker containers. (The name is from the Greek word for "captain.") The basic unit in Kubernetes is called a pod: a number of Docker containers co-located on a server. Some number of pods can provide a service (such as search or payment authorization), so that the load can be balanced among the pods, and if one pod goes down, the service can just use the other pods. An organized group of pods is called a cluster.

Kubernetes in Nine Minutes
Containers, pods, and services in a Kubernetes cluster.

From IBM: Kubernetes and Docker: It's not "either/or".

Lesson 5: Cloud Providers

Major cloud providers include:

  • Amazon Web Services
    The most complete cloud environment.
  • Google Cloud Platform
    A strong focus on AI.
  • Microsoft Azure
    Good on enterprise integration.
  • Digital Ocean
  • IBM Cloud

Some comparisons of cloud providers:

Other Readings
Quiz

    Our main cloud platform, PythonAnywhere, is an example of...?

    1. IaaS
    2. PaaS
    3. SaaS
    4. GaaS

    According to our Microsoft cloud consultant, "location-transparent resource pooling" means...?

    1. all of your resources get pooled into one location
    2. you don't need to pay any attention to where your resources are
    3. you know where on the globe your servers are located
    4. none of the above

    An example of SaaS is...?

    1. Microsoft Office 365
    2. Heroku
    3. Linode virtual machines
    4. none of the above

    Which of the following is a cloud service provider?

    1. AWS
    2. Azure
    3. Google Cloud Services
    4. All of the above

    Because the cloud providers but lots of servers and lots of network bandwidth, by signing up with them, we can achieve...?

    1. economies of scale
    2. scalar processing
    3. economies of recovery
    4. economies of fault tolerance

    "PAAS" stands for...?

    1. Please Authenticate All Services
    2. Pull Authorization Activated Soon
    3. Pods Across All Subnets
    4. Platform as a Service

    The main operational difference between the different recovery zones is...?

    1. how far away they are from your data center
    2. what temperature the machines run at
    3. how fast you can recover from the different zones
    4. how much RAM they have

    The cloud feature of not having to wait for IT to get you a new server is called...?

    1. consumption-based pricing
    2. on-demand self-service
    3. ubiquitous network access
    4. zone-based agility

    In Kubernetes, a number of Docker containers co-located on a server is called...?

    1. a plod
    2. a codpiece
    3. a scrod
    4. a pod

    Heroku is a...?

    1. platform-as-a-service
    2. tool for testing software
    3. tool for managing docker containers
    4. all of the above