welcome to the openshift container platform...

49
@OpenShift RHOpenShift Welcome to the OpenShift Container Platform Workshop Bob Kozdemba [email protected] Principal Domain Architect April 2017

Upload: others

Post on 27-May-2020

26 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

@OpenShift

RHOpenShift

Welcome to the OpenShift Container Platform Workshop

Bob [email protected] Domain Architect

April 2017

Page 2: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

TODAY’S AGENDA

● Why containers?● Enterprise deployment of containers● OpenShift Overview● Hands-On Workshop

Page 3: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

THE CHALLENGE

Applications ...

● can have different requirements (run-times, databases, etc).

● require testing, installation and integration every time they are changed and deployed.

Page 4: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

COMMON LANGUAGE

I.T. OPERATIONSDEVELOPERS

Page 5: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

WHAT ARE CONTAINERS?It Depends Who You Ask

● A sandboxed application sharing a Linux kernel

● Simpler and lighter than virtual machines

● Extremely Portable

● Near-zero configuration

● Package my application and all of its dependencies

● Deploys in seconds and enables CI/CD

● Makes my dev look like production

INFRASTRUCTURE APPLICATIONS

Page 6: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

CLEAR BOUNDARIES

Hardware

Virtual Machine

Operating System

Container

AppControlled by Developers

Controlled by IT Operations

Page 7: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

SchedulingDecide where to deploy containers

Lifecycle and healthKeep containers running despite failures

DiscoveryFind other containers on the network

MonitoringVisibility into running containers

SecurityControl who can do what

ScalingScale containers up and down

PersistenceSurvive data beyond container lifecycle

AggregationCompose apps from multiple containers

WE NEED MORE THAN JUST CONTAINERS

Page 8: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

8

Introducing

The industry’s most secure and comprehensive enterprise-grade container platform based on open source technologies including Linux, Docker and Kubernetes.

Page 9: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Kubernetes is an open-source system for automating deployment, operations, and scaling of containerized applications across multiple hosts

kubernetes

Page 10: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

OPENSHIFT = KUBERNETES + BUILD/DEPLOYMENT AUTOMATION

Source coderepository

OpenShiftDeveloper Containers

Page 11: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Atomic Host

Container Runtime & Packaging(Docker)

Red Hat Enterprise LinuxTrusted by Fortune Global 500 companies

Begin with a trusted container Operating System

Page 12: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Atomic Host

Container Runtime & Packaging(Docker)

Red Hat Enterprise Linux

Infrastructure Automation & Mg

Networking Storage Registry Logs & Metrics

Security

Container Orchestration & Cluster Management(kubernetes)

CloudformsRed Hat Storage

Add a clustered container infrastructure

Page 13: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Atomic Host

Container Runtime & Packaging(Docker)

Red Hat Enterprise Linux

Infrastructure Automation & Mg

Networking Storage Registry Logs & Metrics

Security

Container Orchestration & Cluster Management(kubernetes)

OpenShift Application Lifecycle Management(CI/CD)

Build Automation Deployment Automation

Service Catalog(Language Runtimes, Middleware, Databases)

Self-Service

Add an Enterprise Container Platform

Source-2-ImageApplication Pipelines

Dev Tools

Page 14: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Atomic Host

Container Runtime & Packaging(Docker)

Red Hat Enterprise Linux

Infrastructure Automation & Mg

Networking Storage Registry Logs & Metrics

Security

Container Orchestration & Cluster Management(kubernetes)

OpenShift Application Lifecycle Management(CI/CD)

Build Automation Deployment Automation

Service Catalog(Language Runtimes, Middleware, Databases)

Self-Service

Container

BusinessAutomation

Container

Integration

Container

Data &Storage

Container

Web &Mobile

JBOSS EAPJBOSS DATA GRID

JBOSS DATA VIRTUALIZATION

JBOSS AM-QJBOSS BRMSJBOSS BPMJBOSS FUSE

RED HAT MOBILERED HAT SSO

3Scale

Applications go on top

Page 15: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

OpenShift Architecture Overview

Page 16: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Masters and Nodes

ExternalUser

Page 17: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

OpenShift runs on your choice of infrastructure

Page 18: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Nodes run Red Hat Enterprise Linux (RHEL)

Page 19: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Images run as containers within pods

Container Image

Container

Pod

Page 20: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Pods are the orchestrated unit in OpenShift

Page 21: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Masters are the Control Plane

Page 22: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

API and Authentication

Page 23: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Desired and Current State

Page 24: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Scheduler Pulls From The Registry

Page 25: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Orchestration and Scheduling

Page 26: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Placement by Policy

Page 27: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Services connect application components

Page 28: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Health and Scaling

Page 29: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

What about unhealthy Pods?

Page 30: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

The Master remediates Pod failures

Page 31: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

What about app data?

Page 32: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Routing layer for external accessibility

Page 33: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Developer access via Web UI, CLI, IDE or API

Page 34: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

OpenShift Source-to-Image

Page 35: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Source 2 Image Walk Through

CodeDevelopers can leverage existing

development tools and then access the OpenShift Web, CLI or IDE

interfaces to create new application services and push source code via

GIT. OpenShift can also accept binary deployments or be fully integrated with a customer’s existing CI/CD environment.

Page 36: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Source 2 Image Walk Through

Container Image

Registry

BuildOpenShift automates the Docker

image build process with Source-to-Image (S2I). S2I

combines source code with a corresponding Builder image from

the integrated Docker registry. Builds can also be triggered

manually or automatically by setting a Git webhook. Add in Build

pipelines

Page 37: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Source 2 Image Walk Through

Container Image

Registry

DeployOpenShift automates the deployment of application

containers across multiple Node hosts via the Kubernetes

scheduler. Users can automatically trigger deployments on application

changes and do rollbacks, configure A/B deployments & other

custom deployment types.

Page 38: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Workshop

Page 39: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Open your browsers at:

http://tinyurl.com/mynb877

Workshop

Page 40: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

40

OpenShift Terminology - DC-Metro Application

dc-metro-map route

dc-metro-map service

dc-metro-map (pod-1)

dc-metro-map (pod-2) DC Metro API

GET

ExternalUser

SDN Layer (10.1.0.0/16)

Service Layer (172.30.0.0/16)

Routing Layer (dcmetro-user1.apps.rhsademo.net)

Page 41: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

41

Deploying a Docker container

service

pod-1

$ oc new-app <my-container>

Image Stream

Image location

Image tags

deployment config

replication controller

Registry

Page 42: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

42

Building and deploying a Docker container

service

pod-1

$ oc new-app ~builder-image:<source-code>

Image Stream

Image location

Image tags

deployment config

replication controller

Registrybuild config

builder podpush

tag

pull builder image

GIT

Page 43: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

43

DC-Metro CI/CD Pipeline Lab

dev stage

“dev” Image Stream

“dev” deploymentuses “latest” image

“test” deployment uses “readyToTest” image

OpenShift

dev:latesttag

deploy-to-test stage

dev:readyToTest

build “dev”

tag

pull pull

deploy then scale

Jenkins

pod pod pod

Page 44: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

Wrapup

Page 45: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

http://openshift.katacoda.com

Page 48: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

https://install.openshift.com/

Page 49: Welcome to the OpenShift Container Platform Workshoppeople.redhat.com/bkozdemb/workshop/OpenShifWorkshopKozApril2017.pdf · Welcome to the OpenShift Container Platform Workshop Bob

THANK YOUplus.google.com/+RedHat

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/RedHatNews