42
How Do You OpenShift? Jared Burck Architect May 7, 2019

How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

Page 1: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

How Do You OpenShift?

Jared BurckArchitectMay 7, 2019

Page 2: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

oc whoami

Jared BurckArchitect

Red Hat Consulting

● Cloud application and migration specialist

● Container adoption and devops guru

● Build and release management expert

● Open source contributor and collaborator

Jared BurckArchitectRed Hat

[email protected] https://www.linkedin.com/in/jaredburck/ https://www.linkedin.com/in/jaredburck/

Page 3: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

What tools do you need to OpenShift?

● There are an endless options of tools available● Your tools of choice varies with your

○ Preferences○ Tasks○ Roles○ Operating systems○ “View” of the world

● Do you have the permissions to install your tools of choice?○ Do you have full control over your system or is it manage by an enterprise?

■ Some organizations are very opinionated and locked down■ Others companies may allow some, or controlled/approved installations■ While still other will give out full permissions to specific roles/users

Page 4: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Agenda

> It’s Your WorldThe OpenShift WaysOpenShifting LocallyContainer Tools for EveryoneDevelopment for All & AnywhereFrom Operators to ExtensionsDemo - How Do You OpenShift

Page 5: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Who are You?

Developers & Engineers

Administrators & Operators

Architects & Managers

Directors & Executives

Page 6: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

What is your Primary OS?

Apple

macOS

Microsoft

Windows

Linux

Red HatFedora

Other distros

Page 7: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Where do you OpenShift?

Baremetal

Cloud ServicesLocal Workstations On Premise

Dedicated OnlineOpenShift Azure

Page 8: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

How do you OpenShift?

Command Line Interface(CLI)

Web Console(GUI)

Application Program Interface (API)

Page 9: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Agenda

It’s Your World

> The OpenShift WaysOpenShifting LocallyContainer Tools for EveryoneDevelopment for All & AnywhereFrom Operators to ExtensionsDemo - How Do You OpenShift

Page 10: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

oc: a CLI for OpenShiftThe oc command line tool is used to interact with the OpenShift and Kubernetes HTTP API(s). oc is an alias for openshift cli and commands are verb focused.

There are 5 base verbs and 6 command groups can be used to manage both Kubernetes and OpenShift resources. Most common verbs and subcommands are documented in the CLI help.

oc is a first class tool that can help you interact with openshift regardless of your role!

> oc project <projectName> --display-name="<display_name>"Now using project "rhsummit19" on server "https://192.168.42.101:8443".

> oc new-app --template=django-psql-persistentRun 'oc status' to view your app.

> oc logs -f bc/django-psql-persistentPush successful

> oc describe bc django-psql-persistentName: django-psql-persistent(additional output omitted)

> oc expose service django-psql-persistentroute.route.openshift.io/django-psql-persistent exposed

> oc start-build django-psql-persistentbuild.build.openshift.io/django-psql-persistent-2 started

> oc statusView details with 'oc describe <resource>/<name>' or list everything with 'oc get all'

Page 11: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

odo: a CLI for Developers

odo is a new CLI for OpenShift that is tailored for developer syntax and workflows.

Goal is to make it simple for a developer to create an app, add components (like a database) and expose it without needing to know Kubernetes.

odo is a affectionately called “OpenShift DO!”

> odo create wildfly backendComponent ‘backend’ was created.To push source code to the component run ‘odo push’

> odo pushPushing changes to component: backend

> odo storage create backend-store --path /data --size 100MAdded storage backend-store to backend

> odo create php frontendComponent ‘frontend’ was created.To push source code to the component run ‘odo push’

> odo pushPushing changes to component: frontend

> odo url createfrontend - http://frontend-myproject.192.168.99.100.nip.io

> odo watchWaiting for something to change in /Users/redhat/odo/frontend

Page 12: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

DevOps Console

● Application-centric views and tasks of Kubernetes, OpenShift + Operator-enabled addons

● Developer workflows○ Import app○ Web IDE (Eclipse Che)

