Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
運用事件簿
Search
komuro-sapporo
February 11, 2017
Technology
0
2.5k
運用事件簿
合同勉強会 in 福岡で発表したスライドです
komuro-sapporo
February 11, 2017
Tweet
Share
More Decks by komuro-sapporo
See All by komuro-sapporo
How To 脆弱性対応
komurosappro
0
680
内容は話せないけどGamedayのススメ
komurosappro
0
520
ゲンバのサービス運用
komurosappro
2
1.3k
大阪勉強会_第5回.pdf
komurosappro
0
4
Introduction of Jooby. DevIO2016
komurosappro
0
1.3k
Other Decks in Technology
See All in Technology
QA EM
nihonbuson
0
150
【Oracle Cloud ウェビナー】【入門&再入門】はじめてのOracle Cloud Infrastructure [+最新情報]
oracle4engineer
PRO
2
170
Microsoft Ignite 2024 Update 1 - AIとIoT関連の最新情報をどこよりも早く!
iotcomjpadmin
0
300
全社員に向けて生成AI活用を促進!~電通総研の生成AI活用ロードマップ~
iotcomjpadmin
0
300
RAMP2024
takeyukitamura
3
230
ヤプリのデータカタログ整備 1年間の歩み / Progress of Building a Data Catalog at Yappli
yamamotoyuta
3
640
LINEヤフーにおける超大規模プラットフォーム実現への挑戦と学び / Challenges and Lessons in Building an Ultra-Large-Scale Platform at LY Corporation
hhiroshell
2
940
ゆるSRE勉強会 #8 組織的にSREが始まる中で意識したこと
abnoumaru
2
840
12/2(月)のBedrockアプデ速報(re:Invent 2024 Daily re:Cap #1 with AWS Heroes)
minorun365
PRO
2
250
ご挨拶
iotcomjpadmin
0
300
エンジニアの草の根活動のその先へ LINEギフトのアクセシビリティにおける ネクストアクション
lycorptech_jp
PRO
0
110
Raspberry Pi 秋の新製品をチェックしてみよう / 20231202-rpi-jam-tokyo
akkiesoft
0
180
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
How STYLIGHT went responsive
nonsquared
95
5.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
880
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
470
4 Signs Your Business is Dying
shpigford
181
21k
Become a Pro
speakerdeck
PRO
25
5k
Automating Front-end Workflow
addyosmani
1366
200k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Side Projects
sachag
452
42k
We Have a Design System, Now What?
morganepeng
50
7.2k
Transcript
ӡ༻ࣄ݅ ߹ಉษڧձ IN Ԭ KOMURO, Hiraku @com4dc
ࣗݾհ SELF INTRODUCTION ▸ খࣨ ܒ ▸ ϞόΠϧόοΫΤϯυΤϯδχΞʢJava, AWS, ͪΐͬͱऄʣ
▸ ࡛ۄݝग़࡛ۄҭͪɺݱࡏւಓࡳຈࡏॅ ▸ ΫϥεϝιουגࣜձࣾϞόΠϧΞϓϦαʔϏε෦ ▸ ʢࣗশʣํ։ຽ ▸ ΫϥεϝιουSteam෦෦һʢFPSɺTPSʣ
ւಓհ ւಓ͔Βདྷ·ͨ͠ ▸ Ҡಈڑʹͯ͠2000km ▸ ݱࡏւಓʮݫౙظʯݱࡏɺઇ·ͭΓਅͬ࠷த ࣗͷ ຊؾݐ
None
None
None
͜Ε͕(ࠓͷ)ւಓͩʂ
ؓٳ
ӡ༻ͯ͠ΔϓϩδΣ Ϋτʹ͍ͭͯ
ϓϩδΣΫτʹ͍ͭͯ ϓϩδΣΫτ֓ཁ ▸ ઃܭɺ։ൃ͔ΒΠϯϑϥඋɺӡ༻αϙʔτ·ͰΛ୲ ▸ σʔλҠߦର͕300ສϢʔβʔ΄Ͳ ▸ ϐʔΫ࣌ͷΞΫηεೝূαʔόʔʹ͓͍ͯؒ5ɺ6ສΞΫ ηε ▸
ϞόΠϧΞϓϦͷDL100ສఔ ▸ ࣗͷ୲Oauthೝূج൫ͷΧελϜΫϥΠΞϯταʔόʔ
ϓϩδΣΫτʹ͍ͭͯ ϓϩδΣΫτମ੍ ▸ ։ൃϓϩδΣΫτ͕ಉ࣌ฒߦͰ3ͭ ▸ ͦΕͧΕ։ൃ։࢝ظ͕ؒҟͳΔ ▸ ϓϩύʔͱύʔτφʔ͕ʑ͘Β͍ͷׂ߹
։ൃ࣌ͷମ੍
ϓϩδΣΫτʹ͍ͭͯ MICRO SERVICE܈Ͱߏ ϞόΠϧAPI ΧελϜೝূAPI OAUTH2 ೝূج൫ ϞόΠϧ
ϓϩδΣΫτʹ͍ͭͯ ϓϩδΣΫτͷ͓Αͦͷ࣌ؒ࣠ ϞόΠϧAPI։ൃ ೝূAPI։ൃ ཧCMS։ൃ 20161݄͘Β͍ 20168݄͘Β͍ ϞόΠϧAPIӡ༻
։ൃޙͷӡ༻ϑΣʔζ
ϓϩδΣΫτʹ͍ͭͯ ΄ͱΜͲશ͕ͯҟͳΔϓϩδΣΫτ܈ ϞόΠϧ ೝূ CMS AWS։ൃ༻ ൿີ伴 伴1 伴2 伴2
ϑϨʔϜ ϫʔΫ Play for Scala SpringBoot Ruby on Rails σϓϩΠํ๏ Golden AMI CodeDeploy CodeDeploy ݴޠ Scala Java8 Ruby
ϓϩδΣΫτʹ͍ͭͯ ϓϩδΣΫτΛߏ͢ΔେྔͷαʔϏε
ଟ͗͢ͳ͍ɾɾɾʁ
ϓϩδΣΫτʹ͍ͭͯ ։ൃ͔࣌Βͷେ෯ͳମ੍มߋ ▸ ScalaϓϩάϥϚʔ͕3໊ˠ0໊ ▸ JavaͱRubyΤϯδχΞ͕ࣣసീ͠ͳ͕ΒɺPlay ScalaΛอक ▸ AWSαʔϏεͷো͋ΔͨΊɺJavaɺRubyΤϯδχΞ͕͜ ΕΒͷରԠ݉
▸ ݁Ռ ▸ AWSɺJavaɺScalaɺʢPythonʣͱ͍͏εΩϧηοτ͕ര
None
ϓϩδΣΫτʹ͍ͭͯ ӡ༻ॳظͷঢ়گ ▸ ιʔείʔυBacklogͷWikiΛαϧϕʔδͯ͠෦ߏΛ ཧղ͢Δʑʢ͢Ͱʹ։ൃϝϯόʔ͕͍ͳ͍ͨΊʣ ▸ ҟͳΔDeployπʔϧڥΛɺͲͷΑ͏ʹΓସ͑Δ͔Λ ࡧʢखॱ͕େ෯ʹҟͳΔͨΊɺΦϖϨʔγϣϯϛε͕ൃੜ ͦ͠͏ʣ ▸
ো࣌ͷϩάௐࠪͷखॱΛൿͷखॱΛେࢸٸ໌จԽ͢Δ ʢ͜͜Ͱϩάͷൃ֮͢Δɻ͜Ε·ͨผͷʣ
ࣄ݅
ࣄ݅ ͦͦ͜͜ͷࣄ݅Ұཡ ▸ CASE1. ϞόΠϧΞϓϦϦϦʔεϛεʹΑΔεςʔδϯάڥࢮࣄނ ▸ CASE2. DynamoDB StreamsࢮʹΑΓDBಉظࣦഊࣄ݅ ▸
ʢ୭ؾ͔ͮͳ͔ͬͨͷͰ΄ͱΜͲີࣨࡴਓঢ়ଶɻূڌͳ͠ʣ ▸ CASE3. fluentd ͷϓϥάΠϯʹΑΔϩάফࣦࣄ݅ɻࠈͷαϧ ϕʔδ࡞ۀʢ·ͩͪΐͬͱ͚ͩଓ͍ͯΔΜ͡ΌΑʣ ▸ CASE4. EC2ΨνϟʹΑΔύϑΥʔϚϯεԼࣄނ ▸ ʢ௨ৗͷ1/10ҎԼɻ͞ΕͲϔϧενΣοΫมԽͳ͠ʣ
ࣄ݅ ࣄ݅ൈਮ ▸ CASE1. ϞόΠϧΞϓϦϦϦʔεϛεʹΑΔεςʔδϯάڥࢮࣄނ ▸ CASE2. DynamoDB StreamsࢮʹΑΓDBಉظࣦഊࣄ݅ ▸
ʢ୭ؾ͔ͮͳ͔ͬͨͷͰີࣨࡴਓʣ ▸ CASE3. fluentd ͷϓϥάΠϯʹΑΔϩάফࣦࣄ݅ɻࠈͷαϧ ϕʔδ࡞ۀʢ·ͩͪΐͬͱ͚ͩଓ͍ͯΔΜ͡ΌΑʣ ▸ CASE4. EC2ΨνϟʹΑΔύϑΥʔϚϯεԼࣄނ ▸ ʢ௨ৗͷ1/10ҎԼɻ͞ΕͲϔϧενΣοΫϔϧγʔʣ ॾࣄʹΑΓࠓճ͜ΕҰ
CASE.1
εςʔδϯάڥ͚ͨϞόΠ ϧΞϓϦΛετΞʹϦϦʔεͪ͠Ό ͍·ͨ͠
None
ࣄ݅̍ ঢ়گΛཧ ▸ ετΞਃΛ͔͚ͯެ։ͨ͠ΞϓϦέʔγϣϯͷAPIଓઌ ͕ɺεςʔδϯάڥΛ͍͍ͯͨͱ͍͏ใࠂ ▸ ͢ͰʹඦϢʔβʔ͕DLࡁΈ ▸ AndroidΞϓϦͷΈ ▸
͜ΕʹΑΓ։ൃεςʔδϯάαʔόʔ͕࣮࣭ࢮʢຊ൪ͷΞ ϓϦ͕ࢀর͍ͯ͠ΔՄೳੑ͕͋ΔͨΊʣ
None
ͭ·Γ
ຊདྷ͜͏͋Δ͖ڥ͕
͜͏ͳͬͨ
None
ࣄ݅̍ ଈ࣌ۓٸରԠ ▸ ޡͬͨΞϓϦέʔγϣϯ͔ΒͷΞΫ ηεΛःஅ ▸ ڧ੍ΞοϓσʔτઃఆΛಋೖ ʢ403ΤϥʔͰฦ٫ʣ ▸ Ϧιʔεʹؔͯ͠શͯຊ൪ڥͱ
ಉͷͷ͔ۭσʔλʹͯ͠ɺΤο δαʔόʔͷΩϟογϡΛશͯΫϦ Ξ
ࣄ݅̍ ۓٸରԠͷՌ ▸ ޡͬͨΞϓϦέʔγϣϯ͔ΒͷΞΫηεΛःஅ ▸ ݁Ռతʹ͜ͷରԠෆཁɻΞϓϦͰอ͍࣋ͯ͠ΔΞΫηετʔΫϯ IDɺϓϩμΫγϣϯڥ͚Ͱ͋Γɺεςʔδϯάڥͱಥ͖߹Θ ͤΔͱવଘࡏ͠ͳ͍ͨΊɺແޮͳΞΫηετʔΫϯͱͯ͠ॲཧ͞Ε Δ ▸
Ϧιʔεʹؔͯ͠શͯຊ൪ڥͱಉͷͷ͔ۭσʔλʹ ▸ ޡͬͨΞϓϦ͔Βݟͯ৽ใͳͲ։ൃใ͕ग़͍ͯͳ͍͜ͱ͕ ֬ೝͰ͖ͨɻ͜͜ͷϦιʔεϩάΠϯ͍ͯ͠ͳͯ͘ݟΕΔใͰ ͋ΔͨΊɺ͜ͷରԠඞਢͩͬͨ
ରԠࡦ1 εςʔδϯάαʔόʔ࠶ߏங
ରԠࡦ1 ڥͷશͯΛෳ͢Δ
શͯͷڥΛෳ͢Δ ϝϦοτ ▸ طଘͷεςʔδϯάڥΛอશͰ͖Δ ▸ Πϯϑϥڥ΄ͱΜͲCloudFormationͷςϯϓϨʔτͰ ߏங͞Ε͍ͯΔͨΊɺ৽ͨͳڥߏஙଈ࠲ʹՄೳ
શͯͷڥΛෳ͢Δ σϝϦοτ ▸ ڥͷશͯΛෳ͢ΔͨΊAWSͷར༻අ͕୯७ʹ2ഒͱͳΔ ▸ DeployεΫϦϓτπʔϧͳͲमਖ਼ͷӨڹ͕ग़ͯ͠·͏
ରԠࡦ2 εςʔδϯάαʔόʔ࠶ߏங
ରԠࡦ2 ୀආαʔόʔΛߏங͢Δ
ୀආαʔόʔΛߏங ϝϦοτ ▸ શͯͷϦιʔεΛෳ͢Δͷʹରͯ͠ѹతʹඅ༻ΛѹॖͰ ͖Δ ▸ DeployπʔϧͳͲͷӨڹ͕࠷খݶͱͳΓɺӨڹൣғΛۃ ΊͯݶఆͰ͖Δ
ୀආαʔόʔΛߏங σϝϦοτ ▸ ୀආαʔόʔͷߏங͕ൃੜ͢Δ ▸ Route53ͷมߋͳͲൺֱతखॱ͕ෳࡶʹͳΔ ▸ CloudFrontͷมߋͱ৽ن࡞͕ೖΔͨΊ͕͔͔࣌ؒΔ ʢฒྻԽͰ͖ͳ͍ʣ ▸
nginxͷConfigurationΛAnsibleͰߏ͢ΔͨΊͷௐ͕ࠪඞ ཁʹͳΔ
ରԠࡦ3 εςʔδϯάαʔόʔ࠶ߏங
ରԠࡦ3 ୀආαʔόʔΛߏங͢Δʢվળʣ
ୀආαʔόʔΛߏஙʢMODIFIEDʣ ϝϦοτ ▸ શͯͷϦιʔεΛෳ͢Δͷʹରͯ͠ѹతʹඅ༻ΛѹॖͰ ͖Δ ▸ DeployπʔϧͳͲͷӨڹ͕࠷খݶͱͳΓɺӨڹൣғΛۃ ΊͯݶఆͰ͖Δ ▸ ʢNewʂʣCloudFrontͷઃఆมߋͷӨڹ͕ޡͬͯϦϦʔε
͞ΕͨΞϓϦͷϢʔβʔٴ͠ͳ͍ʂ
ୀආαʔόʔΛߏஙʢMODIFIEDʣ σϝϦοτ ▸ ୀආαʔόʔͷߏங͕ൃੜ͢Δ ▸ Route53ͷมߋͳͲൺֱతखॱ͕ෳࡶʹͳΔ ▸ ʢDeletedʂʣCloudFrontͷ৽ن࡞͞ΕΔͨΊɺ͕͔࣌ؒ ͔ͬͯ͠·͏ ▸
nginxͷConfigurationΛAnsibleͰߏ͢ΔͨΊͷௐ͕ࠪඞ ཁʹͳΔ
࠷ऴతͳखॱ εςʔδϯάαʔόʔ࠶ߏங
࠷ऴతͳ࠶ߏஙखॱ ରԠࡦ3Λ࠾༻ ▸ ੩తϨεϙϯεΛฦ٫͢ΔnginxΛखಈͰߏஙʢEC2x2ʣ ▸ ୀආ༻ͷ੩తϦιʔεΛஔ͢ΔS3όέοτΛ CloudFormationͰ෦ߏங ▸ طଘͷCloudFrontͷCNAMEsʹ৽͍͠εςʔδϯάڥͷ υϝΠϯʢstg2.hogeʣΛઃఆ
▸ Route53ͷ໊લղܾͷઃఆΛมߋ
࠷ऴతͳ࠶ߏஙखॱ ࠷ऴҊ
·ͱΊ
·ͱΊ ࣄ݅ࢥ͍ΑΒͳ͍ͱ͜Ζ͔Β༙͍ͯ͘Δ ▸ ΞϓϦέʔγϣϯΤϯδχΞͱݴ͑ɺߏΛཧղ͍ͯ͠ͳ ͍ͱӨڹൣғΛίϯτϩʔϧ͢ΔରԠ͕Ͱ͖ͳ͍ ▸ ӡ༻ʹܞΘͬͨ࣌Ͱɺࣗͷൣғ֎ͷΦʔόʔϥο ϓͯ͠αϙʔτɾֶश͍͕ͯ࢟͘͠ඞཁ ▸ ͨͩɺτϥϒϧ͕ى͖ΔͱΈ͕ͦϑϧճసͯͪ͠ΐͬͱς
ϯγϣϯ্͕͕Δͷࣄ࣮Ͱ͋ΔΘ͚Ͱʢ͋·Γྑ͘ͳ͍ ▸ ӡ༻৻ॏʹʂ࣌ʹେʹʂ
FIN. ଞͷࣄ݅ͷ ৄࡉ࠙ձͰ