SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
Improve your Java development env with
DOCKER
Compose & Machine
Copyright 2015 eXo Platform
About Us
Copyright 2015 eXo Platform
● Maxime Gréau
○ @mgreau
● Software Engineer at eXo
● Thomas Delhoménie
○ @tdelhomenie
● Software Engineer at eXo
Agenda
Copyright 2015 eXo Platform
1. Docker Toolbox
2. Work on multiple technical stacks
3. Uses cases “In A Container”
3.1. Debug
3.2. Code & Deploy
3.3. Deploy from your IDE
3.4. Build & Run with Maven Docker Plugins
3.5. Integration Tests
4. Reproduce production bugs easily
5. Work with an architecture closest to production
6. Do all the things with Docker & co
What’s the
PROBLEM
with my development environment?
Copyright 2015 eXo Platform
Problem 1: Dev environment setup time
Copyright 2015 eXo Platform
Welcome, it’s your first day, you just have to:
● Install Maven 3.2.3
● Install JDK 1.7.0_80
● Install Tomcat 7.0.63
● Install MySQL 5.5, PostgreSQL 9.1
● Read the installation doc…
The BIG installation doc !
Copyright 2015 eXo Platform
And after 1 hour....
Problem 2: Works on my machine
Copyright 2015 eXo Platform
Problem 3: the matrix hell
Copyright 2015 eXo Platform
MySQL 5.1 MySQL 5.5 Mongo 3.0 Java 7 Java 8
My first app v1 X X
My first app v2 X X X X
My other app v1 X X
...
Fix all those problems with 3 commands!
Copyright 2015 eXo Platform
Pre-requisites
docker, machine & compose installed
Then
1. Run git clone https://github.com/my-repo/my.git & cd my-project
2. Run docker-compose up
3. Open your browser
Docker
TOOLBOX
For OSX and Windows
Copyright 2015 eXo Platform
Docker Toolbox includes...
Copyright 2015 eXo Platform
● Docker Machine for running the docker-machine binary
● Docker Engine for running the docker binary
● Docker Compose for running the docker-compose binary
● Kitematic, the Docker GUI
● Oracle VM VirtualBox
Only for OSX
and Windows
Create dev environment
Copyright 2015 eXo Platform
Mac & Windows
> docker-machine create my-machine-name
> eval $(docker-machine env my-machine-name)
Linux
Nothing special to do!
TOURNAMENTS
TENNIS APP
Sample Application
Copyright 2015 eXo Platform
Tennis App - Screenshots
Copyright 2015 eXo Platform
batch-tennis-app.warws-tennis-app.war
WildFly 8.2
WildFly 8.2
JSON-P
1.0
CDI
1.1
WebSocket
API 1.0
JPA
2.1
Batch API
1.0
Tennis App - Architecture - Java EE 7
Copyright 2015 eXo Platform
batch-tennis-app.war
MySQL
ws-tennis-app.war
Browser
CSV
As a Developer you want to
Work on multiple
technical stacks
Copyright 2015 eXo Platform
WildFly 8.2
Multiple apps with docker compose
Copyright 2015 eXo Platform
MySQL 5.7
Maria DB
10.0
batch-tennis-app.war
Apache
Wordpress
DEMO 1
Copyright 2015 eXo Platform
Application 1
> git clone URL1 & cd app1
> mvn package
> docker-compose up
open your browser !
Application 2
> git clone URL2 & cd app2
> docker-compose up
open your browser !
Tennis App Batch - Dockerfile
Copyright 2015 eXo Platform
FROM jboss/wildfly:8.2.1.Final
RUN mkdir -p /opt/jboss/wildfly/standalone/deployments/ROOT.war/
RUN touch /opt/jboss/wildfly/standalone/deployments/ROOT.war.dodeploy
VOLUME ["/opt/jboss/wildfly/standalone/deployments/ROOT.war/"]
ENV MYSQL_CONNECTOR_VERSION 5.1.34
RUN /opt/jboss/wildfly/bin/add-user.sh -up mgmt-users.properties admin Admin#70365 --silent
# Install mysql driver
RUN curl -L -o /opt/jboss/wildfly/standalone/deployments/mysql-connector-java.jar https://repo1.
maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-
connector-java-${MYSQL_CONNECTOR_VERSION}.jar
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
Tennis App Batch - docker-compose.yml
Copyright 2015 eXo Platform
batch_run:
build: ./docker/dev/run/backend
ports:
- "7777:8080"
volumes:
- ./app/batch/target/batch:/opt/jboss/wildfly/standalone/deployments/ROOT.war/
links:
- db
dbdata:
image: mysql:5.7
volumes:
- /var/lib/mysql
db:
image: mysql:5.7
volumes_from:
- dbdata
environment:
- MYSQL_ROOT_PASSWORD=tennistour
- MYSQL_DATABASE=tennistour
- MYSQL_USER=tennistour
- MYSQL_PASSWORD=tennistour
PHP Application - Dockerfile (Wordpress)
Copyright 2015 eXo Platform
FROM php:5.6-apache
RUN a2enmod rewrite
# install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev && rm -rf /var/lib/apt/lists/* 
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr 
&& docker-php-ext-install gd
RUN docker-php-ext-install mysqli
VOLUME /var/www/html
ENV WORDPRESS_VERSION 4.3.1
ENV WORDPRESS_SHA1 b2e5652a6d2333cabe7b37459362a3e5b8b66221
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
RUN curl -o wordpress.tar.gz -SL https://wordpress.org/wordpress-${WORDPRESS_VERSION}.tar.gz 
&& echo "$WORDPRESS_SHA1 *wordpress.tar.gz" | sha1sum -c - 
&& tar -xzf wordpress.tar.gz -C /usr/src/ 
&& rm wordpress.tar.gz 
&& chown -R www-data:www-data /usr/src/wordpress
COPY docker-entrypoint.sh /entrypoint.sh
# grr, ENTRYPOINT resets CMD now
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
PHP Application - docker-compose.yml
Copyright 2015 eXo Platform
wordpress:
image: wordpress
links:
- db:mysql
ports:
- 8080:80
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: example
Others use cases
Copyright 2015 eXo Platform
eXo use case : multi databases support (matrix compatibility pb)
PostgreSQL
9.3
MySQL 5.6MySQL 5.5 PostgreSQL
9.4
Oracle
11gR2
Others use cases
Copyright 2015 eXo Platform
Migration between 2 versions of the database
my-app
MySQL
5.5
my-app
MySQL
5.7
Copyright 2015 eXo Platform
USE CASES
“In a Container”
As a Developer you want to
Debug Java app in a
container
Copyright 2015 eXo Platform
How to debug in a container ?
Copyright 2015 eXo Platform
WildFly 8.2
MySQL 5.7
batch-tennis-app.war
Remote debug
DEMO 2
Copyright 2015 eXo Platform
As a Developer you want to
Code and deploy
Copyright 2015 eXo Platform
How to deploy a new war ?
Copyright 2015 eXo Platform
● Update your code in your favorite IDE
● Build with maven
● Open your browser !
DEMO 3
Copyright 2015 eXo Platform
As a Developer you want to
Use your IDE to deploy
in a container
Copyright 2015 eXo Platform
IDE starts to support Docker container technology
Copyright 2015 eXo Platform
● Eclipse Mars (2015)
● Netbeans
● IntelliJ IDEA v14.1
As a Developer you want to
Build & Run with
Maven Docker plugins
Copyright 2015 eXo Platform
Docker Maven plugins
Copyright 2015 eXo Platform
mvn tomcat:run
https://github.com/rhuss/docker-maven-plugin
mvn docker:start
As a Developer you want to
Execute Integration
Tests in containers
Copyright 2015 eXo Platform
Arquillian - Intro
Copyright 2015 eXo Platform
● Automated tests without mocks
● Compatible JUnit/TestNG
● Application Server agnostic
● Embedded/Managed/Client modes
Arquillian Cube
Copyright 2015 eXo Platform
http://arquillian.org/modules/cube-extension/
Shameless auto-promotion :
http://mgreau.com/posts/2015/03/03/docker-
asciidoctorj-wildfly-arquillian.html
As a Developer you want to
Easily reproduce
production bugs
Copyright 2015 eXo Platform
Test with the production version of the “old” stack
Copyright 2015 eXo Platform
my-app
MySQL 5.5
my-app
MySQL 5.7
> git checkout v1
> “build”
> docker-compose up
New dev stackProd stack
5.5 5.7
v1 v2
As a Developer you want to
Work with an architecture
close to production
Copyright 2015 eXo Platform
Angular / Java EE 7 Application
Copyright 2015 eXo Platform
Apache
HTTPD
UI
Angular
Load
Balancer
WildFly 8.2
WildFly 8.2
batch-tennis-app.war
MySQL
ws-tennis-app.war
Cache
Redis
CSV
WildFly 8.2
ws-tennis-app.war
WildFly 8.2
ws-tennis-app.war
DEMO 4
Copyright 2015 eXo Platform
DO ALL THE THINGS
WITH DOCKER
Copyright 2015 eXo Platform
Build your projects with docker
Copyright 2015 eXo Platform
You will only need docker tools
on your laptop!
DEMO 5
Copyright 2015 eXo Platform
Docker
TOOLS
Copyright 2015 eXo Platform
GUI for Docker
Copyright 2015 eXo Platform
● Kitematic
● DockerUI
Docker
BEST PRACTICES
Copyright 2015 eXo Platform
Some best practices for development
Copyright 2015 eXo Platform
● Use Docker Machine to organize your images and limit resources usage
(CPU, memory, …)
● Use volume containers to keep your data safe (schema)
● Useful docker commands:
○ stopped docker containers : docker stop $(docker ps -q)
○ remove dangling docker images:
■ docker rmi $(docker images -q -f "dangling=true")
○ and more: https://github.com/javaee-samples/docker-
java/blob/master/chapters/docker-commands.adoc
Copyright 2015 eXo Platform
Docker doesn’t invent
the container technology,
BUT
make it possible to use it
easily on your laptop!
Improve your Java development env with
Docker Compose & Machine
Thanks
@tdelhomenie @mgreau
Code: http://github.com/mgreau/docker4dev-tennistour-app

