WSO2 Container Strategy
Imesh Gunaratne, WSO2
2
● An Introduction to Containers
● WSO2 Reference Architectures for:
○ Docker
○ Kubernetes
○ OpenShift
○ DC/OS
○ Pivotal Cloud Foundry
● Deployment Automation Best Practices
Agenda
An Introduction to Containers
Linux Container Brief for IEEE WG P2302, Boden Russell
Hardware
Hypervisor
Virtual Machine
Operating
System
Bin/Lib
App App
Virtual Machine
Operating
System
Bin/Lib
App App
Hardware
Operating System
Hypervisor
Virtual Machine
Operating
System
Bin/Lib
App App
Virtual Machine
Operating
System
Bin/Lib
App App
Type 1 Hypervisor
(Bare Metal)
Type 2 Hypervisor
Hardware
Operating System
Linux Containers
Container
Bin/Lib
App
Container
Bin/Lib
App
Container Runtime
Virtual Machines Vs Containers
The Container Advantage
Hardware
Hypervisor
Virtual Machine
Operating
System
Bin/Lib
App App
Virtual Machine
Operating
System
Bin/Lib
App App
Type 1 Hypervisor
Hardware
Operating System
Linux Containers
Container
Bin/Lib
App
Container
Bin/Lib
App
16 CPU, 128 GB
RAM
2 CPU, 4 GB RAM
1 CPU, 1.25 GB
RAM
1 CPU, 0.75 GB RAM
16 CPU, 128 GB
RAM
2 CPU, 4 GB RAM
2 CPU, 2 GB RAM
Container Runtime
Operating System
Container Image
Container Images
Hardware
Operating System
Container
Bin/Lib
App
Container
Bin/Lib
App
Container Runtime
Container Image Registry
Operating System
Container
Bin/Lib
App
Container
Bin/Lib
App
Container Runtime
Load Balancer
Hardware
Network
Standard Container based Deployments
Overlay Network
Container Image
Container Images
Hardware
Operating System
Container
Bin/Lib
App
Container
Bin/Lib
App
Container Runtime
Container Image Registry
Operating System
Container
Bin/Lib
App
Container
Bin/Lib
App
Load Balancer
Hardware
Network
Hardware
Operating System
Container Cluster
Manager Controller
Agent Container Runtime Agent
Container Cluster Manager based Deployments
WSO2 Reference Architecture
for Docker
WSO2 Reference Architecture for Docker
C 1 C 2 C 3 C 4 C m
DB 1 DB 2 DB X
Persistent Volume
Container Registry
Container Host 1 Container Host 2 Container Host n
Load Balancer
10
● Use a container registry
● Use host port mappings for exposing container ports
● Use a load balancer with health checks
● Configurations are packaged into the container images
● Use persistent volumes for sharing runtime artifacts
● No, cluster discovery
● No, container auto-healing
● No, container auto scaling
Docker based WSO2 Deployments
11
● https://github.com/wso2/docker-apim/
● https://github.com/wso2/docker-ei/
● https://github.com/wso2/docker-is/
● https://github.com/wso2/docker-das/
WSO2 Docker Github Repositories
WSO2 Reference Architecture
for Kubernetes
An Introduction to Kubernetes
Borg
Google’s first container
cluster manager
Omega
Google’s second container
cluster manager
Kubernetes
Google’s initiative to build
a general purpose
container cluster manager
Kubernetes Architecture
Overlay Network
WSO2 Reference Architecture for Kubernetes
Pod 1 Pod 2
Service 1
Pod 3 Pod 4 Pod m
Service n
Deployments
Load Balancer
DB 1 DB 2 DB X
Persistent Volume
HPAs
Pod Security Policies
Ingresses
Container Registry
Node1
Node2
Noden
16
● Use a container registry
● Use deployments for pod orchestration
● Use pod security policies for enforcing container security
● Use services for internal routing
● Use ingresses for load balancer configuration
● Use load balancer for external routing
● Use configmaps for configuration management
● Use persistent volumes for sharing runtime artifacts
● Use horizontal pod autoscalers for autoscaling
Kubernetes based WSO2 Deployments
17
● https://github.com/wso2/kubernetes-apim/
● https://github.com/wso2/kubernetes-ei/
● https://github.com/wso2/kubernetes-is/
● https://github.com/wso2/kubernetes-das/
WSO2 Kubernetes Github Repositories
Monitoring Kubernetes Cluster
WSO2 Reference Architecture
for OpenShift
OpenShift V3 = Kubernetes + Following;
source code management, builds, deployments, managing container images, team and user tracking
https://docs.openshift.org/latest/architecture/index.html
An Introduction to OpenShift
OpenShift Dashboard
Overlay Network
WSO2 Reference Architecture for OpenShift
Pod 1 Pod 2
Service 1
Pod 3 Pod 4 Pod m
Service n
Deployments
Router
DB 1 DB 2 DB X
Persistent Volume
HPAs
Security Context
Constraints
Routes
Container Registry
Node1
Node2
Noden
23
● Use a container registry
● Use deployments for pod orchestration
● Use security context constraints for enforcing container security
● Use services for internal routing
● Use routes for the router configuration
● Use the router for external routing
● Use configmaps for configuration management
● Use persistent volumes for sharing runtime artifacts
● Use horizontal pod autoscalers for autoscaling
OpenShift based WSO2 Deployments
24
● https://github.com/wso2/kubernetes-apim/
● https://github.com/wso2/kubernetes-ei/
● https://github.com/wso2/kubernetes-is/
● https://github.com/wso2/docker-das/
WSO2 OpenShift Github Repositories
WSO2 Reference Architecture
for DC/OS
An Introduction to Apache Mesos
Image source: Anton Kirillov, Data processing platforms architectures
An Introduction to DC/OS
Cluster Manager
Container Orchestrator UI | CLI | Package RepositoryBatch Job Scheduler
DC/OS Architecture
DC/OS Dashboard
WSO2 Reference Architecture for DC/OS
Overlay Network
Pod 1 Pod 2
Mesos DNS
Pod 3 Pod 4 Pod m
Mesos DNS
Marathon
Applications
Load Balancer
DB 1 DB 2 DB X
Persistent Volume
Container Registry
Node1
Node2
Noden
31
● Use a container registry
● Use Marathon applications for pod orchestration
● Use Mesos DNS for service discovery and internal routing
● Use Marathon application labels for load balancer configuration
● Use the load balancer for external routing
● Use persistent volumes for sharing runtime artifacts
DC/OS based WSO2 Deployments
https://docs.mesosphere.com/1.10/overview/concepts
32
● https://github.com/wso2/mesos-artifacts/
WSO2 DC/OS Github Repository
WSO2 Reference Architecture
for Pivotal Cloud Foundry
PCF Architecture
PCF/WSO2 Service Integration
WSO2 Reference Architecture for PCF
C 1 C 2 C 3 C 4 C m
BOSH Releases
PCF Router
DB 1 DB 2 DB X
Persistent Volume
Container Registry
Node1
Node2
Noden
CF Tiles
37
● https://github.com/wso2/pivotal-cf-apim/
● https://github.com/wso2/pivotal-cf-is/
WSO2 PCF Github Repositories
Deployment Automation Best
Practices
39
● Use WUM for downloading latest WSO2 product distributions
Use WSO2 Update Manager (WUM)
http://wso2.com/wum
Version Control System
Deployment
Load Balancer(s)
Profiles
ProfilesWSO2 Server
Instances
WSO2 Product
Distributions
Deployable WSO2
Product Distributions
Infrastructure
Version Control System
Configuaration Files
Deployable
Artifacts
WSO2 Update
Manager (WUM)
Extensions
Updates
Updated WSO2
Product Distributions
Customizations
Deployment Process - Approach 1
Deployment Process - Approach 2
Version Control System
Deployment
Load Balancer(s)
Profiles
ProfilesWSO2 Server
Instances
WSO2 Product
Distributions
Configuration
Management System
Infrastructure
Version Control System
Configuration
Management System
Files
Deployable
Artifacts
WSO2 Update
Manager (WUM)
Extensions
Updates
Updated WSO2
Product Distributions
Customizations
THANK YOU
wso2.com

