Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Porting of an enterprise OSGi application to a PaaS

Porting of an enterprise OSGi application to a PaaS

This presentation show how to port an (enterprise OSGi) application to a platform-as-a-service-like infrastructure using Docker.

E7c3430a01629f9ca6d3bcb847e8e3b2?s=128

Thomas Uhrig

July 23, 2014
Tweet

Transcript

  1. Porting of an enterprise OSGi application to a PaaS Thomas

    Uhrig tuhrig.de@gmail.com www.tuhrig.de Matrikelnummer: 25826
  2. Agenda Cloud computing ………………………………………………………………………….. 3 Our goals ………………………………………………………………………….. 8 Containers

    as a platform ………………………………………………………………………….. 10 Deploying on AWS ………………………………………………………………………….. 18 Tooling ………………………………………………………………………….. 21 Demo ………………………………………………………………………….. 24 Conclusion ………………………………………………………………………….. 26 References ………………………………………………………………………….. 28 Slide 02/32
  3. What is cloud computing?

  4. Abstraction Cloud computing is all about abstraction and services! ❖

    Traditional resources become services (e.g. CPU or Storage). ❖ Services are on-demand, scalable and isolated. ❖ A set of services makes up a cloud offer. ❖ Different services target different problem domains and users. Abstraction Service Resources Slide 04/32
  5. Example IT and DevOps Developer Customers Slide 05/32

  6. Example IT and DevOps Developer Customers Slide 05/32 Virtual machines

    as a Service Application server as a Service Customer relations as a Service
  7. Levels Infrastructure as a Service Platform as a Service Software

    as a Service VMs Applications Containers Runtimes Environments Services Sandboxes ❖ PaaS is the most diverse layer. ❖ Vendors try to outstand in the market by unique concepts. ❖ However, there is no OSGi-as-a-Service! Slide 06/32
  8. Levels Compute Communicate Software Defined Networks Routing Infrastructure PaaS Applications

    Hardware Virtual Machines Application Containers Application PaaS Model driven platforms Compute App Services Software Defined Storage Object storage Database PaaS Store App Services IaaS Foundational PaaS PaaS SaaS Model driven App Services Infrastructure Engineers DevOps Developers End-users Business Engineers Developers 1 2 3 6 4 5 Communicate App Services ___________________________________________________________________________ Reference: Simplified cloud model according to Johan Den Haan at goo.gl/jexFPB Store Slide 07/32
  9. Our goals for the cloud

  10. Goals ❖ A deployment strategy which is easy, automated, repeatable

    and generic. ❖ A PaaS or PaaS-like infrastructure. ❖ Usage of cloud services. Which platform? Which deployment? Informatica PIM Slide 09/32
  11. Containers as a platform

  12. Containers ❖ A method to package and transport code ❖

    Package heterogeneous applications into a generic format ❖ A platform and environment for applications (an ideal OS) ❖ Raise the abstraction layer (an abstract OS) WAR-files Docker CDs OSGi framework a platform portable self-contained Slide 11/32
  13. Containers ❖ Reliable deployment in different environments (local machines, VMs

    or clouds) ❖ High performance and lightweight ❖ Loose decoupling and isolation of systems ❖ Basic building blocks for application stacks (see demo!) Slide 12/32 WAR-files Docker CDs OSGi framework a platform portable self-contained
  14. Docker ❖ An application container for Linux. ❖ Packages applications

    with all dependencies into a portable format. ❖ Open source under an Apache license (v2) and available on GitHub. ❖ Makes use of existing Linux tools for isolation. ❖ Nearly native performance. Docker Build System Container API Repository Slide 13/32
  15. Docker ❖ Docker is a tooling (glue code) for existing

    Linux technologies. ❖ Docker utilize those technologies to build a platform for application containers. Docker cgroups AUFS Namespaces Slide 14/32
  16. Example DOCKER Java Tomcat SSL- Certificat HSX /var/log /var/www/hsx/settings /var/www/hsx/filestorage

    9090 8443 HARDWARE LINUX Informatica Supplier Exchange Slide 15/32
  17. Example Java Tomcat SSL- Certificat HSX /var/log /var/www/hsx/settings /var/www/hsx/filestorage 9090

    8443 Informatica Supplier Exchange Slide 15/32 Completely self-contained!
  18. Example DOCKER Java Tomcat SSL- Certificat HSX /var/log /var/log /var/www/hsx/settings

    /home/ubuntu/hsx /var/www/hsx/filestorage /home/ubuntu/filestorage 80 9090 443 8443 HARDWARE LINUX Informatica Supplier Exchange Slide 15/32
  19. Example DOCKER Java Tomcat SSL- Certificat HSX /var/log /var/log /var/www/hsx/settings

    /home/ubuntu/hsx /var/www/hsx/filestorage /home/ubuntu/filestorage 80 9090 443 8443 HARDWARE LINUX Cloud Informatica Supplier Exchange Slide 15/32
  20. Example DOCKER Java Tomcat SSL- Certificat HSX /var/log /var/log /var/www/hsx/settings

    /home/ubuntu/hsx /var/www/hsx/filestorage /home/ubuntu/filestorage 80 9090 443 8443 HARDWARE LINUX HOST Cloud PaaS Informatica Supplier Exchange Slide 15/32
  21. Example DOCKER Java Tomcat SSL- Certificat HSX /var/log /var/log /var/www/hsx/settings

    /home/ubuntu/hsx /var/www/hsx/filestorage /home/ubuntu/filestorage 80 9090 443 8443 HARDWARE LINUX HOST Cloud PaaS Informatica Supplier Exchange (REST) API Slide 15/32
  22. Example DOCKER Java Tomcat SSL- Certificat HSX /var/log /var/www/hsx/settings /var/www/hsx/filestorage

    9090 8443 HARDWARE LINUX HOST Cloud PaaS Informatica Supplier Exchange (REST) API Build file Slide 15/32
  23. Example FROM ubuntu MAINTAINER Thomas Uhrig (tuhrig@informatica.com) RUN apt-get update

    && apt-get install -y openjdk-7-jre-headless RUN apt-get install -y tomcat7 ADD /hsx/tomcat/webapps/ /usr/share/tomcat7/webapps/ ADD /hsx/tomcat/conf/ /usr/share/tomcat7/conf/ RUN mkdir /usr/share/tomcat7/temp ADD /logging.properties /usr/share/tomcat7/conf/logging.properties ADD /server.xml /usr/share/tomcat7/conf/server.xml ADD /tomcat-users.xml /usr/share/tomcat7/conf/tomcat-users.xml ADD /hsx/configuration/ /var/www/hsx/configuration/ ADD /hsx/database/ /var/www/hsx/database/ ADD /hsx/filestorage/ /var/www/hsx/filestorage/ ADD /hsx/logs/ /var/www/hsx/logs/ ADD /run.sh /var/www/hsx/run.sh RUN /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore /root/.keystore -storepass password -keypass password -dname "CN=localhost, OU=Docker, O=Ubuntu, L=Stgt, S=Germany, C=DE" EXPOSE 9090 8443 CMD sh /var/www/hsx/run.sh Slide 16/32
  24. Example DOCKER HARDWARE LINUX HOST Cloud PaaS Slide 17/32 (REST)

    API
  25. Example DOCKER HARDWARE LINUX HOST Cloud PaaS Informatica Supplier Exchange

    Informatica PIM Server Log Stash Slide 17/32 (REST) API I S O L A T E D I S O L A T E D
  26. Example DOCKER HARDWARE LINUX HOST Cloud PaaS Informatica Supplier Exchange

    (REST) API Informatica PIM Server Log Stash Java 7 Logstash Agent Java 8 Tomcat Linux Kernel Slide 17/32
  27. Example DOCKER HARDWARE LINUX HOST Cloud PaaS Informatica Supplier Exchange

    (REST) API Informatica PIM Server Log Stash Java 7 Logstash Agent Java 8 Tomcat Linux Kernel Slide 17/32 A complete image
  28. Example DOCKER HARDWARE LINUX HOST Cloud PaaS Informatica Supplier Exchange

    (REST) API Informatica PIM Server Log Stash Java 7 Logstash Agent Java 8 Tomcat Linux Kernel Slide 17/32 AUFS (advanced multi layered unification filesystem)
  29. Deploying to Amazon Web Services

  30. AWS ❖ Amazon Web Services (AWS) is the cloud offer

    from Amazon ❖ 29 (decoupled) services (July 2014) from virtual machines to databases ❖ Support of many technologies (including Linux, Windows, Java, Python, Tomcat, Docker) ❖ Most mature and leading cloud offer ❖ Competitors are Microsoft, Google and dozens of small and medium companies Slide 19/32 #1
  31. AWS EC2 Virtual machines as a Service • Linux •

    Windows • On demand • Sizing • Root access RDS Databases as a Service • MSSQL • Oracle • MySQL • PostgreSQL • On demand (slow) • Sizing • Management S3 Storage as a Service • Storage • Key-Value • Any size API Language bindings (e.g. for Java, Python and C#) and REST API Slide 20/32
  32. Tooling

  33. DeployMan ❖ A command line tool to deploy Docker images

    to AWS. ❖ Build with Java on top of the AWS and Docker API. ❖ Stacks are defined in JSON-files and called “formations”. But also: ❖ A web interface (based on AngularJS) to monitor the deployment process. ❖ Ability to stop machines or images. Slide 22/32
  34. DeployMan Amazon Web Services Image Repository (S3) Source Code Repository

    Dockerfile build Container Build Machine Linux Docker Amazon & Docker API Config Config Repository (S3) create push Cloud (EC2) Linux Docker Deploy Man checkout push Slide 23/32 Maybe a build server such as Jenkins or any local developer machine!
  35. Demo

  36. Stack Ubuntu VM Ubuntu VM EC2 Ubuntu VM Logstash Kibana

    Logstash forwarder Amazon Web Services Elasticsearch PIM Supplier Exchange Logstash Kibana Elasticsearch Logstash f. PIM Supplier Ex. Logstash f. Docker Docker Docker Configuration $: DeployMan DeployMan Ubuntu VM DeployMan Docker API Slide 25/32
  37. Results

  38. Results Compute Communicate Software Defined Networks Routing Infrastructure PaaS Applications

    Hardware Application Containers Application PaaS Model driven platforms Compute App Services Communicate Software Defined Storage Object storage Database PaaS Store App Services IaaS Foundational PaaS PaaS SaaS Model driven App Services Infrastructure Engineers DevOps Developers End-users Business Engineers Developers 1 2 3 6 4 5 Communicate App Services ___________________________________________________________________________ Reference: Simplified cloud model according to Johan Den Haan at goo.gl/jexFPB Virtual Machines AWS EC2 AWS Elastic IP AWS S3 AWS RDS Docker Docker Hub Docker API PIM + Supplier Exchange + Logstash Slide 27/32
  39. References

  40. Graphics Docker whale and wave crest Docker Inc. http://www.docker.com Eclipse

    console own screenshot July, 2014 Cloudy sky own fotography June, 2014 Football goal Wikimedia Commons under Creative Commons Attribution 2.0 Generic license by Ronnie Macdonald https://commons.wikimedia.org/wiki/File:Goal_mouth_melee_1_(7100510129).jpg April, 2012 Container terminal at Port Elizabeth Wikimedia Commons under public domain https://commons.wikimedia.org/wiki/File:Line3174_-_Shipping_Containers_at_the_terminal_at_Port_Elizabeth,_New_Jersey_-_NOAA.jpg June, 2004 Tuk Tuk Wikimedia Commons under Creative Commons Attribution 2.0 Generic license by Heinrich Damm https://commons.wikimedia.org/wiki/File:Tuktukpktalad05b.jpg June, 2005 Solar car race Wikimedia Commons under Creative Commons Attribution 3.0 Unported license by Hideki Kimura https://commons.wikimedia.org/wiki/File:Solar_car_race_suzuka.jpg August, 2008 Slide 29/32
  41. Graphics IT Guy Wikimedia Commons under Creative Commons Attribution 2.0

    Generic license by Intel Free Press https://commons.wikimedia.org/wiki/File:Facebook_Data_Center_Server_Board.jpg September, 2013 Eclipse own fotography July, 2014 Walmart Wikimedia Commons under Public Domain https://commons.wikimedia.org/wiki/File:Remodeled_Walmart.jpg January, 2010 Construction Mechanics Wikimedia Commons under Public Domain http://goo.gl/HuyTHl October, 2009 Library Wikimedia Commons under Public Domain https://commons.wikimedia.org/wiki/File:SteacieLibrary.jpg November, 2008 Slide 30/32
  42. References The cloud landscape described, categorized, and compared Johan Den

    Haan http://www.theenterprisearchitect.eu/blog/2013/10/12/the-cloud-landscape-described-categorized-and-compared Slide 31/32
  43. Thomas Uhrig tuhrig.de@gmail.com www.tuhrig.de Matrikelnummer: 25826