In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm...

90
munz & more Docker In the ORACLE Universe OTN Tour APAC / South America / 2016 Dr. Frank Munz

Transcript of In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm...

Page 1: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

munz & more

DockerIn the ORACLE UniverseOTN Tour APAC / South America / 2016 Dr. Frank Munz

Page 2: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 3: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 4: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

800 km

Page 5: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 6: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 7: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 8: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 9: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

9

•Frank Munz

•Founded munz & more in 2007

•15 years Oracle Middleware,Cloud, and Distributed Computing

•Consulting and High-End Training

•Wrote two Oracle andone Cloud book

Page 10: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 11: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

@frankmunz

Page 12: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker

Page 13: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

... some basics

Page 14: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

“Docker wasn’t on anyone’s agenda for 2014.It’s on every ones roadmap for 2015.”

Adrian Cockroft Netflix

Page 15: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

#OOW2014 ”... Docker?”

Page 16: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker

• Open Source (evolving), written in Go

• Container technology

• Portable standard

• Runs on Linux (Microsoft, MacOS, Solaris)

Google starts2.000.000.000containers per week!

Page 17: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Virtualization vs. Isolation

munz & more #17

Linux + Docker

Hardware

a.war

Docker container in Linuxwith own FS, network stack / IP address, process space and resource limits-> Isolation

Hardware

OVM / VmWare ESX / Xen

Application1

Solaris

Application2

Linux

Application3

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

JythonVirtualBox

Application1

Linux

Application2

Win

Page 18: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker

munz & more #18

Linux + Docker

Hardware

a.warejb.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

Page 19: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

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 images

munz & more #19

Example Layers:- WLS Domain- WebLogic- Java- Base Image

Page 20: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

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 3333:9999 fmunz/micro

munz & more #20

Page 21: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

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 #21

Page 22: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Solves the “Worked For Me!”

issue

munz & more #22

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

Page 23: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

And Now Automate

• Build Docker images for testing incontinuous delivery pipeline

• Use Jenkins / Hudson hooks or a maven plugin to create / start / stop /delete Docker containers

munz & more #23

Page 24: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

… automate, automate, automate

Various maven plugins available, e.g. R. Huss (Jolokia REST-JMX bridge):https://github.com/rhuss/docker-maven-plugin

munz & more #24

Page 25: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Dockerfile

Manually create container withdocker build Dockerfile

Docker Image

Automatic build

+

Page 26: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Dockerfile

munz & more #26

Manually create container:

docker build –t name .

Page 27: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

the registry

Page 28: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Registry

Public Hosted registry:

• Docker image is not found? pulled from registry• Push your image to registry

docker push yourname/newimage

• Free account includes 1 private registry

Private On Premise Registry:containerized registry for downloadwith fs and optional in-memory, S3, or Azure data store

munz & more #28

Page 29: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

what could be your biggest nightmare:

unknown and unofficial images(>14000)

Docker Registry

Page 30: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

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

Page 31: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

clouds

Page 32: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker in the Cloud?

Supported by every major cloud provider:

munz & more #32

On premise -> all clouds

Docker Registry

Docker Container Service

EC2 Container Service

Google Container Engine

Azure Container Service

Bluemix Containers

Page 33: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Oracle Cloud and Docker

Oracle Container Cloud Service (announced)• You can run your Docker containers and orchestrate them• This will work with a public registry

Application Container Cloud Service• Uses Docker containers to run your

Java or JavaScript application

Compute Cloud Service• Manually run your containers

munz & more #33

Page 34: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

OCCS Preview @ OOW 2016

munz & more #34

Page 35: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

OCCS @ OOW 2016

We run the first public Docker image (mine!) on OCCS at OOW 2016.

munz & more #35

Page 36: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

munz & more #36

Page 37: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

munz & more #37

Page 38: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

demo?

Page 39: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Small Images / Microservices

You can have a real service in ...

