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
BeatroboにおけるAWS
Search
Keiji Matsuzaki
February 18, 2013
Programming
2
540
BeatroboにおけるAWS
Beatrobo, Inc.におけるAWSの利用事例を紹介します。
Keiji Matsuzaki
February 18, 2013
Tweet
Share
More Decks by Keiji Matsuzaki
See All by Keiji Matsuzaki
note engineer meetup #3 インフラの現状 / note engineer meetup #3 infra
futoase
4
1.1k
ハマったところ 表参道.rb #44 / into a problem
futoase
0
1k
note meetup #2 Electronを利用した10面ディスプレイの操作 / Controll of gaienmae display
futoase
0
700
mastodon
futoase
0
110
susumekata
futoase
1
710
freee-wacul-web-app-lt-one
futoase
0
1.8k
Engineer All Hands #5 (freee) 「インフラ」
futoase
0
470
soracom-go
futoase
0
340
AWS Summit Tokyo 2015 freee
futoase
19
20k
Other Decks in Programming
See All in Programming
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
HTML/CSS超絶浅い説明
yuki0329
0
190
선언형 UI에서의 상태관리
l2hyunwoo
0
270
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
550
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
Beyond ORM
77web
11
1.6k
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
28
4.2k
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
940
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
390
Featured
See All Featured
Scaling GitHub
holman
459
140k
Making the Leap to Tech Lead
cromwellryan
133
9k
Building Your Own Lightsaber
phodgson
104
6.2k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Producing Creativity
orderedlist
PRO
343
39k
RailsConf 2023
tenderlove
29
970
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
A designer walks into a library…
pauljervisheath
205
24k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
It's Worth the Effort
3n
183
28k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Transcript
Beatroboʹ͓͚ΔAWS Beatrobo, Inc. Engineer: Keiji Matsuzaki 132݄18݄༵ ͡Ί·ͯ͠ɻ Beatroboʹ͓͚ΔAWSͱ͍͏Ͱ Beatrobo
Inc. ΤϯδχΞ দ࡚ ͕ൃද͠·͢ɻ ΑΖ͓͘͠ئ͍͠·͢ɻ
͓લ୭Αʁ দ࡚ ܒ࣏ Beatrobo, Inc. Engineer ୲ൣғόοΫΤϯυͱΠϯϑϥ Twitter: @xga 20126݄͔Β
132݄18݄༵ ͱ͍͏͔͓લͩΕΑͬͯ͜ͱͰɻ দ࡚ͱ͍͍·͢ɻ Beatrobo Inc.ͰΤϯδχΞͬͯ·͢ɻ BeatroboͰ୲͍ͯ͠ΔͷόοΫΤϯυͱΠϯϑϥʹͳΓ·͢ɻ ͱ͍ͬͯઐ͕શʹݻఆ͞ΕͯΔΘ͚Ͱͳ͘ɺ ී௨ʹϑϩϯτͷίʔυʹจ͚۟ͭͨΓ͠·͕͢... TwitterͰ@xgaͱ͍͏ΞΧϯτͰ৭ʑͱॻ͍ͯͨΓ͠·͢ɻ ࠷ۙDCIͳΜͩΖ͏͔ɺͱ͍͏͜ͱͰߟ͑Λ८ΒͤͨΓ͍ͯ͠·͢ɻ
What’s Beatrobo? 132݄18݄༵ Beatroboͷ΄͏͔ΒདྷͨͷͰ͕͢ɺ͝དྷͷํͷதͰ BeatroboΛͬͯΔํͬͯ͜ͷதʹ͍Βͬ͠Ό͍·͔͢ʁ
What’s Beatrobo? ԻָϓϨΠϦετڞ༗αʔϏε 132݄18݄༵ BeatroboԻָϓϨΠϦετͷڞ༗αʔϏεͰ͢ɻ ࠓͷͱ͜ΖYoutubeͱSoundcloud͔ΒԻָϦιʔεΛʮआΓͯʯདྷ͍ͯ·͢ɻ आΓͯΔԻָϦιʔεͷใɺYoutubeͳΒϏσΦIDͱͳΓ·͢ɻ ͦͷϏσΦIDΛʮϩϘοτʯ୯ҐͰཧ͠ɺʮϩϘοτΛϓϨΠϦετͱͯ͠ѻ͏ʯΑ͏ʹ͍ͯ͠· ͢ɻ
What’s Beatrobo? Demo https://www.beatrobo.com/ 132݄18݄༵ Beatroboʹ͍ͭͯܰ͘σϞΛ͠·͢ɻ 3-4ఔ
132݄18݄༵ Beatroboʹ͍ͭͯܰ͘σϞΛ͠·͢ɻ ಈըΛޚཡ͍ͩ͘͞ɻ
What’s Beatrobo? ։ൃϝϯόʔ(Web) @HideyukiTakei @OujiMiyahara @xga @asaeda CEO Web front
Desiginer Back end/Infrastructure @tak0303 Part-timer 132݄18݄༵ Beatrobo Web൛ͷ։ൃମ੍Ҏ্ͷܗʹͳ͍ͬͯ·͢ɻ ϩϘοτͷσβΠϯʹ͍ͭͯ֎෦ͷํ͕ೖ͍ͬͯ·͢ɻ
What’s Beatrobo? Web API Redis node Mail Pub AWS Sub
132݄18݄༵ Beatrobo ͷΞʔΩςΫνϟΛ؆୯ʹ͝આ໌͠·͢ɻ ·ͣɺWebͱAPIͰΘ͔Ε͓ͯΓɺViewશʹfrontଆʹ͍ͤͯ·͢ɻ API...͏ͪPadrinoΛར༻͍ͯ͠ΔͷͰ͕͢ɺPadrinoଆ jsonΛు͖ग़͚ͩ͢ɺͱ͍͏ܗʹ͍ͯ͠·͢ɻ ͦΕ͕៉ྷͩͱࢥͬͨͷͰɻ APIଆͰRDSͳͲͷAWSͱͷαʔϏεͷૄ௨Λߦͳ͍ͬͯ·͢ɻ ଞʹredis+node.jsͰϝʔϧ৴Λߦ͏γεςϜΛཱ͍ͯͯ·͢ɻ Πϯελϯεʹ͍͕ͭͯͯ͢EC2্Ͱߦͳ͍ͬͯ·͢ɻ (ϝʔϧͷ৴ʹ͍ͭͯଞࣾͷαʔϏεΛར༻͓ͯ͠ΓɺϒϩοΫ͠ͳ͍ ߏΛऔΔͨΊʹ͜ͷܗΛऔΓ·ͨ͠ɻ) औΓཱͯͯΞʔΩςΫνϟͱͯ͠ಛผͳ͜ͱΛ͍ͯ͠ΔΘ͚Ͱͳ͘ɺ ΦʔιυοΫεͳߏΛͱ͍ͬͯ·͢ɻ
What’s Beatrobo? Vyatta Dev Stage Internal- DNS Internet batch/ manage
132݄18݄༵ ։ൃڥʹ͍ͭͯVPCͰӡ༻͢ΔΑ͏ʹվળ͠·ͨ͠ɻ (ඞཁ࠷ݶͳηάϝϯτ͔͠ར༻͍ͯ͠·ͤΜɻ) զʑVyattaΛར༻͠ɺVPNଓΛར༻͢Δ͜ͱͰɺ ։ൃڥʹΞΫηε͢ΔܗΛऔ͍ͬͯ·͢ɻ ෦DNSʹΑͬͯɺVPNଓ࣌ͷ ։ൃڥͷϗετ໊ղܾΛͳΜͱ͔͢Δͱ͔ɺ;ͭ͏ͷίτΛ͍ͬͯ·͢ɻ
ӡ༻ localڥ(VM)Ͱ։ൃ devʹө͠νΣοΫ devͰOKͳΒstageʹө ϦϦʔε 132݄18݄༵ ฐࣾͷ։ൃӡ༻खॱͰ͕͢ɺ local -> dev(feature
branch) -> stage(release branch) -> ຊ൪(tag)ʹϦϦʔεɻ ͱ͍͏ҰൠతͳखॱΛ౿ΜͰ͍·͢ɻ git-flowΛར༻ͯ͠local, develop, stage, ຊ൪͚ͷ ϒϥϯνΛͬͯӡ༻͢ΔܗࣜΛͱ͍ͬͯ·͢ɻ
AWSܦݧ ͍͍ͩͨ6ϲ݄͙Β͍ 132݄18݄༵ લ৬ΛؚΊɺಛஈΠϯϑϥʹ͍ͭͯࣄ্͍ͬͯΔΘ͚Ͱ͋Γ·ͤΜͰͨ͠ɻ ͋͘·ͰࣗͷझຯൣғͰͬͯΈΔΈ͍ͨͳΜΘΓͱͨ͠ܗͰ৮͍ͬͯͨఔͰ͢ɻ Beatroboʹೖ͔ࣾͯ͠ΒɺΠϯϑϥઐͱ͍͏Θ͚Ͱͳ͘ΞϓϦͷίʔυΛී௨ʹॻ͍͍ͯ· ͢ɻ AWSͷܦݧ͍͍ͩͨ6ϲ݄͙Β͍Ͱ͢ɻ
ݱঢ় EC2 (No VPC) ElastiCache RDS instance Development (Inside VPC)
Production Dev Stage DynamoDB S3 Batch/Manage 132݄18݄༵ Beatrobo͕αʔϏεΛϦϦʔεͨ͠ͷ2011ͷ12݄Ͱ͢ɻ αʔϏε։࢝ॳ͔ΒAWSΛར༻͍ͯ͠·͢ɻ ࠷ॳ͕ͯ͢No VPCͰߏங͞Ε͍ͯͨͷͰ͕͢ɺ VPCͰDevelopmentڥΛߏங͢ΔΑ͏ʹ͠·ͨ͠ɻ Լͷஈʹ͋ΔTakei-Devͱ͍͏ͷCTOઐ༻ͷ։ൃαʔόʔͰ͢ɻ CTO͕ϦϦʔεखॱΛकΒͣΑ͘DevڥΛյ͢ͷͰ͑͜͞·ͨ͠ɻ
͍ͬͯΔͷ 132݄18݄༵ ฐࣾɺBeatrobo Inc.͕AWSͰར༻͍ͯ͠ΔαʔϏεʹ͍ͭͯ͝આ໌͠·͢ɻ
EC2 132݄18݄༵ ·ͣɺ͓ͳ͡ΈEC2Ͱ͢ɻ ͨΓલ͗ͯ͋͢ΕͰ͕͢...
EC2 (ProductionͷΈNo VPC) ಈ͍͍ͯΔWeb, APIαʔόͯ͢ 132݄18݄༵ ProductionڥͷΈNo VPCͳঢ়ଶͰར༻͍ͯ͠·͢ɻ ཧ༝ͳΜͰ͕͢ɺࡢʹElastiCache͕VPCͷҠߦରԠ͕ߦΘΕͨͷͰ͕͢ɺ (12/20͔ͳ)
ࠓͷͱ͜Ζͷຊ൪ͷڥҠߦ͕ؒʹ߹͍ͬͯͳ͍ҝɺͰ͢ɻ ࠷ۙEBSͷsnapshotΛผͷϦʔδϣϯʹରͯ͠ίϐʔͰ͖ΔΑ͏ʹͳͬͯɺ ϦʔδϣϯผͰͷల։͕͘͢͠ͳ͍ͬͯͯྑ͍ײͩ͡ͳͱࢥͬͯ·͢ɻ
Route 53 132݄18݄༵ Route 53
Route 53 ө͍... 132݄18݄༵ ө͕͍ɻ
VPC 132݄18݄༵ ࣍Amazon VPCͰ͢ɻ ։ൃڥͷEC2Πϯελϯεͯ͢VPCʹೖΕΔΑ͏ʹվળ͠·ͨ͠ɻ
VPC Developڥ 132݄18݄༵ VPCʹ͍ͭͯηάϝϯτΛαϒωοτ͝ͱʹΓ͚Δ͜ͱ͕Ͱ͖ɺ ࣗͷ߹ͰωοτϫʔΫʹׂΓͯΔϓϥΠϕʔτͳIPΞυϨεͷࢦఆ͕Ͱ͖ͨΓ͢ΔͷͰ ͍ͯ͘͢ͱͯྑ͍ͱࢥ͍ͬͯ·͢ɻ Security Groupʹׂ͍ͭͯΓ͍ͯͯΔΠϯελϯεʹରͯ͠มߋ͕ߦ͑Δͷྑ͍ͱࢥ͍ͬͯ ·͢ɻ ·ͨɺࢲͷډΔձࣾখ͍͞ϚϯγϣϯͷҰࣨʹ͋ΔΜͰ͕͢ɺ
ؾܰʹVPNଓڥΛߏஙͯ͠֎͔Β։ൃڥͷΞΫηε͕Ͱ͖Δɺͱ͍͏ ঢ়ଶʹͰ͖·ͨ͠ɻ(VyattaΛͬͯߏஙͯ͠·͢) (։ൃڥʹ͍ͭͯެ։Ͱ͖ͳ͍ઌߦೖͷػೳ͕͋Δ͠ɺ No VPCͳEC2Ͱӡ༻͕͔ͳΓݫ͍͠ͱ͓͍·͢ɻ (/etc/hostsͰ໊લղܾΛͯ͠͠·͏Έ͍ͨͳڧҾͳײ͡ͷӡ༻Λ͍ͯ͠Δͱ͜Ζ͕ଟ͍Μ͡Όͳ͍͔ ͱࢥ͍·͢)
VPC VyattaΛར༻ 132݄18݄༵ VPCͷߏஙʹ͍ͭͯVyattaΛར༻͍ͯ͠·͢ɻ ઌ΄Ͳ͓ݟͤͨ͠ܗͰ෦ωοτϫʔΫΛߏங͍ͯ͠·͢ɻ ͦͷࡍɺcon_mame͞Μͱ͍͏AWSʹৄ͍͠ํͷΤϯτϦ͕ࢀߟʹͳΓ·ͨ͠ɻ Vyattaͷ͍ํͦ͏ͩ͠ɺVPCͦͷͷ͕Θ͔Βͳ͔ͬͨͷͰɻ
VPC http://d.conma.me/entries/2012/05/20 132݄18݄༵ ͪ͜Β͕ࢀߟʹͨ͠ΤϯτϦͰ͢ɻ
RDS 132݄18݄༵ ࣍ɺRDSͰ͢ɻ
RDS Database͜ΕͰ͖·Γ 132݄18݄༵ RDSʹ͍ͭͯɺ ؾܰʹSlaveɺReadreplicaΛ࡞ΕΔڥʹ͋Γɺ·ͨ Readreplica͔ΒMasterͷঢ֨ؾܰʹͰ͖Δ͠ɺͱͯྑ͍ͱ͓͍·͢ɻ Slaveͷ૿Ճͷࡍʹ͔ͳΓָΛ͍͖ͤͯͨͩ͞·ͨ͠ɻ MySQL 5.6ૣ͍͍ͨ͘ͳͱ͔ɺPostgreSQLରԠͯ͠΄͍͠ͳͱ͔ݸਓతʹࢥͬͯ·͢ɻɹ
ElastiCache 132݄18݄༵ ࣍ɺElastiCacheͰ͢ɻ
ElastiCache Memcache 132݄18݄༵ ͜ΕMemcacheޓͷΩϟογϡαʔόʔαʔϏεɺͰ͢ɻ ΞϓϦέʔγϣϯ͔ΒMemcacheϓϩτίϧΛ͠ΌΔαʔόʔͱͯ͠ݟ͑ΔͷͰ ͳ͘ར༻Ͱ͖·͢ɻ ؾܰʹAWS Management ConsoleͳͲ͔Β ΩϟογϡϊʔυΛՃ͢Δ͜ͱ͕Ͱ͖ΔͷͰɺ
ૉͷmemcacheαʔόʔΛݸਓͰӡ༻͢ΔΑΓ ElastiCacheΛར༻͢Δܗ͕ྑ͍ͱࢥ͍ͬͯ·͢ɻ
ElastiCache ΩϟογϡϊʔυՃָ͕ 132݄18݄༵ (ΩϟογϡϊʔυΛՃͨ͠߹ɺݸผͷΞΫηεʹ͍ͭͯ ͦΕͧΕͷEndPointͷଓʹ͍ͭͯࣗݾͰอূ͠ͳ͍ͱ͍͚ͳ͍ΜͰ͕͢ɺ ΩϟογϡϊʔυͷͲΕ͔ʹଓΛ͢Δ͜ͱΛอূ͢Δ) Configuration Endpoint͕͋ΔͨΊɺϗετ໊ͷཧΛΩϟογϡϊʔυͷ૿ݮʹ߹Θͤͯ ՃɾআΛߦ͏ඞཁ͋Γ·ͤΜɻ(ݸผͰ͍͔ͭՃ͠ͳ͚ΕͳΓ·ͤΜ͕) μϯλΠϜͷݮΛ͠ͳ͚ΕͳΒͳ͍ঢ়ଶʹͱͬͯେม͋Γ͕͍ͨػೳͰ͢ɻ
ElastiCache ηογϣϯཧ 132݄18݄༵ ར༻ํ๏ͱͯ͠ɺ͋Γ͖ͨΓͳ͕Βηογϣϯཧͱ
ElastiCache ORMΩϟογϡ 132݄18݄༵ ORM(Sequel)ͷΩϟογϡͰ͢ɻ
ElastiCache Sequel Cacheable 132݄18݄༵ Sequel Cachableͱ͍͏ͷΛར༻͍ͯ͠·͢ɻ
ElastiCache https://github.com/rosylilly/sequel-cacheable Redis, MemcacheରԠ 132݄18݄༵ rosylilly͞Μͱ͍͏OSS࡞Ոͷํ͕ϦϦʔε͍ͯͯ͠ɺ RedisͱMemcacheʹରԠ͍ͯ͠·͢ɻ
ElastiCache ͜Ε͚ͩɻ 132݄18݄༵ Sequelͷpluginͱͯ͠ར༻Λ͢ΔͷͰɺ Modelͷهड़ҰߦͰࡁΈ·͢ɻ
DynamoDB 132݄18݄༵ DynamoDBɻ
DynamoDB εΩʔϚϨεͳӬଓԽDB 132݄18݄༵ εΩʔϚϨεͳӬଓԽDBɺͰ͢ɻ ܗࣜͱͯ͠key, valueͰετΞ͢ΔܗͰ͢ɻ APIܦ༝ͰΞΫηεΛߦ͍·͢ɻ
DynamoDB ঢ়گʹԠͯ͡εϧʔϓοτͷௐ 132݄18݄༵ εϧʔϓοτͱ͍͏֓೦͕DynamoDBʹ͋Γɺ APIͷϦΫΤετʹԠͯ͡εϧʔϓοτͷ্ԼΛՄมʹѻ͏͜ͱ͕Ͱ͖·͢ɻ ϦΫΤετ͕ଟ͘ͳΓɺϨεϙϯε͕ฦͤͳ͘ͳΕεϧʔϓοτΛେ͖͍ͯ͘͘͠ɺͱ͍͏ײ͡ Ͱ͢ɻ
DynamoDB δϟϯϧผͷϩϘοτͷऩूઌͱͯ͠ར༻ 132݄18݄༵ ࠓͷͱ͜ΖɺBeatroboͰ Ϣʔβʔ͕͚ͭͨϩϘοτͷλάΛݩʹ δϟϯϧผͷ෦ʹͩͨ͢ΊͷϩϘοτΛ֨ೲ͢ΔతͰར༻͍ͯ͠·͢ɻ
S3 132݄18݄༵ S3Ͱ͢ɻ
S3 ͳΜͰೖΔόέοτ 132݄18݄༵ ͳΜͰೖΔόέοτɺศརͳόέοτͱ͍͏ೝࣝͰར༻͍ͯ͠·͢ɻ
S3 DatabaseͷόοΫΞοϓ 132݄18݄༵ DatabaseͷόοΫΞοϓͱ͔ɺ
S3 DatabaseͷόοΫΞοϓ ը૾Ϧιʔε 132݄18݄༵ ը૾Ϧιʔεஔ͖ͱ͔ɻ
S3 DatabaseͷόοΫΞοϓ VirtualMachine Imageͷ ը૾Ϧιʔε 132݄18݄༵ VirtualMachine ImageΛ։ൃऀʹ͢ΔͨΊʹͳͲɺ ৭ʑͳ༻్ʹར༻͍ͯ͠·͢ɻ
S3 LifeCycleͷࢦఆͰGlacier 132݄18݄༵ LifeCycleͱ͍͏ɺS3͔ΒGlacierʹϑΝΠϧΛҠಈ͢Δ ظΛઃఆ͢Δ߲͕͋ΓɺLifeCycleΛར༻͢Δ͜ͱͰ ؾܰʹGlacierʹϑΝΠϧΛૹΔ͜ͱ͕Ͱ͖·͢ɻ ...Glacier୯ମͰར༻͢ΔͱࣗͰཁٻͨ͠JobͷཧΛ͠ͳ͚ΕͳΒͳ͔ͬͨΓɺ ΞʔΧΠϒIDΛ͍֮͑ͯͳ͍ͱΞʔΧΠϒIDΛऔಘ͢ΔͨΊͷJobΛൃߦ͠ͳ͍ͱ ͍͚ͳ͔ͬͨΓɺࡶʹ͋ΔͨΊɺͱͯॿ͔Γ·͢ɻ
S3 LifeCycleͷࢦఆͰGlacier VersioningʹΑΔཤྺཧ 132݄18݄༵ όʔδϣχϯάΦϓγϣϯͱ͍͏ͷ͋ΔͨΊɺ ը૾ϦιʔεΛόʔδϣχϯάཧ͠ɺ্ॻ͖ͨ͠ૉࡐʹ͍ͭͯ ݩϑΝΠϧΛόʔδϣϯIDʹΑͬͯऔಘͰ͖ΔΑ͏ʹ͍ͯ͠·͢ɻ
S3 LifeCycleͷࢦఆͰGlacier VersioningʹΑΔཤྺཧ ศརʂ 132݄18݄༵ S3ͱͯศརͰ͢ɻ
IAM 132݄18݄༵ IAMͰ͢ɻ
IAM APIΛར༻͢ΔͨΊͷϢʔβʔཧ 132݄18݄༵ ઌ΄Ͳ͓ͨ͠ɺS3ɺDynamoDBʹ͍ͭͯ AWSͷAPIܦ༝Ͱͷૢ࡞ͱͳΓ·͢ɻ Ϣʔβʔʹ͍ͭͯAWSͰͷΞΧϯτΛ࡞ͨ࣌͠ʹ ϢʔβʔΞΧϯτ͕ɺΩʔͱγʔΫϨοτΩʔϖΞͰ ࡞͞Ε·͢ɺ͕͜ΕΛར༻͢ΔͱͳΜͰͰ͖ͪΌ͏ͷͰɺ ੍ݶΛ͔͚ͨϢʔβʔΛ࡞͠ͳ͍ͱ͍͚·ͤΜɻ ͦ͜ͰIAMΛར༻͠·͢ɻ
IAMʹΑͬͯreadͷΈڐՄͨ͠Ϣʔβʔɺ read/writeΛڐՄ͢ΔϢʔβʔɺ·ͨ S3ͷಛఆͷόέοτͷΈΞΫηεΛՄೳʹ͢ΔͳͲɺ ARNͱ͍͏ܗࣜͰϦιʔεࢦఆΛ͢ΕΞΫηεࢦఆ͕ՄೳͳͷͰɺ APIܦ༝Ͱར༻͢ΔαʔϏεʹରͯ͠ඞͣ࡞͢ΔΧλν͕ྑ͍ͱࢥ͍·͢ɻ
ࣗʹͱͬͯͷAWS 132݄18݄༵ ·ͱΊʹೖͬͪΌ͍·͕͢ɺࣗʹͱͬͯͷAWSͱ͍͏͜ͱͰɺ
ࣗʹͱͬͯͷAWS ·ͣAWSɺ͕ਖ਼ղ 132݄18݄༵ ࠓɺελʔτΞοϓʹͱͬͯ ʮ·ͣAWSɺ͕ਖ਼ղʯͱ͍͏ҹͰ͢ɻ
ࣗʹͱͬͯͷAWS ·ͣAWSɺ͕ਖ਼ղ AWSҎ֎Λબ͢Δཧ༝͕ͳ͍ 132݄18݄༵ ࢲΞϓϦέʔγϣϯΤϯδχΞ(ݱࡏόοΫΤϯυدΓͰ͕͢)ͱͯ͠ɺ ίʔυΛৗʹॻ͍͍͍ͯͨΘ͚ͰɺΠϯϑϥʹؔͯ͠ ҆ఆͨ͠ӡ༻ɺεΠονͷނোΒϋʔυΣΞͷܦྼԽΒɺ ͨ·ͨݸผʹआΓͨVPSͳͲͷΠϯελϯεཧʹ͍ͭͯ ࣄࡉ͔ʹҰͭҰͭγεςϜΛ࡞Δ༨༟Λׂ͘͜ͱ͕͍͠ײ͡Ͱ͢ɻ
ࣗʹͱͬͯͷAWS ·ͣAWSɺ͕ਖ਼ղ AWSҎ֎Λબ͢Δཧ༝͕ͳ͍ ίʔυΛͨͩɺॻ͍͍͍ͯͨɻ 132݄18݄༵ ࢹͷΈΛࣗલͰߦ͏ͷͰ͋ΕɺCactiΛೖΕΔͳΓɺ ϩΪϯάΛ͢ΔͳΓɺͰ͍͚Δͱࢥ͏ͷͰ͕͢ɺ ελʔτΞοϓͰ͋Δ໘ɺ৽͍͜͠ͱΛৗʹ͠ͳ͍ͱ͍͚·ͤΜɻ ਓ͕গͳ͍Ҏ্ɺ࠷ॳ͔Β͋Δఔࢹମ੍͕αϙʔτ͞Ε͍ͯΔαʔϏεΛར༻͢Δ͜ͱͰ ຊདྷͷ։ൃʹઐ೦Ͱ͖Δܗʹ͠ͳ͍ͱຊసͳܗʹͳΓ·͢ɻ
CloudWatchʹΑΔΞϥʔτϝʔϧૹ৴ͳͲɻ ଞࣾΫϥυͱൺͯɺ࿈ܞͰ͖ΔαʔϏεͷྔٴͼ҆ఆੑؚΊͯ ͜ΕҎ্ͷͷແ͍ͳɺͱ͍͏ײ͡Ͱ͢ɻ ηΩϡϦςΟपΓͳΜͯಛʹͦ͏Ͱɺ͍ͭ͏͔ͬΓ ·͍ͣઃఆʹ͍ͯͨ͠ͷͰ͋ΕAWSͰ͋ΕࢦఆͷSecurityGroupͷ ϙʔτϓϩτίϧͷࢦఆΛมߋ͢ΕऴΘΓɺͰ͕ͦ͢͏͡Όͳ͍߹ ᄉᅀʹରԠ͢Δ͜ͱ͕͍͠ײ͡ʹͳΓ·͢…(ઐͰݟ͍ͯΕ͍͍ͱࢥ͍·͕͢)
͋ͬͯΑ͔ͬͨAWS 132݄18݄༵ Α͍͠ΐ͔͗͢͠͠Ε·ͤΜ͕ɺ AWS͕͋ͬͯΑ͔ͬͨͱࢥ͍·͢ɻ αʔόʔͷཧ͕ۤखͳΞϓϦέʔγϣϯΤϯδχΞʹͱͬͯ ॿ͚सతͳଘࡏͱ͓͍·͢ɻ
͜ͷઌ 132݄18݄༵ ͜ͷઌͷݸਓతͳඪͳΜͰ͕͢...
͜ͷઌ Web frontΛS3্ʹஔ͖͍ͨ 132݄18݄༵ WebfrontΛS3ʹஔ͖͍ͨͱࢥ͍ͬͯ·͢ɻ ࠓͷBeatroboͷΞʔΩςΫνϟ Web frontଆͰViewΛ͍࣋ͬͯͯɺAPIଆͰ JSONΛૹΓग़͢(Model)Λ୲͍ͯ͠Δܗʹͳ͍ͬͯΔͷͰɺ S3ʹWeb
frontΛஔ͚ͬͱ҆͘ͳΔΜ͡Όͳ͍͔ͳ͊ͱࢥͬͯΔͨΊͰ͢ɻ (͜͜࠷ۙS3্ʹ੩తίϯςϯπΛى͖͘͢ͳ͍ͬͯͨΓ͢Δ͠)
͜ͷઌ VPCԽΛਐΊ͍ͨ 132݄18݄༵ ϫϯΫϦοΫͰNo VPCͳEC2ΠϯελϯεΛVPCʹೖΕΔ͜ͱ͕ՄೳͳͷͰɺ ηάϝϯτͷཧΛߦͳͬͯVPCԽΛਐΊ͍ͨͱࢥ͍ͬͯ·͢ɻ (ElastiCacheٴͼRDS͕VPCͰར༻Ͱ͖Δڥ͕͍ͬͯΔͷͰ)
͜ͷઌ ҆͘ࡁ·ͤΔͨΊʹ͍ͨ͠... 132݄18݄༵
͓·͚ 132݄18݄༵ Ͱɺ͓·͚Ͱ͢ɻ
͓·͚ એͰ͕͢... 132݄18݄༵ શʹએʹͳΓ·͕͢...
͓·͚ ͪΐͬͱಈըΛݟ͍ͯͩ͘͞ɻ 132݄18݄༵ ಈըΛݟ͍ͯͩ͘͞ɻ
͓·͚ 132݄18݄༵ ...
͓·͚ Beatrobo for iOS 132݄18݄༵ ͍ɺBeatrobo for iOSͰ͢ɻ iOSΞϓϦͰ͢ɻ
͓·͚ βςελʔΛืू͠·͢ (ձͷօ͞Μ͔Β) 132݄18݄༵ ͜ͷձʹདྷ͍ͯΔํʹରͯ͠ɺϕʔλςελʔΛืू͠·͢ɻ
͓·͚ ςελʔͱͯ͠༡ͼ͍ͨʂ ͱ͍͏ਓͷͱ͜Ζ·Ͱ͖͍ͯͩ͘͞ɻ 132݄18݄༵ βςελʔͱ͍ͯͪ͠ૣ͘ΞϓϦΛ৮Γ͍ͨʂͱ͍͏ ํ͕͍Βͬ͠Ό͍·ͨ͠Βɺ΅͘ͷͱ͜Ζ·Ͱདྷ͍ͯͩ͘͞ɻ
͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ɻ 132݄18݄༵ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ Ҏ্ͰൃදऴΘΓͰ͢ɻɻɻ