A gentle introduction to

Cloud Computing

Wassim Chegham, Sr. Cloud Advocate at Microsoft

NOTICE

This is NOT a Marketing pitch!

This is an introductory conversation to Help you better understand Cloud Computing and Build your roadmap!

Microsoft

Senior Cloud Advocate

Wassim CHEGHAM

Angular Core Team

Node.js Foundation Invited Member

Bazel contributor

Open Source Contributions

Hexa.run

(author)

xLayers.dev

(author)

Compodoc.app

(co-author)

ngx.tools

(author)

Open Source Projects

Cloud Computing

What's

?

Cloud Computing is...

The on-demand availability of computer system resources, without direct active management by the user.

Wikipedia

Private Cloud

Public Cloud

Hybrid Cloud

Many Cloud Deployment Models

Network

Storage

Servers

Virtualization

OS

Middleware

Runtime

Database

Application

Network

Storage

Servers

Virtualization

OS

Middleware

Runtime

Database

Application

Network

Storage

Servers

Virtualization

OS

Middleware

Runtime

Database

Application

Network

Storage

Servers

Virtualization

OS

Middleware

Runtime

Database

Application

On Premise

IAAS

PAAS

SAAS

Cloud Computing Service Models

Network

Storage

Servers

Virtualization

OS

Middleware

Runtime

Database

Application

FAAS

Managed by you

Managed by the Cloud Provider

Functions

Functions

Functions

Functions

Pros. & Cons. of each model

Infrastructure As A Service

Platform As A Service

Software As A Service

Complete control of env. and infra.

Can be expensive

Good for developers.

Platform dependent (versions...)

Easy consumer adoption.

Limited functionalities.

Functions As A Service

Lower costs.

Can be complex.

Concepts

Important

Repeatable Infrastructure

Capture your process into a script or a tool. IaC minimizes risk and increases speed.

aka Infrastructure as code (IaC)

Repeatable Infrastructure

aka Infrastructure as code (IaC)

Automated Deployments: CI/CD

Commit/Push

Build

Unit Tests

Code Quality

Publish

Deploy

Regression Tests

variables:
  npm_config_cache: $(Pipeline.Workspace)/.npm

trigger:
- master

pool:
  vmImage: 'ubuntu-16.04'

strategy:
  matrix:
    node_10_x:
      node_version: 10.x
    node_11_x:
      node_version: 11.x
    node_12_x:
      node_version: 12.x
    node_13_x:
      node_version: 13.x
  maxParallel: 4

steps:
- task: CacheBeta@1
  inputs:
    key: npm | $(Agent.OS) | package-lock.json
    path: $(npm_config_cache)
  displayName: Cache npm

- task: NodeTool@0
  inputs:
    versionSpec: $(node_version)
  displayName: 'Install Node.js'

- script: npm ci
  displayName: 'npm install'

- script: npm run build.library.all
  displayName: 'ci/build-all-libraries'
  env:
    BUILD_ID: $(Build.SourceVersion)

- script: npm run app.build.prod
  displayName: 'ci/build-app'
  env:
    BUILD_ID: $(Build.SourceVersion)

- script: |
    npm i -D jest-junit
    npm run test.ci -- --reporters=default --reporters=jest-junit --maxWorkers=2
  displayName: 'ci/test'

- script: |
    npm i -D jest-junit
    npm run e2e
  displayName: 'ci/e2e'

- script: npm run lint || (echo "Lint errors detected. Please run ''npm lint --fix''" ; exit 1)
  displayName: 'ci/lint'

- task: PublishTestResults@2
  condition: succeededOrFailed()
  inputs:
    testRunner: JUnit
    testResultsFiles: './junit.xml'

Automated Deployments: CI/CD

Automated Deployments

Any tools or technologies that don’t support your efforts in doing this shouldn’t be on your roadmap.

Azure DevOps: Example

Roles and Secrets

Pick technologies and platforms that let you use RBAC:

Role-Based Access Control.

Observability and Alerting

You want metrics that allow you to see how your systems are running.

Ready for Scale

You want to be able to do is absorb the need to scale from where you are to where you might be in a few months.

Lift and Shift

Migrate first. Innovate next.

Lift and Shift: Example

Cloud Native Applications

They are built from the ground up—optimized for cloud scale and performance. They’re based on microservices architectures, use managed services, and take advantage of continuous delivery to achieve reliability and faster time to market.

Decoupled Software

Think about how to decouple the parts of your application - even in a monolith.

Message Queues

One of the best indicators of how resilient and scalable a system will be, in a multi-process system.

Serverless

Let's talk about

Fully managed and highly scalable services are core tenants of any Serverless system.

What's Serverless?

What's Serverless?

Serverless is the high level abstraction for Cloud infrastructure.

Functions As A Service

Event-based architecture model.

The execution can be triggered by any of the managed services (http, timer, queue, etc.)

Azure Functions Triggers

 
 

Azure Functions Bindings

Azure Function Languages

generally available

experimental

** More Runtimes will be supported

Serverless Application: Example

1. Capture image (Angular)

2. Upload the image (Storage)

