39
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Oracle WebLogic Server 12c with Docker OTN La’n America Tour 2015 Dr. Frank Munz munz & more Bruno Borges Oracle WebLogic Server Product Management 1

Oracle WebLogic Server 12c with Docker

Embed Size (px)

Citation preview

Page 1: Oracle WebLogic Server 12c with Docker

Copyright  ©  2014,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Oracle  WebLogic  Server  12c  with  Docker  OTN  La'n  America  Tour  2015  

 Dr.  Frank  Munz    munz  &  more    Bruno  Borges  Oracle  WebLogic  Server  Product  Management    

1  

Page 2: Oracle WebLogic Server 12c with Docker

Copyright  ©  2014,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   2  

• Bruno Borges

• Oracle Latin America

• Principal Product Manager WebLogic Latin America

• WebLogic Docker github initiator

Page 3: Oracle WebLogic Server 12c with Docker

3  

• Dr. Frank Munz

• Founded munz & more in 2007

• 15 years Oracle WebLogic and Middleware

• Consulting and High-End Training

• Three Oracle / Cloud books  

• twitter: @frankmunz

Page 4: Oracle WebLogic Server 12c with Docker

Copyright  ©  2014,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

What  we’re  going  to  talk  about…    

1  

2  

GeRng  Started  with  Docker    

Oracle  WebLogic  Server  12c  with  Docker  

 

     

4  

Page 5: Oracle WebLogic Server 12c with Docker

Copyright  ©  2014,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Safe  Harbor  Statement  The  following  is  intended  to  outline  our  general  product  direcVon.  It  is  intended  for  informaVon  purposes  only,  and  may  not  be  incorporated  into  any  contract.  It  is  not  a  commitment  to  deliver  any  material,  code,  or  funcVonality,  and  should  not  be  relied  upon  in  making  purchasing  decisions.  The  development,  release,  and  Vming  of  any  features  or  funcVonality  described  for  Oracle’s  products  remains  at  the  sole  discreVon  of  Oracle.  

5  

Page 6: Oracle WebLogic Server 12c with Docker
Page 7: Oracle WebLogic Server 12c with Docker

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

Adrian  Cockro[,    Ne]lix  

Page 8: Oracle WebLogic Server 12c with Docker

 

#OOW2015      ”...  Docker?”    

Page 9: Oracle WebLogic Server 12c with Docker

#0 ... some basics

Page 10: Oracle WebLogic Server 12c with Docker

Docker

•  Open Source (evolving), written in Go

•  Container technology supported by Oracle

•  Portable Standard

•  Runs on Linux (and Microsoft, Solaris)

Google starts 2.000.000.000 containers per week!

Page 11: Oracle WebLogic Server 12c with Docker

Virtualization vs. Container

munz & more #11  

Linux  +  Docker  

Hardware  

a.war  

Docker  container  in  Linux  with  own  FS,  network  stack  /    IP  address,  process  space  and    resource  limits    

Hardware  

OVM  /  VmWare  ESX  /  Xen  

Appl  1  Solaris  

Appl  1  Linux  

Appl  1  Win  

Server  VirtualizaVon  type  1  hypervisor  =  on  bare  metal  

Hardware  

VirtualBox  Mac  OS  /  Win  

App  Linux  

Desktop  VirtualizaVon:  type  2  hypervisor  =  with  host  OS    

App  Win  

App  Win  

ejb.jar  

y.jar  x.py  

JDK  WebLogic  

tools  Jython  

Page 12: Oracle WebLogic Server 12c with Docker

Docker

munz & more #12  

Linux  +  Docker  

Hardware  

a.war  ejb.jar  

y.jar  

x.py  

JDK  

WebLogic  

tools  

Jython  

Docker is not a lightweight VirtualBox Containers run on Linux kernel of host -> Containers are visible on host

Page 13: Oracle WebLogic Server 12c with Docker

Docker Images

•  Package format

•  Layered incremental file system

•  “Application with all dependencies”

•  Create it yourself or get it from Docker Hub

$  docker  images  

munz & more #13  

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

Page 14: Oracle WebLogic Server 12c with Docker

Docker Container •  Isolated runtime of image

•  Start up in milliseconds

•  Sandboxing uses Linux namespaces and cgroups -> isolated part of your Linux

•  Open Container Standard / Linux Foundation

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

munz & more #14  

a.war   ejb.jar  

y.jar  x.py  

JDK  WebLogic  

tools  Jython  

Page 15: Oracle WebLogic Server 12c with Docker

solves the “Worked For Me!” issue

munz & more #15  

 OS  tools,  JDK,  

patches,  database  driver,  libs,  

appserver,  domain,  deployment,  tools,  

scripts    

Docker  

