29
Cloud I - Introduction

Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud I - Introduction

Page 2: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Chesapeake Node.js User Group (CNUG)

https://www.meetup.com/Chesapeake-Region-nodeJS-Developers-Group

Page 3: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

3

START BUILDING: CALLFORCODE.ORG

Page 4: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Agenda

➢ Cloud Offerings (“Cloud 1.0”)❑ Infrastructure as a Service (IaaS)

❑ Platform as a Service (PaaS)

❑ Software as a Service (SaaS)

➢ Cloud (Linux) Runtime Stack (“Cloud 2.0”)❑ Docker (Containers)

❑ Kubernetes (Container Management)

❑ Helm (Kubernetes Packaging)

❑ Istio (Services Mesh)

➢ Core Cloud Concepts✓ Location Independence

✓ Dynamic Scaling

Page 5: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud Offerings➢ Remote

✓ Facilities

➢ Bare Metal✓ + Network

✓ + Storage

✓ + Compute

➢ IaaS✓ + OS

➢ PaaS✓ + DB & Mgmt

✓ + Middleware

✓ + App Hosting

➢ SaaS✓ + Application

Page 6: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Bare Metal, IaaS, and PaaS Offerings

➢ Remote Computing is NOT new!

❑ First Generation Computing (1950s – 1960s)✓ Timesharing (now called IaaS or PaaS)

❑ Second & Third Generation Computing (1970s – 2000s)✓ Remote Sites (typical Disaster Recovery solution)

✓ Passive PaaS

➢ Global Cloud Market

❑ Market size could reach $100 Billion by 2020

❑ Market Share✓ Amazon (32%), Microsoft (13%), IBM (7%), Google (6%)

✓ IBM Offering is IBM Cloud (fka SoftLayer)

➢ Market evolving towards SaaS model

Page 7: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Hybrid Offerings

➢ Public Cloud

❑ Service Providers✓ Amazon, Microsoft, IBM, Google

✓ Provider provisions and manages Service provided

❑ Services✓ Bare Metal, IaaS, PaaS, SaaS

✓ Increasing number of PaaS, and SaaS options

❑ Provisioning✓ Public (Shared infrastructure)

✓ Dedicated (Isolated & Dedicated infrastructure)

➢ Private Cloud

❑ Run Cloud Software Stack (“2.0”) On-premises✓ IBM Private Cloud (IPC)

Page 8: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud “2.0” Software Stack - Docker

➢ Developed by

Solomon Hykes

➢ Released in 2013

➢ Uses Linux features❑ cgroups

❑ Namespaces

❑ “Union” file system

➢ Union file system

➢ Open Source❑ Open Container

Initiative

❑ Cloud Native

Computing Foundation

Page 9: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Docker Overview (1)

➢ Conceptual Framework❑ Software executes in “Containers”

❑ Containers are based upon native Linux capabilities

❑ A Container is a single isolated & encapsulated thread

✓ Everything necessary to execute (i.e. libraries)

❑ A Container is a run-time instance of an “Image”

✓ Images stored in Docker registries

➢ Containers are managed by a daemon❑ dockerd (Docker container daemon)

❑ containerd (Open Source container daemon)

❑ Container isolated from all other non-kernel processes

❑ Scope of daemon is only server wide

Page 10: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Docker Overview (2)

➢ Virtual Machines versus Containers

❑ Virtual Machines

✓ Implement a “virtual” Operating System

✓ General purpose

✓ Multi-threaded

✓ Shared resources for multiple processes

✓ Slow to start up and shut down

❑ Containers

✓ Implement a “virtual” Thread

✓ Execute a single program

✓ Single-threaded (Single Linux thread)

✓ Resources dedicated to the software image

✓ Extremely fast to start up and shut down

Page 11: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud “2.0” Software Stack - Kubernetes

➢ Developed by Google

➢ Released in 2015

➢ Turned over to the

Cloud Native

Computing

Foundation (CNCF)

➢ ”Clustering for

Containers”

➢ Docker Swarm and

Apache Mesos are

competing products

Page 12: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Kubernetes Overview

➢ Container Orchestration❑ Cluster Management

❑ Container Scheduling

❑ Service Discovery

❑ Dynamic Scaling (Managing Container instances)

❑ Health Maintenance (Health Checking & Repair)

➢ Single Docker instance only spans one server

➢ Kubernetes deploys “Pods” of Containers

❑ Pods contain one or more containers

❑ Pod instances deployed across multiple servers

❑ Number of Pod instances monitored and managed

Page 13: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Kubernetes Architecture

➢ Kubernetes Cluster

defined by Master

node.

➢ Pods distributed

across Worker

nodes.

➢ Client control

interface.

➢ Defined Pods and

Services.

Page 14: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud “2.0” Software Stack - Helm

➢ Developed at Deis

➢ Released in 2015

➢ ”Packaging for

Kubernetes”

➢ Turned over to the

Cloud Native

Computing

Foundation (CNCF)

➢ Initial development

started with a short

Deis hackathon

Page 15: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Helm Overview

➢ Package Manager for Kubernetes

❑ Provides “Helm” Charts✓ A Helm Chart is a zipped directory (chart name = directory)

✓ Package multiple Kubernetes components into one charto Pods

o Services

o Ingress

o Volumes

✓ Separate Manifest data from Environment data