● DevOps / SRE workflows○ Pipelines○ Environments○ Third-party integrations

OCP 4

Page 13: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Cluster Settings Console

● Cluster-centric views and tasks of Kubernetes and OpenShift

● Admin / Ops workflows○ Cluster settings○ Machine info○ CRDs

● DevOps / SRE workflows○ Resource management○ Capacity management

OCP 4

Page 14: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Agenda

It’s Your WorldThe OpenShift Ways

> OpenShifting LocallyContainer Tools for EveryoneDevelopment for All & AnywhereFrom Operators to ExtensionsDemo - How Do You OpenShift

Page 15: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

OpenShift 3.x (local)Minishift

● Based on (community) OKD● Centos or boot2docker based (ISO) VM

image● Utilizes community based images and

imagestreams● Supported on MacOS, Windows, and Linux● Provisions a single-node OKD cluster using

libmachine● Compatible with a variety of hypervisors● Uses oc cluster up behind the scenes

Where to download?● GitHub releases

How do I get support?● Open Source communities

Who should use this?● All users and roles

What are the benefits?● Deploy applications to local OKD● Test new/updated processes and procedures● Extend and validate new platform capabilities● Good for persistent & long lived dev cycles

Page 16: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Where to download?● Red Hat Customer Portal● Red Hat Developers

How do I get support?● Open Source communities● Red Hat Support (with proper entitlements)

Who should use this?● All users and roles

What are the benefits?● Deploy applications to local OCP● Test new/updated processes & procedures● Extend & validate new platform capabilities● Good for persistent & long lived dev cycles

OpenShift 3.x (local)Container Development Kit (CDK)

● Enterprise version of Minishift● Based on (enterprise) OpenShift Container

Platform● Red Hat Enterprise Linux based (ISO) VM

image● Utilizes Red Hat Enterprise Linux based

images and imagestreams● Utilizes free Red Hat Developer subscription● Build Red Hat Enterprise Linux based

container images

Page 17: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

OpenShift 3.x (local)$ oc cluster up

● Part of the oc (OpenShift Client) binary● Only supported on Linux platform● Calls docker on host where command is run

to bootstrap a local OKD cluster● First introduced in OpenShift Origin 1.3● Best suited for creating quick, disposable

environments that you don't plan on persisting

● Docker and oc binary only requirements

Where to download?● GitHub releases● Red Hat Customer Portal

How do I get support?● Open Source communities● Red Hat Support (with proper entitlements)

Who should use this?● All users and roles

What are the benefits?● Easy way to bootstrap a cluster based on a

docker container● Enables rapid prototyping and development● Only requires docker and the oc client

Page 18: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

OpenShift 3.x (local)Other (build your own aka BYO)...

● Build your own virtual machines○ KVM○ Xhyve○ Hyper-V○ VirtualBox○ Vagrant○ others

● Build all-in-one node or multi-node clusters● Can Utilize OpenShift installation methods● Build OpenShift in one or more containers

Where to download?● See particular vendor for specifics

How do I get support?● Red Hat for any product support● Project communities related to that project● 3rd party vendor for their products support

Who should use this?● Developers & Engineers● Administrators & Operators

What are the benefits?● Full installation control and options● Configure high availability cluster● Replicate prod configurations locally● Create advanced & complex architectures

Page 19: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

OpenShift 4.x (local)Universal Installer

● One install script to rule them all● Designed to help users create clusters in

various environments● Acts as an installation wizard, prompting for

values as needed● Provides facilities for varying levels of

customization● On supported platforms, capable of

provisioning the underlying cluster infrastructure

● In alternate scenarios, users can provision their own infrastructure using the cluster assets generated by the installer

Where to download?● GitHub releases● Red Hat Customer Portal

How do I get support?● Open Source communities● Red Hat Support (with OCP entitlements)

Who should use this?● All users and roles

What are the benefits?● Deploy applications to local OpenShift 4● Test new/updated processes & procedures● Extend & validate new platform capabilities● Replaces Minishift, CDK, and oc cluster

