Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

IBM WebSphere Liberty and Docker Deep Dive

1.800 visualizaciones

Publicado el

Latest incarnation of the Liberty and Docker deck as presented at IBM Cloud Technical University in October 2016.

Publicado en: Software
  • Sé el primero en comentar

IBM WebSphere Liberty and Docker Deep Dive

  1. 1. IBM Cloud Technical University 2016 25 – 28 October 2016|Madrid, Spain A133 IBM WebSphere Liberty and Docker Deep Dive David Currie | @dcurrie | WebSphere Application Server Development
  2. 2. © 2016 IBM Corporation 2 Agenda • Docker Fundamentals • Docker and Liberty Development • Deployment Pipeline to Production • Scalability – Liberty Collectives – Docker Datacenter – IBM Containers
  3. 3. IBM Cloud Technical University 2016 25 – 28 October 2016|Madrid, Spain David Currie | @dcurrie | WebSphere Application Server Development Docker Fundamentals
  4. 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! “ ”
  5. 5. Linux containers Linux process PID IPC = Namespaces for isolation CPU Memory = Control groups for resource constraint
  6. 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. 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. 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. 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. 10. IBM Cloud Technical University 2016 25 – 28 October 2016|Madrid, Spain David Currie | @dcurrie | WebSphere Application Server Development Docker and Liberty Development
  11. 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 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. 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. 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
  14. 14. WebSphere Developer Tools
  15. 15. Debugging Liberty under Docker
  16. 16. IBM Cloud Technical University 2016 25 – 28 October 2016|Madrid, Spain David Currie | @dcurrie | WebSphere Application Server Development Deployment Pipeline to Production
  17. 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. 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. 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. 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:
  21. 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. 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. 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. 24. IBM Cloud Technical University 2016 25 – 28 October 2016|Madrid, Spain David Currie | @dcurrie | WebSphere Application Server Development Scalability
  25. 25. Image deployment via collective controller IHS/Plugin Collective Controller Liberty Docker Engine Docker Engine Liberty Liberty Admin HTTP
  26. 26. Docker Datacenter • Based on Docker Compose/Swarm • Adds local registry, commercially supported engine, access control and UI • IBM reselling with support: 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. 27. Swarm, Compose and Liberty collectives Swarm Master IHS/Plugin Collective Controller Liberty Swarm Agent Swarm Agent Liberty Docker Compose HTTP DB
  28. 28. IBM Containers on Bluemix
  29. 29. Scalable container group
  30. 30. Auto-scaling (beta)
  31. 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. 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: –
  33. 33. IBM WebSphere Development Thank you very much. © 2016 IBM Corporation 33 David Currie
  34. 34. © 2016 IBM Corporation 34 Your feedback is valuable Please complete your session or lab evaluation! Session number A133 Provide your evaluations by: Evaluation forms: Fill out a form at the end of each session Paper forms are located in each of the session or lab rooms Complete the session survey on Event Connect Portal: Select Sessions, then Session Finder, and complete the survey - Or -
  35. 35. Notes and Disclaimers 35 Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary. References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business. Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation. It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law
  36. 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,, 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: