Docker from A to Z, including Swarm and OCCS

F
munz & more
Docker from A to Z
Including Oracle Container Cloud Service
OUGN Conference 2017 Dr. Frank Munz
2
Frank Munz
• Founded munz & more in 2007
• 17 years Oracle Middleware,
Cloud, and Distributed Computing
• Consulting and
High-End Training
• Wrote two Oracle WLS and
one Cloud book
... some basics
“Docker wasn’t	on	anyone’s	agenda	for	2014.
It’s	on	every	ones	roadmap	for	2015.”
Adrian	Cockroft
Netflix
Docker
• Open Source (evolving), written in Go
• Container technology
• Portable standard
• Runs on Linux (Microsoft, MacOS, Solaris)
Google starts
2.000.000.000
containers
per week!
Virtualization vs. Isolation
munz & more #6
Linux	+	Docker
Hardware
a.war
Immutable	Docker	container	in	Linux
with	own	FS,	network	stack	/	
IP	address,	process	space	and	
resource	limits.	
->	Isolation
Hardware
OVM	/	VmWare ESX	/	Xen
Application
1	
Solaris
Application
2
Linux
Application
3
Win
Server	Virtualization
Type	1	hypervisor
=	on	bare	metal
Hardware
Mac	OS	/	Win
Desktop	Virtualization:
Type	2	hypervisor
=	with	host	OS
ejb.jar
y.jar
x.py
JDK
WebLogic
tools
Jython
VirtualBox
Application1
Linux
Application2
Win
Docker
munz & more #7
Linux	+	Docker
Hardware
a.war
ejb.jar
y.jar
x.py
JDK
WebLogic
tools
Jython
Docker is not a
lightweight VirtualBox
- it's about isolation.
Containers run on
Linux kernel of host
-> Containers are
visible on host
Docker Images
• Package format
• Layered incremental,
copy on write file system
• “Application with all dependencies”
• Create image yourself
or get it from Docker Hub
docker image ls
munz & more #8
Example Layers:
- WLS Domain
- WebLogic
- Java
- Linux Image
Docker Container
• Isolated runtime of Docker image
• Starts up in milliseconds
• Sandboxing uses Linux namespaces and
cgroups (RAM, CPU, filesystem)
-> isolated part of your Linux
• Open Container Standard / Linux Foundation
docker run -d –p 8080:9999 fmunz/micro
munz & more #9
Docker Limitations
• Cannot load kernel modules
• Applications that manipulate namespaces
• Kernel config per container
• Some SW not (yet) supported when running
in Docker container: Oracle DB etc.
munz & more #10
Solves the “Worked For Me!” issue
munz & more #11
OS	tools,	JDK,	
patches,	database	
driver,	libs,	
appserver,	domain,	
deployment,	tools,	
scripts
Docker
OS	utils,	JDK,	patches,	database	driver,	libs,	
appserver,	domain,	deployment,	tools,	
scripts
Integration,
Performance,
Acceptance
Testing	
Production
dockerize it!
You can pass environment variables
for specific settings e.g. in prod
Docker Registry
Dockerfile
Manually create container with
docker buildDockerfile
Docker Image
Automatic build:
gitub push trigger image build
+
Automated Builds
• Automatically build your images:
GitHub account with Dockerfile
• Registry uses GitHub directory structure
as build context
• Image is uploaded automatically
to Docker hub
-> Trust, up to date, and transparent
Dockerfile
munz & more #14
Manually create container:
docker build –t name .
And Then Automate
• Build Docker images for testing from
continuous delivery pipeline
• Use Jenkins / Hudson hooks or a maven
plugin to create / start / stop /delete
Docker containers
munz & more #15
Docker Maven Plugins
• Alternative
approach to
Dockerfile
• Various plugins
• Few only active
munz & more #16
https://github.com/fabric8io/docker-maven-plugin
fabric8:	docker-maven
the registry
Registry
• Docker image is not found?
-> pulled from registry
• Push your image to registry
docker push yourname/newimage
• Free account includes 1 private registry
Also private, containerized registry for download
with fs and optional in-memory, S3, or Azure data
store
munz & more #18
what should be your
biggest nightmare:
unknown and
unofficial images
(>14000)
Docker Registry
clouds
Docker in the Cloud?
Supported by every major cloud provider:
munz & more #21
On premise -> all clouds
Docker
Registry
Docker	Container	Service
EC2	Container	Service
Google	Container	Engine
Azure	Container	Service
Bluemix Containers
Oracle Cloud and Docker
Oracle Container Cloud Service OCCS (covered in part II)
• Available now!
Oracle Application Container Cloud Service
• Uses Docker containers to run your
Java or JavaScript application
Compute Cloud Service
• Manually run your containers
Docker Data Center, AWS ECS, Google Container Service
• Docker Clouds
munz & more #22
fancy a demo?
Small Images / Microservices
You can have a real service in ...
Possible
Options:
busybox and
static binary
munz & more #24
Simple Life Inside Container
munz & more #25
processes
FS
mounts
#3
Security
$ docker run -d –p
8080:9999 fmunz/micro
vs.
A stranger gives you a box at night and asks
you to connect it to your company network:
Would you do it?
Suggestions
• Use trusted images / with known Dockerfile
• Kernel features are well established
– cgroups (2006, merged into 2.6.24 kernel)
– namespaces (initial kernel patch 2.4.19)
• Docker can use TLS (client to daemon)
• Docker images can be signed
• Think twice about pulling images from
public repos / Docker hub
munz & more #30
FUD
"Docker is like chroot() on steroids."
• Yes: It's easy to escape chroot() environment
• No: Docker does not use chroot()
-> it uses namespaces
munz & more #31
Do namespaces solve it?
6 different namespace, but
not everything is namespaced, eg:
• /proc/sys|irq|bus
• /sys, /sys/fs
• /dev/mem
• /dev/sd*
• kernel modules
• User namespaces since 1.9
Docker uses read-only mounts where possible
munz & more #32
Linux Capabilities
• Privileged container: like being root on host
• Capabilities -> Break down power of root
• Examine PID 1 capabilities with getpcaps:
munz & more #33
User Namespaces
• Before Docker 1.10 root process in container
was root process on host
– with limited capabilites
• With Docker 1.10 user namespaces a root
process in container can be mapped to user
process on host
– Disabled per default
– To enable start Docker daemon with --userns-remap
munz & more #34
… more Suggestions
• Drop privileges as quickly as possible
• Treat root in container as root outside
(although it isn't)
• No secrets in images
• Combine Docker with
SELinux, AppArmor and / or virtualization
• Host can always access container
Note: Public PaaS do not simply spin up Docker
containers!
munz & more #35
Cheat Sheet
munz & more
Source:	Container-Solutions.com
Conclusion
• You have to deal with Docker security
depending on your use case
• Note: Public PaaS are not just spinning up
Docker containers they use SELinux, VMs,…
• Docker is not a risk per se
but new technology with different challenges.
munz & more #37
Oracle Options
Docker Style
• Independent appserver in container
• Microservices / 12-factor app architecture
• Just add your favorite Docker
cluster manager
munz & more #39
OS	tools,	JDK,	
database	driver,	libs,	
appserver,	single	/	
selfcontained
domain,		
deployment,	tools,	
scripts
JDK,	WLS,	Domain
createServer.sh:
creates	machine/NM,
starts	NM,
creates	manServ,
starts	manServ
WebLogic Example
munz & more #40
$docker run -d
--link wlsadmin:wlsadmin
fmdom1
createServer.sh
$docker run -d -p 8001:8001
--name=wlsadmin
fmdom1
startWebLogic.sh
JDK,	WLS,	Domain
startWebLogic.sh
starts	AdminServer
wlsadmin
JDK,	WLS,	Domain
createServer.sh:
creates	machine/NM,
starts	NM,
creates	manServ,
starts	manServ
connect to admin
due to --link:
/etc/hosts
172.17.1.99			wlsadmin 31a1baaf
OLD STYLE!
Use Networks now…port	8001 IP:port 7001
Managed	Servers
--link
Official Support
#41^
Oracle support
does not require
you to use the
provided Docker
files
Oracle	Product Official	Support
GlassFish
MySQL yes
NoSQL
OpenJDK
Oracle	Linux yes
OracleCoherence yes
OracleDatabase yes
OracleHTTPServer yes
OracleJDK yes
OracleTuxedo yes
OracleWebLogic yes
Oracle and Docker
Different approaches:
1. DIY: Dockerfile from Oracle github
2. Oracle Docker registry
3. Oracle Container Cloud Service
munz & more #42
DIY: Github
• Github repo with set up
scripts based on
Oracle Linux
• Docker is a supported
environment for
WebLogic 12.1.3+
https://github.com/oracle/docker-images
munz & more #43
Just Drop Server JRE and WLS Installer
munz & more #44
$ cd java-8
$ docker build -t oracle/jdk:8 .
Sending build context to Docker daemon 4.096 kB
Step 1 : FROM oraclelinux:latest
latest: Pulling from library/oraclelinux
10ec637c060c: Downloading 4.865 MB/97.84 MB
...
$ sh buildDockerImage.sh -g -v 12.2.1.1
...
Extend the WLS image
Sample script provided:
• Dockerfile to extend WLS image
• Run WLST script to create domain
• Create boot.properties
• Expose NM, Server ports
munz & more #45
Linux	Base	Image
JDK	Image
WebLogic	Image
WLS	Domain	Image
Docker Registry (New)
Docker images from Oracle container registry
(restricted to US / OZ / GB!)
Get image:
$ docker login container-registry.oracle.com
$ docker pull container-registry.oracle.com/java/serverjre:8
munz & more #46
Container Cloud Service (New)
Run your Docker in Oracle cloud with OCCS
• Dashboards
• Services
• Stacks of services
• Ressource pools
• Registries
munz & more #47
OCCS
OCCS
• Easy way to run Docker container in Oracle
cloud
• No need to install Docker, buy machines etc.
• Integrates with Docker hub and Oracle
Container registry
• Does not use Kubernetes or Docker Swarm
Dashboard
Services
munz & more #51
Ressource Pools
munz & more #52
Service Editor
Deployment Pulls Image
munz & more #54
Running Grafana in OCCS
munz & more #55
Webcasts on Youtube
munz & more #56
https://www.youtube.com/watch?v=YFWAUEjtTpk https://www.youtube.com/watch?v=aRj0WK6uids
munz & more #57
Is	Docker the	new	PaaS?
Docker in
Production?
WebLogic
in a Docker
Container!
Docker
Networking
Networking: Facts to Know
• Docker --link only works on single host
-> regarded as deprecated now
• Networking supported since Docker 1.9
• SDN network that spans hosts:
Libnetwork implements
Container Networking Model (CNM):
Endpoint / Network / Sandbox
munz & more #61
Overlay Network
munz & more #62
Networking: Facts to Know
• Integrated with Compose / Swarm
• Two types:
– Bridge: Single host
– Overlay: Multiple hosts, based on k-v store
munz & more #63
Orchestration /
Cluster Manager
Cluster Manager Options
On	Premise Cloud
Docker Swarm Docker	1.12 Docker	DC	(EE)
Kubernetes DIY Google	
Oracle Oracle Registry	/	Git Oracle CCS
munz & more #65
Kubernetes (K8s)
• Kicked off by Google’s borg
• Most active github project
• Orchestration for containers, e.g. Docker
• Declarative configuration
• Service discovery
• Rolling upgrades
munz & more #66
K8s
• YAML configuration
• Pod: Container(s) sharing IP, network, filesystem
– IP is ephemeral
– Uses Labels
• Replication Controller -> Replica Set
– Manages PODs (restarts replicas based on labels)
• Services
– Proxy for pod
– Permanent IP
munz & more #67
Kubernetes
• Not easy to install / manage
• Recommended for local: minicube
• Cloud: Google container engine
• Oracle: somehow announced (?)
• OCCS is not K8s
munz & more #68
Docker Swarm
• Native Docker cluster with same API as
a single engine
• Fast provisioning, about 500 msec
• Scheduling: spread, binpack, rand
• No insecure mode J
munz & more #69
Docker Swarm
Since Docker 1.12
• Swarm is merged with Docker engine:
• Load balancer included
• Service discovery
• Cluster scheduler
-> Swarm has now more features similar to Kubernetes
-> easier to get started
munz & more #70
Step to Create a Swarm
1. Create Swarm master node
2. Create worker nodes
3. Create / scale / update service
4. Use routing mesh
munz & more #71
Swarm Routing Mesh
• All nodes participate in routing mesh
• Load balancing for services
• Service discovery
munz & more #72
https://docs.docker.com/engine/swarm/ingress/
#publish-a-port-for-tcp-only-or-udp-only
Kubernetes or Swarm?
• Swarm wasn’t impressive when released,
but this has changed now
• Swarm is much easier to understand
and to operate
• Swarm covers a lot of what K8s does
• Swarm is tightly linked to Docker API
-> harder to replace Docker with e.g. Rocket
munz & more #73
Docker Swarm
munz & more #74
Google Kubernetes
munz & more #75
Docker Containers in Kubernetes
munz & more #76
Welcome
Mini J
Design Goals for Mini
• Hands-on Raspi experience
• Kubernetes setup -> Docker Swarm setup
• HA / failover / rolling updates
• Build something cool
munz & more #78
Design Decisions for Mini
• Hypriot Linux
• 4 node cluster
• ARM based -> runs ARM Docker images
• Preferred Gbit switch, but WIFI only
– Better I/O throughput with separate WIFI chip
– Simplicity
– DHCP reservation bug in router -> no MAC reservation for switch
• Wifi router in hotspot mode
– Mac OS issue with NAT
• DIY: github https://github.com/fmunz/raspicluster
munz & more #79
Paper bag Computer Raspberry Pi
• 1.2 GHz Quad Core ARM cortex-a53
• RAM: 1 GB LPDDR2 Speicher
• Dual Core VideoCore, 1920x1080
• Bluetooth
• 802.11 B/G WIFI
• Boots from micro SD card
• 38 €
munz & more #80
DIY Raspi Docker Cluster
munz & more #81
Component Price
Raspi 4x	38€
Micro	SD	 4x	11€
Power 28€
Wifi 22€
Case 30€
Wires 10€
...
munz & more #82
http://www.oracle.com/us/pro
ducts/middleware/cloud-app-
foundation/weblogic/weblogic
-server-on-docker-wp-
2742665.pdf
Oracle	Whitepaper	
WebLogic	on	Docker
munz & more #84
Good Docker book by
J. Turnbull / $ 9.99
(covering Docker 1.13)
Predictions
• Swarm will take its share from Kubernetes.
• You will not dockerize 90% of your enterprise IT
in the next 24 months.
• Docker is the new Linux.
Be ready to experience that feeling we had
with Linux 13 years ago J
• Sometimes Docker is the new PaaS.
munz & more #85
Conclusion
• Docker is used in production
• Docker, but more so cluster managers
are still evolving
• Docker is not a security risk,
but tick off the referenced security checklist
• Oracle caught the trend early – good!
• Many Oracle products supported already, more
to come?
munz & more #86
TL;DR @docker / #cloud
works for me: solved / cross cloud
/ not everything must be a
container / just Docker is not
enough / #swarm is the easier #k8s
/ not a security risk / many
products offered as images /
official Oracle support / consider
cloud services.
@frankmunz
www.munzandmore.com/blog
facebook.com/cloudcomputingbook
facebook.com/weblogicbook
@frankmunz
youtube.com/weblogicbook
-> more than 50 web casts
Don’t be
shy J
1 of 88

Recommended

Shipping Applications to Production in Containers with Docker by
Shipping Applications to Production in Containers with DockerShipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with DockerJérôme Petazzoni
53.8K views53 slides
Introduction to Docker by
Introduction to DockerIntroduction to Docker
Introduction to DockerAlan Forbes
162 views36 slides
Visualising Basic Concepts of Docker by
Visualising Basic Concepts of Docker Visualising Basic Concepts of Docker
Visualising Basic Concepts of Docker vishnu rao
1.1K views43 slides
Docker and Containers for Development and Deployment — SCALE12X by
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XJérôme Petazzoni
25.5K views82 slides
A Gentle Introduction To Docker And All Things Containers by
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersJérôme Petazzoni
60.6K views52 slides
Docker Introductory workshop by
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshopRuncy Oommen
537 views104 slides

More Related Content

What's hot

Docker 101: An Introduction by
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
930 views56 slides
Docker Introduction + what is new in 0.9 by
Docker Introduction + what is new in 0.9 Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9 Jérôme Petazzoni
3.7K views91 slides
Introduction to Docker and deployment and Azure by
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureJérôme Petazzoni
2.1K views72 slides
Introduction to docker by
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
3.2K views55 slides
A Hands-on Introduction to Docker by
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to DockerCodeOps Technologies LLP
1.2K views151 slides
Docker for the new Era: Introducing Docker,its components and tools by
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsRamit Surana
1.7K views67 slides

What's hot(20)

Docker 101: An Introduction by POSSCON
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
POSSCON930 views
Docker Introduction + what is new in 0.9 by Jérôme Petazzoni
Docker Introduction + what is new in 0.9 Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9
Jérôme Petazzoni3.7K views
Introduction to Docker and deployment and Azure by Jérôme Petazzoni
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and Azure
Jérôme Petazzoni2.1K views
Introduction to docker by John Willis
Introduction to dockerIntroduction to docker
Introduction to docker
John Willis3.2K views
Docker for the new Era: Introducing Docker,its components and tools by Ramit Surana
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
Ramit Surana1.7K views
Docker and the Container Ecosystem by psconnolly
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
psconnolly2.2K views
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire by dotCloud
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud3.1K views
Introduction to Docker and all things containers, Docker Meetup at RelateIQ by dotCloud
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
dotCloud2.2K views
Orchestrating Docker containers at scale by Maciej Lasyk
Orchestrating Docker containers at scaleOrchestrating Docker containers at scale
Orchestrating Docker containers at scale
Maciej Lasyk22.8K views
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more by All Things Open
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and moreAll Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
All Things Open255 views
Docker From Scratch by Giacomo Vacca
Docker From ScratchDocker From Scratch
Docker From Scratch
Giacomo Vacca15.4K views
Introduction to Docker by Jian Wu
Introduction  to DockerIntroduction  to Docker
Introduction to Docker
Jian Wu281 views
Docker presentation | Paris Docker Meetup by dotCloud
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker Meetup
dotCloud11.3K views
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure by Patrick Chanezon
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Patrick Chanezon5.8K views
Architecting .NET Applications for Docker and Container Based Deployments by Ben Hall
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
Ben Hall14.4K views

Viewers also liked

Docker introduction by
Docker introductionDocker introduction
Docker introductiondotCloud
455.8K views29 slides
Why Docker by
Why DockerWhy Docker
Why DockerdotCloud
310.6K views37 slides
Serverless / FaaS / Lambda and how it relates to Microservices by
Serverless / FaaS / Lambda and how it relates to MicroservicesServerless / FaaS / Lambda and how it relates to Microservices
Serverless / FaaS / Lambda and how it relates to MicroservicesFrank Munz
2.5K views58 slides
Docker 101: Introduction to Docker by
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
71.2K views30 slides
Docker 101 - Nov 2016 by
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker, Inc.
7.3K views34 slides
Load Balancing Apps in Docker Swarm with NGINX by
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXNGINX, Inc.
6.6K views46 slides

Viewers also liked(20)

Docker introduction by dotCloud
Docker introductionDocker introduction
Docker introduction
dotCloud455.8K views
Why Docker by dotCloud
Why DockerWhy Docker
Why Docker
dotCloud310.6K views
Serverless / FaaS / Lambda and how it relates to Microservices by Frank Munz
Serverless / FaaS / Lambda and how it relates to MicroservicesServerless / FaaS / Lambda and how it relates to Microservices
Serverless / FaaS / Lambda and how it relates to Microservices
Frank Munz2.5K views
Docker 101: Introduction to Docker by Docker, Inc.
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.71.2K views
Docker 101 - Nov 2016 by Docker, Inc.
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
Docker, Inc.7.3K views
Load Balancing Apps in Docker Swarm with NGINX by NGINX, Inc.
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINX
NGINX, Inc.6.6K views
containerd and CRI by Docker, Inc.
containerd and CRIcontainerd and CRI
containerd and CRI
Docker, Inc.8.7K views
Docker Online Meetup: Announcing Docker CE + EE by Docker, Inc.
Docker Online Meetup: Announcing Docker CE + EEDocker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EE
Docker, Inc.24.2K views
Docker: the road ahead by shykes
Docker: the road aheadDocker: the road ahead
Docker: the road ahead
shykes46.4K views
Docker for Java Developers by NGINX, Inc.
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
NGINX, Inc.6.1K views
Container World 2017 - Characterizing and Contrasting Container Orchestrators by Lee Calcote
Container World 2017 - Characterizing and Contrasting Container OrchestratorsContainer World 2017 - Characterizing and Contrasting Container Orchestrators
Container World 2017 - Characterizing and Contrasting Container Orchestrators
Lee Calcote1K views
Docker and Sitecore : Sci-Fi or match made in heaven? by Saber Karmous
Docker and Sitecore : Sci-Fi or match made in heaven?Docker and Sitecore : Sci-Fi or match made in heaven?
Docker and Sitecore : Sci-Fi or match made in heaven?
Saber Karmous1.1K views
Kubernetesにまつわるエトセトラ(主に苦労話) by Works Applications
Kubernetesにまつわるエトセトラ(主に苦労話)Kubernetesにまつわるエトセトラ(主に苦労話)
Kubernetesにまつわるエトセトラ(主に苦労話)
Works Applications29.5K views
What's New in Docker - February 2017 by Patrick Chanezon
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
Patrick Chanezon1.4K views
How to deploy PHP projects with docker by Ruoshi Ling
How to deploy PHP projects with dockerHow to deploy PHP projects with docker
How to deploy PHP projects with docker
Ruoshi Ling50.3K views
Infrastructure Deployment with Docker & Ansible by Robert Reiz
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
Robert Reiz24.9K views
Ansibleはじめよぉ -Infrastructure as Codeを理解- by Shingo Kitayama
Ansibleはじめよぉ -Infrastructure as Codeを理解-Ansibleはじめよぉ -Infrastructure as Codeを理解-
Ansibleはじめよぉ -Infrastructure as Codeを理解-
Shingo Kitayama10.3K views

Similar to Docker from A to Z, including Swarm and OCCS

Docker in the Oracle Universe / WebLogic 12c / OFM 12c by
Docker in the Oracle Universe / WebLogic 12c / OFM 12cDocker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12cFrank Munz
8.9K views70 slides
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017 by
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017Frank Munz
502 views55 slides
Oracle WebLogic Server 12c with Docker by
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerGuatemala User Group
2.1K views39 slides
Cohesion Techsessie Docker - Daniel Palstra by
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraDaniel Palstra
198 views55 slides
Docker and Microservice by
Docker and MicroserviceDocker and Microservice
Docker and MicroserviceSamuel Chow
1.1K views46 slides
Developer workflow with docker by
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with dockerWyn B. Van Devanter
234 views33 slides

Similar to Docker from A to Z, including Swarm and OCCS(20)

Docker in the Oracle Universe / WebLogic 12c / OFM 12c by Frank Munz
Docker in the Oracle Universe / WebLogic 12c / OFM 12cDocker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
Frank Munz8.9K views
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017 by Frank Munz
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
Frank Munz502 views
Cohesion Techsessie Docker - Daniel Palstra by Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel Palstra
Daniel Palstra198 views
Docker and Microservice by Samuel Chow
Docker and MicroserviceDocker and Microservice
Docker and Microservice
Samuel Chow1.1K views
Django and Docker by Docker, Inc.
Django and DockerDjango and Docker
Django and Docker
Docker, Inc.2.2K views
Docker at Djangocon 2013 | Talk by Ken Cochrane by dotCloud
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
dotCloud16.6K views
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D... by IBM France Lab
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM France Lab267 views
Dockerize the World by damovsky
Dockerize the WorldDockerize the World
Dockerize the World
damovsky753 views
Oracle CODE 2017 San Francisco: Docker on Raspi Swarm to OCCS by Frank Munz
Oracle CODE 2017 San Francisco: Docker on Raspi Swarm to OCCSOracle CODE 2017 San Francisco: Docker on Raspi Swarm to OCCS
Oracle CODE 2017 San Francisco: Docker on Raspi Swarm to OCCS
Frank Munz2.9K views
Docker.pptx by balaji257
Docker.pptxDocker.pptx
Docker.pptx
balaji257467 views
Docker - the what why and hows by Souvik Maji
Docker - the what why and howsDocker - the what why and hows
Docker - the what why and hows
Souvik Maji80 views
Oracle database on Docker Container by Jesus Guzman
Oracle database on Docker ContainerOracle database on Docker Container
Oracle database on Docker Container
Jesus Guzman961 views
Michigan IT Symposium 2017 - Container BOF by Jeffrey Sica
Michigan IT Symposium 2017 - Container BOFMichigan IT Symposium 2017 - Container BOF
Michigan IT Symposium 2017 - Container BOF
Jeffrey Sica86 views
Central Iowa Linux Users Group: November Meeting -- Container showdown by Andrew Denner
Central Iowa Linux Users Group: November Meeting -- Container showdownCentral Iowa Linux Users Group: November Meeting -- Container showdown
Central Iowa Linux Users Group: November Meeting -- Container showdown
Andrew Denner83 views

More from Frank Munz

Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ... by
Serverless Presentation from Devoxx 2017 Casablanca  (AWS Lambda / FaaS / Fn ...Serverless Presentation from Devoxx 2017 Casablanca  (AWS Lambda / FaaS / Fn ...
Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ...Frank Munz
561 views41 slides
Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an... by
Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an...Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an...
Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an...Frank Munz
3.5K views52 slides
Microservices Runtimes by
Microservices RuntimesMicroservices Runtimes
Microservices RuntimesFrank Munz
1.1K views51 slides
Oracle Java Cloud Service JCS (and WebLogic 12c) - What you Should Know by
Oracle Java Cloud Service JCS (and WebLogic 12c) - What you Should KnowOracle Java Cloud Service JCS (and WebLogic 12c) - What you Should Know
Oracle Java Cloud Service JCS (and WebLogic 12c) - What you Should KnowFrank Munz
2.5K views51 slides
Oracle Service Bus 12c (12.2.1) What You Always Wanted to Know by
Oracle Service Bus 12c (12.2.1) What You Always Wanted to KnowOracle Service Bus 12c (12.2.1) What You Always Wanted to Know
Oracle Service Bus 12c (12.2.1) What You Always Wanted to KnowFrank Munz
6.2K views67 slides
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2... by
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...Frank Munz
21.2K views73 slides

More from Frank Munz(9)

Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ... by Frank Munz
Serverless Presentation from Devoxx 2017 Casablanca  (AWS Lambda / FaaS / Fn ...Serverless Presentation from Devoxx 2017 Casablanca  (AWS Lambda / FaaS / Fn ...
Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ...
Frank Munz561 views
Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an... by Frank Munz
Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an...Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an...
Java One 2017: Open Source Big Data in the Cloud: Hadoop, M/R, Hive, Spark an...
Frank Munz3.5K views
Microservices Runtimes by Frank Munz
Microservices RuntimesMicroservices Runtimes
Microservices Runtimes
Frank Munz1.1K views
Oracle Java Cloud Service JCS (and WebLogic 12c) - What you Should Know by Frank Munz
Oracle Java Cloud Service JCS (and WebLogic 12c) - What you Should KnowOracle Java Cloud Service JCS (and WebLogic 12c) - What you Should Know
Oracle Java Cloud Service JCS (and WebLogic 12c) - What you Should Know
Frank Munz2.5K views
Oracle Service Bus 12c (12.2.1) What You Always Wanted to Know by Frank Munz
Oracle Service Bus 12c (12.2.1) What You Always Wanted to KnowOracle Service Bus 12c (12.2.1) What You Always Wanted to Know
Oracle Service Bus 12c (12.2.1) What You Always Wanted to Know
Frank Munz6.2K views
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2... by Frank Munz
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
Frank Munz21.2K views
12 Things About WebLogic 12.1.3 #oow2014 #otnla15 by Frank Munz
12 Things About WebLogic 12.1.3 #oow2014 #otnla1512 Things About WebLogic 12.1.3 #oow2014 #otnla15
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
Frank Munz15K views
WebLogic JMX for DevOps by Frank Munz
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOps
Frank Munz3.4K views
Oracle Service Bus (OSB) for the Busy IT Professonial by Frank Munz
Oracle Service Bus (OSB) for the Busy IT Professonial Oracle Service Bus (OSB) for the Busy IT Professonial
Oracle Service Bus (OSB) for the Busy IT Professonial
Frank Munz7.1K views

Recently uploaded

40th TWNIC Open Policy Meeting: APNIC PDP update by
40th TWNIC Open Policy Meeting: APNIC PDP update40th TWNIC Open Policy Meeting: APNIC PDP update
40th TWNIC Open Policy Meeting: APNIC PDP updateAPNIC
106 views20 slides
WITS Deck by
WITS DeckWITS Deck
WITS DeckW.I.T.S.
36 views22 slides
The Dark Web : Hidden Services by
The Dark Web : Hidden ServicesThe Dark Web : Hidden Services
The Dark Web : Hidden ServicesAnshu Singh
22 views24 slides
Affiliate Marketing by
Affiliate MarketingAffiliate Marketing
Affiliate MarketingNavin Dhanuka
21 views30 slides
cis5-Project-11a-Harry Lai by
cis5-Project-11a-Harry Laicis5-Project-11a-Harry Lai
cis5-Project-11a-Harry Laiharrylai126
9 views11 slides
40th TWNIC Open Policy Meeting: A quick look at QUIC by
40th TWNIC Open Policy Meeting: A quick look at QUIC40th TWNIC Open Policy Meeting: A quick look at QUIC
40th TWNIC Open Policy Meeting: A quick look at QUICAPNIC
109 views20 slides

Recently uploaded(13)

40th TWNIC Open Policy Meeting: APNIC PDP update by APNIC
40th TWNIC Open Policy Meeting: APNIC PDP update40th TWNIC Open Policy Meeting: APNIC PDP update
40th TWNIC Open Policy Meeting: APNIC PDP update
APNIC106 views
WITS Deck by W.I.T.S.
WITS DeckWITS Deck
WITS Deck
W.I.T.S.36 views
The Dark Web : Hidden Services by Anshu Singh
The Dark Web : Hidden ServicesThe Dark Web : Hidden Services
The Dark Web : Hidden Services
Anshu Singh22 views
cis5-Project-11a-Harry Lai by harrylai126
cis5-Project-11a-Harry Laicis5-Project-11a-Harry Lai
cis5-Project-11a-Harry Lai
harrylai1269 views
40th TWNIC Open Policy Meeting: A quick look at QUIC by APNIC
40th TWNIC Open Policy Meeting: A quick look at QUIC40th TWNIC Open Policy Meeting: A quick look at QUIC
40th TWNIC Open Policy Meeting: A quick look at QUIC
APNIC109 views
ATPMOUSE_융합2조.pptx by kts120898
ATPMOUSE_융합2조.pptxATPMOUSE_융합2조.pptx
ATPMOUSE_융합2조.pptx
kts12089835 views
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx by LeasedLinesQuote
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptxCracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download by APNIC
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download
APNIC112 views
Penetration Testing for Cybersecurity Professionals by 211 Check
Penetration Testing for Cybersecurity ProfessionalsPenetration Testing for Cybersecurity Professionals
Penetration Testing for Cybersecurity Professionals
211 Check49 views

Docker from A to Z, including Swarm and OCCS

  • 1. munz & more Docker from A to Z Including Oracle Container Cloud Service OUGN Conference 2017 Dr. Frank Munz
  • 2. 2 Frank Munz • Founded munz & more in 2007 • 17 years Oracle Middleware, Cloud, and Distributed Computing • Consulting and High-End Training • Wrote two Oracle WLS and one Cloud book
  • 5. Docker • Open Source (evolving), written in Go • Container technology • Portable standard • Runs on Linux (Microsoft, MacOS, Solaris) Google starts 2.000.000.000 containers per week!
  • 6. Virtualization vs. Isolation munz & more #6 Linux + Docker Hardware a.war Immutable Docker container in Linux with own FS, network stack / IP address, process space and resource limits. -> Isolation Hardware OVM / VmWare ESX / Xen Application 1 Solaris Application 2 Linux Application 3 Win Server Virtualization Type 1 hypervisor = on bare metal Hardware Mac OS / Win Desktop Virtualization: Type 2 hypervisor = with host OS ejb.jar y.jar x.py JDK WebLogic tools Jython VirtualBox Application1 Linux Application2 Win
  • 7. Docker munz & more #7 Linux + Docker Hardware a.war ejb.jar y.jar x.py JDK WebLogic tools Jython Docker is not a lightweight VirtualBox - it's about isolation. Containers run on Linux kernel of host -> Containers are visible on host
  • 8. Docker Images • Package format • Layered incremental, copy on write file system • “Application with all dependencies” • Create image yourself or get it from Docker Hub docker image ls munz & more #8 Example Layers: - WLS Domain - WebLogic - Java - Linux Image
  • 9. Docker Container • Isolated runtime of Docker image • Starts up in milliseconds • Sandboxing uses Linux namespaces and cgroups (RAM, CPU, filesystem) -> isolated part of your Linux • Open Container Standard / Linux Foundation docker run -d –p 8080:9999 fmunz/micro munz & more #9
  • 10. Docker Limitations • Cannot load kernel modules • Applications that manipulate namespaces • Kernel config per container • Some SW not (yet) supported when running in Docker container: Oracle DB etc. munz & more #10
  • 11. Solves the “Worked For Me!” issue munz & more #11 OS tools, JDK, patches, database driver, libs, appserver, domain, deployment, tools, scripts Docker OS utils, JDK, patches, database driver, libs, appserver, domain, deployment, tools, scripts Integration, Performance, Acceptance Testing Production dockerize it! You can pass environment variables for specific settings e.g. in prod Docker Registry
  • 12. Dockerfile Manually create container with docker buildDockerfile Docker Image Automatic build: gitub push trigger image build +
  • 13. Automated Builds • Automatically build your images: GitHub account with Dockerfile • Registry uses GitHub directory structure as build context • Image is uploaded automatically to Docker hub -> Trust, up to date, and transparent
  • 14. Dockerfile munz & more #14 Manually create container: docker build –t name .
  • 15. And Then Automate • Build Docker images for testing from continuous delivery pipeline • Use Jenkins / Hudson hooks or a maven plugin to create / start / stop /delete Docker containers munz & more #15
  • 16. Docker Maven Plugins • Alternative approach to Dockerfile • Various plugins • Few only active munz & more #16 https://github.com/fabric8io/docker-maven-plugin fabric8: docker-maven
  • 18. Registry • Docker image is not found? -> pulled from registry • Push your image to registry docker push yourname/newimage • Free account includes 1 private registry Also private, containerized registry for download with fs and optional in-memory, S3, or Azure data store munz & more #18
  • 19. what should be your biggest nightmare: unknown and unofficial images (>14000) Docker Registry
  • 21. Docker in the Cloud? Supported by every major cloud provider: munz & more #21 On premise -> all clouds Docker Registry Docker Container Service EC2 Container Service Google Container Engine Azure Container Service Bluemix Containers
  • 22. Oracle Cloud and Docker Oracle Container Cloud Service OCCS (covered in part II) • Available now! Oracle Application Container Cloud Service • Uses Docker containers to run your Java or JavaScript application Compute Cloud Service • Manually run your containers Docker Data Center, AWS ECS, Google Container Service • Docker Clouds munz & more #22
  • 24. Small Images / Microservices You can have a real service in ... Possible Options: busybox and static binary munz & more #24
  • 25. Simple Life Inside Container munz & more #25 processes FS mounts
  • 27. $ docker run -d –p 8080:9999 fmunz/micro
  • 28. vs.
  • 29. A stranger gives you a box at night and asks you to connect it to your company network: Would you do it?
  • 30. Suggestions • Use trusted images / with known Dockerfile • Kernel features are well established – cgroups (2006, merged into 2.6.24 kernel) – namespaces (initial kernel patch 2.4.19) • Docker can use TLS (client to daemon) • Docker images can be signed • Think twice about pulling images from public repos / Docker hub munz & more #30
  • 31. FUD "Docker is like chroot() on steroids." • Yes: It's easy to escape chroot() environment • No: Docker does not use chroot() -> it uses namespaces munz & more #31
  • 32. Do namespaces solve it? 6 different namespace, but not everything is namespaced, eg: • /proc/sys|irq|bus • /sys, /sys/fs • /dev/mem • /dev/sd* • kernel modules • User namespaces since 1.9 Docker uses read-only mounts where possible munz & more #32
  • 33. Linux Capabilities • Privileged container: like being root on host • Capabilities -> Break down power of root • Examine PID 1 capabilities with getpcaps: munz & more #33
  • 34. User Namespaces • Before Docker 1.10 root process in container was root process on host – with limited capabilites • With Docker 1.10 user namespaces a root process in container can be mapped to user process on host – Disabled per default – To enable start Docker daemon with --userns-remap munz & more #34
  • 35. … more Suggestions • Drop privileges as quickly as possible • Treat root in container as root outside (although it isn't) • No secrets in images • Combine Docker with SELinux, AppArmor and / or virtualization • Host can always access container Note: Public PaaS do not simply spin up Docker containers! munz & more #35
  • 36. Cheat Sheet munz & more Source: Container-Solutions.com
  • 37. Conclusion • You have to deal with Docker security depending on your use case • Note: Public PaaS are not just spinning up Docker containers they use SELinux, VMs,… • Docker is not a risk per se but new technology with different challenges. munz & more #37
  • 39. Docker Style • Independent appserver in container • Microservices / 12-factor app architecture • Just add your favorite Docker cluster manager munz & more #39 OS tools, JDK, database driver, libs, appserver, single / selfcontained domain, deployment, tools, scripts
  • 40. JDK, WLS, Domain createServer.sh: creates machine/NM, starts NM, creates manServ, starts manServ WebLogic Example munz & more #40 $docker run -d --link wlsadmin:wlsadmin fmdom1 createServer.sh $docker run -d -p 8001:8001 --name=wlsadmin fmdom1 startWebLogic.sh JDK, WLS, Domain startWebLogic.sh starts AdminServer wlsadmin JDK, WLS, Domain createServer.sh: creates machine/NM, starts NM, creates manServ, starts manServ connect to admin due to --link: /etc/hosts 172.17.1.99 wlsadmin 31a1baaf OLD STYLE! Use Networks now…port 8001 IP:port 7001 Managed Servers --link
  • 41. Official Support #41^ Oracle support does not require you to use the provided Docker files Oracle Product Official Support GlassFish MySQL yes NoSQL OpenJDK Oracle Linux yes OracleCoherence yes OracleDatabase yes OracleHTTPServer yes OracleJDK yes OracleTuxedo yes OracleWebLogic yes
  • 42. Oracle and Docker Different approaches: 1. DIY: Dockerfile from Oracle github 2. Oracle Docker registry 3. Oracle Container Cloud Service munz & more #42
  • 43. DIY: Github • Github repo with set up scripts based on Oracle Linux • Docker is a supported environment for WebLogic 12.1.3+ https://github.com/oracle/docker-images munz & more #43
  • 44. Just Drop Server JRE and WLS Installer munz & more #44 $ cd java-8 $ docker build -t oracle/jdk:8 . Sending build context to Docker daemon 4.096 kB Step 1 : FROM oraclelinux:latest latest: Pulling from library/oraclelinux 10ec637c060c: Downloading 4.865 MB/97.84 MB ... $ sh buildDockerImage.sh -g -v 12.2.1.1 ...
  • 45. Extend the WLS image Sample script provided: • Dockerfile to extend WLS image • Run WLST script to create domain • Create boot.properties • Expose NM, Server ports munz & more #45 Linux Base Image JDK Image WebLogic Image WLS Domain Image
  • 46. Docker Registry (New) Docker images from Oracle container registry (restricted to US / OZ / GB!) Get image: $ docker login container-registry.oracle.com $ docker pull container-registry.oracle.com/java/serverjre:8 munz & more #46
  • 47. Container Cloud Service (New) Run your Docker in Oracle cloud with OCCS • Dashboards • Services • Stacks of services • Ressource pools • Registries munz & more #47
  • 48. OCCS
  • 49. OCCS • Easy way to run Docker container in Oracle cloud • No need to install Docker, buy machines etc. • Integrates with Docker hub and Oracle Container registry • Does not use Kubernetes or Docker Swarm
  • 55. Running Grafana in OCCS munz & more #55
  • 56. Webcasts on Youtube munz & more #56 https://www.youtube.com/watch?v=YFWAUEjtTpk https://www.youtube.com/watch?v=aRj0WK6uids
  • 57. munz & more #57 Is Docker the new PaaS?
  • 61. Networking: Facts to Know • Docker --link only works on single host -> regarded as deprecated now • Networking supported since Docker 1.9 • SDN network that spans hosts: Libnetwork implements Container Networking Model (CNM): Endpoint / Network / Sandbox munz & more #61
  • 63. Networking: Facts to Know • Integrated with Compose / Swarm • Two types: – Bridge: Single host – Overlay: Multiple hosts, based on k-v store munz & more #63
  • 65. Cluster Manager Options On Premise Cloud Docker Swarm Docker 1.12 Docker DC (EE) Kubernetes DIY Google Oracle Oracle Registry / Git Oracle CCS munz & more #65
  • 66. Kubernetes (K8s) • Kicked off by Google’s borg • Most active github project • Orchestration for containers, e.g. Docker • Declarative configuration • Service discovery • Rolling upgrades munz & more #66
  • 67. K8s • YAML configuration • Pod: Container(s) sharing IP, network, filesystem – IP is ephemeral – Uses Labels • Replication Controller -> Replica Set – Manages PODs (restarts replicas based on labels) • Services – Proxy for pod – Permanent IP munz & more #67
  • 68. Kubernetes • Not easy to install / manage • Recommended for local: minicube • Cloud: Google container engine • Oracle: somehow announced (?) • OCCS is not K8s munz & more #68
  • 69. Docker Swarm • Native Docker cluster with same API as a single engine • Fast provisioning, about 500 msec • Scheduling: spread, binpack, rand • No insecure mode J munz & more #69
  • 70. Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: • Load balancer included • Service discovery • Cluster scheduler -> Swarm has now more features similar to Kubernetes -> easier to get started munz & more #70
  • 71. Step to Create a Swarm 1. Create Swarm master node 2. Create worker nodes 3. Create / scale / update service 4. Use routing mesh munz & more #71
  • 72. Swarm Routing Mesh • All nodes participate in routing mesh • Load balancing for services • Service discovery munz & more #72 https://docs.docker.com/engine/swarm/ingress/ #publish-a-port-for-tcp-only-or-udp-only
  • 73. Kubernetes or Swarm? • Swarm wasn’t impressive when released, but this has changed now • Swarm is much easier to understand and to operate • Swarm covers a lot of what K8s does • Swarm is tightly linked to Docker API -> harder to replace Docker with e.g. Rocket munz & more #73
  • 76. Docker Containers in Kubernetes munz & more #76
  • 78. Design Goals for Mini • Hands-on Raspi experience • Kubernetes setup -> Docker Swarm setup • HA / failover / rolling updates • Build something cool munz & more #78
  • 79. Design Decisions for Mini • Hypriot Linux • 4 node cluster • ARM based -> runs ARM Docker images • Preferred Gbit switch, but WIFI only – Better I/O throughput with separate WIFI chip – Simplicity – DHCP reservation bug in router -> no MAC reservation for switch • Wifi router in hotspot mode – Mac OS issue with NAT • DIY: github https://github.com/fmunz/raspicluster munz & more #79
  • 80. Paper bag Computer Raspberry Pi • 1.2 GHz Quad Core ARM cortex-a53 • RAM: 1 GB LPDDR2 Speicher • Dual Core VideoCore, 1920x1080 • Bluetooth • 802.11 B/G WIFI • Boots from micro SD card • 38 € munz & more #80
  • 81. DIY Raspi Docker Cluster munz & more #81 Component Price Raspi 4x 38€ Micro SD 4x 11€ Power 28€ Wifi 22€ Case 30€ Wires 10€
  • 84. munz & more #84 Good Docker book by J. Turnbull / $ 9.99 (covering Docker 1.13)
  • 85. Predictions • Swarm will take its share from Kubernetes. • You will not dockerize 90% of your enterprise IT in the next 24 months. • Docker is the new Linux. Be ready to experience that feeling we had with Linux 13 years ago J • Sometimes Docker is the new PaaS. munz & more #85
  • 86. Conclusion • Docker is used in production • Docker, but more so cluster managers are still evolving • Docker is not a security risk, but tick off the referenced security checklist • Oracle caught the trend early – good! • Many Oracle products supported already, more to come? munz & more #86
  • 87. TL;DR @docker / #cloud works for me: solved / cross cloud / not everything must be a container / just Docker is not enough / #swarm is the easier #k8s / not a security risk / many products offered as images / official Oracle support / consider cloud services. @frankmunz