up in OpenShift 3.x

Page 20: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Agenda

It’s Your WorldThe OpenShift WaysOpenShifting Locally

> Container Tools for EveryoneDevelopment for All & AnywhereFrom Operators to ExtensionsDemo - How Do You OpenShift

Page 21: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Container Tools

= skopeo+

+

Page 22: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Container Tools

● Specializes in commands & functions to help you manage OCI images

● Works with containers and pods

● Based on the Docker CLI● No big fat daemon● Image/container tagging● Adv namespace isolation

docker-compatible CLIfor containers

Operate on container images & repositories

● Copying images to and from various storage mechanisms

● Inspecting remote images and repositories

● Deleting images from various repositories

● Pass authentication credentials & certificates

Secure & flexible OCI container builds

● Specializes in building OCI images

● Build containers without Dockerfile

● Works with various formats

● No big fat daemon● Integrated into OCP

build pods

skopeo

Page 23: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Container Tools

skopeo

Where to download?● Linux package managers● GitHub or build from source

[podman] [skopeo] [buildah]

How do I get support?● Open Source communities ● Red Hat (with proper entitlements - e.g. RHEL)

Who should use this?● All users and roles

What are the benefits?● Daemonless container management● Build OCI compliant containers and images● Copy container and images to/from registries● Run and orchestrate containers in production

Page 24: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Other Container Tools

Page 25: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Agenda

It’s Your WorldThe OpenShift WaysOpenShifting LocallyContainer Tools for Everyone

> Development for All & AnywhereFrom Operators to ExtensionsDemo - How Do You OpenShift

Page 26: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Workstation IDEs

● Deep insights into your code● Developer ergonomics● Built-in developer tools● Polyglot experience

● Download from JetBrains● Supported by JetBrain & community● Good for Developer & Engineers, Admins &

Ops, and Architect & Managers

● Extensible tools & platform support● Powerful editing, browsing, refactoring, &

debugging● Customize & extend platform to make it your own

● Download from Eclipse or 3rd Party Vendor● Supported by 3rd party and/or OSS communities● Good for Developer & Engineers, Admins & Ops,

and Architect & Managers

Page 27: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Laptop IDEs

● Lightweight & super fast to install● Native support for Git● Support for Emmet abbreviations● Super-simple editor zoom● Very keyboard-friendly

● Download from VS Code (Microsoft)● Supported by VS Code Marketplace team● Good for Developer & Engineers, Admins

& Ops, and Architect & Managers

● Many other lightweight or niche specific IDEs● Alternatively, many text editors can also be IDEs● Familiarity with tools that have use cases beyond

development● Personal preference or lack of other options

● Download from vendor specified locations (sites)● Supported by provided or alternatively OSS

communities● Good for Developer & Engineers, Admins & Ops, and

Architect & Managers

Page 28: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Visual Studio Code PluginsRed Hat plugins for VSCode add IDE superpowers for Java, Kubernetes YAML and Fuse XML.

The OpenShift plugin allows developers to quickly connect and deploy to OpenShift instances locally or remotely.

Dependency Analytics adds license and CVE package alerts.

Available now in Marketplace directly from VS Code!

Page 29: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

CodeReady Studio

Where to download?● Red Hat Customer Portal● Red Hat Developers● Eclipse Marketplace (JBoss Tools)

How do I get support?● Open Source communities ● Red Hat Support (with proper

entitlements)

Who should use this?● Developers & Engineers,● Administrators & Operators● Architects & Managers

What are the benefits?● Local workstation IDE, tailored for extreme productivity● Red Hat branded & supported Eclipse IDE (previously

JBDS)● Red Hat tested and certified for compatibility● Provides supplemental integration tooling in support of

Red Hat middleware● Available as BYO JBoss Tools from Eclipse Marketplace

Page 30: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

CodeReady Workspaces

Where to download?● Red Hat Customer Portal● Red Hat Developers