Contenu connexe

Tendances

Dockercon2015 bamboo
Dockercon2015 bambooDockercon2015 bamboo
Dockercon2015 bambooSteve Smith
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker AgileDenver
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and ComposeDockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and ComposeDocker, Inc.
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)CloudBees
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins UsersJules Pierre-Louis
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesJava Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesAntons Kranga
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsAndy Pemberton
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Dockertoffermann
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Longericlongtx
 
Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsDaniel Oh
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowContinuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowUdaypal Aarkoti
 
Locally it worked! virtualizing docker
Locally it worked! virtualizing dockerLocally it worked! virtualizing docker
Locally it worked! virtualizing dockerSascha Brinkmann
 
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
Using Docker to Develop, Test and Run Maven Projects - Wouter DanesUsing Docker to Develop, Test and Run Maven Projects - Wouter Danes
Using Docker to Develop, Test and Run Maven Projects - Wouter DanesNLJUG
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsContinuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsCamilo Ribeiro
 
Docker Best Practices Workshop
Docker Best Practices WorkshopDocker Best Practices Workshop
Docker Best Practices WorkshopAhmed AbouZaid
 
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...Peter Leschev
 
Game of Codes: the Battle for CI
Game of Codes: the Battle for CIGame of Codes: the Battle for CI
Game of Codes: the Battle for CIAtlassian
 
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS CloudCI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS CloudSimon McCartney
 

