Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GunosyのMicroServicesとOpsWorks / よくわかる AWS OpsWorks
Search
koid
March 26, 2015
18
5.9k
GunosyのMicroServicesとOpsWorks / よくわかる AWS OpsWorks
2015/03/26 よくわかるAWS OpsWorks
koid
March 26, 2015
Tweet
Share
More Decks by koid
See All by koid
新しい技術の導入時に大切にしていること / IVS CTO Night 2018 LT
koid
2
7.1k
GunosyでのKinesis Analytics利用について / AWS Solution Days 2017 -AWS DB Day-
koid
0
240
GunosyでのKinesis Analytics利用について / BigData JAWS 6 Kinesis Analytics
koid
1
910
re:Inventに行ってきました - 気になった新サービス / AWS re:Invent2016 Participants LT
koid
0
2k
AWS Lambda - ピーキーなアクセスに備える / Gunosy Beer Bash #8
koid
0
2k
AWS Lambdaで複数アカウント間でアレコレする / Gunosy Beer Bash #7
koid
1
2k
サーバにログインしない・させないサービス運用 / AWS Summit 2015 Devcon
koid
6
9k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
136
6.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Why Our Code Smells
bkeepers
PRO
334
57k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Embracing the Ebb and Flow
colly
84
4.5k
How to Ace a Technical Interview
jacobian
276
23k
What's in a price? How to price your products and services
michaelherold
243
12k
Designing for humans not robots
tammielis
250
25k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Transcript
(VOPTZͷ.JDSP4FSWJDFTͱ0QT8PSLT גࣜձࣾ(VOPTZ খग़య
ࣗݾհ • ໊લ – খग़యʢ͍͜ͰΏ͖ͷΓʣ • ॴଐ – גࣜձࣾ(VOPTZ։ൃຊ෦ •
"84Πϯϑϥ୲ • ࢄόονʢ"84ͷ"1*ୟ͖·͘Δܥͷʣ • ͖ͳ"84αʔϏε – 0QT8PSLT 5SVTUFE"EWJTPS
ຊ͓͍ͤͯͨͩ͘͞༰ • (VOPTZͱ0QT8PSLT • αʔόߏஙσϓϩΠ – Ͳ͏͍ͬͯΔ͔ – Ͳ͏มΘͬͨͷ͔ •
Πϯϑϥӡ༻ – Ͳ͏มΘͬͨͷ͔
͜Μʹͪ(VOPTZͰ͢
ओͳࣄۀͱΞϓϦέʔγϣϯ "E /FXT 1MBUGPSN ৴ "1* 8FC ਪન Ϋϩʔϥʔ ϝʔϧ
ϓογϡ ௨ ৴ "1* ৴ "1* ύʔτφʔ༷ ͚ ཧը໘ ͦͷଞશൠͱͯ͠ ཧπʔϧɺϩάऩूɺ ,1*ूܭμογϡϘʔυʑɺɺɺ ͦͷଞ اը ίϯςϯπ ࠂओ༷ ͚ ཧը໘ ఏܞ֤༷ࣾ ͚ ཧը໘
(VOPTZͷ։ൃ.JDSP4FSWJDFT • ૿͑Δ૿͑ΔΞϓϦ – ϚΠΫϩαʔϏεʢബ͍ΞϓϦͷू߹ʣ • ͻͱͭͷΞϓϦʹͳΜͰ͔ΜͰػೳΛͤͳ͍ • "1*ͷཪଆͰผͷ"1*ݺͼग़͠ –
ύʔτφʔاۀ༷͚ͷཧπʔϧ*' – اըίϯςϯπظؒݶఆίϯςϯπ • ഭΔഭΔϦϦʔε – ڥߏஙʹ͔͚Δ࣌ؒແ͍ • ʮ໌εςʔδϯάڥͰ͖Δ͔ͳʁʯ • ʮདྷिϦϦʔεͳΜ͚ͩͲʯ – σϓϩΠʹ͔͚Δ࣌ؒແ͍ • αʔϏεΠϯ·ͰτϥΠΤϥʔ • ෳࡶͳσϓϩΠํ๏ͩͱͦ͜ʹ͕࣌ؒऔΒΕΔ • ͱ͍͑ʮσϓϩΠ୲ʯΈ͍ͨͳਓ͕ډΔͱ͕ͦ͜ϘτϧωοΫʹ
(VOPTZͱ0QT8PSLT • 4UBDL – ݱࡏͷਁಁdׂఔ – ৽نΞϓϦجຊతʹ0QT8PSLT – طଘΞϓϦઈࢍҠߦத •
ϛοΫεΠϯʹΑΔαʔόߏங – ࣮$PPLCPPLϦϙδτϦͻͱ͚ͭͩ • ͻͨ͢Βڞ௨Խڞ௨Խڞ௨Խ • ΞϓϦ໊γεςϜ໊ͷೖͬͨϨγϐઈର࡞Βͳ͍ – ϨγϐͷΈ߹Θ͚ͤͩͰظؒͰαʔόߏங • σϓϩΠՄೳͳݶΓࣗಈԽ – $JSDMF$*ΛىʹϏϧυσϓϩΠ ઌɺҰ൪ϝΠϯͷ χϡʔε৴"1*͕ 0QT8PSLTʹΓ·ͨ͠
αʔόߏஙͱσϓϩΠ Ͳ͏͍ͬͯΔ͔
αʔόߏஙΑ͋͘Δύλʔϯ &-# 8FC 3%4 8PSLFS $BDIF 424 ߹ʹΑͬͯ &MBTUJ$BDIF 3FEJTPO&$
߹ʹΑͬͯෳʹ ͳͬͨΓ .POHP%#PO&$ ߹ʹΑͬͯ 3FEJTPO&$ MySQL
αʔόߏஙϛοΫεΠϯͷྫᶃ ࠓճͷΞϓϦHPͰ ϩάΛϩʔΧϧͷ UEBHFOUʹྲྀ͍ͨ͠ Ϧόϓϩ/HJOY ιέϚFJOIPSOͰ ࢹΑ͠ͳʹ
αʔόߏஙϛοΫεΠϯͷྫᶄ ࠓճͷΞϓϦ %KBOHPͰ ϫʔΧʔىಈ TVQFSWJTPSͰ Ϧόϓϩ/HJOY ιέϚHVOJDPSOͰ ࢹΑ͠ͳʹ
%PDLFS͍͍ͨ αʔόߏஙͦͷଞΑ͋͘Δཁ %#ʹ.POHP%#͍͍ͨ 3FEJTɺCHTBWFແ͠Ͱ /HJOYͷSMJNJUOPpMF UEBHFOUͷGPSXBSEઌ JGͷNUV͕ʜ .FTTBHF2VFVFʹ /42Λ
αʔόߏஙͦͷଞΑ͋͘Δཁ %PDLFS͍͍ͨ %#ʹ.POHP%#͍͍ͨ 3FEJTɺCHTBWFແ͠Ͱ /HJOYͷSMJNJUOPpMF UEBHFOUͷGPSXBSEઌ JGͷNUV͕ʜ .FTTBHF2VFVFʹ /42Λ ॊೈʹઃఆΛೖΕΒΕΔϨγϐ
ޙDVTUPNKTPOͰ͕ΜΔ
αʔόߏஙࢹϛοΫεΠϯ • ;BCCJYͰ֤.JEEMF8BSFຖʹࢹ߲Λઃఆ – ϨΠϠʔʹରͯ͠.JEEMF8BSFͷςϯϓϨʔτΛϦϯΫ ༨Γ͓ݟͤͰ͖·ͤΜ͕ʜ
σϓϩΠΑ͋͘Δύλʔϯ master develop feature upload deploy upload deploy merge merge
release copy staging produc2on semi-‐prod • 0QT8PSLTΛར༻͞Ε͍ͯΔଞ༷ࣾͱେମಉ͡ – $JSDMF$*ͰϏϧυΞοϓϩʔυσϓϩΠ
σϓϩΠ$VTUPN"QQMJDBUJPOͷσϓϩΠ リバプロ ソケマ nginx unicorn Rails nginx gunicorn Django nginx
einhorn Golang ⾮非同期ワーカ sidekiq celery -‐‑‒ 場合によって Varnishとか 場合によって Supervisorとか • Έ߹ΘͤύλʔϯΛੳ͠ɺϨγϐԽ – جຊతʹBXTPQTXPSLTDPPLCPPLTͷSBJMTΛ౿ऻ
σϓϩΠڞ௨ϨγϐͱΞϓϦݻ༗Ϩγϐ • ΞϓϦέʔγϣϯ໊αʔό໊ͷೖͬͨSFDJQF࡞Βͳ͍ – ΞϓϦݻ༗ͱͳΔ෦$BMMCBDLΛར༻ • CFGPSF@NJHSBUF CFGPSF@TZNMJOL CFGPSF@SFTUBSU BGUFS@SFTUBSU
– BTTFUTQSFDPNQJMFDPMMFDUTUBUJD – DSPOͷొɺTVQFSWJTPSͷQHNొ • ϨΠϠ XFC XPSLFS ຖʹৼΔ͍Λม͑Δ͜ͱՄೳ – JGOPEF<PQTXPSLT><JOTUBODF><MBZFST>pSTUdXFC – JGOPEF<PQTXPSLT><JOTUBODF><IPTUOBNF>dXFC
αʔόߏஙͱσϓϩΠ Ͳ͏มΘͬͨͷ͔
Ͳ͏มΘͬͨͷ͔CFGPSF • ൿͷΰʔϧσϯҋ".* – Կ͕ೖ͍ͬͯͯͲ͏͍͏ઃఆͨ͠ͷ͔Θ͔Βͳ͍ – ͱΓ͋͑ͣίϐʔ͍ͯ͠·Θͦ͏ • ΞϓϦຖʹཚཱ͢ΔσϓϩΠεΫϦϓτ –
GBCͩͬͨΓDBQͩͬͨΓ – ΞϓϦຖʹҟͳΔσϓϩΠαʔό – ಉ͡ΞϓϦͳͷʹҰ෦αʔό͚ͩϩάΠϯͯ͠HJUQVMMͩͬͨΓ • ఆ࣌ʹΠϯελϯεΛىಈɾऴྃͤ͞Δπʔϧ – FD4UBSU*OTUBODFɺ্هͷσϓϩΠεΫϦϓτɺ FMC3FHJTUFS*OTUBODFT8JUI-PBE#BMBODFS
Ͳ͏มΘͬͨͷ͔BGUFS • αʔόઃఆͷݟ͑ΔԽ – ඞͣਅͬ͞Βͳ".*͔Βߏங – 44)ϩάΠϯͯ͠ͷมߋ࡞ۀېࢭ • શͯͷΞϓϦͰ౷Ұ͞ΕͨσϓϩΠͷΈ –
σϓϩΠαʔόɾϏϧυαʔόΛ࣋ͨͳ͍࡞Βͳ͍ – ΞϓϦݻ༗ͷσϓϩΠॲཧ$BMMCBDLʹهࡌ – 44)ϩάΠϯͯ͠ίϚϯυଧͭͷېࢭ • ࡞Βͳͯ͘ྑ͍πʔϧ͔Βͷ٫ – ͋Δఔͷ͜ͱ0QT8PSLT͕উखʹͬͯ͘ΕΔ – ຊʹඞཁͳͷͳΒଞͷελοΫͰ͑ΔΑ͏ʹ࡞ • αʔόߏங͕ѹతʹૣ͘ͳͬͨ – ΄΅*".ͱηΩϡϦςΟάϧʔϓΛΔ࡞ۀ͚ͩ
Πϯϑϥӡ༻ Ͳ͏มΘͬͨͷ͔
ΠϯελϯεͷϢʔβཧ • FDVTFS͔Βͷ٫ – GBCSJDͷϓογϡܕπʔϧ44)ݤ͕ࢃ͔Ε͍ͯΔ͜ͱ͕લఏ – ͜ͷݤͷཧ͕ࡶˠߟ͑ͳͯ͘Α͘ͳͬͨ • ݸਓͷ44)ݤ –
ελοΫຖʹΞΫηεݖݶΛॊೈʹࢦఆͰ͖Δ – ݤͷมߋɺը໘Ͱొ͢Εউखʹࢃ͍ͯ͘ΕΔ
োൃੜ࣌ͷௐࠪҰ࣍ରԠ • ΤϥʔϩάFSSCJU BJSCSBLF ू – جຊతʹαʔόͷϩάΠϯෆཁ – ͱ͍͑ɺͦΜͳ͜ͱݴͬͯΔ߹Ͱͳ͍࣌͋Δ •
ͲΜͳΞϓϦέʔγϣϯαʔόʹೖͬͯɺ – σϓϩΠͷΈ͕౷Ұ͞Ε͍ͯΔͱ • ඞͣಉ͡ॴʹΞϓϦέʔγϣϯϩά͕͋Δ • ඞͣಉ͡ॴʹ࠶ىಈεΫϦϓτ͕͋Δ – ʮ͜͜ʹߦ͚99͕͋ΔΑͶʯͱ͍͏҆৺ײ
ύονɾΞοϓσʔτ • ɺͨ͘͞Μͷ੬ऑੑ͕ݟ͔ͭΓ·ͨ͠ – ͨ͘͞Μͷ੬ऑੑ͕ݟ͔ͭΔͱࢥ͍·͢ – ͨ͘͞Μͷύον͕ެ։͞ΕΔͱࢥ͍·͢ • 0QT8PSLTͳΒ –
VQEBUF@EFQFOEFODJFTͷ࣮ߦ – ·ͨ৽͘͠ΠϯελϯεՃͯ͠ݹ͍ΠϯελϯεΛআ
·ͱΊ • 0QT8PSLTΛಋೖͯ͠ – αʔόߏஙɾσϓϩΠͷ݈શԽ – αʔόߏஙͷߴԽ – ݪଇ44)ϩάΠϯͤ͞ͳ͍ –
Πϯϑϥӡ༻ͷޮԽ