docker bdxio
TRANSCRIPT
@ndeloof
<me/>
Docker à l’AgileTour ?
Who are you ?!
!
✓ PO / MO
✓ Dev
✓ Integration/Test
✓ Acceptance / Qualif
✓ Sysdamin / Ops
✓ Management
Why ?
As a Developer
I code using …
I run tests on …
I deploy app to …
and (sometime) it fails :’(
Some told me to …
Demo of a simple VM
OS kernel
File System (libs, …)
services Hypervisor
OS kernel
(virtual) File System
services application runtime (JDK)
application
data (memory / disk)
emulation
OS kernel
File System (libs, …)
services Hypervisor
OS kernel
(virtual) File System
services application runtime (JDK)
application
data (memory / disk)
emulation
hardware !virtualization
What’s a VM
my App
rsyslogd
cron
/sbin/getty
/sbin/init
dhclient
sshd -D
Some3mes worse
What for?✓ Different Operating System ✓ Different CPU Architecture ✓Work with multiples versions in // ✓ Import/export running environment ✓…
Docker contract :
Demo of a simple container
OS kernel
File System (libs, …)
services
(virtual) File System
services application runtime (JDK)
application
data (memory / disk)
Hypervisor
OS kernel
emulation
Who will use it ?
Will you ?!
!
✓ Dev
✓ Test
✓ Perf
✓ Staging
✓ prod
Developer
Not on Linux ?
DEV
✓Quickly get third party tools up-and-running
!
➜ ~ docker run mongo
DEV
✓Exact reproduction for target environment
!
!
!
!
DEV
✓Share with the team
✓Bug reproduction scenario !
!
!
!
Define environment … as code
Tester
Test resources
✓ Define build / test infra in your SCM !
•Database
•Messaging Middleware
•… !
Test
✓ Define build / test infra in your SCM
✓ Quickly get low-cost iso-production environment
QA
P.O. / Sales
Run a demo
✓ Ready to run demo
✓ No setup stress
✓ No technical skills required
✓ Can share with partners
Production
Dev/Opsa WAR archive is NOT what a sysadmin expect as delivery !
!
+
best DevOps tool so far (imho)
Separation of concernInside container /var/log/myapp
!
!
!
On host /mnt/backup/myapp/log
Separation of concerns
VOLUMEInside container /var/log/myapp
!
!
!
On host /mnt/backup/myapp/log
✓ Manage hardware / infrastructure
✓ Monitoring / backups
- Not apps « implementation details »
Ops
✓ Develop simplest possible solution
✓ Configuration is a runtime constraint
- Not extra-extra-flexibile application !
!
new WebServer().start(8080);
Dev
Continuous Delivery
Continuous Delivery
•100% Reproducible environments
« docker build . » to replace « mvn install »
Dockerfile build WAR from
sources
Dockerfile run acceptance
test suite
Dockerfile build deployable
container
docker run COPY
Continuous Delivery
Pour quoi ?
!
✓ Cloud !
✓ devices !
✓ on-premises
more to come soon …
New architectures
LightWeight VM ?
1 process per container !
OS kernel
File System (libs, …)
services (virtual) File System
services application runtime (JDK)
application
data (memory / disk)
OS kernel
File System (libs, …)
services (virtual) File System
application runtime (JDK)
application
data (memory / disk)
vFS
runtime
service
data
OS kernel
File System (libs, …)
services (virtual) File System
application runtime (JDK)
application
data (memory / disk)
vFS
runtime
service
data
OS kernel
File System (libs, …)
services (virtual) File System
application runtime (JDK)
application
data
vFS
runtime
service
data
other application
data
OS kernel
File System (libs, …)
(virtual) File System
application runtime (JDK)
application
data
vFS
runtime
service
data
application
data
vFS
runtime
service
data
Diviser pour mieux régnerStop the monolithes ! !
!
!
!
!
!
!
Diviser pour mieux régnerembrace Micro-services ‣ « the unix way » ‣ domain focussed ‣ quick release cycles ‣ segregate resources !
!
http://yobriefca.se/blog/2013/04/29/micro-service-architecture/
!
Micro-‐service avec Docker
LINK
host
sample : syslog
http://jpetazzo.github.io/2014/08/24/syslog-docker/
rsyslog
/dev/log
/tmp/syslogdev
logger "hello"
/dev/log
durée de vieUn serveur ou une VM : des mois, voir plus !
Un (ou des) containeur(s) : parfois juste quelques minutes !
Upgrades
!
Upgrade applicatif = build d’une nouvelle image
Q?