DSLs, Scout and Docker in the Web - Eclipsewiki.eclipse.org/images/7/70/ScoutXtextDocker.pdf ·...

13
© itemis Schweiz GmbH DSLs, Scout and Docker in the Web Eclipse DemoCamp – Zurich / 06-2016 Serano Colameo

Transcript of DSLs, Scout and Docker in the Web - Eclipsewiki.eclipse.org/images/7/70/ScoutXtextDocker.pdf ·...

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

DSLs, Scout and Docker in the Web Eclipse DemoCamp – Zurich / 06-2016

Serano Colameo

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

•  Eclipse Features to manage Docker Files, Images, Container etc.

•  Editor with Code Completion, Validation and Syntax Highliting

•  Build and run Docker Images with Launch Configuration

Xdocker – An eXtensible Docker DSL with IDE Features An Eclipse IDE for Docker written in Xtext, Xtend (90%) and Java

2

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

Xtext and Scout both support Web Why not develop a Web DSL for Docker in a Scout Application?

3

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

How to bring all these pieces together?

4

…put it all together, but

how?

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

Xtext Web DSL Architecture Migrate the Xdocker DSL to Xtext 2.10.x

5

DSL Server running in a

Web Container HTTP Communication

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

Scout Neon Architecture Understand how Scout Neon works, Web Integration, JavaScript, JQuery stuff etc.

6

Frontend Server (WAR)

Backend Server (WAR)

HTTP

HTT

P

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

Docker Architecture

7

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

Docker REST API Integration with Xtend

8

Xtend API Scout Backend Server (WAR)

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

docker [

val callback = build('./tomcat8/docker') val response = callback.awaitCompletion println(response)

val id = image.run('/usr/share/tomcat8/bin/catalina.sh') println('''Cotainer id = «id»''')

images.forEach [ print(it.id + ' ') println(it.repoTags.get(0))

]

callback = pull('tomcat:latest') val result = callback.awaitCompletion println(result) ...

]

Xtend API for Docker as internal DSL

9

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH 10

Xtend in Scout

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

Frontend Xdocker Web App Architecture

11

Xdocker DSL Server (WAR)

Scout Frontend (WAR)

Scout Backend Server (WAR)

Scout/JS Integration

Scout Client Model

Xtend API

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

Demo – „Xdocker in Action“

12

��������������������������

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

© itemis Schweiz GmbH

itemis Schweiz GmbH | Dorfstrasse 69 | CH-5210 Windisch | www.itemis-schweiz.ch

Serano Colameo

Phone: +41 (0)56 442 68 63

Email: [email protected]

13