container con europe 2016 - container orchestration: which conductor?
TRANSCRIPT
![Page 1: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/1.jpg)
ContainerOrchestration:WhichConductor?
ContainerConEurope,Berlin,Oct2016
MikeBright, @mjbright
HaikelGuemar, @hguemar
MarioLoriedo, @mariolet
![Page 2: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/2.jpg)
First...Alittlebitofhistory
![Page 3: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/3.jpg)
Solet'sfirstlookatrecentcontainerhistory...
Unix
con
tain
ers,
Unik
erne
lsLi
nux
cont
aine
rs(L
XC),
Mes
osLX
C(C
loud
Foun
dry,
Dot
Clou
dPa
aS)
Dock
er
Cont
aine
rOrc
hest
ratio
nOp
tions
PaaS
ado
ptio
nso
fDoc
ker
Dock
er"S
war
mm
ode"
,OCI
D...
Mic
ro-O
Ses,
Swar
m,R
kt,L
XD
Dock
erb
uysU
nike
rnel
Sys
tem
s
...2009 2013 2014 2016...2015
@hguemar@mjbright@mariolet
![Page 4: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/4.jpg)
History μ-OSesManyvendorsaredevelopingμ-OSes,smallOS(mainlyLinux-based)tobethebasisforcontainerenginehostswhethertheybebare-metalorvirtualhostmachines.
They'resmall,withfaststartup,usefewresourcesandhaveasmallattacksurfaceandoften"atomic"softwareupdates.
OS VendorCoreOS - (CoreOS)ProjectAtomic - (RedHat)RancherOS - (RancherLabs)Photon - (VMWare)NanoServerOS - (Microsoft)UbuntuSnappyCore - (Canonical)
...Unikernels
![Page 5: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/5.jpg)
μ-Services
![Page 6: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/6.jpg)
μ-services Frommonolithstoμ-services
Rememberwhenhighavailabilitymeantthis...?
Active StandbyAppApp
ServersrunningmonolithicapplicationsinActive-Standbymodes,as1+1,N+1,orN+Morsplitacross3tiers.
Scalingmeantto"scaleup"byaddingCPU,RAM,disk.Butthere'salimittothis...thenyouhaveto"scaleout"@hguemar@mjbright@mariolet
![Page 7: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/7.jpg)
μ-services Frommonolithstoμ-services
Thencameμ-services..
Astheindustrymovedtovirtualizedmicro-servicesthisallowedtoobtaingreaterefficiencies(higherutilisationofresources)andtheredesignofapplicationsallowstoscaleoutandachievehighavailability.
Containersfacilitatethismove,allowingfasterscalingandevengreaterefficiencieswithlessredundancy(noOStoreproduce).
@hguemar@mjbright@mariolet
![Page 8: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/8.jpg)
μ-services Howcontainershelp?
ContainersolutionssuchasDockergobeyondtheisolationcapabilitiesofLXCbyprovidingsimpletousetoolstoenablepackagingofappswiththeirdependenciesallowingportableapplicationsbetweensystems.
Containersarelightweight
Versionedimagescontainingalldependanciescanbeshared
Containersallowtousethesameapplicationbinariesondevelopment,testandproductionsystemswhetherthatbeonalaptop,serverorinthecloud.
It'sanobrainerfordevelopers,whocanbuildandsharetheirownimages
@hguemar@mjbright@mariolet
![Page 9: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/9.jpg)
μ-services Frommonolithstoμ-services
But1000'sofnodesareunmanageable...aren'tthey?
Wecan'ttakecareofour
,
sowehavetotreatthemlike
that'scloudnative!
@hguemar@mjbright@mariolet
![Page 10: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/10.jpg)
Soweneedcontainerorchestration
![Page 11: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/11.jpg)
OrchestrationWhatwasContainerOrchestrationagain?
Architecture-Composition&StitchingWorkflows&Policiesto
Scalein/out(maybeautomatically)Placeworkloadsfor
loadbalancing,faulttolerance,resourceoptimization
Adapttofaults
....
....
Master
Worker Worker Worker
....App1 AppNDistrib
Cluster
Config
(quorum)
Master Master
WorkerTasks:
![Page 12: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/12.jpg)
OrchestrationGettingto"DesiredState"Tomanage100's,1000's,10,000'sofnodesweneedtoexpress"desiredstate"ratherthan"dothis".
Imperative DeclarativeTellsystem Dothis desiredstate
"startanewnode" "3mysqlnodes".
Intelligence Operator OrchestrationEngine.
Flexibility Best Least.
Itisnotlongerfeasibleforanoperatorto
knowtheresourcesavailable(e.g.SSD/HDD,GPU,...)reacttofailure,knowwhentoscale...
@hguemar@mjbright@mariolet
![Page 13: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/13.jpg)
Choiceisgreat-whenyouknowwhatyouwant...
![Page 14: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/14.jpg)
Orchestration
TheBig3-MainOrchestrationChoices
DockerSwarm("SwarmMode")
ApacheMesos
Kubernetes
![Page 15: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/15.jpg)
Orchestration
TheBig3-MainOrchestrationChoices
DockerSwarm("SwarmMode")
ApacheMesos
Kubernetes
...moreChoices...
Rancher(RancherLabs)
Fleet(CoreOS)
Nomad(HashiCorp)
Kontena
OpenStackMagnum@hguemar@mjbright@mariolet
![Page 16: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/16.jpg)
OrchestrationTheBig3-WhatdoesGoogleTrendssay?
ClearlyKuberneteshasaleadinGoogle"searchtrends"
Butwecanexpect"DockerSwarm"tomakequickprogressthankstothenew"swarmmode"
![Page 17: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/17.jpg)
DockerSwarm
![Page 18: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/18.jpg)
DockerSwarm
Dec2014 ...DockerSwarmisannounced
OrchestrationusingDockerCompose
Jun2016 ... SwarmToolkitreleasedOpenSourceOrchestrationToolkit
Jun2016 ... SwarmModeannouncedOrchestrationintegratedintoDockerEngine
Docker1.12isthefirstreleasetointegrate"SwarmMode"TheoriginalDockerSwarmismaintainedforlegacyuse.
"SwarmMode"isarevolutionbringing:
OrchestrationdirectlyintheDockerEngineAdvancednetworkingfeatures
meshnetwork,vxlanLoadbalancingServiceDiscoveryDockertraditionaleaseofuse
docker.com @hguemar@mjbright@mariolet
![Page 19: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/19.jpg)
DockerSwarm
Architecture
....
....
Master
Worker Worker Worker
....App1 AppN DistribClusterConfig(quorum)
Master Master
WorkerTasks:
GossipNetwork
DockerEngine DockerEngine DockerEngine DockerEngine
gRPC
docker.com @hguemar@mjbright@mariolet
![Page 20: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/20.jpg)
DockerSwarm
UsingDocker"SwarmMode"Createanewswarmbycreatingthemasternode:
$dockerswarminit--advertise-addr192.168.2.100Swarminitialized:currentnode(dxn1zf6l61qsb1josjja83ngz)isnowamanager.
JoinanewWorkernodetotheswarm:
$dockerswarmjoin--tokenTOKEN192.168.2.100:2377
JoinanewMasternodetotheswarm:
$dockerswarmjoin-tokenmanager
docker.com @hguemar@mjbright@mariolet
![Page 21: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/21.jpg)
DockerSwarmDemo
![Page 22: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/22.jpg)
DockerSwarm
DockerSwarmDemoCreationofa3nodecluster
Runaserviceontheclusterandscaleitto3replicas
Makearollingupdateoftheservice
Drainanodeofthecluster
docker.com @hguemar@mjbright@mariolet
![Page 23: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/23.jpg)
DockerSwarm
Gettingstarted
BrunoCornecs'Docker101LabNewtoDocker?Cometohttp://sched.co/7oHf
Docker101Lab,9am-Friday7thOctober
https://github.com/bcornec/Labs/tree/master/Docker
Followedby..
JeromePetazzoni'sOrchestrationWorkshopormoreadvanced?Cometohttp://sched.co/7oHx
OrchestratingContainersinProductionatScalewithDockerSwarm,Friday7thOctober
https://github.com/jpetazzo/orchestration-workshop
docker.com @hguemar@mjbright@mariolet
![Page 24: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/24.jpg)
Kubernetes
FromtheGreek:"Steersman,helmsman,sailingmaster"
![Page 25: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/25.jpg)
Kubernetes
Googlecreatedbasedonextensiveexperiencerunningcontainersinternally~billionsofcontainersayear
StartedOct2014,reachedv1.0inJuly2015,nowatv1.4
ManagedbytheCloudNativeComputingFoundationhttps://cncf.io/
CommercialofferingsfromCoreOS(Tectonic)andCanonical
Integratedin:
GKE(GoogleContainerEngine)OpenStackaboveKubernetes
Stackanetes(CoreOS,usesTectonic)SelfhealingOpenStackdemo
Mirantis(OpenStackCI/CDbasedonKolla)VariousPaaS:
RedHatOpenShiftCPHPEStackatov.40Deis
kubernetes.io @hguemar@mjbright@mariolet
![Page 26: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/26.jpg)
Kubernetes
Architecture
....
....
Master
Worker Worker Worker
....App1 AppN etcd
Master Master
WorkerPods: 192.168.100.10
ServicesLabels,Selectors
kubernetes.io @hguemar@mjbright@mariolet
![Page 27: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/27.jpg)
ApacheMesos
![Page 28: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/28.jpg)
ApacheMesos
Themostprovenorchestratortoday,existssince2009.
Canscaleto~10,000nodes.
Usedinproductionby:
UberTwitterPaypalHubspotAirbnbeBayGrouponNetflix
SupportsContainerizerstoisolatetasks
mesos.apache.org
![Page 29: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/29.jpg)
ApacheMesos
Architecture
....
....
Master
Worker(agent)
....Spark AppNDistrib
Cluster
Config
(quorum)
Master Master
WorkerTasks:
ResourcesAvailable
Scheduler
SparkExecutor SparkExecutor Executor
Offer
AcceptRegister
Worker(agent) Worker(agent)
mesos.apache.org
![Page 30: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/30.jpg)
ApacheMesos
MesosisusedinconjunctionwithFrameworkssuchas
Forlongrunningtasks:
Marathon(Mesosphere),AuroraorSingularity
Forjoborchestration:
Chronos"cron",Jenkins
ForBigDataProcessing:
Hadoop,Spark,StormCassandra,ElasticSearch,...
mesos.apache.org@hguemar@mjbright@mariolet
![Page 31: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/31.jpg)
Soisn'tittimewetoldyouwhattochoose?
...let'sjustcomparethem...
![Page 32: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/32.jpg)
What'scommon
DockerSwarmandKubernetesarecreatingrichOrchestrationstackswithintegratedruntimes.
They'removingincrediblyquicky...
Theyareaddingfeaturessuchasnetworkingcapabilities,loadbalancing,services,labels.
Theyhaveamore'declarative'approach
Theysupportorarelookingtosupportdifferentruntimeengines(*)
@hguemar@mjbright@mariolet
![Page 33: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/33.jpg)
Whatadvantages?Docker"Swarm
Mode"Simpletouse(despiteunderlyingcomplexity)
All-in-onecontainerengineplusorchestration
UsesDockerAPIandfamiliardockercommands
Advancednetworking
-meshnetworking-LoadBalancingandServiceDiscovery
Replication
@hguemar@mjbright@mariolet
![Page 34: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/34.jpg)
Whatadvantages?Kubernetes
Richconceptualmodel
Podsasgroupingsofcontainers
LabelsandSelectors(forallcomponents)
Largeecosystem
Networking
-LoadBalancingandServiceDiscovery
Replication
@hguemar@mjbright@mariolet
![Page 35: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/35.jpg)
Whatadvantages?ApacheMesos
Mostmature
Battletestedbymanyserviceproviders
Scalesto10,000nodes
DataCenterOS-appearsas1resource
Notjustcontainers
Manyframeworksavailable
Difficultramp-up
@hguemar@mjbright@mariolet
![Page 36: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/36.jpg)
Handson...
@hguemar@mjbright@mariolet
![Page 37: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/37.jpg)
Hands-on Comealong
Thisafternoon'stutorialsessionledbyMario:Tuesday,October4-15:30-16:20
5Containersfor5Languages:PatternsforSoftwareDevelopmentUsingContainers-MarioLoriedo,RedHat
Tomorrow'slabsessionledbyHaikel:Wednesday,October5-11:00-12:50
ContainerOrchestrationLab:Swarm,Mesos,Kubernetes-HaïkelGuémar,FedoraProject
Labsetupinstructionshere
DockerSwarmKubernetesApacheMesos
@hguemar@mjbright@mariolet
![Page 38: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/38.jpg)
Questions?Thankyou
@hguemar@mjbright@mariolet
![Page 39: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/39.jpg)
Resources
@hguemar@mjbright@mariolet
![Page 40: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/40.jpg)
ResourcesBooksPublisher Title AuthorOReilly DockerCookbook SébastienGoasguen
OReilly DockerUp&Running
KarlMatthias,SeanP.Kane
OReilly UsingDocker AdrianMouat
OReilly[EarlyAccess]KubernetesUp&Running
KelseyHightower
Manning [MEAP]CoreOSinAction MattBailey
Manning [MEAP]KubernetesinAction MarkoLukša
@hguemar@mjbright@mariolet
![Page 41: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/41.jpg)
ResourcesArticles/OrganismsCloudNativeComputingFoundation-Kubernetes,Prometheushttps://cncf.io/
"KubernetestheHardWay,KelseyHightower"-https://github.com/kelseyhightower/kubernetes-the-hard-way
"KubernetesUserGuide,Walkthrought"-http://kubernetes.io/docs/user-guide/walkthrough/
@hguemar@mjbright@mariolet
![Page 42: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/42.jpg)
ResourcesVideosJune2016-ContainerOrchestrationWars,KarlIsenberg,Mesosphere
Mar2016-ContainerOrchestrationwithKubernetes,DockerSwarm&Mesos-Marathon-AdrianMouat,ContainerSolutions
Jan2016-Docker,Kubernetes,andMesos:Compared.,,AdrianOtto,SouthernCaliforniaLinuxExpo
Repos
@hguemar@mjbright@mariolet
![Page 43: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/43.jpg)
Kubernetes
DocumentationGettingstartedguides
CreatingaKubernetesClusterportKubernetestoanewenvironment
inGettingStartedfromScratchUserdocumentation
torunprogramsonanexistingKubernetescluster
KubernetesUserGuide:ManagingApplications
theKubectlCommandLineInterfaceisadetailedreferenceonthekubectlCLIUserFAQ
kubernetes.io @hguemar@mjbright@mariolet
![Page 44: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/44.jpg)
Kubernetes
Documentation-2
ClusteradministratordocumentationforpeoplewhowanttocreateaKubernetesclusterandadministeritintheKubernetesClusterAdminGuide
DeveloperandAPIdocumentationtowriteprogramsusingtheKubernetesAPI,writepluginsorextensions,ormodifycorecodeKubernetesDeveloperGuidenotesontheAPIAPIobjectdocumentation,adetaileddescriptionofallfieldsfoundinthecoreAPIobjects
Walkthroughsandexampleshands-onintroductionandexampleconfigfilesintheuserguideinthedocs/examplesdirectory
ContributionsfromtheKubernetescommunity
inthedocs/contribdirectory
kubernetes.io @hguemar@mjbright@mariolet
![Page 45: Container Con Europe 2016 - Container Orchestration: Which Conductor?](https://reader033.vdocuments.us/reader033/viewer/2022051521/5a654bc87f8b9a5b558b63cb/html5/thumbnails/45.jpg)
Kubernetes
Documentation3Designdocumentationanddesignproposals
tounderstandthedesignofKubernetes,andfeatureproposalsKubernetesDesignOverviewandthedocs/designdirectorydocs/proposalsdirectory
Wiki/FAQthewikitroubleshootingguide
Community,discussion,contribution,andsupport
ConsiderjoiningtheCloudNativeComputingFoundation.Fordetailsaboutwho'sinvolvedandhowKubernetesplaysarole,readtheirannouncement.
kubernetes.io @hguemar@mjbright@mariolet