OS  uVls,  JDK,  patches,  database  driver,  libs,  appserver,  domain,  deployment,  tools,  scripts  

IntegraVon,  Performance,  Acceptance    

 TesVng    

ProducVon  

dockerize it!

You can pass environment variables for specific settings e.g. in prod

Page 16: Oracle WebLogic Server 12c with Docker

#1 the registry

Page 17: Oracle WebLogic Server 12c with Docker

Registry

•  Hosted, code open sourced

•  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 #17  

Page 18: Oracle WebLogic Server 12c with Docker

what should be your biggest nightmare: unknown and unofficial images (>14000)

Docker  Registry  

Page 19: Oracle WebLogic Server 12c with Docker

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 20: Oracle WebLogic Server 12c with Docker

#2 clouds

Page 21: Oracle WebLogic Server 12c with Docker

Docker in the Cloud?

Supported by every major cloud provider:

munz & more #21  

On premise -> all clouds

Docker    Registry  

Page 22: Oracle WebLogic Server 12c with Docker

The new PaaS?

”PaaS: some hosted platform* that runs my Java, Java EE, node.js, or Ruby code.” Now you build your all-incl. container yourself...

->PaaS: platform that runs containers? *real cloud: API, elasticity, and pay per use

munz & more #22  

Page 23: Oracle WebLogic Server 12c with Docker

The new PaaS?

PaaS is more than just code-push...

-> Don’t forget DB as a Service, Integration Service (Oracle ICS) etc.

munz & more #23  

Page 24: Oracle WebLogic Server 12c with Docker

demo?

Page 25: Oracle WebLogic Server 12c with Docker

Small Images / Microservices

You can have a real service in ...

Possible Options: busybox and static binary

munz & more #25  

Page 26: Oracle WebLogic Server 12c with Docker

Simple Life Inside Container

munz & more #26  

processes

FS

mounts

Page 27: Oracle WebLogic Server 12c with Docker

#3 Yes, WebLogic!

 WLS  and  Docker  

Page 28: Oracle WebLogic Server 12c with Docker

WebLogic in a Docker Container!

Page 29: Oracle WebLogic Server 12c with Docker

What is supported?

munz & more #29  

Check the ff. Oracle docs: -  CertMatrix -  WLS &

Docker Whitepaper

Page 30: Oracle WebLogic Server 12c with Docker

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

•  Dev or generic distribution •  Docker is a supported

environment for WebLogic 12.1.3

munz & more #30  

Page 31: Oracle WebLogic Server 12c with Docker

Dockerfile

$docker build

Dockerfile and Scripts (from Oracle github)

WebLogic Docker Image (no domain)

Page 32: Oracle WebLogic Server 12c with Docker

Extend the WLS-only image

Sample script provided:

•  Dockerfile to extend WLS image. Starts with FROM  oracle/weblogic:12.1.3-­‐dev  

•  Run WLST script to create domain

•  Create boot.properties

•  Expose NM, Server ports

•  Default command: startWebLogic.sh

munz & more #32  

Page 33: Oracle WebLogic Server 12c with Docker

Docker Style

•  Independent WLS in container

•  Microservices style architecture

•  Just add your favorite Docker cluster manager

munz & more #33  

 OS  tools,  JDK,  

database  driver,  libs,  appserver,  single  domain  (admin  server  only),    

deployment,  tools,  scripts  

 

Page 34: Oracle WebLogic Server 12c with Docker

The WebLogic Way

munz & more #34  

$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  

or  createMachine.sh    or  startNodeManager.sh    

port  8001   IP:port  7001  

Managed  Servers  

Page 35: Oracle WebLogic Server 12c with Docker

The WebLogic Way Config

munz & more #35  

Managed  Server   Node  Manager  

Managed  Server  starVng  up  automaVcally  

Page 36: Oracle WebLogic Server 12c with Docker

Facts to Know

•  Oracle supports WebLogic on Docker

•  Docker networking is still experimental -> limitations for cross-machine deployments

•  Docker cluster managers are still evolving (Kubernetes, Apache Mesos with Marathon, AWS ECS, CloudFoundry, etc.)

munz & more #36  

Page 37: Oracle WebLogic Server 12c with Docker

munz & more #37  

Good  Docker  book  by  J.  Turnbull  (Docker  1.8)  

Oracle  Whitepaper  WebLogic  on  Docker  Containers  

Page 38: Oracle WebLogic Server 12c with Docker

gracias a ustedes!

Page 39: Oracle WebLogic Server 12c with Docker

Copyright  ©  2014,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

www.munzandmore.com/blog facebook.com/cloudcomputingbook facebook.com/weblogicbook @frankmunz youtube.com/weblogicbook

-> more than 45 web casts

Don’t be shy J