3. Extract text (Vision API)

4. Translate it (Translate API)

5. Store result (Table)

6. Read the result (Queue)

7. Send SMS (TWILIO)

Containers

Introducing

What’s a container?

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.

What’s a container?

Infrastructure

Infrastructure

Host Operating System

Host Operating System

Hypervisor

Container Engine (Docker)

Guest OS

Guest OS

bins/libs

bins/libs

App 1

App 2

bins/libs

bins/libs

App 1

App 2

Virtual Machines

Containers

Why containers?

Dockerfiles are recipes

Docker uses Dockerfiles to specify a series of commands that are run consecutively to create a container.

Dockerfiles are recipes

# /path/to/Dockerfile

FROM nginx:latest

COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY dist/html /usr/share/nginx/html

Dockerfiles are recipes

FROM circleci/node:10.9.0-browsers

USER root

###
# Bazel install
# See https://bazel.build/versions/master/docs/install-ubuntu.html#using-bazel-custom-apt-repository-recommended
# Note, only the latest release is available, see https://github.com/bazelbuild/bazel/issues/4947
RUN BAZEL_VERSION="0.18.0" \
 && wget -q -O - https://bazel.build/bazel-release.pub.gpg | apt-key add - \
 && echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" > /etc/apt/sources.list.d/bazel.list \
 && apt-get update \
 && apt-get install -y bazel=$BAZEL_VERSION \
 && rm -rf /var/lib/apt/lists/*

###
# Brotli compression
# Not available on backports so we have to pull from Debian 9
# See https://packages.debian.org/search?keywords=brotli
RUN echo "deb http://deb.debian.org/debian stretch main contrib" > /etc/apt/sources.list.d/stretch.list \
 && apt-get update \
 && apt-get install -y --no-install-recommends brotli/stretch

###
# Buildifier
# TODO(alexeagle): remove this when all users use their locally built buildifier
# BUILD file formatter
# 'bazel clean --expunge' conserves size of the image
RUN git clone https://github.com/bazelbuild/buildtools.git \
 && (cd buildtools \
  && bazel build //buildifier \
  && cp bazel-bin/buildifier/linux_amd64_stripped/buildifier /usr/local/bin/ \
  && bazel clean --expunge \
  ) && rm -rf buildtools

###
# Skylint
# TODO(alexeagle): remove this when all users use their locally built skylint
# .bzl file linter
# Follows readme at https://github.com/bazelbuild/bazel/blob/master/site/docs/skylark/skylint.md#building-the-linter
# 'bazel clean --expunge' conserves size of the image
RUN git clone https://github.com/bazelbuild/bazel.git \
 && (cd bazel \
  && bazel build //src/tools/skylark/java/com/google/devtools/skylark/skylint:Skylint_deploy.jar \
  && cp bazel-bin/src/tools/skylark/java/com/google/devtools/skylark/skylint/Skylint_deploy.jar /usr/local/bin \
  && bazel clean --expunge \
  ) && rm -rf bazel

USER circleci

###
# Fix up npm global installation
# See https://docs.npmjs.com/getting-started/fixing-npm-permissions
RUN mkdir ~/.npm-global \
 && npm config set prefix '~/.npm-global' \
 && echo "export PATH=~/.npm-global/bin:$PATH" >> ~/.profile

###
# This version of ChromeDriver works with the Chrome version included
# in the circleci/*-browsers base image above.
# This variable is intended to be used by passing it as an argument to
# "postinstall": "webdriver-manager update ..."
ENV CHROMEDRIVER_VERSION_ARG "--versions.chrome 2.41"

Dockerfiles are recipes

$ docker build -t container-name/image-name:latest .

Dockerfiles are recipes

Build

Run

A Container Image

You should reuse the same image for multiple environments for consistency.

Externalise any environment-specific configuration in environment variables or external services.

Container Registries

Use Docker’s public registry, or Azure Container Registry (ACR) to publish your containers.

Production

Containers in

Containers as a Service

Azure Container Instances (ACI) allow you to run a single container on-demand in seconds. Billing is PER SECOND!

Azure Container Instances

Simple. Repeatable. Isolated. Automatable.

Azure Batch

Run your large-scale parallel workflows with ease. Not just ETL!

Azure Batch

Financial risk modeling using Monte Carlo simulations

VFX and 3D image rendering

Image analysis and processing

Media transcoding

Genetic sequence analysis

Optical character recognition (OCR)

Data ingestion, processing, and ETL operations

Software test execution

Kubernetes

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

Azure Kubernetes Service (AKS)

Kubernetes

https://medium.com/google-cloud/modern-frontend-ci-cd-architecture-the-missing-guide-part-1-8444001fadc

Distributed Data Stores

Decentralized, globally distributed, multi-model database service. 

Turn

Your

You want to spend most of your time solving your specific business problem. Your idea.

You

Thank 

Links

A gentle introduction to Cloud Computing with Microsoft Azure

By Wassim Chegham

A gentle introduction to Cloud Computing with Microsoft Azure

A gentle introduction to Cloud Computing with Microsoft Azure

  • 2,397