docker for dummies
DESCRIPTION
An internal presentation I did at Miles about Docker. In Norwegian and definitely lacks some polish, but here if someone might need it. :)TRANSCRIPT
for Dummies
It’s all virtual baby!
Miles Session – Januar 2014Anders Sveen
Virtualisering
• Separate maskiner• Forskjellige ressurser• Forskjellige OS• Forskjellig software
The current
• VMWare• Redhat (KVM)• Ubuntu
IaaS
• On demand• Forhåndsdefinerte image• Self service
• Openstack• Propreitært
PaaS
• On demand• Forhåndsdefinerte templates• Self service• Raskt
• Følg disse patterns så får du:– Automatisk skalering– Drifting og backup av DB– Overvåkning– Fail over– Minimumsgaranti i forhold til resursser
Virtualisering for utvikling
Vagrant
• Automatisering av Virtualbox
• Bruk og last ned dette imaget• Koble inn disse mappene• Sett opp disse portene
• Start/reset/stopp/pause
Docker
• Virtualbox pluss Vagrant• Isolasjon• Forskjellige OS• Porter• Mapper
• Produksjonsfokus• Hastighet
LXC
• Linux Containers• En del av Linux Kernel• Cgroups og namespaces• SELinux for sikkerhet?
root@docker-demo:~# lxc-create -t ubuntu -n testChecking cache download in /var/cache/lxc/saucy/rootfs-amd64 ... Copy /var/cache/lxc/saucy/rootfs-amd64 to /usr/lib/x86_64-linux-gnu/lxc ... Copying rootfs to /usr/lib/x86_64-linux-gnu/lxc ...
### The default user is 'ubuntu' with password 'ubuntu'!# Use the 'sudo' command to run tasks as root in the container.##
root@docker-demo:~# lxc-start -n test -droot@docker-demo:~# lxc-ls --fancyNAME STATE IPV4 IPV6 AUTOSTART ------------------------------------------test RUNNING 10.0.3.237 - NO
root@docker-demo:~# ssh [email protected]@10.0.3.237's password:
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted byapplicable law.
ubuntu@test:~$
LXC
• Etabler egen mappe som filsystem• Sett opp Cgroups og Namespace slik at det
isoleres• Start prosesser
• Dårlig…
Docker
• Images• Repository– Push– Pull
• Layered filesystem• Mapper• Porter• Dockerfiles
Docker deler
Docker Layered File System
Docker
• Raskt• Egne tilpasninger• Virtualisert• Alle containere starter fra samme basis
To image or not
To image or not
This changes everything
• Alle kan virtualisere• Alle kan virtualisere mye• Alle kan distribuere fullstendige snapshots av
maskiner• Det går kjapt• Det gir fullstendig isolasjon
IaaS? PaaS?
• Docker i OpenStack• PaaS har ikke lenger hastighetsfordelen• Trenger fortsatt templates for å komme i gang• Fortsatt utfordring å monitorere, overvåke,
skalere og gjøre failover
Fremover
• Openshift skal integrere Docker• Bedre verktøy• Andre PaaS løsninger• Erstatte Vagrant?• Integrert i Vagrant?• Flere Linux varianter• OS X støtte?
What?
• Teste software• Teste scripts• Teste nettverk• Isolere inkompatibel software• Flytte oppsett
SPØRSMÅL?