Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions...

38
Use the Source or join the Dark Side The differences between Docker Community Edition and Docker Enterprise Edition

Transcript of Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions...

Page 1: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

UsetheSourceorjointheDarkSide

ThedifferencesbetweenDockerCommunityEdition

andDockerEnterpriseEdition

Page 2: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Outline

• Introductions• Highleveldifferences• Build,ship,andrun• Securitymodel• Trafficrouting• Gettingstarted

Page 3: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

WhoamI?

• JérômePetazzoni(@jpetazzo)• JoineddotCloudin2010(tobuildandscaleacontainerplatform)• In2013,dotCloudlaunchesDocker(andchangesitsname)• Thesameyear,Isubmitmyfirstcontainertalk(attheSCALE11xconferenceinLosAngeles)• SincethenI’vebeenlivinginconferencehotelsandairports😰

Page 4: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

⚠Thisisavendortalk

• IworkforDockerInc.• IwilltalkaboutDockerInc.commercialproducts• ButIdon’tlikeadvertising• I’llexplain:• whatyougetforfree(DockerCE,CommunityEdition)• whatyougetfor€€€(DockerEE,EnterpriseEdition)

• Targetaudience:engineers(andtech-savvydecisionmakers)

Page 5: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Whythistalk?

• Dispellingafewmyths• MYTH#1:“DockerInc.doesn’thaveabusinessmodel!”• DockerInc.sellscommercialproducts,support,SAASofferings• DockerInc.generatessignificantrevenue&hascustomerslikeVisa,PayPal…• Thishasbeengoingonforafewyearsnow

• MYTH#2:“Dockerisonlyfordevelopment,notproduction!”• PeoplehavebeenusingDockerinproductionsince2013• Usinganykindofsoftware inproductionischallenging• Tohelp,DockerInc.hascommercialproducts,support,...yougettheidea

• HelpingyoutodecideifDockerisgoodforyourapp

Page 6: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Therewillbedemos(It’sanoldDockertradition!)

Page 7: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Ourdemoapplication

• Wewillshowanappbuiltaroundamicro-servicesarchitecture• DockerCoins• usedinmyorchestrationworkshop:https://github.com/jpetazzo/orchestration-workshop

• Youcanrunthisdemoonany Dockermachine• …anditshouldtakeapproximately1minutetobuildandrunit!

Page 8: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

DemoRunDockerCoins inaplay-with-docker sandbox

Page 9: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

High leveldifferencesbetweenDockerCEandDockerEEDockerCE• fordevelopersandsmallorganizations• free• stableversion(every3months)• edgeversion(everymonth),withcuttingedgefeatures

DockerEE• forbusinesscriticalproductionapps• subscriptionmodel• stableversion(every3months)• eachversionmaintainedatleastforoneyear• additionalenterprisefeatures(management,security…)

Page 10: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Releaseschedule

Page 11: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Supportedplatforms

Page 12: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Deployingourdemoapponacluster

• TheDockermottois“build,ship,andrunanyapp,anywhere”• Thismeans:• build containerimagesforourapp• ship theseimagestoaregistry• runtheapponaSwarmcluster

• DockerComposeisagreattoolfordevstacks…• …andcanbeusedtodeploythemonclustersaswell!

Page 13: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

DemoUseComposeand“docker stackdeploy”tobuild,ship,andrunDockerCoins

Page 14: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Inspectingourapplication

• Wewantto:• listdeployedservicesandtheirstatus• viewcontainerlogs• getashellinacontainer

• DockerCE:wewilluseDocker’sCLIandAPI• DockerEE:wewilluseUCP(UniversalControlPlane)

Therearealso3rd-partyinterfaceslikePortainer,usingtheDockerAPI:https://github.com/portainer/portainer

Page 15: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Demodocker ps,docker logs,docker servicels,docker serviceps,docker exec

Page 16: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

DemoShowthesameinformationwithUCP

Page 17: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Operatingourapplication

• Wewantto:• viewtheportallocatedtoDockerCoins’webUI• displaythewebUI• scaleupanddownthe“worker”service• viewmetrics

• DockerCE:wewillusetheDockerAPI• DockerEE:wewilluseUCP

Page 18: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Demodocker inspect,loadpageinbrowser,docker serviceupdate

Page 19: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Demometrics?Thatoneistrickier!Wecouldusethisthingnamed“Prometheus”...

Page 20: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

DemoDothesameoperationsinUCP,showmetrics

Page 21: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Security(CE&EE)

• Dockernativeclustering(“SwarmMode”)usestheSwarmKit library• SwarmKit hasverystrongsecurityfoundations:• automaticTLSkeyingandsigning• fullencryptionofthecontrolplane• automaticcertandkeyrotation• optionalencryptionofthedataplane(leveraginghardwarecryptowhereavailable)• leastprivilegearchitecture(single-nodecompromise≠clustercompromise)• on-diskencryptionwithoptionalpassphrase

Page 22: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Secrets(CE&EE)