WSO2 Container Strategy

  • 1.
  • 2.
    2 ● An Introductionto Containers ● WSO2 Reference Architectures for: ○ Docker ○ Kubernetes ○ OpenShift ○ DC/OS ○ Pivotal Cloud Foundry ● Deployment Automation Best Practices Agenda
  • 3.
  • 4.
    Linux Container Brieffor IEEE WG P2302, Boden Russell Hardware Hypervisor Virtual Machine Operating System Bin/Lib App App Virtual Machine Operating System Bin/Lib App App Hardware Operating System Hypervisor Virtual Machine Operating System Bin/Lib App App Virtual Machine Operating System Bin/Lib App App Type 1 Hypervisor (Bare Metal) Type 2 Hypervisor Hardware Operating System Linux Containers Container Bin/Lib App Container Bin/Lib App Container Runtime Virtual Machines Vs Containers
  • 5.
    The Container Advantage Hardware Hypervisor VirtualMachine Operating System Bin/Lib App App Virtual Machine Operating System Bin/Lib App App Type 1 Hypervisor Hardware Operating System Linux Containers Container Bin/Lib App Container Bin/Lib App 16 CPU, 128 GB RAM 2 CPU, 4 GB RAM 1 CPU, 1.25 GB RAM 1 CPU, 0.75 GB RAM 16 CPU, 128 GB RAM 2 CPU, 4 GB RAM 2 CPU, 2 GB RAM Container Runtime Operating System
  • 6.
    Container Image Container Images Hardware OperatingSystem Container Bin/Lib App Container Bin/Lib App Container Runtime Container Image Registry Operating System Container Bin/Lib App Container Bin/Lib App Container Runtime Load Balancer Hardware Network Standard Container based Deployments
  • 7.
    Overlay Network Container Image ContainerImages Hardware Operating System Container Bin/Lib App Container Bin/Lib App Container Runtime Container Image Registry Operating System Container Bin/Lib App Container Bin/Lib App Load Balancer Hardware Network Hardware Operating System Container Cluster Manager Controller Agent Container Runtime Agent Container Cluster Manager based Deployments
  • 8.
  • 9.
    WSO2 Reference Architecturefor Docker C 1 C 2 C 3 C 4 C m DB 1 DB 2 DB X Persistent Volume Container Registry Container Host 1 Container Host 2 Container Host n Load Balancer
  • 10.
    10 ● Use acontainer registry ● Use host port mappings for exposing container ports ● Use a load balancer with health checks ● Configurations are packaged into the container images ● Use persistent volumes for sharing runtime artifacts ● No, cluster discovery ● No, container auto-healing ● No, container auto scaling Docker based WSO2 Deployments
  • 11.
    11 ● https://github.com/wso2/docker-apim/ ● https://github.com/wso2/docker-ei/ ●https://github.com/wso2/docker-is/ ● https://github.com/wso2/docker-das/ WSO2 Docker Github Repositories
  • 12.
  • 13.
    An Introduction toKubernetes Borg Google’s first container cluster manager Omega Google’s second container cluster manager Kubernetes Google’s initiative to build a general purpose container cluster manager
  • 14.
  • 15.
    Overlay Network WSO2 ReferenceArchitecture for Kubernetes Pod 1 Pod 2 Service 1 Pod 3 Pod 4 Pod m Service n Deployments Load Balancer DB 1 DB 2 DB X Persistent Volume HPAs Pod Security Policies Ingresses Container Registry Node1 Node2 Noden
  • 16.
    16 ● Use acontainer registry ● Use deployments for pod orchestration ● Use pod security policies for enforcing container security ● Use services for internal routing ● Use ingresses for load balancer configuration ● Use load balancer for external routing ● Use configmaps for configuration management ● Use persistent volumes for sharing runtime artifacts ● Use horizontal pod autoscalers for autoscaling Kubernetes based WSO2 Deployments
  • 17.
    17 ● https://github.com/wso2/kubernetes-apim/ ● https://github.com/wso2/kubernetes-ei/ ●https://github.com/wso2/kubernetes-is/ ● https://github.com/wso2/kubernetes-das/ WSO2 Kubernetes Github Repositories
  • 18.
  • 19.
  • 20.
    OpenShift V3 =Kubernetes + Following; source code management, builds, deployments, managing container images, team and user tracking https://docs.openshift.org/latest/architecture/index.html An Introduction to OpenShift
  • 21.
  • 22.
    Overlay Network WSO2 ReferenceArchitecture for OpenShift Pod 1 Pod 2 Service 1 Pod 3 Pod 4 Pod m Service n Deployments Router DB 1 DB 2 DB X Persistent Volume HPAs Security Context Constraints Routes Container Registry Node1 Node2 Noden
  • 23.
    23 ● Use acontainer registry ● Use deployments for pod orchestration ● Use security context constraints for enforcing container security ● Use services for internal routing ● Use routes for the router configuration ● Use the router for external routing ● Use configmaps for configuration management ● Use persistent volumes for sharing runtime artifacts ● Use horizontal pod autoscalers for autoscaling OpenShift based WSO2 Deployments
  • 24.
    24 ● https://github.com/wso2/kubernetes-apim/ ● https://github.com/wso2/kubernetes-ei/ ●https://github.com/wso2/kubernetes-is/ ● https://github.com/wso2/docker-das/ WSO2 OpenShift Github Repositories
  • 25.
  • 26.
    An Introduction toApache Mesos Image source: Anton Kirillov, Data processing platforms architectures
  • 27.
    An Introduction toDC/OS Cluster Manager Container Orchestrator UI | CLI | Package RepositoryBatch Job Scheduler
  • 28.
  • 29.
  • 30.
    WSO2 Reference Architecturefor DC/OS Overlay Network Pod 1 Pod 2 Mesos DNS Pod 3 Pod 4 Pod m Mesos DNS Marathon Applications Load Balancer DB 1 DB 2 DB X Persistent Volume Container Registry Node1 Node2 Noden
  • 31.
    31 ● Use acontainer registry ● Use Marathon applications for pod orchestration ● Use Mesos DNS for service discovery and internal routing ● Use Marathon application labels for load balancer configuration ● Use the load balancer for external routing ● Use persistent volumes for sharing runtime artifacts DC/OS based WSO2 Deployments https://docs.mesosphere.com/1.10/overview/concepts
  • 32.
  • 33.
    WSO2 Reference Architecture forPivotal Cloud Foundry
  • 34.
  • 35.
  • 36.
    WSO2 Reference Architecturefor PCF C 1 C 2 C 3 C 4 C m BOSH Releases PCF Router DB 1 DB 2 DB X Persistent Volume Container Registry Node1 Node2 Noden CF Tiles
  • 37.
  • 38.
  • 39.
    39 ● Use WUMfor downloading latest WSO2 product distributions Use WSO2 Update Manager (WUM) http://wso2.com/wum
  • 40.
    Version Control System Deployment LoadBalancer(s) Profiles ProfilesWSO2 Server Instances WSO2 Product Distributions Deployable WSO2 Product Distributions Infrastructure Version Control System Configuaration Files Deployable Artifacts WSO2 Update Manager (WUM) Extensions Updates Updated WSO2 Product Distributions Customizations Deployment Process - Approach 1
  • 41.
    Deployment Process -Approach 2 Version Control System Deployment Load Balancer(s) Profiles ProfilesWSO2 Server Instances WSO2 Product Distributions Configuration Management System Infrastructure Version Control System Configuration Management System Files Deployable Artifacts WSO2 Update Manager (WUM) Extensions Updates Updated WSO2 Product Distributions Customizations
  • 42.