Thisrepository(formerlyknownasorchestration-workshop)containsmaterials(slides,scripts,demoapp,andothercodesamples)usedforvariousworkshops,tutorials,andtrainingsessionsaroundthethemesofDocker,containers,andorchestration.
Forthemoment,itincludes:
IntroductiontoDockerandContainers,ContainerOrchestrationwithDockerSwarm,ContainerOrchestrationwithKubernetes.Thesematerialshavebeendesignedaroundthefollowingprinciples:
theyassumeverylittlepriorknowledgeofDocker,containers,oraparticularprogramminglanguage;theycanbeusedinaclassroomsetup(withaninstructor),orself-pacedathome;theyarehands-on,meaningthattheycontainlotsofexamplesandexercisesthatyoucaneasilyreproduce;theyprogressivelyintroduceconceptsinchaptersthatbuildontopofeachother.Ifyou'relookingforthematerials,youcanstopreadingrightnow,andhoptohttps://container.training/,whichhostsalltheslidesdecksavailable.
Therestofthisdocumentexplainshowthisrepositoryisstructured,andhowtouseittodeliver(orcreate)yourowntutorials.
Whyasinglerepository?Allthesematerialshavebeengatheredinasinglerepositorybecausetheyhaveafewthingsincommon:
somesharedslidesthatarere-used(andupdated)identicallybetweendifferentdecks;abuildsystemgeneratingHTMLslidesfromMarkdownsourcefiles;asemi-automatedtestharnesstocheckthattheexercisesandexamplesprovidedworkproperly;aPhantomJSscripttocheckthattheslideslookgoodanddon'thaveformattingissues;deploymentscriptstostarttrainingVMsinbulk;afancypipelinepoweredbyNetlifyandcontinuouslydeployingmastertohttps://container.training/.Whatarethedifferentcoursesavailable?IntroductiontoDockerisderivedfromthefirst"DockerFundamentals"trainingmaterials.Formoreinformation,seejpetazzo/intro-to-docker.TheversioninthisrepositoryhasbeenadaptedtotheMarkdownpublishingpipeline.Itisstillmaintained,butonlyreceivesminorupdatesonceinawhile.
ContainerOrchestrationwithDockerSwarm(formerlyknownas"OrchestrationWorkshop")isaworkshopcreatedbyJérômePetazzoniinJune2015.Sincethen,ithasbeencontinuouslyupdatedandimproved,andreceivedcontributionsfrommanyothersauthors.Itisactivelymaintained.
ContainerOrchestrationwithKuberneteswascreatedbyJérômePetazzoniinOctober2017,withhelpandfeedbackfromafewothercontributors.Itisactivelymaintained.
RepositorystructurebinAfewhelperscriptsthatyoucansafelyignorefornow.dockercoinsThedemoappusedthroughouttheorchestrationworkshops.efk,elk,prom,snap:Loggingandmetricsstacksusedinthelaterpartsoftheorchestrationworkshops.prepare-local,prepare-machine:Contributedscriptstoautomatethecreationoflocalenvironments.Thesecouldusesomehelptotest/checkthattheywork.prepare-vms:ScriptstoautomatethecreationofAWSinstancesforstudents.Theseareroutinelyusedandactivelymaintained.slides:Alltheslides!TheyareassembledfromMarkdownfileswithacustomPythonscript,andthenrenderedusinggnab/remark.Checkthisdirectoryformoredetails.stacks:AhandfulofComposefiles(version3)allowingtoeasilydeploycomplexapplicationstacks.Coursestructure(Thisappliesonlyfortheorchestrationworkshops.)
Theworkshopintroducesademoapp,"DockerCoins,"builtaroundamicro-servicesarchitecture.First,werunitonasinglenode,usingDockerCompose.Then,wepretendthatweneedtoscaleit,andweuseanorchestrator(SwarmKitorKubernetes)todeployandscaletheapponacluster.
Weexplaintheconceptsoftheorchestrator.ForSwarmKit,wesetuptheclusterwithdockerswarminitanddockerswarmjoin.ForKubernetes,weusepre-configuredclusters.
Then,wecovermoreadvancedconcepts:scaling,loadbalancing,updates,globalservicesordaemonsets.
Thereareanumberofadvancedoptionalchaptersaboutlogging,metrics,secrets,networkencryption,etc.
Thecontentisverymodular:itisbrokendowninalargenumberofMarkdownfiles,thatareputtogetheraccordingtoaYAMLmanifest.Thisallowstore-usecontentbetweendifferentworkshopsveryeasily.
DockerCoinsThesampleappisinthedockercoinsdirectory.It'susedduringallchaptersforexplainingdifferentconceptsoforchestration.
Toseeitinaction:
cddockercoins&&docker-composeup-dthiswillbuildandstartalltheservicesthewebUIwillbeavailableonport8000RunningtheWorkshopIfyouwanttodeliveroneoftheseworkshopsyourself,thissectionisforyou!
*ThissectionhasbeenmostlycontributedbyBretFisher,whowasoneofthefirstpersonstohavethebraveryofdeliveringthisworkshopwithoutme.ThanksBret!
评论