This document provides an agenda and overview for an IBM technical session on WebSphere Liberty and Docker. The session will cover Docker fundamentals, developing with Docker and Liberty, deploying applications in a production pipeline using Docker, and scaling with Docker technologies like Liberty collectives and Docker Datacenter. It includes slides on topics like building Docker images, the Docker development workflow, deployment best practices, and using Docker to improve scalability.
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
IBM Cloud Technical University 2016: Docker and Liberty Deep Dive
1. IBM Cloud Technical University 2016
25 – 28 October 2016|Madrid, Spain
A133
IBM WebSphere Liberty and
Docker Deep Dive
David Currie | @dcurrie | david_currie@uk.ibm.com
WebSphere Application Server Development
3. IBM Cloud Technical University 2016
25 – 28 October 2016|Madrid, Spain
David Currie | @dcurrie | david_currie@uk.ibm.com
WebSphere Application Server Development
Docker Fundamentals
4. Containers are like lightweight
Virtual Machines
Containers vs VMs
Helps understand the rationale for containers
– Isolation, repeatability and portability of VMs but
without the deployment and runtime overhead of
an entire OS image and hypervisor
But no help in understand what containers are!
“
”
6. Server 1
Building a Docker image
FROM ibmjava
RUN wget …
&& unzip …
CMD server run
Dockerfile
jre
liberty
CMD server run
Image: wlp
Docker
Engine
docker build -t wlp .
Registryjre
Registry
ibmjava
7. Server 1
Pushing to a Docker registry
jre
liberty
CMD server run
Image: wlp
Docker
Engine
docker push wlp
jre
liberty
CMD server run
Registry
wlp
8. Server 2
Pulling from a Docker registry
jre
liberty
CMD server run
Image: wlp
Docker
Engine
docker pull wlp
jre
Registry
liberty
CMD server run
wlp
9. Server 2
Docker run
jre
liberty
CMD server run
Image: wlp
jre
liberty
CMD server run
Container
R/W layer
Docker
Engine
docker run wlp
jre
Registry
liberty
CMD server run
wlp
10. IBM Cloud Technical University 2016
25 – 28 October 2016|Madrid, Spain
David Currie | @dcurrie | david_currie@uk.ibm.com
WebSphere Application Server Development
Docker and Liberty Development
11. Developer images on Docker Hub
$ docker run websphere-liberty
Unable to find image 'websphere-liberty:latest' locally
latest: Pulling from library/websphere-liberty
cad964aed91d: Pull complete
3a80a22fea63: Pull complete
…
Digest:
sha256:af8a91cb0da0f2561613f51ea477cd1c15e64f24698755177ba6c575c48c749c
Status: Downloaded newer image for websphere-liberty:latest
Launching defaultServer (WebSphere Application Server 16.0.0.3/wlp-
1.0.14.cl160320160831-1555) on IBM J9 VM, version pxa6480sr3fp12-20160S)
[AUDIT ] CWWKE0001I: The server defaultServer has been launched.
…
[AUDIT ] CWWKF0011I: The server defaultServer is ready to run a smarter
planet.
12. Official image hierarchy
Also available: s390x/websphere-liberty &
ppc64le/websphere-liberty
websphere-liberty
:kernel :webProfile7
:javaee7 /
:latest
:webProfile6:beta
:microProfile
ubuntu:16.04 ibmjava:8-jre
13. Running a WAR file
• It really is a mount – not a copy of the file
• Updates from the host are now reflected in
the container
.war
$ docker run -d -p 9080:9080
-v $(pwd)/app.war:/config/dropins/app.war
websphere-liberty:webProfile7
16. IBM Cloud Technical University 2016
25 – 28 October 2016|Madrid, Spain
David Currie | @dcurrie | david_currie@uk.ibm.com
WebSphere Application Server Development
Deployment Pipeline to Production
17. Deployment pipeline
Repository
Developer
Download dev
image
Dev on local
image
Check app
code into
Git
Repository
Build app,
layer onto
image in
repository
Put image with
app into repo
Pull image
down to test
boxes
Run tests on
Docker ready test
boxes
If images
pass, update
image in repo
with tag to
indicate prod
ready
Repository
Deploy images
into
production
Run on Docker on
IaaS
Run on CaaS
Run on local
Docker
UrbanCode can be
used to install Docker
on IaaS or on-prem
18. • Build an application layer on a base image
containing the application server
• Dockerfile:
• Modifying the application requires rebuilding
and redeploying just the application layer
FROM websphere-liberty:webProfile7
ADD app.war /config/dropins/
Deploying an application
.war
docker build -t app .
docker run -d -p 80:9080 -p 443:9443 app
19. FROM websphere-liberty:kernel
COPY server.xml /config/
RUN installUtility install --acceptLicense defaultServer
Building a ‘right size’ image
1. Start with the Liberty kernel image
2. Add the application’s server.xml
3. Use installUtility to add just the features
required by the application
20. Obtaining a production licensed
image
• Build your own images using binaries
from Passport Advantage, or
• Upgrade the websphere-liberty image
using executable license JARs from
Passport Advantage
• Instructions and example Dockerfiles:
https://github.com/WASdev/ci.docker
21. Environmental configuration
• Don’t build environment specific images
• Add environment specific configuration at
runtime
• Options:
1. Environments variables
• Easy to insert in to Liberty config ${env.YYY}
• End up in Docker meta-data/logs
2. Mounted files
3. Pull from key-value store
22. Persistent state
• Treat containers as cattle not pets
– Don’t persist state inside containers
• Use non-containerized backing services or
• Write state to volumes outside of the
container
– NFS e.g. GlusterFS
– Volume management e.g. Flocker
23. Logging
• Potential for large number of ephemeral
containers
– Offload and centralize logs for ease of problem
determination
• Docker logging enables collection of
SystemOut/SystemErr
• Liberty features push
messages, trace,
FFDC, GC and HTTP
access logs
– logstashCollector
– bluemixLogCollector
24. IBM Cloud Technical University 2016
25 – 28 October 2016|Madrid, Spain
David Currie | @dcurrie | david_currie@uk.ibm.com
WebSphere Application Server Development
Scalability
25. Image deployment via collective controller
IHS/Plugin
Collective
Controller
Liberty
Docker
Engine
Docker
Engine
Liberty
Liberty
Admin
HTTP
26. Docker Datacenter
• Based on Docker Compose/Swarm
• Adds local registry, commercially supported engine, access
control and UI
• IBM reselling with support: ibm.biz/ddc-announce
UCP Controller
Swarm
Manager
Certificate
Authority
KV Store
Docker Remote API Docker Remote API
LDAP/AD
User Requests via
Docker Remote API
External CA
HA Replica
Swarm
KV Store
HA Replica
Swarm
KV Store
Docker
Trusted
Registry
27. Swarm, Compose and Liberty collectives
Swarm
Master
IHS/Plugin
Collective
Controller
Liberty
Swarm
Agent
Swarm
Agent
Liberty
Docker
Compose
HTTP
DB
31. More on IBM Containers
• Private registry with Vulnerability Advisor
• Per-minute billing
• Integrated logging and monitoring
• Private VLAN and persistent volumes
• Available in all Bluemix flavors
– Public
– Dedicated
– Local
32. One final note:WAS traditional and Docker
• Liberty’s size, start-up time and configurability
make it the best fit for containers
• WAS traditional in Docker is also
– Allows existing and new workloads to share a
common container platform
• WAS developer/try-buy images available on
Docker Hub at ibmcom/websphere-traditional
• Dockerfiles/scripts:
– https://github.com/WASdev/websphere-traditional
36. Notes and Disclaimers
36
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products in connection with this publication
and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions
on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the
quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM
EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM
patents, copyrights, trademarks or other intellectual property right.
IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®,
Enterprise Document Management System™, FASP®, FileNet®, Global Business Services ®, Global Technology
Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®,
MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™,
PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®,
Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli®,
Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of
International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names
might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and
trademark information" at: www.ibm.com/legal/copytrade.shtml.