Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
@SamuelTerburg
OpenShift Specialist Solution Architect
March 2016
Agenda
Docker
Kubernetes added-value
OpenShift added-value
Demo
Q&A
Container Technology
- Docker
Docker Registry
Images & Containers Image A Image B
App A App B
Libs A Libs B
Jboss-EAP
JDK
RHEL
Traditional
shared
Virtual
system isolation
Container
process isolation
Kernel Namespaces
Process
Network
IPC
App1 App2 App3
Mount
User
Resource Limits
Cgroups
Linux Kernel
Security
SELinux
Runs anywhere
- Public cloud
- Private cloud
- Bare metal
Strong ecosystem
- Partners: Red Hat, VMware, CoreOS..
- Community: clients, integration
Visitor
Logging
Core Concepts ELK Kubernetes Cluster
Router
Registry
Service
Pod Image
ReplicationController
Dev/Ops API Node Node
Service etcd
POD Definition:
Group of Containers
Related to each other
Same namespace
Emphemeral
Examples:
Wordpress
MySQL
Wordpress + MySQL
ELK
Nginx+Logstash
Auth-Proxy+PHP
App + data-load
Replication Controller Kubernetes Cluster
Pod Scaling
kind: ReplicationController
metadata:
Pod Monitoring
name: nginx Rolling updates
spec:
replicas: 2
selector: Master
app: nginx Replication
template: Pod Pod
Controller
metadata:
name: nginx Dev/Ops API Node Node
labels:
app: nginx
nginx etcd
spec: RC Object
containers:
- name: nginx
image: nginx:v2.2
ports: Node
- containerPort: 80
172.16.0.1:3386
DB
db.project.cluster.local
Service Definition:
Load-Balanced Virtual-IP (layer 4)
Abstraction layer for your App PHP
Enables Service Discovery
MySQL
DNS MySQL
ENV 10.1.0.1:3306
<?php 10.2.0.1:3306
mysql_connect(getenv(db_host))
Examples: mysql_connect(db:3306)
frontend ?>
database
api
3. Update
Service Rule Redirect
- apiVersion: v1
kind: Service 2. Watch
metadata: Changes
labels: Kube
Proxy
IPTables
Kube
Proxy
IPTables
app: MySQL
role: BE Master PHP
1. Create
phase: DEV Object
name: MySQL MySQL
MySQL
spec: 10.1.0.1:3306
ports: Dev/Ops API 10.2.0.1:3306
- name: mysql-data
port: 3386 DB etcd
protocol: TCP Service Object
Google capacity:
NFS
FibreChannel metadata:
Claim requests:
storage: 8Gi
Persistent Volume Claim
Ops Dev
Persistent Volume Farm Projects Claim and Mount
Project: ABC
pod
5G
SSD
10G pod
Storage
Provider(s)
Project: XYZ
pod
10G
SSD
40G pod
Each Host = 256 IPs
Each POD = 1 IP
etcd
SkyDNS
Volume
Policies
Storage
Node
OpenShift as a Development
Platform
Project spaces
Build tools
Integration with your IDE
We need more than just Orchestration !
Secure
Self Service
- Namespaced
-Templates
- RBAC
- Web Console
Scalable
Multi-Language - Integrated LB
Secure
Self Service
- Namespaced
-Templates
- RBAC
- Web Console
Scalable
Multi-Language - Integrated LB
OpenShift: Kubernetes:
1 Binary for Master ApiServer, Controller, Scheduler, Etcd
1 Binary for Node KubeProxy, Kubelet
1 Binary for Client Kubectl
Docker-image
Vagrant-image
Project Namespaces
Project Project Prod Project Dev Project
Sandboxed Environment Global Services
Network VXLan
Authorization Policies
APP A APP C
Resource Quotas Image Image
Ops in Control, Dev
Freedom
App OpenShift Platform
Images run in Containers
Grouped together as a oc new-project Project-Dev
Service oc policy add-role-to-user admin scientist1
Defined as Template oc new-app
--source=https://gitlab/MyJavaApp
--docker-image=jboss-eap
Logging Visitor
Kubernetes ELK
Hosting Architecture Ingress
Kubernetes Cluster
Registry
Image Service
Pod
Replication Pod
Controller Pod
Dev/Ops API Node Node
etcd
SkyDNS
Volume
Policies
Storage
Master
OpenShift Logging Visitor
SkyDNS
Volume
Policies
Storage
Master
OpenShift Logging Visitor
Code
Builder Images
Jboss-EAP Developer
PHP
Python
Ruby Source
Jenkins
Customer
Build 2
Image Builder
C++ / Go
Image
S2I (bash) scripts
docker
ln s /var/lib/origin/openshift.local.config/admin.kubectl
run openshift/origin ~/.kubectl
* Coming Soon
CloudForms Management
nl.linkedin.com/in/samuelterburg twitter.com/SamuelTerburg
youtube.com/user/RedHatVideos