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
究極のInfrastructure as Codeを目指して
Search
Shin'ya Ueoka
April 24, 2020
Technology
6
4.9k
究極のInfrastructure as Codeを目指して
Infra Study Meetup #1「Infrastructure as Code」のLT資料です
https://forkwell.connpass.com/event/171560/
Shin'ya Ueoka
April 24, 2020
Tweet
Share
More Decks by Shin'ya Ueoka
See All by Shin'ya Ueoka
英語ができなかった自分達が、グローバルチーム立ち上げに挑戦!?
ueokande
1
740
技術書典12協賛企業サイボウズゲストトーク
ueokande
0
230
サービス間をテストするフレームワーク集
ueokande
0
270
kintone.comを支える技術
ueokande
0
180
SLO策定とアラート設定までの長い道のり
ueokande
6
4.4k
オンラインイベントを 半年運営して気づいたこと
ueokande
0
100
インフラ開発チームがプロダクトチームに体験入部したはなし
ueokande
1
650
kintone.comのAWS移行と その舞台裏
ueokande
4
4.7k
OSSでキレイな本を 作りたい話
ueokande
0
230
Other Decks in Technology
See All in Technology
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.2k
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
110
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
300
Can We Measure Developer Productivity?
ewolff
1
150
Featured
See All Featured
Navigating Team Friction
lara
183
14k
The Invisible Side of Design
smashingmag
298
50k
Producing Creativity
orderedlist
PRO
341
39k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Designing Experiences People Love
moore
138
23k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Transcript
ڀۃͷ*OGSBBT$PEFΛ ࢦͯ͠ Infra Study Meetup #1 “Infrastructure as Code” αΠϘζגࣜձࣾ
@ueokande
.F ‰্Ԭ ਅ (@ueokande) ‰αΠϘζגࣜձࣾ ‰ٳOSSจষΛॻ͍ͨΓ ‰kintone.comͱ͍͏αʔϏε ͷ։ൃɾӡ༻Λ͍ͯ͠·͢ 2
LJOUPOFDPN ‰γεςϜΛ؆୯ʹ࡞ΕΔB2B͚αʔϏε ‰ࠃ֎15,000+ࣾͰಋೖ ‰άϩʔόϧࢢ͚AWS্Ͱӡ༻ 3
LJOUPOFDPNͷߏ 4 ֤αʔϏε͕ར༻͢Δ ϚωʔδυαʔϏε Amazon EKS Service A Service B
Service C Service D Service E Service F Service G Service H LJOUPOFDPNΛߏ ͢ΔαʔϏε܈ ‰͜ͷߏΛInfra as CodeͰߏஙɾӡ༻ Ϛωʔδυ,VCFSOFUFT
‰Infra as Codeʹ͓͍ͯɺιʔείʔυ։ൃऀ͕ ࡞Γ͍ͨཧঢ়ଶ (࠷ऴతͳΠϯϑϥߏ) ‰γεςϜݱࡏͷঢ়ଶͱཧঢ়ଶͷࠩΛຒΊΔ • ͦΕΛ͢Δͷ͕terraformAnsible ཧঢ়ଶͷऩଋ 5
ద༻ޙͷ ঢ়ଶ ݱࡏͷ ঢ়ଶ ཧ
LJOUPOFDPNͷϨϙδτϦ ‰ϞϊϨϙʹAWSͷߏͱαʔϏεΛؚΉ • ϨϙδτϦͷঢ়ଶ͕Πϯϑϥͷཧঢ়ଶ 6 Amazon EKS Service A Service
B Service C Service D Service E Service F Service G Service H CloudFormation Service A Service Z ιʔείʔυʢϞϊϨϙʣ $MPVE'PSNBUJPO͕ ཧঢ়ଶʹΠϯϑϥΛઃఆ ,VCFSOFUFT্ͷαʔϏε ࠩݕˍߋ৽͍ͨ͠ ͜ͷࠩΛ Ͳ͏ຒΊΔ͔ʁ
αʔϏεͷߋ৽ ‰Ռͷࠩݕ͕ͯࠩ͋͠ΕσϓϩΠ • ΠϝʔδΛߏ͢ΔϑΝΠϧͷϋογϡΛΠϝʔδλάͱ͢Δ • ιʔείʔυ͕มߋ͞ΕΔͱϦϏϧυͯ͠docker push 7 ϋογϡؔ H
( ) %PDLFSpMF ઃఆ ϑΝΠϧ . . spec: containers: - name: my-service-a image: quay.io/cybozu/my-service-a:BKCXSIF3Z3GEH2OEIM5BLEQBP4 ιʔε ίʔυ ιʔείʔυ͕มߋ͞ΕΔͱ Πϝʔδλά৽͘͠ͳΔ ϥΠϒϥϦ .
ྫϕʔεΠϝʔδͷ+7.ߋ৽ ϕʔεΠϝʔδΛߋ৽ʢηΩϡϦςΟରԠͳͲʣ (1) ϕʔεΠϝʔδͷDockerfileΛߋ৽ (2) Dockerfile͔ΒϕʔεΠϝʔδΛϦϏϧυ (3) ϕʔεΠϝʔδ͔Β֤छαʔϏεΛϦϏϧυ (4) ΠϝʔδλάͰdocker
push (5) λάͷΠϝʔδΛkubectl apply 8
ϕʔεΠϝʔδͷߋ৽ 9 Service A ϕʔεΠϝʔδ Service B ιʔείʔυʢϞϊϨϙʣ Amazon EKS
4FSWJDF " 4FSWJDF # 4FSWJDF $ ߋ৽ ֤αʔϏεΛϦϏϧυ ʢdocker build && docker pushʣ ৽͍͠ΠϝʔδΛల։ ʢkubectl applyʣ 4FSWJDF " 4FSWJDF # 4FSWJDF $ σϓϩΠ ύΠϓϥΠϯ ΠϝʔδλάΛιʔείʔυ͔Βܭࢉ ϕʔε Πϝʔδ
ྫϕʔεΠϝʔδͷ+7.ߋ৽ ϕʔεΠϝʔδΛߋ৽ʢηΩϡϦςΟରԠͳͲʣ (1) ϕʔεΠϝʔδͷDockerfileΛߋ৽ (2) Dockerfile͔ΒϕʔεΠϝʔδΛϦϏϧυ (3) ϕʔεΠϝʔδ͔Β֤छαʔϏεΛϦϏϧυ (4) ΠϝʔδλάͰdocker
push (5) λάͷΠϝʔδΛkubectl apply 10 ࣮ࡍͷखॱ ͜Ε͚ͩ ͋ͱࣗಈͰ ຊ൪ʹద༻
11
CloudFormationͷద༻ KubernetesϚχϑΣετͷద༻ ςετ࣮ߦ JVMαʔϏεΛϦϏϧυˍ ৽͍͠ΠϝʔδλάͰdocker push ৽͍͠ΠϝʔδλάΛద༻ JVMϕʔεΠϝʔδΛϏϧυ JVMҎ֎ͷαʔϏε
ڀۃͷ*OGSBBT$PEFΛࢦͯ͠ ‰ιʔείʔυࠓͷΠϯϑϥͷঢ়ଶΛද͢ ‰ίʔυΛมߋ͢Δɺ͢ͳΘͪຊ൪ద༻ ‰ϩʔϧόοΫgit revertͯ͠Ϛʔδ͢Δ͚ͩ 13