Possible Options:busybox andstatic binary

munz & more #39

Page 40: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Simple Life Inside Container

munz & more #40

processes

FS

mounts

Page 41: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

#3

Security

Page 42: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

$ docker run -d –p 8080:9999 fmunz/micro

Page 43: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

vs.

Page 44: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Mistery Box

A stranger gives you a box at night and asks you to connect it to your company network.

Would you do it?

Page 45: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

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 #45

Page 46: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

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 #46

Page 47: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Do namespaces solve it?

6 different namespace, butnot everything is namespaced, eg:• /proc/sys|irq|bus • /sys, /sys/fs• /dev/mem• /dev/sd*• kernel modules• No user namespaces (but experimental in 1.9)

Docker uses read-only mounts where possible

munz & more #47

Page 48: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Linux Capabilities

• Privileged container: like having root on host

• Capabilities -> Break down power of root

• Examine PID 1 capabilities with getpcaps:

munz & more #48

Page 49: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

"Containers don't contain!"

Quote by D. Walsh, Mr. SE Linux <- !!SELinux = what a process is able to do based on rules.

Enforcement:

containerProcessTypecan only read/exec/user files

and only write to containerFilesType

munz & more #49

A really bad idea: setenforce 0

Page 50: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

… 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 #50

Page 51: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Cheat Sheet

munz & more

Source: Container-Solutions.com

Page 52: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

User Namespaces

Docker 1.9 experimental supports user namespaces:

root in container != root on host

munz & more #52

Page 53: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Conclusion

• You have to deal with Docker securitydepending on your use case

• Note: Public PaaS are not just spinning up Docker containers they use SELinux, VMs,…

• Docker is not a risk per sebut new technology with different challenges.

munz & more #53

Page 54: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker in

Production?

Page 55: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

WebLogicin a Docker Container!

Page 56: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 57: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster
Page 58: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker Style

• Independent appserver in container

• Microservices style architecture

• Just add your favorite Docker cluster manager

munz & more #58

OS tools, JDK, database driver, libs,

appserver, single / selfcontained

domain, deployment, tools,

scripts

Page 59: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

JDK, WLS, DomaincreateServer.sh:

creates machine/NM,starts NM,

creates manServ,starts manServ

Links (OLD): WebLogic Example

munz & more #59

$docker run -d --link wlsadmin:wlsadminfmdom1 createServer.sh

$docker run -d -p 8001:8001 --name=wlsadmin fmdom1 startWebLogic.sh

JDK, WLS, Domain

startWebLogic.sh

starts AdminServer

wlsadmin

JDK, WLS, DomaincreateServer.sh:

creates machine/NM,starts NM,

creates manServ,starts manServ

connect to admindue to --link:/etc/hosts172.17.1.99 wlsadmin 31a1baaf

OLD STYLE!Use Networks now…port 8001 IP:port 7001

Managed Servers

--link

Page 60: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker in

the Oracle Universe

Page 62: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

https://github.com/oracle/docker-images

munz & more #62

Page 63: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

WebLogic: What Do You Get?

• NOT WebLogic from Docker registry• NO automatic build via github

• Github repo with scripts to set up WebLogic on Oracle Linux in Docker

• Generic distribution• Docker is a supported

environment forWebLogic 12.1.3+

munz & more #63

Page 64: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Just Drop Server JRE and WLS Installer

munz & more #64

$ cd java-8$ docker build -t oracle/jdk:8 .Sending build context to Docker daemon 4.096 kBStep 1 : FROM oraclelinux:latestlatest: Pulling from library/oraclelinux10ec637c060c: Downloading 4.865 MB/97.84 MB...

$ sh buildDockerImage.sh -g -v 12.2.1.1...

Page 65: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Dockerfile

$docker build -t wls:latest .

Dockerfile and Scripts (from Oracle github)

WebLogicDocker Image(no domain)

Page 66: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Dockerfile

