Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFoundry)

927 vues

Publié le

This presentation talks about how to migrate an existing Java EE applications onto IBM's Bluemix cloud platform, which is based CloudFoundry.

Publié dans : Logiciels
  • Login to see the comments

Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFoundry)

  1. 1. © 2015 IBM Corporation Migrating Java EE applications to IBM Bluemix Platform-as-a-Service David Currie Jack Cai
  2. 2. Understand the Basics: Cloud, Bluemix, Cloud Foundry
  3. 3. Traditional Deployment • Slow to set up • Expensive • Manage everything • Maintain security • Lots of waste You Manage Networking Storage Servers O/S Middleware Runtime Database Application 2
  4. 4. Cloud Service Models Infrastructure as a Service (IaaS) Platform as a Service (PaaS) Software as a Service (Saas) 3
  5. 5. Pizza as a Service 4
  6. 6. Cloud Service Models • Public Cloud • Over the internet • Fast & cheap • Private Cloud • More control • Hybrid Cloud • Interconnected 5
  7. 7. Build Your Own Cloud Use virtualized WebSphere App Server on your hardware IaaS – Amazon BYOS&L - WebSphere App Server PaaS - Bluemix Composable services WebSphere Liberty Profile Pure Application Systems Build reusable & redeployable patterns using the WebSphere App Server PaaS - Cloud Foundry WebSphere Liberty Build Pack IaaS - SoftLayer BYOS&L - WebSphere App Server Public Cloud Economies Time to Market Shared Everything Economics Packaged Services Total Control Maximum Flexibility Maximum Security On-Premises IaaS PaaS WebSphere Application Server - Flexibility in cloud 6
  8. 8. WebSphere Application Server • One solution, multiple deployment options • Right fit your application server • WebSphere Application Server Liberty Core for web applications • Network Deployment for maximum availability, scale, and QOS • Right fit your deployments • Traditional for maximum security, control, flexibility, and SOR • IaaS for hybrid environments and peak workloads • PaaS for Systems of Engagement • Integrated across deployment platforms • Move between platforms with license mobility • Move at your own pace On Premise On Cloud 7
  9. 9. Bluemix was built from the ground up with a user-based and design-centric approach. It addresses these personas and key needs. Our users include novice, born-on-the-cloud, and enterprise developers. Want to compose applications quickly with useful APIs, to avoid tedious backend config. Expect fast time-to-value, simplicity, flexibility, clear documentation. Failing Fast Seconds to Deploy Friction Free Any Language Continuous Integration Mobile Ready Focus on Code Choice of Tools Useful APIs Bluemix Goals: Focus on the Cloud & Enterprise Application Developer 8
  10. 10. Bluemix: IBM‟s Cloud Platform • DevOps • Big Data • Mobile • Watson • Business Analytics Bluemix service categories • Database • Web and application • Security • Internet of Things • Integration • Containers • Virtual Machines Developer experience • Rapidly deploy and scale applications in any language. • Compose applications quickly with useful APIs and services and avoid tedious backend config. • Realize fast time-to-value with simplicity, flexibility and clear documentation. Enterprise capability • Securely integrate with existing on-prem data and systems. • Choose from flexible deployment models. • Manage the full application lifecycle with DevOps. • Develop and deploy on a platform built on a foundation of open technology. Built on a foundation of open technology. Build, run, scale, manage, integrate & secure applications in the cloud 9
  11. 11. Bluemix embraces Cloud Foundry as an open source Platform as a Service and extends it with IBM, third party, and community built runtime and services. How does Bluemix work? 10
  12. 12. Key Concepts • cf: the command line tool used to interact with the CloudFoundry environment, via the cloud controller component • Buildpack: a collection of code responsible for transforming pushed application artifacts into a ready-to-run droplet, in a process referred to as „staging‟ • Droplet: a package containing everything that is needed in order to successfully run your application (e.g. JRE, Liberty, the application itself) short of the operating system • Service: the means of providing runtime dependencies needed by an application, e.g. a database • Warden: the containerization mechanism used to achieve application isolation in the CloudFoundry environment 11
  13. 13. Cloud Foundry Architecture 12
  14. 14. IBM Confidential June 7, 2013 Application Push • Push a stand-alone application to the cloud • cf push –p <path to file> • Default server configuration provided by the buildpack 13
  15. 15. Application Staging Buildpack 14
  16. 16. WebSphere Liberty Buildpack • Buildpack for running applications on IBM WebSphere Application Server Liberty Profile • Designed to run “packaged” servers, web applications and EAR packages • Generates the Liberty server configuration for bound services • Simplifies developers‟ lives by requiring minimal configuration and making it easy to consume services • Loads into the server only what is needed for a running application • https://github.com/cloudfoundry/ibm-websphere-liberty- buildpack 15
  17. 17. Service Integration with the Liberty buildpack • IBM services • SQLDB / dashDB • Monitoring and Analytics service • Auto-Scaling • Single Sign On • Data Cache • Session Cache • MQ Light • Cloudant • Third party/community services • New Relic • mysql / ClearDB • Postgresql / ElephantSQL • mongodb / MongoLab Information about bound services is available in the VCAP_SERVICES env var Some services are container managed only (SessionCache) Some services can be either container managed or application managed (SQLDB) Some services contain multiple features which can be separately enabled (Monitoring and Analytics) Some services have local analogs (SQLDB, mongo) and some do not (Monitoring and Analytics) Services may require client driver JARs, extension features (WXS ESA), Liberty features, bootstrap.properties 16
  18. 18. Migrating your code
  19. 19. social x2020 monitoring workload decision database sms mobile push geolocation Incremental Progression 18
  20. 20. Programming model gaps: Java EE 6 Java EE 6 Web Profile WAS Liberty profile WAS Full profile JSONP 1.0 JSON 1.0 Servlet 3.1 Web Socket 1.0 Concurrent 1.0 JAXB 2.2 CouchDB MongoDB Open ID 2.0 OAuth 2.0 JCA 1.6 JMS 1.1 JAX-WS 2.2 MDB 3.1 Java EE 6 Web Profile EJB Remote, 2.x, Timers Java Mail 1.5 JACC 1.5 JASPIC 1.1 Java 2 Security JavaMgmt 1.1 EnterpriseWS 1.4 *JAXR/UDDI *JAX-RPC JCA 1.6 JMS 1.1 JAX-WS 2.2 MDB 3.1 Java EE App Client *deprecated by Java EE 19
  21. 21. Coding Do‟s and Don‟ts • Stateless • Ephemeral file system • Ephemeral memory • Ports • Security • Avoid creating new process instances • Avoid writing to the local file system • Capture log information • HTTP session persistence • Listening for inbound connections • Stopping the server • Transport security is terminated at the router • Two-phase commit transactions 20
  22. 22. The Twelve Factor App – http://12factor.net/ 1. One codebase tracked in revision control, many deploys 2. Explicitly declare and isolate dependencies 3. Store config in the environment 4. Treat backing services as attached resources 5. Strictly separate build and run stages 6. Execute the app as one or more stateless processes 7. Export services via port binding 8. Scale out via the process model 9. Maximize robustness with fast startup and graceful shutdown 10. Keep development, staging, and production as similar as possible 11. Treat logs as event streams 12. Run admin/management tasks as one-off processes 21
  23. 23. DayTrader • Performance benchmark app • Java EE 6 • Uses database for persistence • The application or database does not scale • “System of Record” • Nothing cloud about it! 22
  24. 24. Deploy DayTrader to Bluemix • Tooling to help migrate • IBM WebSphere Application Server Migration Toolkit V8.5.5 – Liberty Technology Preview • Talks to either a cloud or on-premise database • Value-Add • Application can scale horizontally • Load balancing • High availability 23
  25. 25. Database • Use database services provided by Bluemix • Powerful auto-configuration features makes it easy to consume! @Resource (name = "jdbc/mydb") private DataSource db; “mydb” is the name of the service instance created in Bluemix 24
  26. 26. Scaling of the runtime • Scale up and down in seconds! • Condition based scaling 25
  27. 27. Session Persistence and Caching • WebSphere eXtreme Scale • Distributed object caching • Session off-load and replication 26
  28. 28. Other Application Services 27
  29. 29. Adoption of other services – Make it Engaging! • Rules Engine • Use Business Rules to monitor stocks, portfolio and perform actions when criteria is met • Social • View friends portfolio • Post tweets and collaborate on stock transactions • Stay connected w/ tweets related to your portfolio • Push/SMS • Instant notifications to buy or sell • Cloud Integration • Export backend interfaces as a service • Single Sign-On • Improve authentication • Watson • Add real intelligence to your application! 28
  30. 30. On-premiseservices SQLDB Session Cache Monitoring & Analytics Bluemix WAS Liberty Runtime IBM JRE WAS Liberty Buildpack Session Cache Twilio 29
  31. 31. © 2014 IBM Corporation For Additional Information • IBM Bluemix http://bluemix.net • IBM Training http://www.ibm.com/training • IBM WebSphere http://www-01.ibm.com/software/be/websphere/ • IBM developerWorks www.ibm.com/developerworks/websphere/websphere2.html • WebSphere forums and community www.ibm.com/developerworks/websphere/community/ 30
  32. 32. Notices and Disclaimers Copyright © 2015 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.
  33. 33. Notices and Disclaimers (con‟t) 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, Bluemix, Blueworks Live, CICS, Clearcase, DOORS®, Enterprise Document Management System™, Global Business Services ®, Global Technology Services ®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, SoDA, SPSS, StoredIQ, Tivoli®, Trusteer®, 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.
  34. 34. Thank You Your Feedback is Important! Access the InterConnect 2015 Conference CONNECT Attendee Portal to complete your session surveys from your smartphone, laptop or conference kiosk.