Web Applications with 
Eclipse RT and Docker 
in the Cloud 
Johannes Eickhold, Markus Knauer, 
Florian Waibel
Sandboxing
User Perspective 
● register 
● access 
● upload 
● manage 
● experiment 
● play
Implementing our Vision 
● one lightweight container per lab 
● minimal / no manual preparation per lab
Server Client 
Button button = new Button(parent, SWT.PUSH); 
button.setText("Push me!"); 
JSON 
HTTP 
{"head":{"requestCo...
Heavy to Lightweight 
Isolation Level 
Lightweight Heavyweight
Docker DDoocckkeerr is iiss an aann open ooppeenn platform 
ppllaattffoorrmm 
for developers and sysadmins 
to build, ship...
Intro to Docker 
Docker uses containers 
● LXC (Linux Containers) 
○ cgroups and namespaces for strong process 
isolation ...
Intro to Docker: Containers 
Docker Container A Docker Container B 
OSGi Application B 
Eclipse Virgo 
Docker Daemon 
Host...
Intro to Docker: Commands 
$ docker version 
$ docker search ubuntu 
$ docker pull ubuntu 
$ docker run ubuntu cat /etc/os...
Intro to Docker: Dockerfile 
FROM base:ubuntu-12.10 
MAINTAINER EclipseSource <admin@eclipsesource.com> 
RUN apt-get updat...
Docker Security 
Docker Daemon is running as root! 
Beware! 
Bad things may happen!
Serving HTTP 
SSL for https? 
Dynamic Rewriting?
The Backend Server 
:443 
:80 
User Portal 
Developer 
Trial Application User
Container 
Container 
B 
Container 
C 
Dynamic Reverse Proxy++ REST 
Mapping 
Service 
:20002 
:20003 
A 
:20001 
hhttttpp...
Our Technology Selection
Using the Lab 
1. register at website 
2. receive mail with registration key 
3. access user portal with 
registration key...
Docker Container 
● Based on Ubuntu image 
● Contains OpenJDK 7 + Virgo 
Static and dynamic containers 
linked
Inside Docker: Virgo 
Container A 
:20001 
Java VM 
:8080 
● Deployment mechanism 
for uploaded app 
Application Upload 
●...
Visit the Labs 
DEMO
Conclusions 
● Docker proved to be stable and flexible and 
scalable at the same time 
● Inspiring cool technology 
● Crea...
Outlook 
● Put everything into Docker containers 
● Switch to Virgo RAP Server base-image 
● Use Gradle to build Docker im...
Questions?
Web Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the Cloud
Upcoming SlideShare
Loading in …5
×

Web Applications with Eclipse RT and Docker in the Cloud

2,907 views

Published on

Using Docker as a container for running web applications based on Eclipse RAP in an Eclipse Virgo application server.

Published in: Internet

Web Applications with Eclipse RT and Docker in the Cloud

  1. 1. Web Applications with Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel
  2. 2. Sandboxing
  3. 3. User Perspective ● register ● access ● upload ● manage ● experiment ● play
  4. 4. Implementing our Vision ● one lightweight container per lab ● minimal / no manual preparation per lab
  5. 5. Server Client Button button = new Button(parent, SWT.PUSH); button.setText("Push me!"); JSON HTTP {"head":{"requestCounter":1}, "operations": [... ["create","w3","rwt.widgets.Button",{"parent":"w2","style":["PUSH"],"bounds":[5,5,98,32]}], ["set","w3",{"text":"Push me!"}],... ]}
  6. 6. Heavy to Lightweight Isolation Level Lightweight Heavyweight
  7. 7. Docker DDoocckkeerr is iiss an aann open ooppeenn platform ppllaattffoorrmm for developers and sysadmins to build, ship, and run distributed applications.
  8. 8. Intro to Docker Docker uses containers ● LXC (Linux Containers) ○ cgroups and namespaces for strong process isolation and resource control Docker uses a copy-on-write filesystem ● AUFS ○ stacking and layering of containers Docker uses simple configuration language
  9. 9. Intro to Docker: Containers Docker Container A Docker Container B OSGi Application B Eclipse Virgo Docker Daemon Host OS (Linux) Server Hardware Web Application A Tomcat Base Image Debian Base Image Ubuntu Docker Container C OSGi Application C Eclipse Virgo Base Image Ubuntu API Console Client
  10. 10. Intro to Docker: Commands $ docker version $ docker search ubuntu $ docker pull ubuntu $ docker run ubuntu cat /etc/os-release $ docker run -t -i ubuntu /bin/bash $ docker run ubuntu apt-get install -y iputils-ping $ docker ps -l $ docker commit --author="Markus Knauer <mknauer@eclipsesource.com>" -m="Install ping utility" ID123123123123 mknauer/ping $ docker run mknauer/ping ping eclipse.org $ docker run -i -t mknauer/ping /bin/bash
  11. 11. Intro to Docker: Dockerfile FROM base:ubuntu-12.10 MAINTAINER EclipseSource <admin@eclipsesource.com> RUN apt-get update && apt-get upgrade -y RUN apt-get install -y gzip tar curl openjdk-7-jre-headless RUN useradd -m tomcat ... EXPOSE 8080 ADD setenv.sh /home/tomcat/bin/setenv.sh VOLUME ["/home/tomcat/webapps"]
  12. 12. Docker Security Docker Daemon is running as root! Beware! Bad things may happen!
  13. 13. Serving HTTP SSL for https? Dynamic Rewriting?
  14. 14. The Backend Server :443 :80 User Portal Developer Trial Application User
  15. 15. Container Container B Container C Dynamic Reverse Proxy++ REST Mapping Service :20002 :20003 A :20001 hhttttpp::////ttaabbrriissttrriiaall..eecclliippsseessoouurrccee..ccoomm//ffoooo//eexxaammpplleess user: foo http://localhost:20002/myapp myapp/examples http://tabristrial.eclipsesource.com/foo/examples
  16. 16. Our Technology Selection
  17. 17. Using the Lab 1. register at website 2. receive mail with registration key 3. access user portal with registration key (OAuth) 4. upload app (Web Application) 5. URL under which app is available 6. access app Lab Registration (some website) Lab
  18. 18. Docker Container ● Based on Ubuntu image ● Contains OpenJDK 7 + Virgo Static and dynamic containers linked
  19. 19. Inside Docker: Virgo Container A :20001 Java VM :8080 ● Deployment mechanism for uploaded app Application Upload ● Virgo Runtime ● RAP and dependencies pre-installed
  20. 20. Visit the Labs DEMO
  21. 21. Conclusions ● Docker proved to be stable and flexible and scalable at the same time ● Inspiring cool technology ● Creating Docker images manually is time consuming and error prone
  22. 22. Outlook ● Put everything into Docker containers ● Switch to Virgo RAP Server base-image ● Use Gradle to build Docker images ● Polish web user interfaces and add more management capabilities to user console ● Release as well documented open source template project
  23. 23. Questions?

×