This session discusses OpenShift Enterprise (or OpenShift Container Platform). OpenShift Container Platform is Red Hat's on-premise private platform as a service product, built around a core of application containers powered by Docker, with orchestration and management provided by Kubernetes, on a foundation of Red Hat Enterprise Linux.
1 of 34
More Related Content
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Axon Active Vietnam
4. Images & Containers
Docker “Image”
Unified Packaging format.
- Like “war" or “tar.gz"
- For any type of
Application
- Portable
Docker “Container”
Runtime
Isolation
Image BImage A
Hardware
Container
APP A
Image
Host Minimal OS
Container
APP B
Image
Container
APP C
Image
Docker Engine
Docker Registry
RHEL
JDK
Jboss-EAP
Libs A Libs B
App A App B
docker pull <image>
5. Evolution
Hardware
Host OS
LIBS A LIBS B LIBS..
APP A APP B
Hardware
Guest OS
LIBS A
APP A
Hypervisor
Guest OS
LIBS B
APP B
Guest OS
LIBS C
APP C
Hardware
Container
LIBS A
APP A
Host Minimal OS
Container
LIBS B
APP B
Container
LIBS C
APP C
Traditional Virtual Containershared system isolation process isolation
6. Linux Kernel
App1 App2 App3
Isolation, not Virtualization
• Kernel Namespaces
• Process
• Network
• IPC
• Mount
• User
• Resource Limits
• Cgroups
• Security
• SELinux
8. We need more than just packing and isolation
• Scheduling : Where should my containers run?
• Lifecycle and health : Keep my containers running despite failures
• Discovery : Where are my containers now?
• Monitoring : What’s happening with my containers?
• Auth{n,z} : Control who can do things to my containers
• Aggregates : Compose sets of containers into jobs
• Scaling : Making jobs bigger or smaller
9. Kubernetes – Container Orchestration at Scale
Greek for “Helmsman”; also the root of the word “Governor” and “cybernetic”
• Container Cluster Manager
- Inspired by the technology that runs Google
• Runs anywhere
- Public cloud
- Private cloud
- Bare metal
• Strong ecosystem
- Partners: Red Hat, VMware, CoreOS..
- Community: clients, integration
11. Pods
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
13. Kubernetes Cluster
MySQL
DB
MySQL
Service
Service Definition:
• Load-Balanced Virtual-IP (layer 4)
• Abstraction layer for your App
• Enables Service Discovery
• DNS
• ENV
Examples:
• frontend
• database
• api
172.16.0.1:3386
PHP
10.1.0.1:3306
10.2.0.1:3306
db.project.cluster.local
Visitor
<?php
mysql_connect(getenv(“db_host”))
mysql_connect(“db:3306”)
?>
15. Pod
Service
Pod
Pod
Labels & Selectors
- apiVersion: v1
kind: Service
metadata:
labels:
app: MyApp
role: BE
phase: DEV
name: MyApp
spec:
ports:
- name: 80-tcp
port: 80
protocol: TCP
targetPort: 8080
selector:
app: MyApp
role: BE
sessionAffinity: None
type: ClusterIP
Role: FE
Phase: Dev
Role: BE
Phase: DEV
Role: BE
Phase: TST
Role: BEthink SQL ‘select ... where ...’
- apiVersion: v1
kind: Pod
metadata:
labels:
app: MyApp
role: BE
phase: DEV
name: MyApp
21. OpenShift as a Development Platform
• Project spaces
• Build tools
• Integration with your IDE
22. We need more than just Orchestration !
Self Service
-Templates
- Web Console
Multi-Language
Automation
- Deploy
- Build
DevOps
Collaboration
Secure
- Namespaced
- RBAC
Scalable
- Integrated LB
Open Source
Enterprise
- Authentication
- Web Console
- Central Logging
23. We need more than just Orchestration
Self Service
-Templates
- Web Console
Multi-Language
Automation
- Deploy
- Build
DevOps
Collaboration
Secure
- Namespaced
- RBAC
Scalable
- Integrated LB
Open Source
Enterprise
- Authentication
- Web Console
- Central Logging
OpenShift is Red Hat’s Container Application Platform (PaaS)
24. Kubernetes Embedded
https://master:8443/api = Kubernetes API
/oapi = OpenShift API
/console = OpenShift WebConsole
OpenShift:
• 1 Binary for Master
• 1 Binary for Node
• 1 Binary for Client
• Docker-image
• Vagrant-image
Kubernetes:
• ApiServer, Controller, Scheduler, Etcd
• KubeProxy, Kubelet
• Kubectl
25. Project Namespaces
Project
• Sandboxed Environment
• Network VXLan
• Authorization Policies
• Resource Quotas
• Ops in Control, Dev Freedom
oc new-project Project-Dev
oc policy add-role-to-user admin scientist1
oc new-app
--source=https://gitlab/MyJavaApp
--docker-image=jboss-eap
Project “Prod” Project “Dev” Project
Global Services
OpenShift Platform
APP A
Image
APP C
Image
App
• Images run in Containers
• Grouped together as a Service
• Defined as Template