Tendances (20)

Dockercon2015 bamboo
Dockercon2015 bambooDockercon2015 bamboo
Dockercon2015 bamboo
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and ComposeDockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesJava Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
 
Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOps
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowContinuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins Workflow
 
Locally it worked! virtualizing docker
Locally it worked! virtualizing dockerLocally it worked! virtualizing docker
Locally it worked! virtualizing docker
 
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
Using Docker to Develop, Test and Run Maven Projects - Wouter DanesUsing Docker to Develop, Test and Run Maven Projects - Wouter Danes
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsContinuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and Jenkins
 
Docker Best Practices Workshop
Docker Best Practices WorkshopDocker Best Practices Workshop
Docker Best Practices Workshop
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
 
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
 
Game of Codes: the Battle for CI
Game of Codes: the Battle for CIGame of Codes: the Battle for CI
Game of Codes: the Battle for CI
 
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS CloudCI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
 

En vedette

eXo Platform 4.4 Released: Work Better with More Context!
eXo Platform 4.4 Released: Work Better with More Context!eXo Platform 4.4 Released: Work Better with More Context!
eXo Platform 4.4 Released: Work Better with More Context!eXo Platform
 
Bangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterBangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterGanesh Samarthyam
 
Angular Performance: Then, Now and the Future. Todd Motto
Angular Performance: Then, Now and the Future. Todd MottoAngular Performance: Then, Now and the Future. Todd Motto
Angular Performance: Then, Now and the Future. Todd MottoFuture Insights
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaArun Gupta
 
