charlie garrod michael hilton - carnegie mellon school of ...charlie/courses/15-214/... · 15-214 2...
TRANSCRIPT
115-214
SchoolofComputerScience
Microservices +DevOps
CharlieGarrod MichaelHilton
215-214
Administrivia
• Homework6checkpoint– MondayDec4th
• FinalExamReview:Dec13th,2-4pmWean5409• FinalExam:Dec15th,5:30-8:30pmWean7500
315-214
LastTime:
• Architecturalstyles
415-214
SimpleLayersApp
515-214
Morefunctionality
615-214
Evenmorefunctionality
715-214
Organizeourbackend
815-214
Howtoscale?
915-214
Monolith
• Whathappenswhenweneed100servers?
• Whatifwedon’tuseallmodulesequally?
• Howcanweupdateindividualmodels?
• DoallmodulesneedtousethesameDB,language,runtime,etc?
1015-214
Microservices
1115-214
Microservices shouldbe:
• Modelledaroundbusinessdomain• Cultureofautomation• Hideimplementationdetails• Decentralizedgovernance• Deployindependently• Designforfailure• Highlyobservable
1215-214
Microservice prerequisites
• RapidProvisioning• BasicMonitoring• RapidApplicationDeployment• Devops Culture
1315-214
1415-214
Whyaremicroservices suchabigdeal?
1515-214
Impactondevelopmentpractices
• Amazontransitionedto“two-pizza”teams• “FullStack”developers• ”Devops”asaprereq• Livetestingandrollback• Migratingfrom“monolithtomicroservices”ispopular,but
comesatacost
1615-214
Microservices benefits
• StrongModuleBoundaries• IndependentDeployment• TechnologyDiversity
1715-214
Microservices overhead
1815-214
Microservice costs
• Distribution• EventualConsistency• Operationalcomplexity
1915-214
DiscussionofMicroservices
• Aretheyreally“new”?• Domicroservices solveproblems,orpushthemdowntheline?• Whataretheimpactsoftheaddedflexibility?• GoodArchitecturedoesn’tfixpoorlowleveldesignproblems• Beware“cargocult”• “Ifyoucan’tbuildawell-structuredmonolith,whatmakesyou
thinkmicroservices istheanswer?” – SimonBrown• LeadstomoreAPIdesigndecisions
2015-214
Microservice prerequisites
• RapidProvisioning• BasicMonitoring• RapidApplicationDeployment• Devops Culture
2115-214
DEVOPS
2215-214
WhyDevOps?
• DevelopersandOperationsdon’thavethesamegoals– Devs wanttopushnewfeatures– Opswantstokeepthesystemavailable(stable,tested,etc.)s
• PoorcommunicationbetweenDevandOps• Limitedcapacityofoperationsstaff• Wanttoreducetimetomarketfornewfeatures• Reduce“Throwitoverthefence”syndrome
2315-214
DevOpsDefinition
• “DevOpsisasetofpracticesintendedtoreducethetimebetweencommittingachangetoasystemandthechangebeingplacedintonormalproduction,whileensuringhighquality.”
2415-214
WhatareimplicationsofDevOps?
• Qualityofthecodemustbehigh– Testing
• Qualityofthebuild&deliverymechanismmustbehigh– Automation&moretesting
• Timeissplit:– Fromcommittodeploymenttoproduction– Fromdeploymenttoacceptanceintonormalproduction
• Goal-orienteddefinition– Mayuseagilemethods,continuousdeployment(CD),etc.– Likelytousetools
• Achievingitstartsbeforecommitting
2515-214
Microservices relyonDevOps
2615-214
DevOpsToolchain
2715-214
DevOpsToolchain
• Code— codedevelopmentandreview, sourcecodemanagement tools,codemerging
• Build— continuousintegration tools,buildstatus• Test— continuoustesting toolsthatprovidefeedbackon
businessrisks• Package— artifactrepository,applicationpre-deployment
staging
2815-214
DevOpsToolchaincontinued
• Release— changemanagement,releaseapprovals, releaseautomation
• Configure— infrastructureconfigurationandmanagement, InfrastructureasCode tools
• Monitor— applicationsperformancemonitoring,end–userexperience
2915-214
DevOpsToolchain- Code
• Codedevelopmentandreview• Sourcecodemanagement tools• Codemerging
3015-214
DevOpsToolchain- Code
• Codedevelopmentandreview• Sourcecodemanagement tools• Codemerging
MoreonCodeReviewin17-313
3115-214
DevOpsToolchain- Code
• Codedevelopmentandreview• Sourcecodemanagement tools• Codemerging
3215-214
DevOpsToolchain- Code
• Codedevelopmentandreview• Sourcecodemanagement tools• Codemerging
3315-214
DevOpsToolchain- Build
• Continuousintegration tools• Buildstatus
3415-214
DevOpsToolchain- Test
• Continuoustesting toolsthatprovidefeedbackonbusinessrisks
3515-214
DevOpsToolchain- Test
• Continuoustesting toolsthatprovidefeedbackonbusinessrisks
Testingtoolsmusthavetests tobevaluable!!