Example Dockerfile: hello-world:

Example Dockerfile: fmunz/supersmall

Page 67: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Extend the WLS-only image

Sample script provided:

• Dockerfile to extend WLS image

• Run WLST script to create domain

• Create boot.properties

• Expose NM, Server ports

munz & more #67

Linux Base Image

JDK Image

WebLogic Image

WLS Domain Image

Page 68: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker Compose

munz & more #68

docker-compose.yml

With –f you can have multiple Docker Compose YAML files

Page 69: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker

Networking

Page 70: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

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 implementsContainer Networking Model (CNM):Endpoint / Network / Sandbox

munz & more #70

Page 71: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Overlay Network

munz & more #71

Page 72: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

munz & more #72

OracleWebLogic/samples/1221-multihost:

Page 73: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Networking

• etcd, consul, or zookeeper used for machine discovery and meta data

• Top level API:docker network

• Libnetwork, open sourced 04/2015, 500 pull requests

• Dynamically (dis)connect to multiple NW

munz & more #73

Page 74: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Networking

munz & more #74

Page 75: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker Compose

Page 76: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Orchestration /

Cluster Manager

Page 77: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Setup Swarm and Machine

1. Create Swarm ID

2. Create Machine with Swarm master

3. Create Machine with Swarm agent01 / 02

4. Set Docker env for Swarm master

munz & more #77

Page 78: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker Swarm

• Native Docker cluster-> same API as a single engine

• Fast provisioning, about 500 msec• Scheduling Algo: spread, binpack, rand• Features are optional,

you can continue use Kubernetes etc.

• There is NO insecure mode☺

munz & more #78

Page 79: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker Swarm

Since Docker 1.12• Swarm is merged with Docker engine:

– Load balancer included– Service discovery– Cluster scheduler

• Swarm has many features like Google's Kubernetes- easier to get started

munz & more #79

Page 80: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Docker Machine

• Provision Docker in VirtualBox, Vmware, GCE, AWS, DigitalOcean etc.

docker-machine \create -d=virtualbox default

• Mac OS's boot2docker is replacedby Docker Machine, which againis replaced by native Docker on Mac now

munz & more #80

Page 81: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Updates Images?

You could use Docker copy command –yet it’s not hip in the cloud to update.Just rebuild the container.

munz & more #81

“Servers are cattle. Not pets.”

-> immutable server

Page 82: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

My Predictions

• Swarm will take its share from Kubernetes.

• You will not dockerize 90% of your enterprise IT in the next 18 months.

• Docker is the new Linux.Be ready to experience that feeling we had with Linux 13 years ago ☺

munz & more #82

Page 83: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Conclusion

• Docker is ready for prime time!

• Docker itself, but more so cluster managers are still evolving

• Docker is not a security risk, but make sure to tick off the security checklist

• Oracle caught the trend early – good!

• Many products supported, more to come?

munz & more #83

Page 84: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

http://www.oracle.com/us/products/middleware/cloud-app-foundation/weblogic/weblogic-server-on-docker-wp-2742665.pdf

Oracle Whitepaper WebLogic on Docker

Page 85: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

munz & more #85

Good Docker book byJ. Turnbull (covering Docker 1.12)

Page 86: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Thank You!

Page 87: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

You can win a book... if you promise to write a short

review on Amazon.com

Page 88: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

Adivina el numero

entre 1 y 100

Page 89: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

tweet to win!

#otntour AND @soacommunity

@frankmunz

+picture?

Page 90: In the ORACLE Universe - macleanliu Munz - Docker in... · Docker Swarm Since Docker 1.12 • Swarm is merged with Docker engine: –Load balancer included –Service discovery –Cluster

www.munzandmore.com/blog

facebook.com/cloudcomputingbookfacebook.com/weblogicbook

@frankmunz

youtube.com/weblogicbook-> more than 50 web casts

Don’t be shy ☺