Public and private APIs: differences and challenges
Public and private APIs: differences and challengesPublic and private APIs: differences and challenges
Public and private APIs: differences and challengesRestlet
 
Don't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadDon't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadWASdev Community
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Izzet Mustafaiev
 
Great Places 2020 Maple Crossing Full Strategic Plans
Great Places 2020 Maple Crossing Full Strategic PlansGreat Places 2020 Maple Crossing Full Strategic Plans
Great Places 2020 Maple Crossing Full Strategic PlansKeelee Slack
 
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.Rafael Dohms
 
Migration from Swing to JavaFX
Migration from Swing to JavaFXMigration from Swing to JavaFX
Migration from Swing to JavaFXYuichi Sakuraba
 
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you needDutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you needKacper Gunia
 
BASICS OF TRANSMISSION SYSTEM
BASICS OF TRANSMISSION SYSTEMBASICS OF TRANSMISSION SYSTEM
BASICS OF TRANSMISSION SYSTEMKartik Paliwal
 
Car Transmission System
Car Transmission SystemCar Transmission System
Car Transmission SystemShubham Thakur
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesArun Gupta
 
How to Speak English on the Telephone with Confidence
How to Speak English on the Telephone with ConfidenceHow to Speak English on the Telephone with Confidence
How to Speak English on the Telephone with ConfidenceTJ Taylor Language Training
 
Mobile Investment Outlook 2016 - Edith Yeung
Mobile Investment Outlook 2016  - Edith YeungMobile Investment Outlook 2016  - Edith Yeung
Mobile Investment Outlook 2016 - Edith YeungEdith Yeung
 
The best of mobile marketing 2015
The best of mobile marketing 2015The best of mobile marketing 2015
The best of mobile marketing 2015Monika Mikowska
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 

En vedette (20)

eXo Platform 4.4 Released: Work Better with More Context!
eXo Platform 4.4 Released: Work Better with More Context!eXo Platform 4.4 Released: Work Better with More Context!
eXo Platform 4.4 Released: Work Better with More Context!
 
Bangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterBangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - Poster
 
Angular Performance: Then, Now and the Future. Todd Motto
Angular Performance: Then, Now and the Future. Todd MottoAngular Performance: Then, Now and the Future. Todd Motto
Angular Performance: Then, Now and the Future. Todd Motto
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
Public and private APIs: differences and challenges
Public and private APIs: differences and challengesPublic and private APIs: differences and challenges
Public and private APIs: differences and challenges
 