• Secretsarearbitraryblobsofdata(passphrases,privatekeys,oreventextpads…)• First-classcitizenwiththeDockerAPI• Neverstoredinclearondisk(persistedinencryptedformbymanagernodes)• Exposedtoservices(presentedasafileonanin-memoryfilesystem)

Page 23: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Demodocker secretcreate;addthesecrettoaservice;seethesecretintheservice

Page 24: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Privilegeseparation

• Bydefault,ifIhaveAPIaccess,Icandoanything• Includingcreatingamaliciousservicetoleaksecrets!⚠• Howdowefixthis?🤔

Page 25: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Authenticationandauthorization

• DockerEEhasthenotionofusers,groups,andpermissions• Permissionsareimplementedwithpermissionslabels:“IfanobjecthasthepermissionslabelX,youruserneedstohavepermissionX tobeabletoseeorinteractwiththatobject.”• Normallabel(com.docker.ucp.access.label)• Everyobjectcanhaveone(service,container,volume,secret…)• VisiblewiththeCLI,API,etc.• ProtectedandenforcedbyUCP

Page 26: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

DemoCreateaUCPuser“jerome”withbasicprivilegeLoginwith“jerome”Deploya“jeromecoins”stack;Seeitrunninginthe“admin”console

Page 27: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Underthehood

• Docker(CEandEE)hasauthorizationplugins• AllAPIrequestsareexaminedbyallenabledplugins• Eachpluginhastheopportunitytoacceptordenytherequest• UCPisanauthorizationplugin• Youcanwriteyourownplugins• Multiplepluginscanco-exist• UCPletsyouexportakey/certbundle forauser(tousetheCLIwhilerespectingthepermissionssystem)

Page 28: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

HTTProutingmesh

• Docker(CEandEE)hasaTCProutingmesh• providesload-balancingforinternalandinboundtraffic• leveragesIPVS,ahigh-performancein-kernelloadbalancer)

But:onlyoneappatatimecan“sit”onport80onyourcluster

• Docker(EE)hasaHTTProutingmesh• providesHTTPHostheaderparsingandvirtualhostrouting• optionalTLStermination• implementedusinglabels

Page 29: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

DemoShowlabelsinthedeployedappDorequeststothedifferentvirtualhosts

Page 30: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Hostingcontainerimages

• DockerCE:wecanusetheopensourceregistry• assimpleas“docker runregistry:2”• thisistheregistrythatweusedforallthesedemos

• DockerEE:wecanuseDockerTrustedRegistry(DTR)• hasuserandgroups,integratingwiththeonesinUCP• also:webhooks andworkflowsimplementingCI/CD

• Alsomanythirdpartyoptions:ECR,quay…

Page 31: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Bigscarysecurityquestion

IsitsafetorunthisprogramthatIjustdownloadedfromtheInternet?

• Makesurethatitisfromatrusted,reputablesource• Checkthatitwasn’tcompromisedintransit• Runitthroughanantivirusscanner

Page 32: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Nextbigscarysecurityquestion

IsitsafetorunthiscontainerimagethatIjustdownloaded?

• Makesurethatitisfromatrusted,reputablesource• Checkthatitwasn’tcompromisedintransit• Runitthroughasecurityscanner

Page 33: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Dockersecurityfeatures

• Trusted,reputablesources• DockerStore• officialimages• DockerContentTrust

• Integritychecking• content-addressedlayers• manifestsignatures• cryptographichashes

• Arbitraryimagescanning• DockerSecurityScanning(onlyinEE)• other3rd partyscannersareavailable

Page 34: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

GettingstartedwithDockerCE,usingplay-with-dockerLet’sdeployDockerCoins:• onaSwarmcluster• withoutinstallinganythingonourlocalmachine• inlessthan5minutes• andscaleit!

Page 35: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

DemoCreateaSwarmclusterinPWDSetupaself-hostedregistryBuild,ship,runDockerCoinsScaleit!

Page 36: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Thereismore…

• RunDockeranywhere• onvirtualorphysicalmachines• onembeddedorenergy-efficientplatformslikeARM

• RunWindowsapplications• DockercanrunLinuxandWindowscontainers• Swarmcanmanagemixedclusters

• Runmonolithic/legacyapplications• image2dockerhelpsto“dockerize”existingapps(similartoP2Vprograms)• lookforDocker’s“MTA”(modernizetraditionalapps)program!

Page 37: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Conclusions

• WithDocker,youcanbuild,ship,andrunanyapp,anywhere• DockerCommunityEditionisgreatfordevelopersandsmallteams• DockerEnterpriseEditionisoptimizedforbusinesscriticalapps• longtermsoftwaremaintenance• dependablesupportteam• fine-grainedaccesscontrol• containerimagelifecyclemanagement• additionalsecurityfeatures

• Alltheseextrafeaturesareprovidedthroughopenintegrationpoints(no“magicbackdoor”orvendorlock-in)

Page 38: Use the Source or Join the Dark Side: differences between Docker Community and Enterprise Editions (devopscon berlin)

Thankyou!Questions?

@jpetazzo@docker