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
CircleCIを活用して AWSへの継続的デリバリーを 実践する
Search
coconala_engineer
March 27, 2024
Programming
1
340
CircleCIを活用して AWSへの継続的デリバリーを 実践する
https://trident-qa.connpass.com/event/310009/
のイベントの登壇資料です。
coconala_engineer
March 27, 2024
Tweet
Share
More Decks by coconala_engineer
See All by coconala_engineer
VPoE Meetup Vol.1 VPoEとして実践してきたことと反省点
coconala_engineer
3
270
エンジニアマネージャーになった理由を振り返ってみた
coconala_engineer
0
210
Developer Experienceを向上させる基盤づくりの取り組み事例集
coconala_engineer
0
200
Vue.jsで入力フォームにリアルタイムハイライト機能を自前実装した話
coconala_engineer
0
53
技術広報経験0のEMがエンジニアブランディングを始めてみた
coconala_engineer
2
240
オンコール運用をほんの少し効率的に行うためのTips
coconala_engineer
0
250
事業会社におけるセキュリティ・ ITガバナンス強化への道のり
coconala_engineer
0
34
徹底解説!Insight SQL Testingを活用したデータベース移行の実践ポイント
coconala_engineer
0
260
人材・モチベーション・情報システムの融合とエンゲージメント
coconala_engineer
0
150
Other Decks in Programming
See All in Programming
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
役立つログに取り組もう
irof
28
9.6k
Remix on Hono on Cloudflare Workers
yusukebe
1
290
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Jakarta EE meets AI
ivargrimstad
0
530
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Rails Girls Zürich Keynote
gr2m
94
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
89
Speed Design
sergeychernyshev
24
610
Code Reviewing Like a Champion
maltzj
520
39k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Being A Developer After 40
akosma
86
590k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
A better future with KSS
kneath
238
17k
Transcript
Copyright coconala Inc. All Rights Reserved. CircleCIΛ׆༻ͯ͠ AWSͷܧଓతσϦόϦʔΛ ࣮ફ͢Δ ΠϯϑϥɾSREνʔϜ
TeamManager ٢ݟ
Copyright coconala Inc. All Rights Reserved. 2 ࣗݾհ ٢ݟʢΑ͔͠Θ ͨ͘Έʣ
• ੜ·Ε ੩Ԭ → จܥେֶ͔ΒΤϯδχΞ • ܦྺ ۚ༥SIer → ελʔτΞοϓ → ίίφϥ • झຯ ϥΠϒɾΠϕϯτʹߦ͘
Vision Ϗδϣϯɺϛογϣϯʹج͍ͮͨࣄۀΛల։ νʔϜ͕ߏங͍ͨ͠ͱࢥ ͏࠷ྑͳະདྷͷΠϝʔδ νʔϜ͕ߏங͍ͨ͠ͱࢥ ͏࠷ྑͳະདྷͷΠϝʔδ Mission νʔϜ͕࣮ݱ͍ͨ͠த৺ తͳతʢଘࡏҙٛʣ ҰਓͻͱΓ͕ʮࣗͷετʔϦʔʯΛੜ͖͍ͯ͘ੈͷதΛ࡞Δ
ݸਓͷࣝɾεΩϧɾܦݧΛՄࢹԽ͠ɺ ඞཁͱ͢Δͯ͢ͷਓʹ݁ͼ͚ͭɺ ݸਓΛΤϯύϫʔϝϯτ͢ΔϓϥοτϑΥʔϜΛఏڙ͢Δ ࣝɾεΩϧɾܦݧͷϚονϯάαʔϏεΛల։ ࣄۀ༰ 3
ϚονϯάαʔϏε ֓ཁ 4
Copyright coconala Inc. All Rights Reserved. 5 ΞδΣϯμ • CI/CDͱ
◦ ͳͥඞཁͳͷ͔ • CircleCIͷಛ • ίίφϥͰͷར׆༻ ◦ ͪΐͬͱͨ͠ςΫχοΫ
Copyright coconala Inc. All Rights Reserved. 6 CI/CDͱ
Copyright coconala Inc. All Rights Reserved. 7 CI/CDͱ • ݫີʹCIͱCDผͰ͋Δ͕ɺͻͱ͘͘ΓͰઆ໌͞ΕΔ͜ͱ͕ଟ͍
◦ CIɿܧଓతΠϯςάϨʔγϣϯ ◦ CDɿܧଓతσϦόϦʔ
Copyright coconala Inc. All Rights Reserved. 8 CI/CDͱ • ݫີʹCIͱCDผͰ͋Δ͕ɺͻͱ͘͘ΓͰઆ໌͞ΕΔ͜ͱ͕ଟ͍
◦ CIɿܧଓతΠϯςάϨʔγϣϯ ◦ CDɿܧଓతσϦόϦʔ • ͷͬ͘͘͢͟͝ΓҰݴઆ໌͢Δͱ ◦ CIɿࣗಈςετ ◦ CDɿࣗಈσϓϩΠ ɹ→ Ұ࿈ͷྲྀΕʢύΠϓϥΠϯʣ͕͋Δ
Copyright coconala Inc. All Rights Reserved. 9 ͳͥCI/CDύΠϓϥΠϯ͕ ඞཁͳͷ͔
Copyright coconala Inc. All Rights Reserved. 10 ͳͥCI/CDύΠϓϥΠϯΛΉͷ͔
Copyright coconala Inc. All Rights Reserved. 11 ͳͥCI/CDύΠϓϥΠϯΛΉͷ͔ ɾϑΥʔϚοτਖ਼͍͠ʁ ɾςετ͞Ε͍ͯΔʁ
ɾϏϧυͰ͖Δʁ
Copyright coconala Inc. All Rights Reserved. 12 ͳͥCI/CDύΠϓϥΠϯΛΉͷ͔ ɾϑΥʔϚοτਖ਼͍͠ʁ ɾςετ͞Ε͍ͯΔʁ
ɾϏϧυͰ͖Δʁ ։ൃऀϨϏϡΞʔ ෛ୲͕େ͖͍
Copyright coconala Inc. All Rights Reserved. 13 ͳͥCI/CDύΠϓϥΠϯΛΉͷ͔ push͢Δ͚ͩͰࣗಈ࣮ߦ →
݁ՌΛ֬ೝ͢Δ͚ͩͰ OK
Copyright coconala Inc. All Rights Reserved. 14 ͳͥCI/CDύΠϓϥΠϯΛΉͷ͔ • ίʔυ࣭ͷ্
◦ खಈ࡞ۀΛ͕શͯࣗಈԽ͢Δ͜ͱʹΑΔώϡʔϚϯϦεΫɾίετͷݮ ◦ ςετϓϩηεΛ௨͢͜ͱʹΑΔόάͷൃݟ • ϦϦʔεαΠΫϧͷߴԽ ◦ ϝΠϯϒϥϯνͷঢ়ଶͰରڥʹϦϦʔε͞ΕΔ
Copyright coconala Inc. All Rights Reserved. 15 ͳͥCI/CDύΠϓϥΠϯΛΉͷ͔ • ίʔυ࣭ͷ্
◦ खಈ࡞ۀΛ͕શͯࣗಈԽ͢Δ͜ͱʹΑΔώϡʔϚϯϦεΫɾίετͷݮ ◦ ςετϓϩηεΛ௨͢͜ͱʹΑΔόάͷൃݟ • ϦϦʔεαΠΫϧͷߴԽ ◦ ϝΠϯϒϥϯνͷঢ়ଶͰରڥʹϦϦʔε͞ΕΔ ɹ ։ൃੜ࢈ੑͷ্
Copyright coconala Inc. All Rights Reserved. 16 CircleCIͱ
Copyright coconala Inc. All Rights Reserved. 17 ଟछଟ༷ͳCI/CDπʔϧ
Copyright coconala Inc. All Rights Reserved. 18 CircleCIͰओʹͰ͖Δ͜ͱ • ੩తղੳʢLintʣ
• ୯ମςετʢTestʣ • ϦιʔεϏϧυʢBuildʣ • ίʔυͷσϓϩΠʢReleaseʣ etc…
Copyright coconala Inc. All Rights Reserved. 19 CircleCIͷಛ 1. ΫϥυαʔϏεͷͨΊ࣮ߦڥΛཧ͢Δඞཁ͕ͳ͍
• ࣗಈϏϧυɺςετΛ࣮ߦ͢ΔͨΊʹαʔόΛ༻ҙ͢Δඞཁͳ͍ ◦ ઃఆϑΝΠϧΛهड़͢Εɺ࣮ߦ͞ΕΔΑ͏ʹͳΔ • ͨͩ͠ηΩϡϦςΟͷ߹্ɺΫϥυNGͱ͍͏߹ ◦ Self Hosted Runner·ͨEnterpriseϓϥϯͰରԠՄೳ 1. ͞·͟·ͳVCSʢόʔδϣϯίϯτϩʔϧγεςϜʣʹରԠ • GithubɺGitLabɺBitbucket • ྫ͑GithubActionsΛ͍͍ͨ߹GithubΛ͍ͬͯΔඞཁ͕͋Δ͕ɺ ɹɹCircleCIͰͦͷΑ͏ͳ੍΄ͱΜͲͳ͍
Copyright coconala Inc. All Rights Reserved. 20 CircleCIͷಛ 3. άάϥϏϦςΟ͕ͳ͔ͳ͔ߴ͍
• 2013ࠒ͔Β಄͍ͯ͠Δ&ݸਓͰແྉར༻ՄೳͳͷͰใ͕๛ • ࠷ۙGithubActions͔... 4. σϑΥϧτͰsshσόοάػೳ͋Γ • ઃఆϑΝΠϧΛهࡌͯ͠ɺ ࢥ͏Α͏ʹಈ͔ͳ͍ͱ͖ʹศར • printσόοάΈ͍ͨͳ͜ͱ͕ෆཁ • GithubActionsͰઐ༻ActionsΛΈࠐΉ ඞཁ͕͋Δ
Copyright coconala Inc. All Rights Reserved. 21 CircleCIͷಛ 5. Insightػೳ
• ϦϙδτϦ͝ͱͷޭɺύΠϓϥΠϯͷ࣮ߦ࣌ؒͷ֓ཁΛ֬ೝͰ͖Δ ◦ Ͳ͕͍͜ͷ͔ɺվળ༨͕͋Δͷ͔͕ҰͰΘ͔Γ͍͢
Copyright coconala Inc. All Rights Reserved. 22 CircleCIͷ֓೦ ύΠϓϥΠϯʢ㲈ϫʔΫϑϩʔʣʢԼਤͦͷͷʣ |–
δϣϒʢԼਤͷϒϩοΫʣ |– εςοϓʢӈਤͷϒϩοΫʣ |– ίϚϯυ
Copyright coconala Inc. All Rights Reserved. 23 CircleCIͷઃఆ yamlϑΝΠϧ1ͭͰ݁ʂ
Copyright coconala Inc. All Rights Reserved. 24 ίίφϥͰͷར׆༻ࣄྫ ͱςΫχοΫ
Copyright coconala Inc. All Rights Reserved. 25 πʔϧ༻ 90%ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ10% ओཁαʔϏεྨͷςετɾσϓϩΠ
ࣾ༻πʔϧɺPRૢ࡞ܥ
Copyright coconala Inc. All Rights Reserved. 26 CircleCIΛ༻͍ͯAWSσϓϩΠ͢Δ ίίφϥͰEC2ɺECSɺLambdaͷσϓϩΠʹCircleCIΛ׆༻ •
developϒϥϯνϚʔδʹΑΓεςʔδϯάɺ masterϒϥϯνϚʔδʹΑΓຊ൪ࣗಈతʹσϓϩΠ͞ΕΔ • CircleCI্ͰLint→test→build→deploy ͕جຊϑϩʔ
Copyright coconala Inc. All Rights Reserved. 27 ͪΐͬͱͨ͠ςΫχοΫ • AWSGCPσϓϩΠ͢ΔͨΊʹΞΧϯτΩʔ͕ඞཁɾɾɾʁ
◦ ͩͬͨͷલ·Ͱͷ ◦ ݱࡏͰOpenIDConnectͱ͍͏ΈͰೝূ͢Δ͜ͱͰΩʔϨε͕Մೳ ◦ ৄ͘͠ϒϩάΛࢀর͍͖͍ͨͩͨ
Copyright coconala Inc. All Rights Reserved. 28 ͪΐͬͱͨ͠ςΫχοΫ • OrbsΛͲΜͲΜར༻
◦ OrbsͱδϣϒίϚϯυΛύοέʔδԽͨ͠ͷ ▪ ຊདྷेߦʹΔίϚϯυͳͲΛγϯϓϧʹهࡌͰ͖Δ ◦ ࣗͨͪઐ༻ʹPrivate OrbΛ࡞͢Δ͜ͱՄೳ ɹɹ ɹ→aws-cliΛར༻͍ͨͨ͠ΊΠϯετʔϧ͍ͨ͠ɻ ɹ ௨ৗwgetʙtarʙmvͳͲهࡌ͢Δඞཁ͕͋Δ͕ ɹ ͜Ε͕ͨͬͨ1ߦʢaws-cli/installʣͰࡁΜͰ͍Δ
Copyright coconala Inc. All Rights Reserved. 29 ͪΐͬͱͨ͠ςΫχοΫ • ςετฒྻԽͯ͠ߴԽ
◦ CI࣮ߦ࣌ؒͷଟ͘ͷׂ߹ΛΊΔͷ͕ςετఔ ◦ CircleCIͰࢄ࣮ߦͷઃఆ͕Մೳ ◦ ৄ͘͠ϒϩάΛࢀর͍͖͍ͨͩͨ ↓ ྻ࣮ߦͰ30͔͔͍ͬͯͨͷ͕τʔλϧ6ఔʹ
Copyright coconala Inc. All Rights Reserved. 30 CircleCIͰ CI/CDύΠϓϥΠϯΛ͑ շదͳ։ൃऀϥΠϑΛʂ
We are hiring!! ࠾༻ϗʔϜϖʔδ https://coconala.co.jp/recruit ΤϯδχΞ࠾༻ϗʔϜϖʔδ https://coconala.co.jp/recruit/engineer ίίφϥͷਓͱ৫Λ͑Δϒϩά ίίφϥLIVE https://blog.coconala.co.jp/m/m4e4abe8b17e5
ਓੜͷՄೳੑΛ͛ͨϢʔβʔετʔϦʔ Θͨ͠ͷεΩϧղ์ه https://blog.coconala.co.jp/m/me8a586112ad2 ίίφϥʹॴଐ͢ΔΤϯδχΞʹΑΔϒϩά ςοΫϒϩά https://zenn.dev/coconala 31