How do I get support?● Open Source communities ● Red Hat (with proper entitlements)

Who should use this?● Developers & Engineers,● Administrators & Operators

What are the benefits?● Centralized developer IDE platform● Browser-based Web IDE + container based workspaces● Source code never lands on hard-to-secure laptops

● Red Hat supported Eclipse Che● Installed and enabled via an operator● Pre-configured and custom stacks

(tools and runtimes)

Page 31: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Agenda

It’s Your WorldThe OpenShift WaysOpenShifting LocallyContainer Tools for EveryoneDevelopment for All & Anywhere

> From Operators to ExtensionsDemo - How Do You OpenShift

Page 32: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Operator Framework

For Builders and the community● Easily create application on Kubernetes via a common method● Provide standardized set of tools to build consistent apps

For application consumers and Kubernetes users● Keep used apps up to date for security reasons and app lifecycle management● Consumer of cloud-native / kube-native applications more secure and easier

Page 33: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Operator SDK

Go SDKAnsible SDKHelm SDK

“No code” Operator Perfect for Ops Full power & features

Testing framework & Scorecard

Red Hat verification

● “No code” improvements to Helm SDK user experience

○ operator-sdk new memcached-operator --type=helm --helm-chart=stable/memcached

● Testing is extremely important for Operators, now we have a testing framework built in

● SDK includes a “scorecard” to ensure your Operator is technically correct

● Support new RHEL universal base image OperatorHub

Page 34: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Operator Maturity Model

Page 35: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Operator Lifecycle Manager

● Operators are installed cluster-wide, not per namespace○ All teams get access with minimal

fuss and overhead● In 4.1+, OperatorGroups will allow

groups to be deployed together○ Install Foo and Bar Operator in NS

where env=prod

Page 36: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

OperatorHub● Accessible to admins only● Discovery/install of all optional

components and apps● Upstream and downstream

content● ISV partners will support their

Operators

Red Hat ProductsISV PartnersCommunity

Page 37: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Developer Catalog● Entry point for a developer to access all services available to them● Merges all capabilities from Operators, Service Catalog, Brokers, and S2I

Page 38: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Operator Powered UI Extensions

SERVICE MESH

External Application Launcher CNVNative Experience

MONITORING

Native + External Links

Core PlatformOPERATOR &

BROKER APPS

Dev. CatalogMETERING &CHARGEBACK

Native Experience

Page 39: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

Agenda

It’s Your WorldThe OpenShift WaysOpenShifting LocallyContainer Tools for EveryoneDevelopment for All & AnywhereFrom Operators to Extensions

> Demo - How do you OpenShift

Page 41: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images

7:45 - 8:30 PM - 4 ways to jump start an open source & agile automation culture

TUESDAY

WEDNESDAY

THURSDAY

10:15-11:00 AM - Day-in-the-Life: Designing Software for Open Innovation Labs

11:15-12:00 PM - How Volkswagen used microservices & automation to develop self-service solutions

12:15-1:00 PM - Container adoption at scale: Metrics-driven framework and other lessons learned

3:15-4:00 PM - The road to RHEL 8: Best practices for optimizing your operating system

4:15-5:00 PM - Adoptando RHEL 8: Las mejores practicas para optimizar tu Sistema Operativo

5:15-6:00 PM - A DevOps survival guide: Small changes lead to big results

6:15-7 PM - Digital Nudge: How automation, machine learning, A.I., and more shape our digital decisions

10:45-11:30 AM - OpenShift DevSecOps: Making your enterprise more secure for tomorrow, today

11:45-12:30 PM - To the Edge and Beyond: Network Automation for Telecommunications

12:45-1:30 PM - People first, digital second: Using open principles to drive transformation at Heritage Bank

1:45-2:30 PM - Monoliths in OpenShift: Application onboarding strategies for containers

Page 42: How Do You OpenShift? · docker-compatible CLI for containers Operate on container images & repositories Copying images to and from various storage mechanisms Inspecting remote images