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
MDH-LT-Thursday-20170126
Search
Shuhei Kimura
January 26, 2017
Technology
0
1.6k
MDH-LT-Thursday-20170126
Shuhei Kimura
January 26, 2017
Tweet
Share
More Decks by Shuhei Kimura
See All by Shuhei Kimura
Akka streamsを活用したログ集計に優しいデータフローの構築
kimurashuhei
2
5.2k
pmconf2017
kimurashuhei
0
3.5k
AWS Summit Tokyo 2015
kimurashuhei
0
90
Other Decks in Technology
See All in Technology
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
440
非機能品質を作り込むための実践アーキテクチャ
knih
3
1.1k
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
110
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
400
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
170
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
240
ハイテク休憩
sat
PRO
2
140
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
190
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
260
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Mobile First: as difficult as doing things right
swwweet
222
9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Designing for humans not robots
tammielis
250
25k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
It's Worth the Effort
3n
183
28k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Building Applications with DynamoDB
mza
91
6.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Transcript
ECS্Ͱಈ͘DockerΞϓϦέʔγϣϯΛTerraformΛ ͬͯσϓϩΠ͢ΔΑ͏ʹͯ͠Έͨ Dynalyst System Engineer Shuhei Kimura
DynalystͰγεςϜͯ͢AWSͰߏங͞Ε͍ͯ·͢ ֓ཁ - ϦλʔήςΟϯάࠂ৴αʔϏεϓϥοτϑΥʔϜͰ͢ɻ - ੈքதͷސ٬ʹαʔϏεΛఏڙ͠·͢ɻ نײ - RTBͰɺϐʔΫ࣌13ສQPS@Asia/Tokyo Region,
10ສQPS@US/East Region - ೖࡳαʔό྆RegionͰ120 - ܭଌͳͲॾʑؚΊͯEC2 200ۙ͘Instance͕Քಇத - ֤छϩά͓Αͦ1.5TB/dayΛS3ʹอଘ
Ͳ͏ͬͯΞϓϦέʔγϣϯͷϦϦʔεͯ͠·͔͢ʁ ࣮ߦڥ x σϓϩΠํ๏ = Ұൠతʹͱͯଟ༷Ͱ͋Δ - Fabric/CapistranoͳͲΛͬͯEC2ʹΞϓϦΛϦϦʔε - Apex/aws-cliͳͲΛͬͯLambdaFunctionΛϦϦʔε
- ElasticbeanstalkΛར༻ͯ͠ELB+EC2ߏͷΞϓϦΛRollingUpdateϦϦʔε - Chef/Ansible/PuppetͳͲͰपลڥؚΊͯprovisionͯ͠ϦϦʔε DynalystͰɺ͍Ζ͍Ζͳٕज़తઓͷ݁Ռ .. ͍Ζ͍Ζͳ࣮ߦڥͰ৭ʑͳΞϓϦ͕ಈ͍͍ͯΔঢ়ଶΛ ίπίπFabricͷtaskΛՃͨ͠Γϝϯςͨ͠Γ͠ͳ͕Βɺ ͳΜͱ͔Γ͘Γ͍ͯ͠Δঢ়ଶɻ
σϓϩΠͷ؍͔ΒEC2 Container Service ʹະདྷΛײͨ͡ ECS Cluster - αʔόϦιʔεແବͳ͘༗ޮʹ͍ͭͭ ECS Task
Definition - ʓʓͳΞϓϦΛ ECS Service - XXͳ෩ʹಈ͔͍ͨ͠ ͍ΖΜͳΞϓϦέʔγϣϯΛಈ͔͢େલఏ͕ͱͯ౷Ұ͞Εͨঢ়ଶʹͳΔ BatchAPIWorkerConsumer͍͍ͩͨECS্Ͱಈ͔ͤΔ DockerContainerԽ͢Δ͜ͱ͕σϓϩΠͷγϯϓϧԽʹܨ͕Δͱ͍͏ߟ͑
ECS Docker ApplicationΛTerraformΛͬͯϦϦʔε͠Α͏ ͳΜͰTerraformʁ - ίʔυͰ͔͚Δ - ECSͱͷIntegration͕ͪΌΜͱ։ൃ͞Εͯͨ - ੜͷAPIୟ͘ͷ͖ͬͱͲ͔͜Ͱ࠳ં͢Δ,
retryͱ͔πϥͦ͏ - terraformͷΊΜͲ͍͘͞ͱ͜ΖΛ͋Μ·Γؾʹ͠ͳͯ͘Α͍ 㱺 stateյΕͯͳΜͱͳ͍ɻ࠶ߏஙͯ͠deploy͍͍ͤ͠ɻ - MultiRegionΛߟ͑Δͱɺಉ࣌ʹσϓϩΠͱ͔͕ͨΓલʹͳͬͯͣ͘ 㱺 ݁ہͷͱ͜ΖதAWS APIͳͷͰ౿Έαʔό͍ΒͣͰσϓϩΠͰ͖Δʂ 㱺 CircleCI͔Βterraform࣮ߦ͢Δͱ͔͢ΕɺσϓϩΠڥߏங͍Βͳ͍
ͬͯΈͨΒ͜͏ͳͬͨᶃ ͱΓ͋͑ͣɺTerraform࣮ߦڥతʹCircleCIͤʹͯ͠ΈΔ
ͬͯΈͨΒ͜͏ͳͬͨᶄ TaskDefinition Service ErrorLogCount LogGroup
ͬͯΈͨΒ͜͏ͳͬͨᶅ ΞϓϦέʔγϣϯ͕ಈ͚ͩ͘Ͱͳ͘ɺͦͷपลؚΊͯ ༻ҙͰ͖ΔඇৗʹΘ͔Γͯ͘͢Α͘ͳͬͨɻ
ෳRegionʹෳͷAppΛϦϦʔε͢ΔͷɺRollback؆୯ ͖ͳΑ͏ʹpr͢Δɻ વreviewϑϩʔ࡞͍͍ͬͯɻ
·ͱΊ ECS x Terraform ͷΈ߹ΘͤࢥͬͯͨΑΓྑ͛͞ ࠓޙ͍Ζ͍Ζͳٕज़͕ग़ͯ͘ΔͷͰɺࢼߦࡨޡ͍ͯ͘͠ ʮSSHͨ͠Βෛ͚ʯΛݱ࣮ͷͷʹ͢Δ͘ϒϥογϡΞοϓ