Steve Tegeler, Director SE/TPM Cloud Native Apps Ryan Kelly, Staff Cloud Specialist CNA1466BU #VMworld #CNA1466BU Containers 101 for the vSphere Admin VMworld 2017 Content: Not for publication or distribution
Steve Tegeler, Director SE/TPM Cloud Native AppsRyan Kelly, Staff Cloud Specialist
CNA1466BU
#VMworld #CNA1466BU
Containers 101 for the vSphere Admin
VMworld 2017 Content: Not fo
r publication or distri
bution
What do you know?
Don’t know what you don’t know
Have issued a “docker run”
App Teams Leverage Containers TodayVMworld 2017 Content: N
ot for publicatio
n or distribution
• This presentation may contain product features that are currently under development.
• This overview of new technology represents no commitment from VMware to deliver these features in any generally available product.
• Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind.
• Technical feasibility and market demand will affect final delivery.
• Pricing and packaging for any new technologies or features discussed or presented have not been determined.
Disclaimer
3#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Containers 101 for the vSphere Admin
• Getting Oriented – Stack of Silos
• Container Technology Overview
– Basics
– Registry
– Storage
– Container Schedulers
– Demo
• vSphere Integrated Containers
– Demo
• Impact of Containers on Software Development
• What next?
4#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Consumers & Providers in IT
5
Physical Infrastructure
X86 | L2/L3 | IOPS
Compute | Network | Storage
Plugins | Drivers | SDK
HV | SDN | SDS
API
Tenancy | Quota | Orchestration
CI/CD | DBs | Dev Envs
PaaS | K8s | Custom
App1 | App2 | App3
Jenkins | MySQL | Java
VirtualInfrastructure
IaaS
PlatformServices
ApplicationDevelopers
Public
CloudsConsumer
Provider
VMworld 2017 Content: Not fo
r publication or distri
bution
Container Technologies In the Stack
6
Physical Infrastructure
VirtualInfrastructure
IaaS
PlatformServices
ApplicationDevelopers
Container Schedulers
ContainersVMworld 2017 Content: Not fo
r publication or distri
bution
Running Applications – Traditional vs. Containers
• Configuration Management (Puppet, Chef, Ansible)
– Update/Install Packages
– Installing Middleware
– Install/Run Application
• Chose a distribution & create “gold” templates
• Common Linux KernelLinux Kernel 4.2
Management & User-space Tools (Libraries, Additional Software, & Docs)
Configuration | Application SW
App
Process 1
App
Process 2App
Process n
Standard Linux Host
Photon OS
Challenges
• Long Lived Operating Systems - patching, gold image updates, configuration drift
• Configuration Management Overhead
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Linux Kernel 4.2
Linux “Container” Host
Running Applications – Traditional vs. Containers
Linux Kernel 4.2
Management & User-space Tools (Libraries, Additional Software, & Docs)
Configuration | Application SW
App
Process 1
App
Process 2App
Process nContainer 1
Standard Linux Host
Docker
Engine
Photon OS
Tools,
Libs, SW
containerimage built w/Dockerfile
Container n
Tools,
Libs, SW
#docker run containerimage
The “Dockerfile”
VMworld 2017 Content: Not fo
r publication or distri
bution
Container Registry 101
Linux Kernel
Linux “Container” Host
Docker Hub
Container
IMGn
Private Registry
Container
IMG1
Container
IMGn
Registry=
Docker Hub
Local Image
Cache
Docker
Engine
#docker run containerimage1
Registry=
Habor.local
Container
IMG1
Container 1n
Tools,
Libs, SW
Container
IMG1 Container
IMG1
Container 1m
Tools,
Libs, SW
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Application
Operating System
Physical
Infrastructure
Application
Operating System
Physical
Infrastructure
Containers & VMs in the Stack
Operating System
Virtual Machine
Hardware Abstraction
Container
Operating System Abstraction
Operating System
Virtual Machine
Hardware Abstraction
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Demo #1 - Sample Application - vhobby
1. Inspect Dockerfile PHP code
2. Docker-compose to start the 3 containers
3. Make a rating in the vhobby UI
4. Make change to PHP Dockerfile v2.0
5. Docker compose-build – auto swap out of old/new container
6. Show UI change, with same backend data
14
Redis DB
Master
Router
PHP Code v1
PHP Code v2.0
https://github.com/prydin/vhobby
Redis DB
Slave
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Brief Word on “Stateless”Persistent Volumes
16
VMworld 2017 Content: Not fo
r publication or distri
bution
THERE IS NO SUCH THING AS
STATELESS ARCHITECTURE.
IT'S JUST SOMEONE ELSE'S PROBLEM.
17#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
vSphere Docker Volume Service
18
ESXi
Linux Container Host
Docker
Engine
Datastore1
dataVol
dataVol.vmdk
# docker plugin install --alias vsphere store/vmware/docker-volume-vsphere:0.13
vSphere Docker Volume
Service VIB
vSphere vol
plugin#docker volume create --driver=vsphere --name dataVol
Container Host
dockerVM.vmdk
esxcli# <install VIB CLI Command here>1
2
3Container
Tools, Libs, SW
Redis
DB
VMworld 2017 Content: Not fo
r publication or distri
bution
Container Technologies In the Stack
20
Physical Infrastructure
VirtualInfrastructure
IaaS
PlatformServices
ApplicationDevelopers
Container Schedulers
Containers
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Deployment_X.yaml
ContainerImage1
Replicas: 3
ContainerImage2
Replicas: 2
Kubernetes 101 in a single slide
• Container Cluster = “Desired State Management”
– Kubernetes Cluster Services (w/API)
• Worker = (Container Host) have agent called “Kubelet”
• Deployment = Configuration File of desired state
• Container Image = Runs in a Pod
• Replicas = QTY of Pods that must be running
21
Worker
(Container Host)
P1R1
Worker
(Container Host)
P1R2 P2R1 P1R1
P2R1
Worker
(Container Host)
P1R3 P2R2 P2R2
Kubernetes
Cluster
ServicesAPI
K
K
KDeployment_Y.yaml
ContainerImage1
Replicas: 1
ContainerImage2
Replicas: 2
P1R1
P1R2
P2R1
https://youtu.be/PH-2FfFD2PU
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Containers in Development & Operations
22
VMworld 2017 Content: Not fo
r publication or distri
bution
Dichotomy: Dev/Ops have different “cares”
23
Developers Like Ops Needs
Portable Fast Light Secure Network Data
PersistenceConsistent
Management
Ability to move
Dev Test Prod
Rapid start
times
&
Control
Minimal
Configuraiton
and footprint
Meet
security
standards
Hook into
existing
network
Access to the
“state” of the
app
Single
pane of
glass
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Container Host
Container Networking
24
Corp
Network
10.10.10.130 172.16.0.1
10.10.10.130:1600 -> 172.16.0.10:80
10.10.10.130:1601 -> 172.16.0.11:80
10.10.10.130:nnnn -> 172.16.0.xxx
Container 1
172.16.0.10
Container 2
172.16.0.11
Container n
172.16.0.xxx
Docker
Engine
Photon OS
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
26CONFIDENTIAL
Containers
IN DEVELOPMENTContainers
IN PRODUCTION
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Brief Introduction: vSphere Integrated Containers
27
VMworld 2017 Content: Not fo
r publication or distri
bution
Consumers & Providers in IT
28
Physical Infrastructure
VirtualInfrastructure
IaaS
PlatformServices
ApplicationDevelopers
Consumer
Provider
Docker Endpoint &
Future Services*
Virtual Container Host
Net | Sec | Ops Visibility
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
vSphere
Linux
CCC Linux
Kernel
Linux
KernelLinux
Kernel
Virtual Container Host
Introducing vSphere Integrated Containers
29
Container Engine
DockerAPI
Container Engine
Container Host
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
View from vCenter
30
CCC
Linux Kernel Linux KernelLinux Kernel
Virtual Container Host
Container Engine
VMworld 2017 Content: Not fo
r publication or distri
bution
vSphere
Value Proposition of vSphere Integrated Containers
• A single Virtual Container Hosts backed by a resource pool
• Resources can be dynamically added/removed
• Run in the same vSphere environment as VMs
• NSX micro segmentation and networking
• vCenter operations work with containers like they do with VMs (DRS, Host Evac, etc.)
• Ecosystem of tools available for VMs can be used with containers
31
CCC
Linux
KernelLinux
KernelLinux
Kernel
Virtual Container Host
Container Engine
DockerAPI
Resource Pool
50 Ghz, 512GB
Resource Pool
75 Ghz, 768GB
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Demo #2 - Sample Application – vhobby – VIC
1. Inspect Dockerfile PHP code
2. Docker-compose to start the 3 containers
3. Make a rating in the vhobby UI
4. Make change to PHP Dockerfile v2.0
5. Docker compose-build – auto swap out of old/new container
6. Show UI change, with same backend data
33
Redis DB
Master
Router
PHP Code v1
PHP Code v2.0
https://github.com/prydin/vhobby
Redis DB
Slave
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
CI/CD - Software Development & Containers
VMworld 2017 Content: Not fo
r publication or distri
bution
Containers in CI/CD
36
flavor: m1.small
CPU: 2
Mem: 2
Disk: 10
Cloud APIsIaaS
WW
A A
R
Provisioning of VMs, Networks, Storage,
Security primitives
Manage Configuration: IaC, Config Mgmt
Linux “Container” Host
Docker Engine
Photon OS
Container 1
Tools,
Libs, SW
Container 3
Tools,
Libs, SW
Container 2
Tools,
Libs, SW
Container 4
Tools,
Libs, SW
Provisioning of container images, (volumes,
TCP ports, etc..)
Manage Configuration with: Dockerfile
CorpNet
Container m
Tools,
Libs, SW
Container n
Tools,
Libs, SW
Dev CI/CD Tools
VMworld 2017 Content: Not fo
r publication or distri
bution
VMworld Session Highlight - DEV1369 – CI/CD
IaaS, Infrastructure as Code, and the role of Containers in CI/CD
Wednesday Aug 30, 1:00 PM
DEV1369
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
• Active / Passive Role with Containers?
• Active – Understand Infrastructure Related AspectsDecide
• Start asking questions to “Platform Services” teams
• Leverage vRNI to discover current container usage• i.e. TCP 2375
Discover
• HOLs @ VMworld
• YouTube Cloud Native Channel
• http://vmware.github.ioLearn
#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution
Containers - VMworld Breakouts & HOLs
• Project Harbor Secure and Effective Container Image Management for Docker and Beyond [CNA1632GU]
– Wednesday, Aug 30, 4:00 p.m. - 5:00 p.m
• Demystifying Kubernetes Everything You Need to Know to Get Started [CNA2603GU]
– Monday, Aug 28, 1:00 p.m. - 2:00 p.m
• VIC Docker on Your Existing Infrastructure w/vSphere Integrated Containers [CNA1699BU]
– Wednesday, Aug 30, 1:00 p.m. - 2:00 p.m
• HOLs
– HOL-1830-01 Containers 101
– HOL-1830-02 Virtual Container Hosts with vSphere Integrated Containers
– HOL-1831-01 Kubernetes Basics
40#CNA1466BU CONFIDENTIAL
VMworld 2017 Content: Not fo
r publication or distri
bution