✓ Charts can be stored and versioned in a repository

✓ A “Release” is an instance of a Chart

❑ Simplifies managing deployments✓ Combines multiple Kubernetes actions into a single chart

✓ Creates a single reusable set of deployed objects (manifest)

✓ Isolates Environment settings for simplified deployment

migration (e.g. from Development to Production)

Page 16: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Helm Chart – Directory Structure

➢ Helm Chart Directory ❑ Chart.yaml (Chart metadata; YAML format)

❑ LICENSE (L) - optional

❑ README.md (Text file formatted using Markdown) - optional

❑ templates (Resource manifests; Directory)

o NOTES.txt (Text file)

o _helpers.tpl (Text file)

o configmap.yaml (YAML file)

o deployment.yaml (YAML file)

o pvc.yaml (YAML file)

o secrets.yaml (YAML file)

o svc.yaml (YAML file)

❑ values.yaml (Release Keys and Values; YAML format)

Page 17: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Helm Architecture

Page 18: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Helm Hooks➢ Custom processing during life cycle events.

➢ Hooks are standard manifest YAML files.

➢ Declared as annotations in manifest metadata.annotations:

“helm.sh/hook”: pre-install

“helm.sh/hook-weight”: “-5”

“helm.sh/hook-delete-policy”: hook-succeeded

Page 19: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud “2.0” Software Stack - Istio

➢ Developed by IBM,

Google, & Lyft

➢ Released in 2017

➢ Service Discovery

(“Dynamic DNS”) for

the Cloud

➢ Consolidation of the

Amalgam8 (IBM),

Service Control

(Google), and Envoy

Proxy (Lyft) projects

Page 20: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Istio Overview

➢ The Problem:

❑ How can the location of a Service be determined?

➢ The Answer:

❑ A Service Mesh✓ Envoy Proxies are added as “sidecars” to Docker containers

✓ These sidecars are deployed as part of the Kubernetes Pod

✓ TCP requests routed through the Proxies.

✓ Proxies announce their existence to the “Control Plane”

o This allows them to receive inbound traffic

✓ Proxies route their requests through the “Control Plane”

o This allows them to receive inbound traffic

✓ Control Plane may also enforce Policies (Security, Traffic, etc.)

Page 21: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Istio Architecture

Page 22: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud “2.0” Software Stack – NoSQL DB

➢ Term introduced 2009

➢ Refer to the newest

generation of

databases natively

designed for Cloud

➢ Cloud requirements❑ Horizontal scaling

✓ Dynamic

✓ Massive in scope

➢ Trade-Offs❑ Not transactional (XA)

❑ Lack ACID properties

Page 23: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

NoSQL Database Overview

➢ Many products, many different features

❑ Document Databases✓ Cloudant (logo on right), CouchDB, MongoDB

✓ Store structured data (typically in JSON format)

❑ Key/Value Databases✓ Memcached, Redis

✓ Store individual “Values” referenced by “Keys”

✓ “State of the Art” in the 1960s

❑ CAP Theorem✓ Distributed Databases can only have two of three properties:

o Consistency (Each read retrieves the most current data)

o Availability (Each CRUD request is honored)

o Partition Tolerance (No effect from delay or loss of data)

Page 24: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Cloud “2.0” Software Stack - Microservices

➢ Term defined in 2011

➢ A reaction to the

general

misunderstanding of

SOA principles

➢ No new concepts

(Loose coupling,

High cohesion,

KISS)

➢ Concepts applied to

new environment

(containers).

Page 25: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Microservices Overview

➢ Software designed to run in containers

❑ Designed for dynamic scaling (horizontally)

❑ Designed for dynamic deployment (servers)

➢ Cloud based Languages and Run-times

❑ Cloud Native Computing Foundation (CNCF)

❑ Design Methodologies✓ 12 Factor

✓ Reactive

❑ Programming Languages✓ Liberty (Java)

✓ Node.js (JavaScript)

✓ Go Runtime (Go)

Page 26: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

What’s Really Different in the Cloud? (1)

➢ Software as a Service (SaaS)❑ The world really IS heading in this direction

❑ Major examples:✓ Salesforce

✓ Amazon Web Services (AWS)

❑ IBM Products:✓ All major IBM products will run in multiple cloud environments

✓ IBM Cloud, ICP, AWS, Azure, …

➢ Location Independence❑ Software will be deployed to multiple locations

✓ On-premises across multiple data centers

✓ Across multiple “Cloud” providers

✓ Across multiple Cloud instances

❑ Software will execute on multiple servers

Page 27: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

What’s Really Different in the Cloud? (2)

➢ Scaling❑ Containers are VERY lightweight

✓ A LinuxOne can launch tens of thousands containers/sec

✓ A LinuxOne can support over one million light containers

❑ Containers are quickly created and destroyed✓ Container locations can thus be extremely dynamic

✓ Container start up/shut down times measured microseconds

➢ Entirely New Application Environment❑ Deployed in containers

❑ Developed in new languages and runtimes✓ Go, JavaScript (Node.js), Node-RED

❑ Use new Databases & Filesystems✓ NoSQL

Page 28: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container

Questions?

Page 29: Cloud - 1 - Introduction - WordPress.com · Docker Overview (1) Conceptual Framework Software executes in “Containers” Containers are based upon native Linux capabilities A Container