WebLogic On Containers On-Prem Cloud PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Running WebLogic on Containers

On-Premises and Public Cloud


Robert Honeyman
http://www.honeymanit.co.uk
rob.honeyman@honeymanit.co.uk
DOCKER ENGINE
DOCKER IMAGES & LAYERS

 Dockerimage is the set of binaries required to instantiate a


container
 Images are built from layers
 Layers
are SHA256 hashed so that they are only rebuilt
incrementally if they have changed
 Time saving
 Space saving
DOCKER CONTAINERS

 An instantiation of an image
 Set of processes required to run a service
 Small or large :
 a single command e.g. ping
 a full operating system with multiple services nested in the container

 Docker uses OS kernel


 Linux
 Containers for Windows Server 2016

 Container does not run in a separate process space like a VM


 Container processes are visible from Docker host
DOCKER VERSIONS

 Docker CE (Community Edition)


 Free version
 Open Source
 Provides core tool set and main features

 Docker EE (Enterprise Edition)


 Enterprise licensing
 Enhanced features – e.g. advanced swarm load balancing, stickiness etc
 Formerly known as Docker Data Center
DOCKER DISTRIBUTIONS

 Docker for Linux


 Original native version
 Docker for Windows
 Windows 10 Pro, Enterprise, Windows 2016
 Requires Hyper-V
 Embedded Linux VM
 Docker Toolbox (Legacy)
 Windows 7,8
 Virtualbox
 Embedded Linux VM
 Docker for IAAS
 Docker Official Marketplace Apps
 MS Azure
 AWS
DOCKER PUBLIC CLOUD PAAS

All the major public clouds also provide a Docker


compatible container service as well as Docker
themselves.

 Microsoft Azure Container Service Engine


 Oracle Container Service
 Red Hat OpenShift
 Amazon EC2 Container Service
 Google Container Engine
BASIC DOCKER COMMANDS

 Get docker build information

docker info

 Run a container (pulls an image if not present locally)

docker container run –d –-name mywebserver –p 80:80 httpd

 Pull an image without running a container


docker image pull httpd

 View container information


docker container ls
docker container ps <container>
docker container inspect <container>
 View image information
docker image ls
docker image ps <container>
docker image inspect <container>

 Get help
docker –help
docker <command> --help
DOCKERFILES AND DOCKER-COMPOSE FILES

 Dockerfiles
 Command file to build an image and issue first start command
 Each command builds a new layer

 docker-compose file
 YAML Format
 Development deployment tool
STORAGE

 Volumes
 Docker Managed external to container
 Different drivers possible

 Bind Mounts
 Mapped to host file system / directory
 Potentially useful for development
 Shared storage?
SWARM, SERVICES AND STACKS

 Swarm is built into Docker for orchestration and


 Swarm cluster comprises
 Masters
 Workers

 Services
 Services allow scale and redundancy
 Containers abstracted

 Stacks
can use YAML files in same way as docker-
compose
 production ready
 define full stack of services and dependencies
SWARM MODE
ORACLE RESOURCES

 Oracle Docker Whitepaper


 http://www.oracle.com/technetwork/middleware/weblogic/overvie
w/weblogic-server-docker-containers-2491959.pdf

 Oracle Support Note for Docker 2017945.1


 https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoo
p=406751007847345&id=2017945.1&_afrWindowMode=0&_adf.ctrl-
state=8o7bv5ya0_4

 Docker Store
 https://store.docker.com/images/oracle-weblogic-server-12c

 GitHub Oracle WebLogic Docker Scripts / Templates


 https://github.com/oracle/docker-
images/tree/master/OracleWebLogic
ORACLE BEST PRACTICES

 Certified Docker containers on Red Hat / OEL hosts


 Othernon-EL host versions (inc Docker) supported as per
VMWare, i.e. unrepeatable issue means Oracle will refer
customer to host OS vendor support
 Git scripts appear most production ready Oracle method
of deployment
 Full customization of script samples possible
 Well documented
 White paper recommended topologies
ORACLE DOCUMENTED TOPOLOGIES
ORACLE CONTAINER REGISTRY
https://container-registry.oracle.com
ORACLE CONTAINER REGISTRY

 Prebuilt WebLogic Images


 WebLogic versions
 12.2.1.1
 12.2.1.2

A base_domain is included in the image


 12.2.1.3
not yet supported in Oracle Container Registry, but
are some examples in GitHub
 Images are also available on Docker Store now
 https://store.docker.com/images/oracle-weblogic-server-12c
DEMO 1 : BUILDING A LOCAL DOCKER
WEBLOGIC INSTANCE
1. Pull the image first as required to authenticate to Oracle Container Registry.
Trying to launch using “docker run …” fails as authentication prompt not
presented. Use your Oracle account to login and note this is a large download.
2. Check the image in the local image repository.
3. Run the container image now it has been stored in the local image repository.
4. Wait a bit ….
5. Check the logs and the containers to verify the WebLogic has started.
6. Adjust some of the environment variables and create another container.
docker image pull container-registry.oracle.com/middleware/weblogic:12.2.1.2

docker image ls

docker container run -d --name wl-1221-base -p 7001:7001 container-


registry.oracle.com/middleware/weblogic:12.2.1.2

docker container logs wls-1221-base

docker container exec -it wl-1221-base bash

(look for password entry at the top of the log output and enter weblogic/password)

Alternative in new Docker Store:


https://store.docker.com/images/oracle-weblogic-server-12c
docker pull store/oracle/weblogic:12.2.1.2

Login weblogic:<password> at

http://localhost:7001
DEMO 2 : BUILDING A DOCKER WEBLOGIC
SWARM IN MICROSOFT AZURE
DEMO 2 : BUILDING A DOCKER FOR AZURE
SWARM AND DEPLOYING WEBLOGIC
DEMO 2 : BUILDING A DOCKER WEBLOGIC
SWARM IN MICROSOFT AZURE
docker image pull container-registry.oracle.com/middleware/weblogic:12.2.1.2
docker image ls

docker service create -d --replicas 1 --name wl-1221-base -p 7001:7001 container-


registry.oracle.com/middleware/weblogic:12.2.1.2

docker service ls
docker service ps <container>
docker container logs wls-1221-base

Login weblogic:<password> at

http://localhost:7001

docker service scale wl-1221-base=2

Check login again

docker service scale wl-1221-base=1

Check login again

Create second service


DEMO 3 : BUILD AN IMAGE FROM ORACLE
SCRIPTS

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


DEMO 3 : BUILDING A DOCKER SANDPIT

1. Go to the Docker play sandpit (4 hour timeout)


http://labs.play-with-docker.com/
Note : Docker preinstalled (if installing on Linux then “curl -sSL https://get.docker.com/ | sh”)

2. Create nodes
3. Initialise swarm on node 1
4. Add workers and managers on other nodes
5. Check configuration
6. Experiment !!!

You might also like