in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus...
Transcript of in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus...
![Page 1: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/1.jpg)
Web Applications with Eclipse RT and Docker
in the CloudJohannes Eickhold, Markus Knauer,
Florian Waibel
![Page 2: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/2.jpg)
![Page 3: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/3.jpg)
Sandboxing
![Page 4: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/4.jpg)
User Perspective
● access● upload● manage
● experiment● play
● register
![Page 5: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/5.jpg)
Implementing our Vision
● one lightweight container per lab● minimal / no manual preparation per lab
![Page 6: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/6.jpg)
![Page 7: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/7.jpg)
Button button = new Button(parent, SWT.PUSH);button.setText("Push me!");
{"head":{"requestCounter":1}, "operations": [... ["create","w3","rwt.widgets.Button",{"parent":"w2","style":["PUSH"],"bounds":[5,5,98,32]}], ["set","w3",{"text":"Push me!"}],...]}
Server Client
JSONHTTP
![Page 8: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/8.jpg)
![Page 9: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/9.jpg)
Heavy to Lightweight
Isolation Level
Ligh
twei
ght
Hea
vyw
eigh
t
![Page 10: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/10.jpg)
Docker is an open platform Docker is an open platform for developers and sysadmins
Docker is an open platform for developers and sysadmins
to build, ship, and run distributed applications.
![Page 11: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/11.jpg)
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● Dockerfile
![Page 12: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/12.jpg)
Intro to Docker: Containers
Server Hardware
Host OS (Linux)
Docker Daemon
Docker Container A Docker Container B
Base Image Debian
Tomcat
Web Application A
Base Image Ubuntu
Eclipse Virgo
OSGi Application B
Docker Container C
Base Image Ubuntu
Eclipse Virgo
OSGi Application C
API Console Client
![Page 13: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/13.jpg)
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 <[email protected]>"
-m="Install ping utility" ID123123123123 mknauer/ping
$ docker run mknauer/ping ping eclipse.org
$ docker run -i -t mknauer/ping /bin/bash
$ docker inspect ID123123123123
$ docker images
$ docker push
![Page 14: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/14.jpg)
Intro to Docker: DockerfileFROM base:ubuntu-12.10
MAINTAINER EclipseSource <[email protected]>
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"]
WORKDIR /home/tomcat
CMD bin/startup.sh && tail -f logs/catalina.out
![Page 15: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/15.jpg)
Docker Security
Docker Daemon is running as root!
Beware!
Bad things may happen!
![Page 16: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/16.jpg)
Serving HTTP
SSL for https?Dynamic Rewriting?
![Page 17: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/17.jpg)
The Backend Server
:443
:80
User Portal
Trial Application User
Developer
![Page 18: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/18.jpg)
Container C
:20003
Dynamic Reverse Proxy++ RESTMappingService
Container B
:20002
Container A
:20001
http://tabristrial.eclipsesource.com/foo/exampleshttp://tabristrial.eclipsesource.com/foo/examples
http://localhost:20002/myapp/examples
user
: foo
http://localhost:20002/myapp
http://tabristrial.eclipsesource.com/foo/examples
![Page 19: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/19.jpg)
Our Technology Selection
![Page 20: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/20.jpg)
Using the Lab1. 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
![Page 21: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/21.jpg)
Docker Container
● Based on Ubuntu image● Contains OpenJDK 7 + VirgoStatic and dynamic containers
linked
![Page 22: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/22.jpg)
Inside Docker: VirgoContainer A
:20001
Java VM
:8080
● Deployment mechanism for uploaded app
Application Upload
● Virgo Runtime
● RAP and dependencies pre-installed
![Page 23: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/23.jpg)
Visit the Labs
DEMO
![Page 24: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/24.jpg)
Conclusions
● Docker proved to be stable and flexible and scalable at the same time
● Inspiring cool technology
● Creating Docker images manuallyis time consuming and error prone
![Page 25: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/25.jpg)
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
![Page 26: in the Cloud Eclipse RT and Docker · Eclipse RT and Docker in the Cloud Johannes Eickhold, Markus Knauer, Florian Waibel. Sandboxing. User Perspective access upload manage experiment](https://reader034.fdocuments.in/reader034/viewer/2022042223/5ec98174840bd01f0a0e24b4/html5/thumbnails/26.jpg)
Questions?