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
インフラ自動化の落とし穴と宣言的アーキテクチャ
Search
Yusuke Nojima
July 14, 2020
Technology
24
12k
インフラ自動化の落とし穴と宣言的アーキテクチャ
2020/07/14
Cybozu Tech Meetup #3
Yusuke Nojima
July 14, 2020
Tweet
Share
More Decks by Yusuke Nojima
See All by Yusuke Nojima
SSLセッションキャッシュを共有したいだけの人生だった
nojima
6
2.7k
Nginx Hacking Guide
nojima
0
590
Other Decks in Technology
See All in Technology
TypeScript、上達の瞬間
sadnessojisan
46
13k
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
500
Engineer Career Talk
lycorp_recruit_jp
0
140
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
300
いざ、BSC討伐の旅
nikinusu
2
780
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
7
760
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
370
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
The Pragmatic Product Professional
lauravandoore
31
6.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Building Adaptive Systems
keathley
38
2.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Visualization
eitanlees
145
15k
Speed Design
sergeychernyshev
24
610
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Music & Morning Musume
bryan
46
6.2k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Transcript
ΠϯϑϥࣗಈԽͷམͱ݀͠ͱ એݴతΞʔΩςΫνϟ $ZCP[V5FDI.FFUVQ ։ൃຊ෦ :BLVNPνʔϜ ౡ ༟ี
ࠓ͢͜ͱ ΠϯϑϥࣗಈԽͷམͱ݀͠ એݴతΞʔΩςΫνϟͱσϓϩΠύΠϓϥΠϯ
ΠϯϑϥࣗಈԽͷམͱ݀͠
DZCP[VDPN ͷΠϯϑϥ • ࠃͷΦϯϓϨ%$Ͱӡ༻ • ཧαʔόʔ 1,000 Ҏ্ • ΠϯϑϥͷͨΊͷ1ZUIPOίʔυ
100,000 ߦҎ্
ࣗಈԽͷྲྀΕ ਓ͕खͰΦϖϨʔγϣϯ खॱॻ ΦϖϨʔγϣϯͷճ͕૿Ճ ࣗಈԽͷػӡ͕ߴ·Δ ࣗಈԽʂ खॱॻΛ 1ZUIPOεΫϦϓτʹ
ࣗಈԽͷྫ • ΞϓϦέʔγϣϯͷΞοϓσʔτ • "1αʔόʔͷΓ͠ɺϓϩάϥϜͷஔ͖͑ɺ%#ϚΠά ϨʔγϣϯɺόονͷҰ࣌ఀࢭɺϝλσʔλͷॻ͖͑ͳͲ େͳखॱΛҰίϚϯυʹ • ͜ΕͰΦϖϨʔλʔΞοϓσʔτखॱͷৄࡉΛΒͳͯ͘ ΞοϓσʔτͰ͖Δʜͣͩͬͨ
ͱ͜Ζ͕ʜ ͑ͬɺ͜ͷίϚϯυଧͭલʹ αʔϏε"ΛࢭΊͳ͍ͱ͍͚ͳ͍ΜͰ͔͢ʁ ͋Εɺ͜ͷίϚϯυଧͬͨΒ উखʹόονॲཧ͕ࢭ·ͬͨΜͰ͚͢Ͳʁ ҙຯͷΘ͔Βͳ͍ΤϥʔΛు͍ͯ ࢭ·ͬͪΌͬͨΜͰ͕͢ʜ ͑ɺ͜ͷίϚϯυͱಉ࣮࣌ߦͰ͖ͳ͍ΜͰ͔͢ʁ
͜ͷίϚϯυΛ࣮ߦ͢Δͱ Կ͕ى͜Δ͔Θ͔Βͳ͍͔Β ࣄલʹԿ͕࣮ߦ͞ΕΔ͔ௐ͓͔ͯͳ͍ͱʜ ಉ࣮࣌ߦͰΤϥʔ͕ى͜Δͱ͍͚ͳ͍͔Βɺ ଞͷΦϖϨʔλʔ͕ͲΜͳίϚϯυΛ࣮ߦ͢Δͷ͔ ͪΌΜͱฉ͍͓ͯ͜͏ʜ
ΦϖϨʔγϣϯ ϓϥϯχϯά ΦϖϨʔγϣϯ࣮ࢪ ͲͷίϚϯυΛଧͭʁ લఏ݅ʁ
ΦϖϨʔγϣϯ ϓϥϯχϯά ΦϖϨʔγϣϯ࣮ࢪ Ϝζ͗͢ʜ ΠϯϑϥͷେنԽ ࣗಈԽʹΑΔฐ
݁ہͲ͏͢Δ͖ͩͬͨͷ͔ʁ ΦϖϨʔγϣϯ ϓϥϯχϯά ΦϖϨʔγϣϯ࣮ࢪ ͍··Ͱͷ ࣗಈԽ ࢦ͖͢ ࣗಈԽ
ʜʜͲ͏Δͷʁ ͍Ζ͍Ζͱٞɾݕ౼͢Δ͙̎ؒΒ͍ਐḿͤͣ
ɺ͜Μͳঢ়گʹసػ͕๚ΕΔʂʂ
64൛LJOUPOFͷ"84Ҡߦ
:BLVNPϓϩδΣΫτ • 64൛LJOUPOFͷͨΊʹ"84্ͰΠϯϑϥΛθϩ͔Βߏங͢Δ ϓϩδΣΫτ͕ൃ • ΞϝϦΧͰചΔͳΒΞϝϦΧʹ%$͕ඞཁ • ΦϯϓϨ%$͡Όͳͯ͘"84Ͱ
• ࠷ॳ͔ΒࣗಈԽΛલఏͱͨ͠ΞʔΩςΫνϟ • Πϯϑϥ͚ͩͰͳ͘ΞϓϦέʔγϣϯ LJOUPOF ʹ खΛՃ͑Δ • %FW0QTΛҙࣝͨ͠৫ߏ •
%FW͔ͭ 0QTͳνʔϜɻนΛऔΓ͓͏ શମ࠷దΛࢦͧ͢ʂʂ
ࣗಈԽͷιϦϡʔγϣϯ • ΠϯϑϥࣗಈԽͷΛҰܸͰղܾ͢Δ୯ҰͷιϦϡʔγϣϯͳ͍ • ࡉ͔͍ʹղͯ͠ݸผܸഁ • એݴతΞʔΩςΫνϟ • ϚωʔδυαʔϏεͷಋೖ •
ϦϦʔεϓϩηεվળ • ৫ମ੍มߋ • ʜ ࠓ͜Εͷ͕ϝΠϯ
ద༻खॱʹ͍ͭͯߟ͑Δ
l43&ɺ͓Αͦ ͷαʔϏεোɺಈ࡞தͷγεςϜͷ มߋʹΑͬͯੜ͍ͯ͡Δ͜ͱΛൃݟ͠·ͨ͠z #FUTZ#FZFSଞʮαΠτϦϥΠΞϏϦςΟΤϯδχΞϦϯάʯ ΦϥΠϦʔɺɺQ
ALB Aurora Aurora nginx slash-ap kintone-ap pod service EKS Cluster
Elastic search kintone-ap (kintone 本体) kintone-ap (kintone 本体) ミドルウェア、 管理サービス等 いろいろ kintone-ap (kintone 本体) kintone-ap (kintone 本体) slash-ap (ユーザー管理) slash-ap (ユーザー管理) VPC nginx nginx
ద༻खॱ • Πϯϑϥଟͷখ͞ͳαʔϏεʹΑͬͯߏ͞Ε͍ͯΔ • :BLVNPͷ߹ݸ͙Β͍ • ͜Ε·ͰɺαʔϏεΛมߋͨ͠ͱ͖ʹखಈͰద༻खॱΛ࡞͍ͬͯͨ • ʮϥΠϒϥϦΛมߋ͔ͨ͠ΒɺαʔϏε"ͱαʔϏε#Λߋ৽ͯ͠࠶ى ಈͯ͠ʜʯ
• Өڹൣғͷ࿙ΕʹΑΔద༻ϛε͕ൃੜ͍͢͠
ద༻खॱΛͳͤ͘ͳ͍͔ʁ
ద༻खॱΛͳͤ͘ͳ͍͔ʁ ˠ ιʔείʔυͷΈ͕༩͑ΒΕͨͱ͖ʹ ࣗಈతʹͦΕΛσϓϩΠͰ͖Δ͔ʁ
<docker> debian10 <docker> corretto11 service A service B service C
<library> shared-kernel ιʔείʔυؒͷґଘάϥϑ
TIBSFELFSOFMΛมߋͨ͠߹ʁ <docker> debian10 <docker> corretto11 service A service B service
C <library> shared-kernel TFSWJDF#ͱ TFSWJDF$ΛσϓϩΠ
<docker> debian10 <docker> corretto11 service A service B service C
<library> shared-kernel EFCJBOΛมߋͨ͠߹ʁ TFSWJDF" # $ΛσϓϩΠ
͑ͬ ͜Εμϝ͡Όͳ͍ʁ
ᶃ ιʔείʔυ͕มԽ͍ͯ͠ͳͯ͘σϓϩΠ͕ඞཁͳ߹ͳ͍ͷʁ ᶄ σϓϩΠʹΑΔαʔϏεӨڹͱ͔ىಈॱং੍ޚͱ͔Ͳ͏͢Δͷʁ
ᶃ ιʔείʔυ͕มԽ͍ͯ͠ͳͯ͘σϓϩΠ͕ඞཁͳ߹ͳ͍ͷʁ ᶄ σϓϩΠʹΑΔαʔϏεӨڹͱ͔ىಈॱং੍ޚͱ͔Ͳ͏͢Δͷʁ
l࠶ݱੑz • ϏϧυͱσϓϩΠʹ࠶ݱੑΛͨͤΔ • ࠶ݱੑͱ • ιʔείʔυ͕ಉ͡Ͱ͋ΕՌ͕ಉ͡ͱ͍͏ੑ࣭ • ͢ͳΘͪɺιʔείʔυ͕มԽ͠ͳ͚ΕσϓϩΠෆཁ
࠶ݱੑͷ͋ΔϏϧυ ྫ͑ʜ • ґଘϥΠϒϥϦͷόʔδϣϯશͯݻఆ͢Δ • ࠷ۙͷϏϧυπʔϧͳΒΘΓͱ؆୯ • EPDLFS ͷϕʔεΠϝʔδෆมͳϥϕϧΛࢦఆ͢Δ •
lMBUFTUzμϝ • ωοτϫʔΫӽ͠ͷϑΝΠϧμϯϩʔυʹҙ • ಉ͡63-ͰผͷϑΝΠϧ͕མͪͯ͜ͳ͍͔ʁ
AP Server, Middlewares Network Database 物理 CloudFormation Kubernetes AWS なら
気にしなくていい ࠶ݱੑͷ͋ΔσϓϩΠ Load Balancer Monitoring (Datadog), Alerts (PagerDuty) Terraform
ᶃ ιʔείʔυ͕มԽ͍ͯ͠ͳͯ͘σϓϩΠ͕ඞཁͳ߹ͳ͍ͷʁ ᶄ σϓϩΠʹΑΔαʔϏεӨڹͱ͔ىಈॱং੍ޚͱ͔Ͳ͏͢Δͷʁ
l͍ͭͰσϓϩΠͯ͠Α͍z • શͯͷαʔϏεΛʮ͍ͭͰσϓϩΠͰ͖Δʯঢ়ଶʹอͭ • σϓϩΠͰ͖ͳ͍ঢ়ଶʹͳΔͱͨ͠Βෆ۩߹ͱͯ͠ରॲ • ͦͦ"84Ͱ&$ΠϯελϯεͷಥવࢮʹରԠ͠ͳ͍ ͱ͍͚ͳ͍ͷͰɺඞવతʹ͜ͷ͕݅ඞཁ ΦϯϓϨతࢥߟ͔Βͷ٫
l͍ͭͰσϓϩΠͯ͠Α͍zͷͨΊʹ • όονॲཧதʹσϓϩΠ͕Δͱ௨৴அʹΑΓΤϥʔʹͳΔ ˠదʹϦτϥΠ͢Δ • ೋॏʹΔͱࠔΔॲཧ͕͋ͬͯԽͰ͖ͳ͍ ˠ ࢄϩοΫΛಋೖͯ͠Խ • ϩʔυόϥϯαͷ࠶ىಈͰϢʔβʔ͔ΒͷϦΫΤετ͕ΤϥʔʹͳΔ
ˠ (SBDFGVM4IVUEPXO
ʮ͍··ͰΦϖϨʔγϣϯͰղܾ͍ͯͨ͠Λ αʔϏεଆͰղܾ͢Δʯ ͱ͍͏ํ
service A service B service C 上位の管理サービス1 上位の管理 サービス2 ΦϖϨʔλʔ
ྫ֎ॲཧ ྫ֎ॲཧ ྫ֎ॲཧ ྫ֎ॲཧ ྫ֎ॲཧ ͍··Ͱྫ֎ॲཧΛΦϖϨʔλʹ͍͛ͯΔߏਤͩͬͨ
service A service B service C 上位の管理サービス1 上位の管理 サービス2 ΦϖϨʔλʔ
ྫ֎ॲཧ ྫ֎ॲཧ ྫ֎ॲཧ ྫ֎ॲཧ ྫ֎ॲཧ ͜Ε͔Βྫ֎ॲཧͰ͖Δ͚ͩԼҐͷαʔϏεͰؤுΔ ྫ֎ॲཧͷ࣮ʹϚΠΫϩαʔϏεຊ #VJMEJOH.JDSPTFSWJDFT ͷݟ͕͘͢͝ࢀߟʹͳͬͨ
%FW0QTͱͷؔ • ΦϖϨʔγϣϯίετͱαʔϏε։ൃίετͷτϨʔυΦϑ • %FWͱ 0QT͕͍ͯ͠Δͱɺίετͷԡ͚͠߹͍ʹ ͳͬͯେม • :BLVNP
%FW͔ͭ 0QTͳνʔϜͳͷͰΓ͍͢ • ΦϖϨʔγϣϯ͢Δ͠ɺαʔϏεଆͷ࣮͢Δ
એݴతΞʔΩςΫνϟͱ σϓϩΠύΠϓϥΠϯ
એݴతΞʔΩςΫνϟ "1αʔόʔ͕ ͋Δ͜ͱ ཧͷঢ়ଶ ೖྗ BQ ࣮ࡍͷঢ়ଶ ࠩ "1αʔόʔ͕͏̍ඞཁ BQ
खॱࢦͷΞʔΩςΫνϟͱ એݴతΞʔΩςΫνϟͷҧ͍ • खॱࢦ • ΦϖϨʔγϣϯ ཧͱ࣮ࡍͷࠩ Λೖྗ͢Δ • ࠷ऴతʹͲ͏͍ͨ͠ͷ͔ΛγεςϜΒͳ͍
• એݴత • ཧͷঢ়ଶΛೖྗ • Ͳ͏͍͏ΦϖϨʔγϣϯΛ͢Δ͔γεςϜ͕ܾΊΔ
σϓϩΠύΠϓϥΠϯ Πϯϑϥͷঢ়ଶΛ ιʔείʔυͰఆٛ (JUͰཧ ύΠϓϥΠϯ $* "84 ཧͷঢ়ଶ ࣮ࡍͷঢ়ଶ
yakumo Build Deploy Test dev 環境 dev pipeline repository Deploy
Test Deploy Test staging 環境 prod 環境 staging pipeline prod pipeline 1JQFMJOF0WFSWJFX
yakumo Build Deploy Test dev 環境 dev pipeline repository Deploy
Test Deploy Test staging 環境 prod 環境 staging pipeline prod pipeline 1JQFMJOF0WFSWJFX
#VJME ଟͷαʔϏεΛ ࠩϏϧυ͢Δ
#VJME • ࠩϏϧυ • ͦͷαʔϏεͷιʔείʔυͷϋογϡΛऔΔ • ڞ௨ϥΠϒϥϦڞ௨%PDLFSΠϝʔδʹґଘ͍ͯ͠Δ߹ɺ ґଘͻͬ͘ΔΊͯϋογϡΛܭࢉ͢Δ • 4ʹࠓ·ͰϏϧυͨ͜͠ͱͷ͋ΔϋογϡΛશ෦ه͓ͯ͘͠
• 4ʹϋογϡ͕ͳ͍ 㱺 Ϗϧυ͠ͳ͍ͱ͍͚ͳ͍ • ੜ͞ΕͨίϯςφΠϝʔδͷλάʹϋογϡΛ͚Δ ʢσϓϩΠͰ͏ʣ
yakumo Build Deploy Test dev 環境 dev pipeline repository Deploy
Test Deploy Test staging 環境 prod 環境 staging pipeline prod pipeline 1JQFMJOF0WFSWJFX
%FQMPZ • "84ͷϦιʔεͷσϓϩΠ • $MPVE'PSNBUJPO ͰσϓϩΠ͢Δ • $MPVE'PSNBUJPO͕ࣗಈతʹࠩσϓϩΠΛߦ͏ • :BLVNPͷ
$MPVE'PSNBUJPOςϯϓϨʔτ̍ສߦҎ্ • ߹ʹΑͬͯΧελϜϦιʔε͏
None
%FQMPZ • ϛυϧΣΞͷσϓϩΠ • ,VCFSOFUFT ΛͬͯσϓϩΠ • ίϯςφΠϝʔδͷλάϏϧυ࣌ͷϋογϡΛࢦఆ 㱺 มߋ͕͋ͬͨίϯςφͷΈ͕σϓϩΠ͞ΕΔ
• :BLVNPͷ ,VCFSOFUFT.BOJGFTU̍ສߦ͙Β͍
yakumo Build Deploy Test dev 環境 dev pipeline repository Deploy
Test Deploy Test staging 環境 prod 環境 staging pipeline prod pipeline 1JQFMJOF0WFSWJFX
5FTU • &&ςετΛߦ͏ • 4FMFOJVN ͕ಈ͘ • 2"JO1SPEVDUJPO • ຊ൪ڥͰςετΛ࣮ߦ
·ͱΊ
·ͱΊ • ΠϯϑϥࣗಈԽͷམͱ݀͠ • ϓϥϯχϯάͷίετΛݟམͱ͢ͱΦϖϨʔγϣϯ͕εέʔϧ͠ͳ͍ • ΦϖϨʔγϣϯͷΛαʔϏεଆͰղܾ • .JDSPTFSWJDFT"84ͷݟॏཁ •
%FW0QT • એݴతΞʔΩςΫνϟͱσϓϩΠύΠϓϥΠϯ • ຊ൪ڥͷঢ়ଶΛιʔείʔυͱಉظͤ͞Δ