Don't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadDon't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 Instead
 
Agile Product Management
Agile Product ManagementAgile Product Management
Agile Product Management
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?
 
Great Places 2020 Maple Crossing Full Strategic Plans
Great Places 2020 Maple Crossing Full Strategic PlansGreat Places 2020 Maple Crossing Full Strategic Plans
Great Places 2020 Maple Crossing Full Strategic Plans
 
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.
 
Migration from Swing to JavaFX
Migration from Swing to JavaFXMigration from Swing to JavaFX
Migration from Swing to JavaFX
 
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you needDutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
 
BASICS OF TRANSMISSION SYSTEM
BASICS OF TRANSMISSION SYSTEMBASICS OF TRANSMISSION SYSTEM
BASICS OF TRANSMISSION SYSTEM
 
Car Transmission System
Car Transmission SystemCar Transmission System
Car Transmission System
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
Gear box –industrial applications
Gear box –industrial applicationsGear box –industrial applications
Gear box –industrial applications
 
How to Speak English on the Telephone with Confidence
How to Speak English on the Telephone with ConfidenceHow to Speak English on the Telephone with Confidence
How to Speak English on the Telephone with Confidence
 
Mobile Investment Outlook 2016 - Edith Yeung
Mobile Investment Outlook 2016  - Edith YeungMobile Investment Outlook 2016  - Edith Yeung
Mobile Investment Outlook 2016 - Edith Yeung
 
The best of mobile marketing 2015
The best of mobile marketing 2015The best of mobile marketing 2015
The best of mobile marketing 2015
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 

Similaire à Improve your Java Environment with Docker

eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXo Platform
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzSteve Hoffman
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windowsDocker, Inc.
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel ApplicationAfrimadoni Dinata
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday developmentJustyna Ilczuk
 
How to create your own hack environment
How to create your own hack environmentHow to create your own hack environment
How to create your own hack environmentSumedt Jitpukdebodin
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungKAI CHU CHUNG
 
Modernizing .NET Apps
Modernizing .NET AppsModernizing .NET Apps
Modernizing .NET AppsDocker, Inc.
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 
WinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's GuideWinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's GuideElton Stoneman
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Patrick Chanezon
 
DockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with DockerDockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with DockerElton Stoneman
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersBen Hall
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherKarim Vaes
 

Similaire à Improve your Java Environment with Docker (20)

eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel Application
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday development
 
How to create your own hack environment
How to create your own hack environmentHow to create your own hack environment
How to create your own hack environment
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChung
 
Set up a Development Environment in 5 Minutes
Set up a Development Environment in 5 MinutesSet up a Development Environment in 5 Minutes
Set up a Development Environment in 5 Minutes
 
Modernizing .NET Apps
Modernizing .NET AppsModernizing .NET Apps
Modernizing .NET Apps
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
WinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's GuideWinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's Guide
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016
 
DockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with DockerDockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with Docker
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows Containers
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
 

Dernier

logical backup of Oracle Datapump-detailed.pptx
logical backup of Oracle Datapump-detailed.pptxlogical backup of Oracle Datapump-detailed.pptx
logical backup of Oracle Datapump-detailed.pptxRemote DBA Services
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flinkconfluent
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Preparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple ArchitecturesPreparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple ArchitecturesAke Koomsin
 
Effort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsEffort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsDEEPRAJ PATHAK
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Piyovi
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive ReviewRevolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Reviewjw364beach
 
Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...
Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...
Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...Milind Agarwal
 
Key Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapKey Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapIshara Amarasekera
 
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...OnePlan Solutions
 
What is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxWhat is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxTechnogeeks
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...Bert Jan Schrijver
 
What are the core components of Azure Data Engineer courses.docx
What are the core components of Azure Data Engineer courses.docxWhat are the core components of Azure Data Engineer courses.docx
What are the core components of Azure Data Engineer courses.docxkzayra69
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 

