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
Aurora Cloneで QA環境をつくってみた
Search
toridori
January 09, 2025
310
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Aurora Cloneで QA環境をつくってみた
toridori
January 09, 2025
More Decks by toridori
See All by toridori
Locustでmacから開発環境に負荷試験をしてみた
toridori_dev
0
270
N + 1 問題の概要と Railsにおける解決方法
toridori_dev
0
220
ニューモーフィズムってどうなの
toridori_dev
0
550
toridori base webをv0で爆速で作った話
toridori_dev
0
250
ハイパーパラメータチューニングって何をしているの
toridori_dev
0
490
KoT APIでプチ業務改善を試してみた
toridori_dev
0
610
MUI DataGridProコンポーネントの紹介
toridori_dev
0
1.1k
あの日行ったマージの仕組みを僕達はまだ知らない。
toridori_dev
0
400
DBマイグレーションとORMについて
toridori_dev
0
300
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Facilitating Awesome Meetings
lara
57
7k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
The SEO Collaboration Effect
kristinabergwall1
1
490
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
440
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Transcript
Aurora Cloneで QA環境をつくってみた CTO室 寺田 20241220
自己紹介 入社エントリみてください! https://note.com/toridori_inc/n /n045d275596e4
本番リリースまでの流れ toridoriのインフラ環境 ローカル Code,Build Test 開発 機能テスト ステージング or QA
動作テスト 本番 リリース AWS
ステージングはAWS本番環境にある toridoriのインフラ環境 ローカル 開発 ステージング or QA 本番 AWS AWS開発
AWS本番
ステージングはAWS本番環境にある toridoriのインフラ環境 ステージング or QA 本番 AWS AWS本番 • 限りなく本番に近い環境
◦ デプロイテスト ◦ 動作検証 ◦ システム検証 • 開発環境は事業部側も利用する • STGは開発者の利用がメイン
• 1つのデータベースをPRODとSTGで利用 ◦ STGで検証したいけど、本番にまで影響がある ◦ Aurora RDSは高いのでなるべく増やしたくない… • 開発環境でなんとかしたらいいじゃん ◦
データ量が違う ◦ ネットワークや環境変数(NODE_ENVとか)が違う toridoriのインフラ環境 課題
簡単に作れて、簡単に消せるデータベースのQA環境をつくろう! AWSで公開しているサンプルから https://github.com/aws-samples/aws-stepfunctions-aurora-clone • EventBridge • StepFunction • Lambda •
Aurora Clone QA環境 を簡単に作れる方法を試してみた!
簡単にいうと、 ある地点からクローンを作成するけど、変更があるまでは同じファイルを参照する仕組み Auroraクローンって? Amazon Aurora DB クラスターのボリュームのクローン作成 https://docs.aws.amazon.com/ja_jpAmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Clone.html
AWS account (toridori-sandbox) CDK Step Functions workflow AWS構成図 EC2 Aurora
Step Functions Lambda (Check) EventBridge Lambda (Clone) Lambda (Delete) SSM Portforwarding
StepFunction 処理内容 aurora_check_status.py aurora_clear_target.py aurora_clone.py
パラメータ VPC ID SecurityGroup ID
Clone DBに書き込んでも 元のDBへ変更がないことを確認 実際にAurora Cloneの安全性を試してみる。
・toridoriではAuroraを採用している ・AWS RDS機能で安全に・簡単に複製可能! ・本番影響がないので多少雑にあつかっても怖くない その他 sandbox環境がめっちゃ便利。 いいところ
• 現状のCDKだと1つのクローンしかできない → StepFunctionの量産で複数環境可能 Lambdaは使いまわし • Cluster Endpointがクローンするたびに変わる → SSMParameterでEndpoint名を格納で解決?
• クローンにちょっと時間がかかる。(15-20min) → 抗えない。 懸念事項を質問タイムで聞きたい わるいところ
ご清聴ありがとうございました