Docker and JBoss

The perfect combination

@marekgoldmann

ToruĊ„ JUG, 29th Oct 2014

Docker

Applications are complex

Mess

http://www.reddit.com/r/pics/comments/nf8la/im_always_tempted_to_switch_two_random_cables_to/

Different deployment environments

Mess

http://www.shedworking.co.uk/2012/03/nuts-and-bolts-cable-ties.html

Docker

A project to manage containers.

Containers?

Yes, a lightweight operating system virtualization.

How this compares to a virtual machine?

It's completely different.

Comparison

Virtual Machine (KVM, VMware)Container (LXC, OpenVZ)
HardwareSimulatedUses it (almost) directly
Supported OS'esAlmost anyOnly Linux
SpaceUser spaceKernel space
SeparationFullControl Groups (cgroups)
Startup timeSeconds to minutesMiliseconds
ScalabilityA fewSky is the limit (thousands)
Custom kernelYesNo
Enterprise features (live migration, etc)YesNo
Ease of creationModerateEasy
Time consumption of creationHighLow
SizeHUGESmall

Linux FTW!

(still)

Microsoft Linux

Source: http://goo.gl/bqb360

http://blog.docker.com/2014/10/docker-microsoft-partner-distributed-applications/
https://github.com/boot2docker/boot2docker

Docker community...

  • GitHub
    • >1100 watchers
    • >14000 stars
    • >2700 forks
    • >660 open issues
    • >100 pull requests
  • Over 585 contributors
    • avg 17 commits / day
    • 90% are external
  • Many meetups all over the world

JBoss and Docker

Dockerized projects

  • WildFly
  • Keycloack
  • TorqueBox
  • Aerogear
  • Immutant
  • Nodyn
  • LiveOak
  • Infinispan
  • ModeShape
  • ...
JBoss Docker site http://www.jboss.org/docker/
Docker HUB with JBoss images https://registry.hub.docker.com/repos/jboss/
Docker HUB with JBoss images https://github.com/jboss-dockerfiles
Much JBoss

Demos!

A few tips

I need metrics!

  • Use iptables for network
  • Parse /sys/fs/cgroup/ for everything else

I need to limit resources!

I need to do backup!

  • Files?
    • Use volumes
  • Data?
    • Use links

I need to access my containers!

  • Do you own the host?
    • Use nsenter
  • In other cases:
    • Run sshd inside of the container (boooo...)

I need performance!

RLY?

  • CPU: native
  • Memory: (almost) no overhead
  • Network: no overhead with --net host
  • I/O: native on volumes

Thanks!

Attributions:

  • https://www.docker.io/