Dernier (20)

logical backup of Oracle Datapump-detailed.pptx
logical backup of Oracle Datapump-detailed.pptxlogical backup of Oracle Datapump-detailed.pptx
logical backup of Oracle Datapump-detailed.pptx
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Preparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple ArchitecturesPreparing BitVisor for Supporting Multiple Architectures
Preparing BitVisor for Supporting Multiple Architectures
 
Effort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software ProjectsEffort Estimation Techniques used in Software Projects
Effort Estimation Techniques used in Software Projects
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive ReviewRevolutionize Your Video Editing with InVideo.io: A Comprehensive Review
Revolutionize Your Video Editing with InVideo.io: A Comprehensive Review
 
Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...
Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...
Leveraging the Expertise of a Social Media Fraud Analyst to Safeguard Brand R...
 
Key Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery RoadmapKey Steps in Agile Software Delivery Roadmap
Key Steps in Agile Software Delivery Roadmap
 
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
 
What is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxWhat is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docx
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
 
What are the core components of Azure Data Engineer courses.docx
What are the core components of Azure Data Engineer courses.docxWhat are the core components of Azure Data Engineer courses.docx
What are the core components of Azure Data Engineer courses.docx
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 

Improve your Java Environment with Docker

  • 1. Improve your Java development env with DOCKER Compose & Machine Copyright 2015 eXo Platform
  • 2. About Us Copyright 2015 eXo Platform ● Maxime Gréau ○ @mgreau ● Software Engineer at eXo ● Thomas Delhoménie ○ @tdelhomenie ● Software Engineer at eXo
  • 3. Agenda Copyright 2015 eXo Platform 1. Docker Toolbox 2. Work on multiple technical stacks 3. Uses cases “In A Container” 3.1. Debug 3.2. Code & Deploy 3.3. Deploy from your IDE 3.4. Build & Run with Maven Docker Plugins 3.5. Integration Tests 4. Reproduce production bugs easily 5. Work with an architecture closest to production 6. Do all the things with Docker & co
  • 4. What’s the PROBLEM with my development environment? Copyright 2015 eXo Platform
  • 5. Problem 1: Dev environment setup time Copyright 2015 eXo Platform Welcome, it’s your first day, you just have to: ● Install Maven 3.2.3 ● Install JDK 1.7.0_80 ● Install Tomcat 7.0.63 ● Install MySQL 5.5, PostgreSQL 9.1 ● Read the installation doc…
  • 6. The BIG installation doc ! Copyright 2015 eXo Platform
  • 7. And after 1 hour....
  • 8. Problem 2: Works on my machine Copyright 2015 eXo Platform
  • 9. Problem 3: the matrix hell Copyright 2015 eXo Platform MySQL 5.1 MySQL 5.5 Mongo 3.0 Java 7 Java 8 My first app v1 X X My first app v2 X X X X My other app v1 X X ...
  • 10. Fix all those problems with 3 commands! Copyright 2015 eXo Platform Pre-requisites docker, machine & compose installed Then 1. Run git clone https://github.com/my-repo/my.git & cd my-project 2. Run docker-compose up 3. Open your browser
  • 11. Docker TOOLBOX For OSX and Windows Copyright 2015 eXo Platform
  • 12. Docker Toolbox includes... Copyright 2015 eXo Platform ● Docker Machine for running the docker-machine binary ● Docker Engine for running the docker binary ● Docker Compose for running the docker-compose binary ● Kitematic, the Docker GUI ● Oracle VM VirtualBox Only for OSX and Windows
  • 13. Create dev environment Copyright 2015 eXo Platform Mac & Windows > docker-machine create my-machine-name > eval $(docker-machine env my-machine-name) Linux Nothing special to do!
  • 15. Tennis App - Screenshots Copyright 2015 eXo Platform batch-tennis-app.warws-tennis-app.war
  • 16. WildFly 8.2 WildFly 8.2 JSON-P 1.0 CDI 1.1 WebSocket API 1.0 JPA 2.1 Batch API 1.0 Tennis App - Architecture - Java EE 7 Copyright 2015 eXo Platform batch-tennis-app.war MySQL ws-tennis-app.war Browser CSV
  • 17. As a Developer you want to Work on multiple technical stacks Copyright 2015 eXo Platform
  • 18. WildFly 8.2 Multiple apps with docker compose Copyright 2015 eXo Platform MySQL 5.7 Maria DB 10.0 batch-tennis-app.war Apache Wordpress
  • 19. DEMO 1 Copyright 2015 eXo Platform Application 1 > git clone URL1 & cd app1 > mvn package > docker-compose up open your browser ! Application 2 > git clone URL2 & cd app2 > docker-compose up open your browser !
  • 20. Tennis App Batch - Dockerfile Copyright 2015 eXo Platform FROM jboss/wildfly:8.2.1.Final RUN mkdir -p /opt/jboss/wildfly/standalone/deployments/ROOT.war/ RUN touch /opt/jboss/wildfly/standalone/deployments/ROOT.war.dodeploy VOLUME ["/opt/jboss/wildfly/standalone/deployments/ROOT.war/"] ENV MYSQL_CONNECTOR_VERSION 5.1.34 RUN /opt/jboss/wildfly/bin/add-user.sh -up mgmt-users.properties admin Admin#70365 --silent # Install mysql driver RUN curl -L -o /opt/jboss/wildfly/standalone/deployments/mysql-connector-java.jar https://repo1. maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql- connector-java-${MYSQL_CONNECTOR_VERSION}.jar CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
  • 21. Tennis App Batch - docker-compose.yml Copyright 2015 eXo Platform batch_run: build: ./docker/dev/run/backend ports: - "7777:8080" volumes: - ./app/batch/target/batch:/opt/jboss/wildfly/standalone/deployments/ROOT.war/ links: - db dbdata: image: mysql:5.7 volumes: - /var/lib/mysql db: image: mysql:5.7 volumes_from: - dbdata environment: - MYSQL_ROOT_PASSWORD=tennistour - MYSQL_DATABASE=tennistour - MYSQL_USER=tennistour - MYSQL_PASSWORD=tennistour
  • 22. PHP Application - Dockerfile (Wordpress) Copyright 2015 eXo Platform FROM php:5.6-apache RUN a2enmod rewrite # install the PHP extensions we need RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev && rm -rf /var/lib/apt/lists/* && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr && docker-php-ext-install gd RUN docker-php-ext-install mysqli VOLUME /var/www/html ENV WORDPRESS_VERSION 4.3.1 ENV WORDPRESS_SHA1 b2e5652a6d2333cabe7b37459362a3e5b8b66221 # upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress RUN curl -o wordpress.tar.gz -SL https://wordpress.org/wordpress-${WORDPRESS_VERSION}.tar.gz && echo "$WORDPRESS_SHA1 *wordpress.tar.gz" | sha1sum -c - && tar -xzf wordpress.tar.gz -C /usr/src/ && rm wordpress.tar.gz && chown -R www-data:www-data /usr/src/wordpress COPY docker-entrypoint.sh /entrypoint.sh # grr, ENTRYPOINT resets CMD now ENTRYPOINT ["/entrypoint.sh"] CMD ["apache2-foreground"]
  • 23. PHP Application - docker-compose.yml Copyright 2015 eXo Platform wordpress: image: wordpress links: - db:mysql ports: - 8080:80 db: image: mariadb environment: MYSQL_ROOT_PASSWORD: example
  • 24. Others use cases Copyright 2015 eXo Platform eXo use case : multi databases support (matrix compatibility pb) PostgreSQL 9.3 MySQL 5.6MySQL 5.5 PostgreSQL 9.4 Oracle 11gR2
  • 25. Others use cases Copyright 2015 eXo Platform Migration between 2 versions of the database my-app MySQL 5.5 my-app MySQL 5.7
  • 26. Copyright 2015 eXo Platform USE CASES “In a Container”
  • 27. As a Developer you want to Debug Java app in a container Copyright 2015 eXo Platform
  • 28. How to debug in a container ? Copyright 2015 eXo Platform WildFly 8.2 MySQL 5.7 batch-tennis-app.war Remote debug
  • 29. DEMO 2 Copyright 2015 eXo Platform
  • 30. As a Developer you want to Code and deploy Copyright 2015 eXo Platform
  • 31. How to deploy a new war ? Copyright 2015 eXo Platform ● Update your code in your favorite IDE ● Build with maven ● Open your browser !
  • 32. DEMO 3 Copyright 2015 eXo Platform
  • 33. As a Developer you want to Use your IDE to deploy in a container Copyright 2015 eXo Platform
  • 34. IDE starts to support Docker container technology Copyright 2015 eXo Platform ● Eclipse Mars (2015) ● Netbeans ● IntelliJ IDEA v14.1
  • 35. As a Developer you want to Build & Run with Maven Docker plugins Copyright 2015 eXo Platform
  • 36. Docker Maven plugins Copyright 2015 eXo Platform mvn tomcat:run https://github.com/rhuss/docker-maven-plugin mvn docker:start
  • 37. As a Developer you want to Execute Integration Tests in containers Copyright 2015 eXo Platform
  • 38. Arquillian - Intro Copyright 2015 eXo Platform ● Automated tests without mocks ● Compatible JUnit/TestNG ● Application Server agnostic ● Embedded/Managed/Client modes
  • 39. Arquillian Cube Copyright 2015 eXo Platform http://arquillian.org/modules/cube-extension/ Shameless auto-promotion : http://mgreau.com/posts/2015/03/03/docker- asciidoctorj-wildfly-arquillian.html
  • 40. As a Developer you want to Easily reproduce production bugs Copyright 2015 eXo Platform
  • 41. Test with the production version of the “old” stack Copyright 2015 eXo Platform my-app MySQL 5.5 my-app MySQL 5.7 > git checkout v1 > “build” > docker-compose up New dev stackProd stack 5.5 5.7 v1 v2
  • 42. As a Developer you want to Work with an architecture close to production Copyright 2015 eXo Platform
  • 43. Angular / Java EE 7 Application Copyright 2015 eXo Platform Apache HTTPD UI Angular Load Balancer WildFly 8.2 WildFly 8.2 batch-tennis-app.war MySQL ws-tennis-app.war Cache Redis CSV WildFly 8.2 ws-tennis-app.war WildFly 8.2 ws-tennis-app.war
  • 44. DEMO 4 Copyright 2015 eXo Platform
  • 45. DO ALL THE THINGS WITH DOCKER Copyright 2015 eXo Platform
  • 46. Build your projects with docker Copyright 2015 eXo Platform You will only need docker tools on your laptop!
  • 47. DEMO 5 Copyright 2015 eXo Platform
  • 49. GUI for Docker Copyright 2015 eXo Platform ● Kitematic ● DockerUI
  • 51. Some best practices for development Copyright 2015 eXo Platform ● Use Docker Machine to organize your images and limit resources usage (CPU, memory, …) ● Use volume containers to keep your data safe (schema) ● Useful docker commands: ○ stopped docker containers : docker stop $(docker ps -q) ○ remove dangling docker images: ■ docker rmi $(docker images -q -f "dangling=true") ○ and more: https://github.com/javaee-samples/docker- java/blob/master/chapters/docker-commands.adoc
  • 52. Copyright 2015 eXo Platform Docker doesn’t invent the container technology, BUT make it possible to use it easily on your laptop!
  • 53. Improve your Java development env with Docker Compose & Machine Thanks @tdelhomenie @mgreau Code: http://github.com/mgreau/docker4dev-tennistour-app