Title Text

Openshift Overview at Bandwidth

Jonathan Seth Mainguy

Engineer @ Bandwidth

October 24th, 2018

Title Text

What is OpenShift?

its a kubernetes distribution. Like RHEL is to GNU/Linux, Openshift is to kubernetes

Title Text

What is kubernetes?

Kubernetes
is a portable, extensible open-source platform for managing containerized workloads and services

(its a Platform as a service for containers)

Title Text

Whats a container?

According to Jeff Spahr -

  • It’s a process

  • Existing linux functionality is used to provide isolation

  • Namespaces

    • Mount

    • Network

    • IPC

    • UTS

    • PID

  • Selinux

  • cgroups

Title Text

I like to think of it as a really minimal VM more or less. Its not a VM, but its easier for me to think of it as such. You can run a

  • ubuntu container
  • fedora container
  • python container
  • haproxy
  • apache
  • mysql
  • nodejs
  • etc etc etc

all on a Centos Host.

Title Text

Containers have been around for awhile, Zones were big on Solaris

 

Docker made it popular for everyone else.

The corporate overlords that run opensource stuff don't get along with the docker developers, so alternatives to docker have been built and are being pushed hard now.

Title Text

So, openshift is a kubernetes distribution for running containers (mostly docker right now), similiar to how VMware or RHEVM are platforms for running VM's.

Title Text

However, Kubernetes has some cool features in addition to those platforms. It can auto-scale, it can load balance

  • it can forward tcp /udp / http traffic
  • it can build containers
  • it can host a internal registry
  • it can take some yaml file you check into git, and turn it into a functioning application.

Title Text

Here at BW we run our openshift clusters with three different types of nodes (the vm's / physical boxes that host kubernetes)

  • Master
  • Infra
  • Compute

Title Text

Master

host or hosts that contain the master components, including the

  • API server
  • controller manager server
  • etcd.

The master manages nodes in its Kubernetes cluster and schedules pods to run on nodes

Title Text

Master

  • API Server
    • ​The Kubernetes API server validates and configures the data for
      • pods
      • services
      • replication controllers
      • It also assigns pods to nodes and synchronizes pod information with service configuration.

Title Text

Master

  • etcd
    • etcd stores the persistent master state while other components watch for changes to bring themselves into the desired state.

Title Text

Master

  • Controller Manager Server
    • The controller manager server watches etcd for changes to replication controller objects and then uses the API to enforce the desired state.

Title Text

Infra

  • Compute server just for infrastructure projects that the systems team creates
  • Is where our external loadbalancer sends all traffic to
    • ​These nodes host the haproxy router, and registry

Title Text

Compute

  • A node provides the runtime environments for containers. Each node in a Kubernetes cluster has the required services to be managed by the master.
  • Nodes also have the required services to run pods, including

Title Text

Compute

Kubelet

 

updates the node as specified by a container manifest, which is a YAML file that describes a pod. The kubelet uses a set of manifests to ensure that its containers are started and that they continue to run

Title Text

Compute

Service Proxy

Each node also runs a simple network proxy that reflects the services defined in the API on that node. This allows the node to do simple TCP and UDP stream forwarding across a set of back ends.

Title Text

Compute

So the compute nodes is where all your apps go when you create them. You care about the compute nodes.

You likely do not care about the Master or Infra nodes

Title Text

Docker

Here is what a Dockerfile looks like, that can be used to build a docker container

Title Text

Pods

A pod (as in a pod of whales) is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers

Title Text

Openshift PVC

Physical Volume Claim - Ie, this is my physical volume, there are many like it, but I claim this one

Title Text

Openshift Deployment

This is how I want my app to look

Title Text

Title Text

Openshift nodePort

 

ie, how do I get traffic from the world, to my pods (I want to connect and play)

Title Text

Ez way to turn all those text files, into a minecraft server hosted on kubernetes with persistent storage so I don't lose my world if it crashes.

Title Text

Live Demo of what you just saw

Title Text

Questions?

Title Text

Thank you

openshift-overview

By jsmainguy

openshift-overview

Overview of Openshift at Bandwidth

  • 187